Sleep support in Gateway
-
Hi,
I've built a sensor node that can sleep for most of the time except it receives a
-
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.
-
With something a bit more powerful than an ATmega328, yes, probably.
-
@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
-
@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 ?
-
@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 ?
-
@stefaanv you can fill the V_TEXT device from a lua script in Domoticz.
-
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
-
@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
-
@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)
-
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.
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Why is the output of ACS712 current measurement module unchanged?
General Discussion • 19 Jul 2021, 09:09 • Tessie T about 12 hours ago -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 23 Feb 2025, 14:57 -
Running out of nodeId's
General Discussion • 3 Sept 2024, 07:33 • NielBierman 25 Jan 2025, 17:19 -
Combination of networks
General Discussion • 1 Feb 2025, 17:30 • Sniker 4 Feb 2025, 01:02 -
Meet in Malmö, Summer 2016?
General Discussion • 1 Feb 2016, 15:34 • bjacobse 26 days ago