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. Development
  3. Method to OTA a sleeping node

Method to OTA a sleeping node

Scheduled Pinned Locked Moved Development
6 Posts 4 Posters 2.1k Views 5 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.
  • K Offline
    K Offline
    Kurt
    wrote on last edited by
    #1

    Hi,
    I'm looking for some hints how to enable doing OTA to a node that is normally sleeping most of the time. Whilst sleeping the node can't receive messages from the controller so initiating OTA is difficult.

    The node wakes up every 5mins to send a sensor update. I was thinking to then also get the node to request a value from the controller representing it's 'run mode'. The controller then sends a value and the node changes it's 'run mode' to this.
    Such run modes could then be:

    • Normal RUN with sleep

    • RUN without sleep (OTA could be triggered)

    • STOP (waiting for OTA)

    It would be nice to somehow standardize on this, I think other battery operated nodes have the same need. Controllers could then also standardize handling such 'run mode request' by if needed automatically switching the node to STOP - OTA mode and doing the OTA. On could then instruct the controller to upload a new firmware to the node as soon as it comes online (in my case every 5 mins).

    Any other ideas or can this already be done in a standard way?
    Please comment if you find this a useful feature as well. Then I could add it as a feature request :dancer:

    Kurt

    chrilleC 1 Reply Last reply
    2
    • K Kurt

      Hi,
      I'm looking for some hints how to enable doing OTA to a node that is normally sleeping most of the time. Whilst sleeping the node can't receive messages from the controller so initiating OTA is difficult.

      The node wakes up every 5mins to send a sensor update. I was thinking to then also get the node to request a value from the controller representing it's 'run mode'. The controller then sends a value and the node changes it's 'run mode' to this.
      Such run modes could then be:

      • Normal RUN with sleep

      • RUN without sleep (OTA could be triggered)

      • STOP (waiting for OTA)

      It would be nice to somehow standardize on this, I think other battery operated nodes have the same need. Controllers could then also standardize handling such 'run mode request' by if needed automatically switching the node to STOP - OTA mode and doing the OTA. On could then instruct the controller to upload a new firmware to the node as soon as it comes online (in my case every 5 mins).

      Any other ideas or can this already be done in a standard way?
      Please comment if you find this a useful feature as well. Then I could add it as a feature request :dancer:

      Kurt

      chrilleC Offline
      chrilleC Offline
      chrille
      wrote on last edited by
      #2

      @Kurt said:

      I'm looking for some hints how to enable doing OTA to a node that is normally sleeping most of the time. Whilst sleeping the node can't receive messages from the controller so initiating OTA is difficult.
      [...]
      Please comment if you find this a useful feature as well. Then I could add it as a feature request

      I fully support this feature request! The majority of my sensors are battery powered and they all have SPIflash installed

      • Jan
      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

        We've already implemented something we call "smart sleep" which makes sure to send a heart beat to server and wait for a short period before going into sleep mode. This enables controllers to buffer outgoing commands and potential FOTA transmissions for sleeping nodes.

        https://www.mysensors.org/view/167#sleeping

        AFAIK only MYSController and MyController supports this feature.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kurt
          wrote on last edited by
          #4

          That sounds great hek, I'll give it a try.
          Strangely I looked over this when reading the API spec.

          1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #5

            I must have missed adding the smartSleep functions in the documentation page when we released 2.0. Did it just before answering you :blush:

            1 Reply Last reply
            1
            • martinhjelmareM Offline
              martinhjelmareM Offline
              martinhjelmare
              Plugin Developer
              wrote on last edited by
              #6

              Home assistant also supports smartsleep.

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


              17

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


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