switch is not working when gateway is unavailable

  • Hello!

    Could you point me to - how to deal with situation, when Gateway goes down (raspberry pi which does a lot of stuff..) - and the sensor is left by himself alone?

    If the Nano, which acts like sensor (light switch) is restarted when Gateway is down - i can't operate my sensor. It just tells me:

    865584 !TSM:FPAR:NO REPLY
    865586 TSM:FPAR
    865623 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    867630 !TSM:FPAR:FAIL
    867632 TSM:FAIL:CNT=7
    867634 TSM:FAIL:PDT
    927637 TSM:FAIL:RE-INIT
    927639 TSM:INIT
    927646 TSM:INIT:TSP OK
    927648 TSF:SID:OK,ID=3
    927650 TSM:FPAR
    927687 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    929695 !TSM:FPAR:NO REPLY
    929697 TSM:FPAR
    929734 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    931741 !TSM:FPAR:NO REPLY
    931743 TSM:FPAR
    931780 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    933787 !TSM:FPAR:NO REPLY
    933789 TSM:FPAR
    933826 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    935833 !TSM:FPAR:FAIL
    935835 TSM:FAIL:CNT=7
    935837 TSM:FAIL:PDT

    Do i need to post the code? It's quite simple, beside all the preparation - here is how i switch lights On/Off:

         Serial.println("LED is on");
         digitalWrite(RELAY_PIN4, !digitalRead(RELAY_PIN4));
         #undef CHILD_ID
         #define CHILD_ID 4
          MyMessage msg(CHILD_ID,V_STATUS);
          saveState(CHILD_ID, state);

    To wrap it up - how should i program the sensor, so in case of gateway's outage, the system still would be functioning?

    Thankyou! 🙂

  • Hardware Contributor

    Yes, please post your sketch.

  • Hi, I experienced the same problems, but after some search, it turns out we are not alone

    I ended up using an example from @Boots33 works good for me.

    Mysensors is more aimed at Internet of things than home automation so I guess that's why it's not the default operation.

  • Mod



Log in to reply

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.