Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Home Assistant
  4. MQTT Ethernet Gateway with Wired RS485 Network

MQTT Ethernet Gateway with Wired RS485 Network

Scheduled Pinned Locked Moved Home Assistant
13 Posts 6 Posters 188 Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • BearWithBeardB Offline
    BearWithBeardB Offline
    BearWithBeard
    wrote on last edited by
    #4

    You don't need inclusion mode for Home Assistant. I don't know if it is even supported. Once you power up your sensor node while HA is running, HA should detect it automatically during the presentation(), however HA will not show any sensor data until you send at least one value. Your persistance file mysensors_mqtt.json should tell you what HA knows about your sensors.

    I may have overlooked it, but I don't know what exactly is your issue here. Does your node send no data at all? Does the gateway receive data from it, but not the gateway? Does your controller receive data but doesn't display anything? Does any of the serial outputs on the node and gateway or the HA log give you hints at what might be wrong?

    How does your sensor node sketch look like? Do you send an initial value for your PIR sensor in the loop()?

    By the way - you should change version: '2.3.2' in your HA configuration to version: '2.3' because the prior is invalid and can cause (different) problems in the future.

    ATha1A 1 Reply Last reply
    0
    • BearWithBeardB BearWithBeard

      You don't need inclusion mode for Home Assistant. I don't know if it is even supported. Once you power up your sensor node while HA is running, HA should detect it automatically during the presentation(), however HA will not show any sensor data until you send at least one value. Your persistance file mysensors_mqtt.json should tell you what HA knows about your sensors.

      I may have overlooked it, but I don't know what exactly is your issue here. Does your node send no data at all? Does the gateway receive data from it, but not the gateway? Does your controller receive data but doesn't display anything? Does any of the serial outputs on the node and gateway or the HA log give you hints at what might be wrong?

      How does your sensor node sketch look like? Do you send an initial value for your PIR sensor in the loop()?

      By the way - you should change version: '2.3.2' in your HA configuration to version: '2.3' because the prior is invalid and can cause (different) problems in the future.

      ATha1A Offline
      ATha1A Offline
      ATha1
      wrote on last edited by
      #5

      @BearWithBeard Thanks for your reply

      Well the sensor doesn't show up.
      And I don't know if my wiring is correct, maybe you could review that, because I don't know, but I think this should be right.

      The motion sensor sketch is used as presented here: https://www.mysensors.org/build/rs485
      So the code looks like this:

      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable RS485 transport layer
      #define MY_RS485
      
      // Define this to enables DE-pin management on defined pin
      #define MY_RS485_DE_PIN 2
      
      // Set RS485 baud rate to use
      #define MY_RS485_BAUD_RATE 9600
      
      // Enable this if RS485 is connected to a hardware serial port
      //#define MY_RS485_HWSERIAL Serial1
      
      #include <MySensors.h>
      
      uint32_t SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define CHILD_ID 1   // Id of the sensor child
      
      // Initialize motion message
      MyMessage msg(CHILD_ID, V_TRIPPED);
      
      void setup()
      {
          pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      }
      
      void presentation()
      {
          // Send the sketch version information to the gateway and Controller
          sendSketchInfo("Motion Sensor", "1.0");
      
          // Register all sensors to gw (they will be created as child devices)
          present(CHILD_ID, S_MOTION);
      }
      
      void loop()
      {
          // Read digital motion value
          bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      
          Serial.println(tripped);
          send(msg.set(tripped?"1":"0"));  // Send tripped value to gw
      
          // Sleep until interrupt comes in on motion sensor. Send update every two minute.
          sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      }
      

      I will change to configuration.yml as you've suggested to version: '2.3'. But I haven't recognized any issues so far with that.

      1 Reply Last reply
      0
      • BearWithBeardB Offline
        BearWithBeardB Offline
        BearWithBeard
        wrote on last edited by
        #6

        I haven't worked with RS485 neither but your wiring looks good as far as I can tell.

        I asked you to look at the serial output. If your gateway receives data (presentation and triggering of the PIR sensor), your network is wired properly and the issue is somewhere else.

        In this case, an excerpt of your HA log would be helpful. Maybe you don't have write permissions for your persistance file. Does it even exist? Could it be that the node and sensor ID is already present from earlier projects, but the sensor type is different from the current one?

        I will change to configuration.yml as you've suggested to version: '2.3'. But I haven't recognized any issues so far with that.

        This is because the MySensors integration converts this version string you specify in the configuration into a float value. A string which contains more than one dot fails this conversion, which causes the pymysensors module to fall back to the 1.4 version of the serial protocol, which doesn't support some of the newer sensor types and features of later MySensors versions.

        ATha1A 1 Reply Last reply
        0
        • BearWithBeardB BearWithBeard

          I haven't worked with RS485 neither but your wiring looks good as far as I can tell.

          I asked you to look at the serial output. If your gateway receives data (presentation and triggering of the PIR sensor), your network is wired properly and the issue is somewhere else.

          In this case, an excerpt of your HA log would be helpful. Maybe you don't have write permissions for your persistance file. Does it even exist? Could it be that the node and sensor ID is already present from earlier projects, but the sensor type is different from the current one?

          I will change to configuration.yml as you've suggested to version: '2.3'. But I haven't recognized any issues so far with that.

          This is because the MySensors integration converts this version string you specify in the configuration into a float value. A string which contains more than one dot fails this conversion, which causes the pymysensors module to fall back to the 1.4 version of the serial protocol, which doesn't support some of the newer sensor types and features of later MySensors versions.

          ATha1A Offline
          ATha1A Offline
          ATha1
          wrote on last edited by ATha1
          #7

          @BearWithBeard alright, I've changed the config version to 2.3 now and restarted HASS

          I also change the gateway code and removed the following lines:

          
          // Enable inclusion mode
          //#define MY_INCLUSION_MODE_FEATURE
          // Enable Inclusion mode button on gateway
          //#define MY_INCLUSION_BUTTON_FEATURE
          // Set inclusion mode duration (in seconds)
          //#define MY_INCLUSION_MODE_DURATION 60
          // Digital pin used for inclusion mode button
          //#define MY_INCLUSION_MODE_BUTTON_PIN  3
          

          I deployt the gateway node and this is the output of the Serial Monitor there:

          ⸮⸮Q8V⸮⸮⸮⸮0 MCO:BGN:INIT GW,CP=RSNGA---,FQ=16,REL=255,VER=2.3.2
          19:58:49.479 -> 4 TSM:INIT
          19:58:49.479 -> 5 TSF:WUR:MS=0
          19:58:49.479 -> 7 TSM:INIT:TSP OK
          19:58:49.479 -> 8 TSM:INIT:GW MODE
          19:58:49.479 -> 10 TSM:READY:ID=0,PAR=0,DIS=0
          19:58:49.516 -> 12 MCO:REG:NOT NEEDED
          10183 GWT:TPC:IP=192.168.0.220
          11186 MCO:BGN:STP
          19:59:00.662 -> 11188 MCO:BGN:INIT OK,TSP=1
          15335 GWT:TPC:IP=192.168.0.220
          16338 GWT:RMQ:CONNECTING...
          16996 GWT:RMQ:OK
          19:59:06.476 -> 16998 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
          19:59:06.476 -> 17004 TSM:READY:NWD REQ
          19:59:06.512 -> 17024 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
          

          btw. yes my mysensors_mqtt.json (persistent file) exists but only looks like this:

          {}
          

          And had no other sensors in this wired network with that id or child_id as far as I know.

          Now I've redeployt the sensor node and output on Serial Monitor is:

          ⸮⸮⸮z⸮⸮⸮⸮⸮Y⸮⸮⸮A⸮h⸮l⸮,ht⸮⸮⸮⸮⸮Q 
          20:14:41.610 ->  __  __       ____
          20:14:41.610 -> |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
          20:14:41.610 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
          20:14:41.610 -> | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
          20:14:41.610 -> |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
          20:14:41.610 ->         |___/                      2.3.2
          20:14:41.610 -> 
          20:14:41.610 -> 16 MCO:BGN:INIT NODE,CP=RSNNA---,FQ=16,REL=255,VER=2.3.2
          20:14:41.645 -> 26 TSM:INIT
          20:14:41.645 -> 28 TSF:WUR:MS=0
          20:14:41.645 -> 29 TSM:INIT:TSP OK
          20:14:41.645 -> 31 TSM:FPAR
          20:14:41.645 -> 49 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          2057 !TSM:FPAR:NO REPLY
          20:14:43.660 -> 2059 TSM:FPAR
          20:14:43.696 -> 2076 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          4084 !TSM:FPAR:NO REPLY
          20:14:45.674 -> 4086 TSM:FPAR
          20:14:45.710 -> 4104 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          6112 !TSM:FPAR:NO REPLY
          20:14:47.714 -> 6114 TSM:FPAR
          20:14:47.749 -> 6131 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          8139 !TSM:FPAR:FAIL
          20:14:49.763 -> 8140 TSM:FAIL:CNT=1
          20:14:49.763 -> 8142 TSM:FAIL:DIS
          20:14:49.763 -> 8144 TSF:TDI:TSL
          18146 TSM:FAIL:RE-INIT
          20:14:59.754 -> 18148 TSM:INIT
          20:14:59.754 -> 18149 TSM:INIT:TSP OK
          20:14:59.754 -> 18151 TSM:FPAR
          20:14:59.790 -> 18169 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          20178 !TSM:FPAR:NO REPLY
          20:15:01.773 -> 20180 TSM:FPAR
          20:15:01.809 -> 20199 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          22206 !TSM:FPAR:NO REPLY
          20:15:03.800 -> 22208 TSM:FPAR
          20:15:03.837 -> 22226 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          24235 !TSM:FPAR:NO REPLY
          20:15:05.829 -> 24237 TSM:FPAR
          20:15:05.867 -> 24255 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          26262 !TSM:FPAR:FAIL
          20:15:07.855 -> 26263 TSM:FAIL:CNT=2
          20:15:07.855 -> 26265 TSM:FAIL:DIS
          20:15:07.855 -> 26267 TSF:TDI:TSL
          36270 TSM:FAIL:RE-INIT
          20:15:17.879 -> 36272 TSM:INIT
          20:15:17.879 -> 36273 TSM:INIT:TSP OK
          20:15:17.879 -> 36275 TSM:FPAR
          20:15:17.913 -> 36293 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          38301 !TSM:FPAR:NO REPLY
          20:15:19.905 -> 38303 TSM:FPAR
          20:15:19.943 -> 38322 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          40329 !TSM:FPAR:NO REPLY
          20:15:21.944 -> 40331 TSM:FPAR
          20:15:21.944 -> 40349 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          42356 !TSM:FPAR:NO REPLY
          20:15:23.961 -> 42358 TSM:FPAR
          20:15:23.997 -> 42377 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          44384 !TSM:FPAR:FAIL
          20:15:25.987 -> 44385 TSM:FAIL:CNT=3
          20:15:25.987 -> 44387 TSM:FAIL:DIS
          20:15:25.987 -> 44389 TSF:TDI:TSL
          54392 TSM:FAIL:RE-INIT
          20:15:35.987 -> 54394 TSM:INIT
          20:15:35.987 -> 54395 TSM:INIT:TSP OK
          20:15:35.987 -> 54397 TSM:FPAR
          20:15:36.023 -> 54416 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          56424 !TSM:FPAR:NO REPLY
          20:15:38.017 -> 56426 TSM:FPAR
          20:15:38.055 -> 56444 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          58452 !TSM:FPAR:NO REPLY
          20:15:40.051 -> 58455 TSM:FPAR
          20:15:40.088 -> 58473 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          60480 !TSM:FPAR:NO REPLY
          20:15:42.099 -> 60482 TSM:FPAR
          20:15:42.099 -> 60500 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          62508 !TSM:FPAR:FAIL
          20:15:44.117 -> 62509 TSM:FAIL:CNT=4
          20:15:44.117 -> 62511 TSM:FAIL:DIS
          20:15:44.117 -> 62513 TSF:TDI:TSL
          72516 TSM:FAIL:RE-INIT
          20:15:54.121 -> 72518 TSM:INIT
          20:15:54.121 -> 72519 TSM:INIT:TSP OK
          20:15:54.121 -> 72521 TSM:FPAR
          20:15:54.157 -> 72540 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          74548 !TSM:FPAR:NO REPLY
          20:15:56.174 -> 74550 TSM:FPAR
          20:15:56.174 -> 74568 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          76575 !TSM:FPAR:NO REPLY
          20:15:58.190 -> 76577 TSM:FPAR
          20:15:58.190 -> 76596 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          78603 !TSM:FPAR:NO REPLY
          20:16:00.193 -> 78605 TSM:FPAR
          20:16:00.226 -> 78623 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          80630 !TSM:FPAR:FAIL
          20:16:02.238 -> 80631 TSM:FAIL:CNT=5
          20:16:02.238 -> 80633 TSM:FAIL:DIS
          20:16:02.238 -> 80635 TSF:TDI:TSL
          90638 TSM:FAIL:RE-INIT
          20:16:12.234 -> 90640 TSM:INIT
          20:16:12.234 -> 90641 TSM:INIT:TSP OK
          20:16:12.234 -> 90643 TSM:FPAR
          20:16:12.270 -> 90661 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          92670 !TSM:FPAR:NO REPLY
          20:16:14.274 -> 92673 TSM:FPAR
          20:16:14.312 -> 92691 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          94698 !TSM:FPAR:NO REPLY
          20:16:16.302 -> 94700 TSM:FPAR
          20:16:16.340 -> 94718 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          96726 !TSM:FPAR:NO REPLY
          20:16:18.335 -> 96728 TSM:FPAR
          20:16:18.371 -> 96746 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          98753 !TSM:FPAR:FAIL
          20:16:20.373 -> 98754 TSM:FAIL:CNT=6
          20:16:20.373 -> 98756 TSM:FAIL:DIS
          20:16:20.373 -> 98758 TSF:TDI:TSL
          108761 TSM:FAIL:RE-INIT
          20:16:30.382 -> 108763 TSM:INIT
          20:16:30.382 -> 108764 TSM:INIT:TSP OK
          20:16:30.382 -> 108766 TSM:FPAR
          20:16:30.382 -> 108784 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          110792 !TSM:FPAR:NO REPLY
          20:16:32.394 -> 110794 TSM:FPAR
          20:16:32.431 -> 110813 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          112821 !TSM:FPAR:NO REPLY
          20:16:34.425 -> 112823 TSM:FPAR
          20:16:34.463 -> 112841 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          114849 !TSM:FPAR:NO REPLY
          20:16:36.443 -> 114851 TSM:FPAR
          20:16:36.477 -> 114870 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          116878 !TSM:FPAR:FAIL
          20:16:38.485 -> 116880 TSM:FAIL:CNT=7
          20:16:38.485 -> 116882 TSM:FAIL:DIS
          116884 TSF:TDI:TSL
          176886 TSM:FAIL:RE-INIT
          20:17:38.493 -> 176888 TSM:INIT
          20:17:38.493 -> 176889 TSM:INIT:TSP OK
          20:17:38.493 -> 176891 TSM:FPAR
          20:17:38.529 -> 176910 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          178918 !TSM:FPAR:NO REPLY
          20:17:40.521 -> 178920 TSM:FPAR
          20:17:40.558 -> 178938 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          180947 !TSM:FPAR:NO REPLY
          20:17:42.544 -> 180950 TSM:FPAR
          20:17:42.579 -> 180968 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          182976 !TSM:FPAR:NO REPLY
          20:17:44.599 -> 182978 TSM:FPAR
          20:17:44.599 -> 182996 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          185005 !TSM:FPAR:FAIL
          20:17:46.606 -> 185007 TSM:FAIL:CNT=7
          20:17:46.606 -> 185009 TSM:FAIL:DIS
          185011 TSF:TDI:TSL
          

          I don't see something in the HA logs which has to do with mqtt gateway.

          BearWithBeardB 1 Reply Last reply
          1
          • ATha1A ATha1

            @BearWithBeard alright, I've changed the config version to 2.3 now and restarted HASS

            I also change the gateway code and removed the following lines:

            
            // Enable inclusion mode
            //#define MY_INCLUSION_MODE_FEATURE
            // Enable Inclusion mode button on gateway
            //#define MY_INCLUSION_BUTTON_FEATURE
            // Set inclusion mode duration (in seconds)
            //#define MY_INCLUSION_MODE_DURATION 60
            // Digital pin used for inclusion mode button
            //#define MY_INCLUSION_MODE_BUTTON_PIN  3
            

            I deployt the gateway node and this is the output of the Serial Monitor there:

            ⸮⸮Q8V⸮⸮⸮⸮0 MCO:BGN:INIT GW,CP=RSNGA---,FQ=16,REL=255,VER=2.3.2
            19:58:49.479 -> 4 TSM:INIT
            19:58:49.479 -> 5 TSF:WUR:MS=0
            19:58:49.479 -> 7 TSM:INIT:TSP OK
            19:58:49.479 -> 8 TSM:INIT:GW MODE
            19:58:49.479 -> 10 TSM:READY:ID=0,PAR=0,DIS=0
            19:58:49.516 -> 12 MCO:REG:NOT NEEDED
            10183 GWT:TPC:IP=192.168.0.220
            11186 MCO:BGN:STP
            19:59:00.662 -> 11188 MCO:BGN:INIT OK,TSP=1
            15335 GWT:TPC:IP=192.168.0.220
            16338 GWT:RMQ:CONNECTING...
            16996 GWT:RMQ:OK
            19:59:06.476 -> 16998 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
            19:59:06.476 -> 17004 TSM:READY:NWD REQ
            19:59:06.512 -> 17024 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
            

            btw. yes my mysensors_mqtt.json (persistent file) exists but only looks like this:

            {}
            

            And had no other sensors in this wired network with that id or child_id as far as I know.

            Now I've redeployt the sensor node and output on Serial Monitor is:

            ⸮⸮⸮z⸮⸮⸮⸮⸮Y⸮⸮⸮A⸮h⸮l⸮,ht⸮⸮⸮⸮⸮Q 
            20:14:41.610 ->  __  __       ____
            20:14:41.610 -> |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
            20:14:41.610 -> | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
            20:14:41.610 -> | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
            20:14:41.610 -> |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            20:14:41.610 ->         |___/                      2.3.2
            20:14:41.610 -> 
            20:14:41.610 -> 16 MCO:BGN:INIT NODE,CP=RSNNA---,FQ=16,REL=255,VER=2.3.2
            20:14:41.645 -> 26 TSM:INIT
            20:14:41.645 -> 28 TSF:WUR:MS=0
            20:14:41.645 -> 29 TSM:INIT:TSP OK
            20:14:41.645 -> 31 TSM:FPAR
            20:14:41.645 -> 49 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            2057 !TSM:FPAR:NO REPLY
            20:14:43.660 -> 2059 TSM:FPAR
            20:14:43.696 -> 2076 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            4084 !TSM:FPAR:NO REPLY
            20:14:45.674 -> 4086 TSM:FPAR
            20:14:45.710 -> 4104 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            6112 !TSM:FPAR:NO REPLY
            20:14:47.714 -> 6114 TSM:FPAR
            20:14:47.749 -> 6131 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            8139 !TSM:FPAR:FAIL
            20:14:49.763 -> 8140 TSM:FAIL:CNT=1
            20:14:49.763 -> 8142 TSM:FAIL:DIS
            20:14:49.763 -> 8144 TSF:TDI:TSL
            18146 TSM:FAIL:RE-INIT
            20:14:59.754 -> 18148 TSM:INIT
            20:14:59.754 -> 18149 TSM:INIT:TSP OK
            20:14:59.754 -> 18151 TSM:FPAR
            20:14:59.790 -> 18169 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            20178 !TSM:FPAR:NO REPLY
            20:15:01.773 -> 20180 TSM:FPAR
            20:15:01.809 -> 20199 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            22206 !TSM:FPAR:NO REPLY
            20:15:03.800 -> 22208 TSM:FPAR
            20:15:03.837 -> 22226 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            24235 !TSM:FPAR:NO REPLY
            20:15:05.829 -> 24237 TSM:FPAR
            20:15:05.867 -> 24255 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            26262 !TSM:FPAR:FAIL
            20:15:07.855 -> 26263 TSM:FAIL:CNT=2
            20:15:07.855 -> 26265 TSM:FAIL:DIS
            20:15:07.855 -> 26267 TSF:TDI:TSL
            36270 TSM:FAIL:RE-INIT
            20:15:17.879 -> 36272 TSM:INIT
            20:15:17.879 -> 36273 TSM:INIT:TSP OK
            20:15:17.879 -> 36275 TSM:FPAR
            20:15:17.913 -> 36293 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            38301 !TSM:FPAR:NO REPLY
            20:15:19.905 -> 38303 TSM:FPAR
            20:15:19.943 -> 38322 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            40329 !TSM:FPAR:NO REPLY
            20:15:21.944 -> 40331 TSM:FPAR
            20:15:21.944 -> 40349 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            42356 !TSM:FPAR:NO REPLY
            20:15:23.961 -> 42358 TSM:FPAR
            20:15:23.997 -> 42377 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            44384 !TSM:FPAR:FAIL
            20:15:25.987 -> 44385 TSM:FAIL:CNT=3
            20:15:25.987 -> 44387 TSM:FAIL:DIS
            20:15:25.987 -> 44389 TSF:TDI:TSL
            54392 TSM:FAIL:RE-INIT
            20:15:35.987 -> 54394 TSM:INIT
            20:15:35.987 -> 54395 TSM:INIT:TSP OK
            20:15:35.987 -> 54397 TSM:FPAR
            20:15:36.023 -> 54416 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            56424 !TSM:FPAR:NO REPLY
            20:15:38.017 -> 56426 TSM:FPAR
            20:15:38.055 -> 56444 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            58452 !TSM:FPAR:NO REPLY
            20:15:40.051 -> 58455 TSM:FPAR
            20:15:40.088 -> 58473 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            60480 !TSM:FPAR:NO REPLY
            20:15:42.099 -> 60482 TSM:FPAR
            20:15:42.099 -> 60500 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            62508 !TSM:FPAR:FAIL
            20:15:44.117 -> 62509 TSM:FAIL:CNT=4
            20:15:44.117 -> 62511 TSM:FAIL:DIS
            20:15:44.117 -> 62513 TSF:TDI:TSL
            72516 TSM:FAIL:RE-INIT
            20:15:54.121 -> 72518 TSM:INIT
            20:15:54.121 -> 72519 TSM:INIT:TSP OK
            20:15:54.121 -> 72521 TSM:FPAR
            20:15:54.157 -> 72540 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            74548 !TSM:FPAR:NO REPLY
            20:15:56.174 -> 74550 TSM:FPAR
            20:15:56.174 -> 74568 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            76575 !TSM:FPAR:NO REPLY
            20:15:58.190 -> 76577 TSM:FPAR
            20:15:58.190 -> 76596 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            78603 !TSM:FPAR:NO REPLY
            20:16:00.193 -> 78605 TSM:FPAR
            20:16:00.226 -> 78623 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            80630 !TSM:FPAR:FAIL
            20:16:02.238 -> 80631 TSM:FAIL:CNT=5
            20:16:02.238 -> 80633 TSM:FAIL:DIS
            20:16:02.238 -> 80635 TSF:TDI:TSL
            90638 TSM:FAIL:RE-INIT
            20:16:12.234 -> 90640 TSM:INIT
            20:16:12.234 -> 90641 TSM:INIT:TSP OK
            20:16:12.234 -> 90643 TSM:FPAR
            20:16:12.270 -> 90661 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            92670 !TSM:FPAR:NO REPLY
            20:16:14.274 -> 92673 TSM:FPAR
            20:16:14.312 -> 92691 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            94698 !TSM:FPAR:NO REPLY
            20:16:16.302 -> 94700 TSM:FPAR
            20:16:16.340 -> 94718 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            96726 !TSM:FPAR:NO REPLY
            20:16:18.335 -> 96728 TSM:FPAR
            20:16:18.371 -> 96746 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            98753 !TSM:FPAR:FAIL
            20:16:20.373 -> 98754 TSM:FAIL:CNT=6
            20:16:20.373 -> 98756 TSM:FAIL:DIS
            20:16:20.373 -> 98758 TSF:TDI:TSL
            108761 TSM:FAIL:RE-INIT
            20:16:30.382 -> 108763 TSM:INIT
            20:16:30.382 -> 108764 TSM:INIT:TSP OK
            20:16:30.382 -> 108766 TSM:FPAR
            20:16:30.382 -> 108784 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            110792 !TSM:FPAR:NO REPLY
            20:16:32.394 -> 110794 TSM:FPAR
            20:16:32.431 -> 110813 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            112821 !TSM:FPAR:NO REPLY
            20:16:34.425 -> 112823 TSM:FPAR
            20:16:34.463 -> 112841 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            114849 !TSM:FPAR:NO REPLY
            20:16:36.443 -> 114851 TSM:FPAR
            20:16:36.477 -> 114870 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            116878 !TSM:FPAR:FAIL
            20:16:38.485 -> 116880 TSM:FAIL:CNT=7
            20:16:38.485 -> 116882 TSM:FAIL:DIS
            116884 TSF:TDI:TSL
            176886 TSM:FAIL:RE-INIT
            20:17:38.493 -> 176888 TSM:INIT
            20:17:38.493 -> 176889 TSM:INIT:TSP OK
            20:17:38.493 -> 176891 TSM:FPAR
            20:17:38.529 -> 176910 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            178918 !TSM:FPAR:NO REPLY
            20:17:40.521 -> 178920 TSM:FPAR
            20:17:40.558 -> 178938 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            180947 !TSM:FPAR:NO REPLY
            20:17:42.544 -> 180950 TSM:FPAR
            20:17:42.579 -> 180968 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            182976 !TSM:FPAR:NO REPLY
            20:17:44.599 -> 182978 TSM:FPAR
            20:17:44.599 -> 182996 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            185005 !TSM:FPAR:FAIL
            20:17:46.606 -> 185007 TSM:FAIL:CNT=7
            20:17:46.606 -> 185009 TSM:FAIL:DIS
            185011 TSF:TDI:TSL
            

            I don't see something in the HA logs which has to do with mqtt gateway.

            BearWithBeardB Offline
            BearWithBeardB Offline
            BearWithBeard
            wrote on last edited by
            #8

            @ATha1 Okay, thank you for the logs. There were people with similar issues recently, who weren't able to get their sensor values to show up on HA. At least one of them "fixed" it by switching from an ethernet to a serial gateway, so I quickly setup a new MySensors network with an EthernetMQTT gateway (Arduino Uno + W5500), but using NRF24 radios instead to see if there is a fundamental issue regarding ethernet gateways in combination with HA.

            With only the gateway connected, my newly created persistance file contains an object of my gateway right away:

            {
                "0": {
                    "sensor_id": 0,
                    "children": {},
                    "type": 18,
                    "sketch_name": null,
                    "sketch_version": null,
                    "battery_level": 0,
                    "protocol_version": "2.3.2",
                    "heartbeat": 0
                }
            }
            

            If yours is empty, I suspect that the link between gateway and controller is incorrect. This might be a stupid question, but did you confirm that your gateway is publishing successfully to the topic HA is subscribed to? If you manually subscribe to mygateway1-out/0/255/0/0/18, you should see a 2.3.2 payload after powering up the gateway, according to its serial output. And is MQTT setup correctly in configurations.yml?

            After I confirmed that my gateway does connect to the controller, I added a sensor node to the network, which found its parent right away, received a dynamically assigned ID from HA, got added to the persistance file and started reporting messages as expected. Atleast we now know there is no fundamental issue with the ethernet gateway and HA.

            If your MQTT setup is working fine, I don't know what causes your problem. You could try using static routing between your sensor node and gateway, see if a serial gateway works, double-check your wiring or if replacing RS485 with any other transport method gets you further. I'm out of ideas at this point, sorry.

            1 Reply Last reply
            0
            • MichalM Offline
              MichalM Offline
              Michal
              wrote on last edited by
              #9

              @ATha1 What tool do you use to draw a diagram ?

              ATha1A 1 Reply Last reply
              0
              • MichalM Michal

                @ATha1 What tool do you use to draw a diagram ?

                ATha1A Offline
                ATha1A Offline
                ATha1
                wrote on last edited by
                #10

                @Michal
                I’ve downloaded an older version of fritzing.
                I think this is a beta version btw.
                I’ve just googled fritzing download.

                1 Reply Last reply
                1
                • P Offline
                  P Offline
                  pjr
                  wrote on last edited by
                  #11

                  Back then when I built my RS485 network with normal ethernet GW and domoticz I had to define static node id's for all the nodes(except GW) to get RS485 network working. Not sure if thats the case anymore.

                  #define MY_NODE_ID 123
                  
                  ATha1A 1 Reply Last reply
                  1
                  • P pjr

                    Back then when I built my RS485 network with normal ethernet GW and domoticz I had to define static node id's for all the nodes(except GW) to get RS485 network working. Not sure if thats the case anymore.

                    #define MY_NODE_ID 123
                    
                    ATha1A Offline
                    ATha1A Offline
                    ATha1
                    wrote on last edited by
                    #12

                    @pjr said in MQTT Ethernet Gateway with Wired RS485 Network:

                    #define MY_NODE_ID 123

                    wow awesome!
                    I've just tried and it seems to recognize the other wired node ☺️

                    Now I did some soldering, so that the wiring is easier and moved to a serial gateway.
                    Later I will try again to use the MQTT with Ethernet Gateway

                    1 Reply Last reply
                    0
                    • Giovanni ChivaG Offline
                      Giovanni ChivaG Offline
                      Giovanni Chiva
                      wrote on last edited by
                      #13

                      Hey @ATha1, I'm sorry for reviving this old topic but I'm currently struggling with getting RS485 and RF24 to work together. I can't find any other threads mentioning this so I'm really wondering if you did manage to make them work together and how.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      12

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular