Sleep support in Gateway
-
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.
-
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.
@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 ? -
@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
@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 ?
-
@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 ?
-
@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 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 -
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
-
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.