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. Feature Requests
  3. Gateway relayed commands

Gateway relayed commands

Scheduled Pinned Locked Moved Feature Requests
5 Posts 2 Posters 60 Views 2 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.
  • Constantin PetraC Offline
    Constantin PetraC Offline
    Constantin Petra
    wrote on last edited by
    #1

    Hi,

    Glad to meet you all :)
    I am not (yet) a user of MySensors, but I am actually looking for a software alternative to a custom setup which implies battery sensors and actuators.

    Maybe this feature already exists (and possibly it is also trivial), but unfortunately I'm unable to find a description.

    I have built and programmed my own gateway and devices using NRF24l01+ some years ago. I have a special battery powered switch which actually sends some information and then waits a few milliseconds for a command that should come from the gateway and then goes back to sleep for a couple of minutes (I am using Ack payloads with separate channel for this device). However, every two to four weeks, it stops receving the data and unless I power cycle the gateway altogether it does not handle ACKs again. I won't get into more details as I have also other reasons to replace my setup (and I am almost sure this is a hardware issue as I have tried to debug this quite extensively with no positive result).

    So, my question is this: Is MySensors (NRF24L01 gateway) able to store a command directed to a dormant device and, when that device wakes up and sends a status message, to receive that as quick as possible?
    Or... how can this be done using the available setup and how quick it can be? (for example, in my setup, the gateway acts as MQTT subscriber for the device and prepares the command for when the devices wakes up thus skipping the overhead of MQTT connection/setup/etc).

    Thanks,
    Costa

    mfalkviddM 1 Reply Last reply
    0
    • Constantin PetraC Constantin Petra

      Hi,

      Glad to meet you all :)
      I am not (yet) a user of MySensors, but I am actually looking for a software alternative to a custom setup which implies battery sensors and actuators.

      Maybe this feature already exists (and possibly it is also trivial), but unfortunately I'm unable to find a description.

      I have built and programmed my own gateway and devices using NRF24l01+ some years ago. I have a special battery powered switch which actually sends some information and then waits a few milliseconds for a command that should come from the gateway and then goes back to sleep for a couple of minutes (I am using Ack payloads with separate channel for this device). However, every two to four weeks, it stops receving the data and unless I power cycle the gateway altogether it does not handle ACKs again. I won't get into more details as I have also other reasons to replace my setup (and I am almost sure this is a hardware issue as I have tried to debug this quite extensively with no positive result).

      So, my question is this: Is MySensors (NRF24L01 gateway) able to store a command directed to a dormant device and, when that device wakes up and sends a status message, to receive that as quick as possible?
      Or... how can this be done using the available setup and how quick it can be? (for example, in my setup, the gateway acts as MQTT subscriber for the device and prepares the command for when the devices wakes up thus skipping the overhead of MQTT connection/setup/etc).

      Thanks,
      Costa

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      Welcome to the forum @Constantin-Petra !

      MySensors has a feature called "smart sleep" that probably does what you need. The queue is not on the gateway though; the queue is in the Controller. See the table at https://www.mysensors.org/controller for which controllers support smart sleep and https://www.mysensors.org/download/sensor_api_20#sleeping and https://www.mysensors.org/apidocs/group__MySensorsCoregrp.html#gab5f84c4227e3478af4b6600d5e8d8b15 for the MySensors documentation.

      Constantin PetraC 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        Welcome to the forum @Constantin-Petra !

        MySensors has a feature called "smart sleep" that probably does what you need. The queue is not on the gateway though; the queue is in the Controller. See the table at https://www.mysensors.org/controller for which controllers support smart sleep and https://www.mysensors.org/download/sensor_api_20#sleeping and https://www.mysensors.org/apidocs/group__MySensorsCoregrp.html#gab5f84c4227e3478af4b6600d5e8d8b15 for the MySensors documentation.

        Constantin PetraC Offline
        Constantin PetraC Offline
        Constantin Petra
        wrote on last edited by
        #3

        Thank you @mfalkvidd !

        The "smart sleep" feature seems indeed to do what I want. However, I see two issues for now (I am using Domoticz as Home Automation System):

        1. In the controller description page you have mentioned, "Smart sleep feature" for Domoticz is "n", but I actually find in the Domoticz release history that it was actually implemented (since version 4.9700 - 2018?).
          "- Implemented: MySensors: support for SmartSleep option (gateway 2.x)". I also found some loose ends about this, and no convincing further information:
          https://www.domoticz.com/forum/viewtopic.php?t=13827
          https://github.com/domoticz/domoticz/issues/2394

        2. if this is is implemented in the controller, it means it won't be very fast, especially because my gateway is in a remote location, connected through MQTT over VPN via 3G (unless I create a separate Domoticz instance at the remote location itself).

        Any new thoughts on this?

        Best Regards,
        Costa

        mfalkviddM 1 Reply Last reply
        1
        • Constantin PetraC Constantin Petra

          Thank you @mfalkvidd !

          The "smart sleep" feature seems indeed to do what I want. However, I see two issues for now (I am using Domoticz as Home Automation System):

          1. In the controller description page you have mentioned, "Smart sleep feature" for Domoticz is "n", but I actually find in the Domoticz release history that it was actually implemented (since version 4.9700 - 2018?).
            "- Implemented: MySensors: support for SmartSleep option (gateway 2.x)". I also found some loose ends about this, and no convincing further information:
            https://www.domoticz.com/forum/viewtopic.php?t=13827
            https://github.com/domoticz/domoticz/issues/2394

          2. if this is is implemented in the controller, it means it won't be very fast, especially because my gateway is in a remote location, connected through MQTT over VPN via 3G (unless I create a separate Domoticz instance at the remote location itself).

          Any new thoughts on this?

          Best Regards,
          Costa

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @Constantin-Petra the table is updated manually by the community, so it may very well be out of date.

          I don't see a problem with the connection to the controller being slow. Just increase MY_SMART_SLEEP_WAIT_DURATION_MS.

          1 Reply Last reply
          0
          • Constantin PetraC Offline
            Constantin PetraC Offline
            Constantin Petra
            wrote on last edited by
            #5

            Hi,

            Increasing the MY_SMART_SLEEP_WAIT_DURATION_MS would probably work, but I assume this waiting happens while the sensor sketch is running (at least the RF needs to be powered on), thus decreasing battery life.
            But I think I will give it a try soon and see what happens.
            Thanks for the precious info!

            BR,
            Costa

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


            14

            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