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);
          send(msg.set(digitalRead(RELAY_PIN4)));
          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
    https://forum.mysensors.org/topic/5921/a-basic-domestic-240v-light-and-switch/7
    https://forum.mysensors.org/topic/5884/most-reliable-light-switch/4

    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

    Try

    #define MY_TRANSPORT_WAIT_READY_MS 1
    

Log in to reply
 

Suggested Topics

  • 87
  • 10
  • 7
  • 6
  • 3
  • 8

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts