Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. xefil
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by xefil

    • RE: MQTT Broker gateway

      Hello!

      I've downloaded the 1.4.1 version of the library and tested it via OpenHab.
      I'm still not getting the sketch_name correctly via MQTT and Openhab. Is it still an open bug?

      Thanks!

      Simon

      posted in Controllers
      xefil
      xefil
    • RE: [Solved]UPL:Fail

      I was quite sure the gateway (MQTTClient) was updated with latest API library, but I was wrong. It was on 1.5 version. Updated to the latest, the problem was solved. Hope it helps!

      Simon

      posted in Troubleshooting
      xefil
      xefil
    • RE: [SOLVED] Strange behavior on MQTT Gateway Reset

      Ok, thanks all. Maybe it's a flag I've set on HomeAssistant on some variables and to delete them, it's not sufficient, reading the doc, to restart the mosquitto service. I'll look how delete message AND retain flag.
      Thanks all!

      Simon

      posted in General Discussion
      xefil
      xefil
    • RE: Questions about power and repeater

      @sundberg84 @hek ,

      I've improoved the stability a lot with following modifications:

      • I've applied the isolation on the NRF24L01+PA+LNA, moved away from the router and connected the Arduino 2009 with external source (no more power via USB)
      • I've then changed the configuration of my chain sensors. Tracing the exact sequence of all nodes I've noticed that the last hop of all nodes with problems was a node that I'm using to monitor power usage. It reads from analog input via a "current clamp". This is taking a value every second and saves it in an array to make an average of 60 values. It gives not much time to this node to act well as repeater. Disabling the repeater feature the chain has broken and two nodes from the second room are now connected directly.

      So, with those modifications I've seen big improovments.
      I'll take a look in the next days (I'l start for holidays 😉 ) to check if it's stable as well.

      BTW, I'm still confusing on how, when and why use these settings:

      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      #define RF24_PA_LEVEL_GW RF24_PA_MAX
      

      So, only to improove my knowledges 😉

      Thanks a lot!

      Simon

      posted in Troubleshooting
      xefil
      xefil
    • RE: [SOLVED] Strange behavior on MQTT Gateway Reset

      @electrik said in Strange behavior on MQTT Gateway Reset:

      @mfalkvidd said in Strange behavior on MQTT Gateway Reset:

      MySensors does set the retain message on I_BATTERY_LEVEL messages (but no other messages)

      If the define MY_MQTT_CLIENT_PUBLISH_RETAIN is used, all messages are retained. But that is not active by default, so probably not used in this case. Just to be complete 😉

      Thanks!
      Well, I've succesfully deleted the retained messages via cli using mosquitto command:

      mosquitto_pub -t <my_retained_topic> -r -n

      Maybe it was set by the controller, then removed, but mqtt was retaining it.

      Simon

      posted in General Discussion
      xefil
      xefil
    • [Solved] Problem updating from 2.0 to 2.1

      Hello,

      I've some problems updating from 2.0 to 2.1.
      In my examples, I'm sending the node-id and the distance to my controller, to check which path is using my node.
      Here the part of the code:

      parentNode = _nc.parentNodeId;
      distance = _nc.distance;
      Serial.print(F("Node-id: "));
      Serial.println(MY_NODE_ID);
      Serial.print(F("Parent node id: "));
      Serial.println(parentNode);
      Serial.print(F("Distance Node00: "));
      Serial.println(distance);
      

      Now I'm getting this error:

      error: '_nc' was not declared in this scope
      

      How to get those values now?

      Thanks

      Simon

      posted in Troubleshooting
      xefil
      xefil
    • RE: Best way to send nodeDistance and parentNode

      @mfalkvidd said in Best way to send nodeDistance and parentNode:

      @xefil I've never seen anyone reuse a child ID, and I think it would confuse most controllers. Just look at the presentation call: first the sketch would present the child as type X, then the sketch would present the same child as type Y. Will the controller use the first, the second, both or none of the presentations?

      But you may be right - maybe controllers can handle multiple data types per child id.

      Well @mfalkvidd maybe it's me that I'm making confusion.
      AFAYK, in case of HomeAssistant, it has an auto-discovery system which works, even if I don't like the naming convention it uses. BTW, using the above example, subscribing to MQTT server, I can get the values like follow:

      api doc:
      MY_MQTT_PUBLISH_TOPIC_PREFIX/FROM-NODE-ID/SENSOR-ID/CMD-TYPE/ACK-FLAG/SUB-TYPE

      example message published on topic prefix mygateway1-out from node 28, on V_VAR1, which has id 24, becomes:

      mygateway1-out/28/100/1/0/24

      The same way, message published on topic prefix mygateway1-out from node 28, on V_VAR2, which has id 25, becomes:

      mygateway1-out/28/100/1/0/25

      This gives me the ability to subscribe on it and check for changes, like the logs shows me:

      2018-12-31 08:37:09 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on mygateway1-out/28/100/1/0/24: b'0.0'
      2018-12-31 08:51:09 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on mygateway1-out/28/100/1/0/25: b'1.0'
      

      Looking deeper on what the controller recognize it during the presentation, using S_CUSTOM (id: 23) it's reassumed in this part of xml auto-generated:

          "28": {
              "protocol_version": "2.3.1",
              "battery_level": 0,
              "type": 18,
              "children": {
      <code_snipped>
                  "100": {
                      "description": "Internal variables",
                      "id": 100,
                      "values": {
                          "24": "0.0",
                          "25": "1.0"
                      },
                      "type": 23
                  }
              },
              "heartbeat": 0,
              "sketch_name": "node28Studio",
              "sketch_version": null,
              "sensor_id": 28
          },
      

      So, actually the infos are correctly sent. It's more a matter if the usage of the IDs is correct to avoid further conflicts, if any.
      That's the reason I'm asking 😉

      Thanks, Simon

      posted in General Discussion
      xefil
      xefil
    • RE: [Solved] Problem updating from 2.0 to 2.1

      Thank you!!

      Simon

      posted in Troubleshooting
      xefil
      xefil