Delay Sleep Mode for serial comm

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
meticulus
New user
Posts: 2
Joined: 17 Nov 2016, 08:39

Delay Sleep Mode for serial comm

#1 Post by meticulus » 17 Nov 2016, 13:42

Dear Members,

i have managed to use the serial server along with a simple IR interface connected to the ESP
in order to read out my Landis & Gyr ZMD120 Electricy Meter. The command transmission and data
reception is handled by a Node Red Flow running on a Raspberry and everything works well so far.

Next, i'd like to integrate the ESP and optical R/W head in a small housing, battery powered and
like to read the power consumption every 30 minutes or so.
Since the meter readout itself takes about 15 seconds, my question now is:

- when the sleep mode is enabled, is there a possibility to set a timer in order to keep it
in wake state for 15 seconds (or until a special MQTT message arrives when readout done),
not that it goes to standby amidst the transmission. Perhaps by a rule?

- is there eventually a possibility to sent/receive data on the serial interface (and process)
in espeasy itself?

Many thanks!
_____
Besides, i'd like to congratualate all the devlopers of Easyesp. It's a fantastic
piece of SW and i like it better every day.

Martinus

Re: Delay Sleep Mode for serial comm

#2 Post by Martinus » 19 Nov 2016, 18:39

meticulus wrote:Dear Members,

i have managed to use the serial server along with a simple IR interface connected to the ESP
in order to read out my Landis & Gyr ZMD120 Electricy Meter. The command transmission and data
reception is handled by a Node Red Flow running on a Raspberry and everything works well so far.

Next, i'd like to integrate the ESP and optical R/W head in a small housing, battery powered and
like to read the power consumption every 30 minutes or so.
Since the meter readout itself takes about 15 seconds, my question now is:

- when the sleep mode is enabled, is there a possibility to set a timer in order to keep it
in wake state for 15 seconds (or until a special MQTT message arrives when readout done),
not that it goes to standby amidst the transmission. Perhaps by a rule?

- is there eventually a possibility to sent/receive data on the serial interface (and process)
in espeasy itself?

Many thanks!
_____
Besides, i'd like to congratualate all the devlopers of Easyesp. It's a fantastic
piece of SW and i like it better every day.
I don't think this can be achieved with the current ESP Easy build.

You would need a manual deepsleep command and using the rules engine to control this.
And the serial plugin needs to send an event that can trigger the deepsleep command.

Have to think about this...

meticulus
New user
Posts: 2
Joined: 17 Nov 2016, 08:39

Re: Delay Sleep Mode for serial comm

#3 Post by meticulus » 07 Dec 2016, 14:08

Hi Martinus,

thanks for your response.
I do use Node-Red on a Raspberry to start the polling of the meter via the
ser2net server in ESPeasy. After wake up, the ESP sends an MQTT message
(rule on System#Boot), which triggers Node-Red to send the poll-sequence.
Besides that, ESP-Easy reads a DHT-22.

Activating Deep-Sleep, there is not enough time to receiver the response of the meter,
as this would take atround 20s.

I tried to use a timer rule to keep it awake for 30 sec (just wait), but that did not work.
The rules seem to be overridden by the deep-sleep timeout.

Cheers, Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests