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. Hardware
  3. switch is not working when gateway is unavailable

switch is not working when gateway is unavailable

Scheduled Pinned Locked Moved Hardware
4 Posts 4 Posters 1.3k 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.
  • Pavel LarkinP Offline
    Pavel LarkinP Offline
    Pavel Larkin
    wrote on last edited by gohan
    #1

    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! :)

    1 Reply Last reply
    0
    • FotoFieberF Offline
      FotoFieberF Offline
      FotoFieber
      Hardware Contributor
      wrote on last edited by
      #2

      Yes, please post your sketch.

      1 Reply Last reply
      0
      • archiijsA Offline
        archiijsA Offline
        archiijs
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          Try

          #define MY_TRANSPORT_WAIT_READY_MS 1
          
          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.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