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. Troubleshooting
  3. [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect

[SOLVED] I use serial GW 2.1.1 and my sensor node won't connect

Scheduled Pinned Locked Moved Troubleshooting
26 Posts 6 Posters 6.0k Views 4 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.
  • M Offline
    M Offline
    mckvack
    wrote on last edited by
    #17

    I too had problems with my GW resetting.
    I use custom designed PCBs with Atmega328p-au using the internal oscillator. With some nodes the GW will reset when I turn them on. Sometimes changing to another NRF-module solved it but this time none of my NRF-modules worked so I searched and found this thread. Flashed the GW with v2.2.0-rc.2 and now all my problems are gone.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mario64
      wrote on last edited by
      #18

      Hi,

      I've got across similar problem. What works for you doesn't solve problem in my case.
      Decreasing power to PA_LEVEL_LOW or switching to MySensors v2.2.0-rc.2 gives no positive result.

      I have some experience with Arduino, but it is my first try with MySensors and Domoticz.

      If someone could advice how to cope with, thank you in advance.

      My Hardware:
      Arduino Nano, NRF21+ for GW & Node,
      the node is simple actuator: relay with button.

      GW output on Serial monitor:

      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      0;255;3;0;9;TSM:INIT:TSP OK
      0;255;3;0;9;TSM:INIT:GW MODE
      0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.1.1
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:BGN:INIT OK,TS
      

      Node output on Serial Monitor:

      0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
      3 TSM:INIT
      4 TSF:WUR:MS=0
      11 TSM:INIT:TSP OK
      13 TSM:FPAR
      15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2023 !TSM:FPAR:NO REPLY
      2025 TSM:FPAR
      2027 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4035 !TSM:FPAR:NO REPLY
      4037 TSM:FPAR
      4039 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6047 !TSM:FPAR:NO REPLY
      6049 TSM:FPAR
      6051 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8060 !TSM:FPAR:FAIL
      8061 TSM:FAIL:CNT=1
      8064 TSM:FAIL:PDT
      18067 TSM:FAIL:RE-INIT
      18069 TSM:INIT
      18076 TSM:INIT:TSP OK
      18078 TSM:FPAR
      18080 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      20088 !TSM:FPAR:NO REPLY
      20090 TSM:FPAR
      20092 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      22102 !TSM:FPAR:NO REPLY
      22104 TSM:FPAR
      22106 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      24114 !TSM:FPAR:NO REPLY
      24116 TSM:FPAR
      24118 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      26126 !TSM:FPAR:FAIL
      26127 TSM:FAIL:CNT=2
      26129 TSM:FAIL:PDT
      etc...
      

      Scratches:

      //Gateway
      #define MY_DEBUG
      #define MY_RADIO_NRF24
      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      #define MY_GATEWAY_SERIAL
      #define MY_INCLUSION_MODE_FEATURE
      #define MY_INCLUSION_MODE_DURATION 120
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      
      #include <MySensors.h>
      
      void setup()
      {
      }
      
      void presentation()
      {
      }
      
      void loop()
      {
      }
      

      Node:

      #define MY_DEBUG 
      #define MY_RADIO_NRF24
      #define MY_REPEATER_FEATURE
      
      #include <SPI.h>
      #include <MyConfig.h>
      #include <MySensors.h>
      #include <Bounce2.h>
      
      #define RELAY_PIN  4  // Arduino Digital I/O pin number for relay 
      #define BUTTON_PIN  5  // Arduino Digital I/O pin number for button 
      #define CHILD_ID 10   // Id of the sensor (child)
      #define RELAY_ON 1
      #define RELAY_OFF 0
      
      Bounce debouncer = Bounce(); 
      int oldValue=0;
      bool state;
      
      MyMessage msg(CHILD_ID,V_LIGHT);
      
      void setup()  
      { 
        // Setup the button
        pinMode(BUTTON_PIN,INPUT);
      
        // Setup debouncer
        debouncer.attach(BUTTON_PIN);
        debouncer.interval(5);
      
        // set relay on when starting up
        pinMode(RELAY_PIN, OUTPUT);   
      
        state=true;
        digitalWrite(RELAY_PIN, RELAY_ON);
      }
      
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Relay & Button", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        present(CHILD_ID, S_LIGHT);
      }
      
      
      void loop() 
      {
        debouncer.update();
        // Get the update value
        int value = debouncer.read();
        if (value != oldValue && value==0) {
            send(msg.set(state?false:true), true); // Send new state and request ack back
      
            Serial.println("zmiana value na 0");
      
            // Change relay state localy, anyway
            state = !state;
            digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      
            Serial.print("state = ");
            Serial.println(state);
      
        
        }
        oldValue = value;
      } 
      
      
      void receive(const MyMessage &message) {
        if (message.isAck()) {
           Serial.println("This is an ack from gateway");
        }
      
        if (message.type == V_LIGHT) {
           // Change relay state
           state = message.getBool();
           digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
      
           // Write some debug info
           Serial.print("Incoming change for sensor:");
           Serial.print(message.sensor);
           Serial.print(", New status: ");
           Serial.println(message.getBool());
         } 
      }
      
      
      bjacobseB 1 Reply Last reply
      0
      • M Mario64

        Hi,

        I've got across similar problem. What works for you doesn't solve problem in my case.
        Decreasing power to PA_LEVEL_LOW or switching to MySensors v2.2.0-rc.2 gives no positive result.

        I have some experience with Arduino, but it is my first try with MySensors and Domoticz.

        If someone could advice how to cope with, thank you in advance.

        My Hardware:
        Arduino Nano, NRF21+ for GW & Node,
        the node is simple actuator: relay with button.

        GW output on Serial monitor:

        0;255;3;0;9;TSM:INIT
        0;255;3;0;9;TSF:WUR:MS=0
        0;255;3;0;9;TSM:INIT:TSP OK
        0;255;3;0;9;TSM:INIT:GW MODE
        0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
        0;255;3;0;9;MCO:REG:NOT NEEDED
        0;255;3;0;14;Gateway startup complete.
        0;255;0;0;18;2.1.1
        0;255;3;0;9;MCO:BGN:STP
        0;255;3;0;9;MCO:BGN:INIT OK,TS
        

        Node output on Serial Monitor:

        0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
        3 TSM:INIT
        4 TSF:WUR:MS=0
        11 TSM:INIT:TSP OK
        13 TSM:FPAR
        15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        2023 !TSM:FPAR:NO REPLY
        2025 TSM:FPAR
        2027 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        4035 !TSM:FPAR:NO REPLY
        4037 TSM:FPAR
        4039 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        6047 !TSM:FPAR:NO REPLY
        6049 TSM:FPAR
        6051 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        8060 !TSM:FPAR:FAIL
        8061 TSM:FAIL:CNT=1
        8064 TSM:FAIL:PDT
        18067 TSM:FAIL:RE-INIT
        18069 TSM:INIT
        18076 TSM:INIT:TSP OK
        18078 TSM:FPAR
        18080 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        20088 !TSM:FPAR:NO REPLY
        20090 TSM:FPAR
        20092 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        22102 !TSM:FPAR:NO REPLY
        22104 TSM:FPAR
        22106 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        24114 !TSM:FPAR:NO REPLY
        24116 TSM:FPAR
        24118 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        26126 !TSM:FPAR:FAIL
        26127 TSM:FAIL:CNT=2
        26129 TSM:FAIL:PDT
        etc...
        

        Scratches:

        //Gateway
        #define MY_DEBUG
        #define MY_RADIO_NRF24
        #define MY_RF24_PA_LEVEL RF24_PA_LOW
        #define MY_GATEWAY_SERIAL
        #define MY_INCLUSION_MODE_FEATURE
        #define MY_INCLUSION_MODE_DURATION 120
        #define MY_DEFAULT_LED_BLINK_PERIOD 300
        
        
        #include <MySensors.h>
        
        void setup()
        {
        }
        
        void presentation()
        {
        }
        
        void loop()
        {
        }
        

        Node:

        #define MY_DEBUG 
        #define MY_RADIO_NRF24
        #define MY_REPEATER_FEATURE
        
        #include <SPI.h>
        #include <MyConfig.h>
        #include <MySensors.h>
        #include <Bounce2.h>
        
        #define RELAY_PIN  4  // Arduino Digital I/O pin number for relay 
        #define BUTTON_PIN  5  // Arduino Digital I/O pin number for button 
        #define CHILD_ID 10   // Id of the sensor (child)
        #define RELAY_ON 1
        #define RELAY_OFF 0
        
        Bounce debouncer = Bounce(); 
        int oldValue=0;
        bool state;
        
        MyMessage msg(CHILD_ID,V_LIGHT);
        
        void setup()  
        { 
          // Setup the button
          pinMode(BUTTON_PIN,INPUT);
        
          // Setup debouncer
          debouncer.attach(BUTTON_PIN);
          debouncer.interval(5);
        
          // set relay on when starting up
          pinMode(RELAY_PIN, OUTPUT);   
        
          state=true;
          digitalWrite(RELAY_PIN, RELAY_ON);
        }
        
        
        void presentation()  {
          // Send the sketch version information to the gateway and Controller
          sendSketchInfo("Relay & Button", "1.0");
        
          // Register all sensors to gw (they will be created as child devices)
          present(CHILD_ID, S_LIGHT);
        }
        
        
        void loop() 
        {
          debouncer.update();
          // Get the update value
          int value = debouncer.read();
          if (value != oldValue && value==0) {
              send(msg.set(state?false:true), true); // Send new state and request ack back
        
              Serial.println("zmiana value na 0");
        
              // Change relay state localy, anyway
              state = !state;
              digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
        
              Serial.print("state = ");
              Serial.println(state);
        
          
          }
          oldValue = value;
        } 
        
        
        void receive(const MyMessage &message) {
          if (message.isAck()) {
             Serial.println("This is an ack from gateway");
          }
        
          if (message.type == V_LIGHT) {
             // Change relay state
             state = message.getBool();
             digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
        
             // Write some debug info
             Serial.print("Incoming change for sensor:");
             Serial.print(message.sensor);
             Serial.print(", New status: ");
             Serial.println(message.getBool());
           } 
        }
        
        
        bjacobseB Offline
        bjacobseB Offline
        bjacobse
        wrote on last edited by
        #19

        @mario64
        Which home automation system are you using?
        If using domoticz, then it's vital to accept new sensors, you find it setup->settings
        Hardware/Devices:
        Accept new Hardware Devices

        if this is disabled, no sensors are allowed to be created

        M 1 Reply Last reply
        0
        • bjacobseB bjacobse

          @mario64
          Which home automation system are you using?
          If using domoticz, then it's vital to accept new sensors, you find it setup->settings
          Hardware/Devices:
          Accept new Hardware Devices

          if this is disabled, no sensors are allowed to be created

          M Offline
          M Offline
          Mario64
          wrote on last edited by Mario64
          #20

          Hi @bjacobse,

          thank you for answer. I'm back to my project after e few days.
          Actually, the "Accept new Hardware Devices" switch is on. I also used the "Alow for 5 minutes" button. Let me share more details:

          • pls find log of Domoticz:
           2018-01-22 09:55:34.871 MySensors: retrying in 30 seconds...
          2018-01-22 09:56:00.874 MySensors: Serial Worker stopped...
          2018-01-22 09:56:11.130 New sensors allowed for 5 minutes...
          2018-01-22 09:56:43.077 MySensors: Using serial port: /dev/ttyUSB0
          2018-01-22 10:02:38.123 MySensors: Serial Worker stopped...
          2018-01-22 10:02:39.134 MySensors: Using serial port: /dev/ttyUSB0
          2018-01-22 10:03:38.156 New sensors allowed for 5 minutes...
          2018-01-22 10:04:00.048 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
          2018-01-22 10:04:01.049 Error: Restarting: Gwx
          2018-01-22 10:04:01.146 MySensors: Serial Worker stopped...
          2018-01-22 10:04:02.157 MySensors: Using serial port: /dev/ttyUSB0
          2018-01-22 10:05:30.219 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
          2018-01-22 10:05:31.220 Error: Restarting: Gwx
          2018-01-22 10:05:32.170 MySensors: Serial Worker stopped...
          2018-01-22 10:05:33.181 MySensors: Using serial port: /dev/ttyUSB0
          2018-01-22 10:07:00.204 Error: Gwx hardware (2) nothing received for more than 1 Minute!.... 
          etc
          
          • screen shots:
          • list itemSetup->Hardware:
            ![Gateway settings]https://drive.google.com/file/d/1NjJZMlaM98XaZ-UCY93pyeHcKbT7ZZoh/view?usp=sharing

          • list itemSetup->Hardware Gwx setup:
            ![Gwx Setup]https://drive.google.com/file/d/1vDVDcLGaGK_g3-uYQrl_DnlHlbvjq87Z/view?usp=sharing

          • list itemSetup->Settings:
            ![Domoticz Settings]https://drive.google.com/file/d/15bkfnHx6rEcqRnTvLVOydwPK63dy83xe/view?usp=sharing

          M 1 Reply Last reply
          0
          • M Mario64

            Hi @bjacobse,

            thank you for answer. I'm back to my project after e few days.
            Actually, the "Accept new Hardware Devices" switch is on. I also used the "Alow for 5 minutes" button. Let me share more details:

            • pls find log of Domoticz:
             2018-01-22 09:55:34.871 MySensors: retrying in 30 seconds...
            2018-01-22 09:56:00.874 MySensors: Serial Worker stopped...
            2018-01-22 09:56:11.130 New sensors allowed for 5 minutes...
            2018-01-22 09:56:43.077 MySensors: Using serial port: /dev/ttyUSB0
            2018-01-22 10:02:38.123 MySensors: Serial Worker stopped...
            2018-01-22 10:02:39.134 MySensors: Using serial port: /dev/ttyUSB0
            2018-01-22 10:03:38.156 New sensors allowed for 5 minutes...
            2018-01-22 10:04:00.048 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
            2018-01-22 10:04:01.049 Error: Restarting: Gwx
            2018-01-22 10:04:01.146 MySensors: Serial Worker stopped...
            2018-01-22 10:04:02.157 MySensors: Using serial port: /dev/ttyUSB0
            2018-01-22 10:05:30.219 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
            2018-01-22 10:05:31.220 Error: Restarting: Gwx
            2018-01-22 10:05:32.170 MySensors: Serial Worker stopped...
            2018-01-22 10:05:33.181 MySensors: Using serial port: /dev/ttyUSB0
            2018-01-22 10:07:00.204 Error: Gwx hardware (2) nothing received for more than 1 Minute!.... 
            etc
            
            • screen shots:
            • list itemSetup->Hardware:
              ![Gateway settings]https://drive.google.com/file/d/1NjJZMlaM98XaZ-UCY93pyeHcKbT7ZZoh/view?usp=sharing

            • list itemSetup->Hardware Gwx setup:
              ![Gwx Setup]https://drive.google.com/file/d/1vDVDcLGaGK_g3-uYQrl_DnlHlbvjq87Z/view?usp=sharing

            • list itemSetup->Settings:
              ![Domoticz Settings]https://drive.google.com/file/d/15bkfnHx6rEcqRnTvLVOydwPK63dy83xe/view?usp=sharing

            M Offline
            M Offline
            Mario64
            wrote on last edited by
            #21

            @mario64
            one update information (Gateway)
            when I press reset button on Arduino Nano board, I get one additional line on serial monitor:
            0;255;3;0;2;2.1.1

            and on domoticz HW setup screen, I get one children of node with name: S_ARDUINO_REPEATER_NODE. see screenshot:
            ![ ]https://drive.google.com/file/d/1Pjqy7XKA5V9nZYmP90V8hR-pfDy26hc8/view?usp=sharing

            zboblamontZ 1 Reply Last reply
            0
            • M Mario64

              @mario64
              one update information (Gateway)
              when I press reset button on Arduino Nano board, I get one additional line on serial monitor:
              0;255;3;0;2;2.1.1

              and on domoticz HW setup screen, I get one children of node with name: S_ARDUINO_REPEATER_NODE. see screenshot:
              ![ ]https://drive.google.com/file/d/1Pjqy7XKA5V9nZYmP90V8hR-pfDy26hc8/view?usp=sharing

              zboblamontZ Offline
              zboblamontZ Offline
              zboblamont
              wrote on last edited by
              #22

              @mario64
              That is normal, if you use the Log Parser (Search) you will understand the message...
              Domoticz does that with nodes "S_ARDUINO_REPEATER_NODE", no need to worry....

              M 1 Reply Last reply
              0
              • bjacobseB Offline
                bjacobseB Offline
                bjacobse
                wrote on last edited by
                #23

                maybe trying to use an "older" version for BOTH serial gateway and node. remember for the node to use the special sketch that erases/clear eeprom, as it contains the node id given from the gateway.
                I
                m out of good ideas

                M 1 Reply Last reply
                0
                • bjacobseB bjacobse

                  maybe trying to use an "older" version for BOTH serial gateway and node. remember for the node to use the special sketch that erases/clear eeprom, as it contains the node id given from the gateway.
                  I
                  m out of good ideas

                  M Offline
                  M Offline
                  Mario64
                  wrote on last edited by
                  #24

                  Thanks. I will try with an older version. If you would share known "mix" of software working together, it would be good to start with. I mean" Arduino IDE/MySensors/Domoticz. ?

                  1 Reply Last reply
                  0
                  • zboblamontZ zboblamont

                    @mario64
                    That is normal, if you use the Log Parser (Search) you will understand the message...
                    Domoticz does that with nodes "S_ARDUINO_REPEATER_NODE", no need to worry....

                    M Offline
                    M Offline
                    Mario64
                    wrote on last edited by
                    #25

                    @zboblamont
                    So, gateway works as repeater by default? I also expected that on reset, whole initial sequence should appear, not just 0;255;3;0;2;2.1.1.

                    zboblamontZ 1 Reply Last reply
                    0
                    • M Mario64

                      @zboblamont
                      So, gateway works as repeater by default? I also expected that on reset, whole initial sequence should appear, not just 0;255;3;0;2;2.1.1.

                      zboblamontZ Offline
                      zboblamontZ Offline
                      zboblamont
                      wrote on last edited by
                      #26

                      @mario64 It does not work as a repeater, it registers via Domoticz as a node with a child ID of 255 (Internal effectively) under Setup/Hardware/Nodes, sometimes listed as a Repeater.
                      It baffled me originally as I have no repeaters nor a need for them, but that is what Domoticz does. Since you can activate which child sensors are active under Domoticz, you can simply ignore them anyway.
                      Not sure if you have figured this out yet without reading back to confirm it, but until you send a sensor reading after presentation the device will not show up within Domoticz and remains in the background....

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


                      27

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 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