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. General Discussion
  3. Sleep support in Gateway

Sleep support in Gateway

Scheduled Pinned Locked Moved General Discussion
11 Posts 5 Posters 2.8k 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.
  • stefaanvS stefaanv

    Hi,
    I've built a sensor node that can sleep for most of the time except it receives a

    stefaanvS Offline
    stefaanvS Offline
    stefaanv
    wrote on last edited by
    #2

    Sorry for the typo above.

    I've created a sensor node that could sleep most of the time but needs to receive messages occasionally. I'm eager to reduce the power draw since it is solar/battery powered. The controller is Domoticz.
    Sleep mode doesn't work for incoming messages (to the sensor) because Domoticz doesn't support message delaying.

    My question : is it feasible to create a gateway that buffers messages from the controller to the sensor until the sensor node wakes up ? That way sleep mode can be supported without any changes to the controller software.

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

      With something a bit more powerful than an ATmega328, yes, probably.

      stefaanvS 1 Reply Last reply
      0
      • stefaanvS stefaanv

        Sorry for the typo above.

        I've created a sensor node that could sleep most of the time but needs to receive messages occasionally. I'm eager to reduce the power draw since it is solar/battery powered. The controller is Domoticz.
        Sleep mode doesn't work for incoming messages (to the sensor) because Domoticz doesn't support message delaying.

        My question : is it feasible to create a gateway that buffers messages from the controller to the sensor until the sensor node wakes up ? That way sleep mode can be supported without any changes to the controller software.

        AWIA Offline
        AWIA Offline
        AWI
        Hero Member
        wrote on last edited by
        #4

        @stefaanv what you can do is send a request for the data to domoticz and keep the node alive for a limited time until it receives the data or times out. Be aware that domoticz only accepts requests FOR a few data types. V_STATUS, V_TEXT, V_VAR

        stefaanvS 1 Reply Last reply
        0
        • hekH hek

          With something a bit more powerful than an ATmega328, yes, probably.

          stefaanvS Offline
          stefaanvS Offline
          stefaanv
          wrote on last edited by
          #5

          @hek What is missing in the AtMega328 ? In my case the messages are only spurious door open/close instructions. I expect only a couple of message a day which can be picked up by the sensor node every 10 seconds or so.
          Is it possible in that case ? Can it be done in sketch code using the current library ?

          tbowmoT 1 Reply Last reply
          0
          • AWIA AWI

            @stefaanv what you can do is send a request for the data to domoticz and keep the node alive for a limited time until it receives the data or times out. Be aware that domoticz only accepts requests FOR a few data types. V_STATUS, V_TEXT, V_VAR

            stefaanvS Offline
            stefaanvS Offline
            stefaanv
            wrote on last edited by
            #6

            @AWI Thought about that, but I can't figure out how instruct to store V_TEST or V_VAR information in Domoticz nodes for sending it to the MySensors node. I've searched the Domoticz forum over and over without success. Can you point me in the right direction ?

            AWIA 2 Replies Last reply
            0
            • stefaanvS stefaanv

              @AWI Thought about that, but I can't figure out how instruct to store V_TEST or V_VAR information in Domoticz nodes for sending it to the MySensors node. I've searched the Domoticz forum over and over without success. Can you point me in the right direction ?

              AWIA Offline
              AWIA Offline
              AWI
              Hero Member
              wrote on last edited by
              #7

              @stefaanv you can fill the V_TEXT device from a lua script in Domoticz.

              1 Reply Last reply
              0
              • stefaanvS stefaanv

                @hek What is missing in the AtMega328 ? In my case the messages are only spurious door open/close instructions. I expect only a couple of message a day which can be picked up by the sensor node every 10 seconds or so.
                Is it possible in that case ? Can it be done in sketch code using the current library ?

                tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #8

                @stefaanv

                The atmega 328p doesn't have much ram memory, if you want to store messages on the GW for a node. Also the framework for doing so is not developed yet, and would probably also have a problem with the limited flash storage for programs

                V 1 Reply Last reply
                1
                • stefaanvS stefaanv

                  @AWI Thought about that, but I can't figure out how instruct to store V_TEST or V_VAR information in Domoticz nodes for sending it to the MySensors node. I've searched the Domoticz forum over and over without success. Can you point me in the right direction ?

                  AWIA Offline
                  AWIA Offline
                  AWI
                  Hero Member
                  wrote on last edited by
                  #9

                  @stefaanv if you look for lua in Domoticz there are many examples for lua scripting. You can read the values from sensors and "publish" these in a Text (V_TEXT) device. Although this belongs in the domoticz forum/ section: A lua example excerpt line where a text device "887" is fillled with three values; temp (float) ; humidity (int) ; pressure(float). These values are filled from a generic weather device..

                  commandArray = {} ;
                  sWeatherTemp, sWeatherHumidity, sWeatherUV, sWeatherPressure, sWeatherUV2 = otherdevices_svalues['AlmereWeer']:match("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)") ;
                  sWeatherTemp = tonumber(sWeatherTemp);
                  sWeatherHumidity = tonumber(sWeatherHumidity);
                  sWeatherUV = tonumber(sWeatherUV);
                  sWeatherPressure = tonumber(sWeatherPressure);
                  sWeatherUV2 = tonumber(sWeatherUV2);
                  commandArray[1] = {['UpdateDevice'] = string.format ("887|0|%2.1f:%3d:%4.1f", sWeatherTemp, sWeatherHumidity, sWeatherPressure)}
                  return commandArray
                  
                  1 Reply Last reply
                  1
                  • tbowmoT tbowmo

                    @stefaanv

                    The atmega 328p doesn't have much ram memory, if you want to store messages on the GW for a node. Also the framework for doing so is not developed yet, and would probably also have a problem with the limited flash storage for programs

                    V Offline
                    V Offline
                    vikasjee
                    wrote on last edited by
                    #10

                    @tbowmo Can a ESP8266 kind of device be helpful here? Especially the kinds of NodeMCU V3 with huge memory and flash mem size? And these days they are getting quite economical too... (in terms of both costs and power requirements)

                    1 Reply Last reply
                    0
                    • tbowmoT Offline
                      tbowmoT Offline
                      tbowmo
                      Admin
                      wrote on last edited by
                      #11

                      @vikasjee

                      it could probably be done with the ESP, or the new GW device for the "masses", that is coming later this year. It is build on a atmel SAMD (same MCU as used on arduino Zero), currently being evaluated by our manufacturing partner in China.

                      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