rules delay to post vcc on deepsleep

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: rules delay to post vcc on deepsleep

#21 Post by budman1758 » 12 Feb 2018, 04:17

Does this apply here?

https://www.letscontrolit.com/wiki/inde ... _Variables

Note the part about a custom compiled firmware?
"The glass is twice as big as it needs to be".

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#22 Post by rene9900 » 12 Feb 2018, 07:50

budman1758 wrote: 12 Feb 2018, 04:17 Does this apply here?

https://www.letscontrolit.com/wiki/inde ... _Variables

Note the part about a custom compiled firmware?
i did enable vcc by "true" before uploading to my 8266, and it does post vcc in every boot, as long as it is not from deepsleep, then it go to sleep before reading vcc, so it post only value of -1.00

This is arduino IDE serial output on normal boot :

INIT : Booting Build nr:120
IP : Static IP :192.168.1.13
WIFI : Connecting... 1
WIFI : Connected!
MQTT : Connected to broker
Subscribed to: /8266-3/#
INIT : Boot OK
INIT : Normal boot
EVENT: System#Boot
ACT : Publish /8266-3/status,8266-3_Online
ACT : timerSet,1,8
MQTT : Topic: /8266-3/status
MQTT : Payload: 8266-3_Online
EVENT: Clock#Time=Mon,07:45
EVENT: Rules#Timer=1
ACT : On bat#VCC do
ACT : Publish /8266-3/bat/VCC,3.46
MQTT : Topic: /8266-3/bat/VCC
MQTT : Payload: 3.46
WD : Uptime 0 ConnectFailures 0 FreeMem 25432

This is Arduino IDE serial output with deepsleep enabled:

INIT : Booting Build nr:120
IP : Static IP :192.168.1.13
WIFI : Connecting... 1
WIFI : Connected!
MQTT : Connected to broker
Subscribed to: /8266-3/#
INIT : Boot OK
INIT : Deep sleep enabled
INIT : Reboot from deepsleep
EVENT: System#Boot
ACT : Publish /8266-3/status,8266-3_Online
ACT : timerSet,1,12
MQTT : Topic: /8266-3/status
MQTT : Payload: 8266-3_Online
SYS : 3.46
EVENT: bat#VCC=3.46
Enter deep sleep...


this is my enabled rules:

On System#Boot do
Publish /%sysname%/status,%sysname%_Online
timerSet,1,12
endon
On Rules#Timer=1 do
On bat#VCC do
Publish /%sysname%/bat/VCC,%vcc%
endon

as serial show, the vcc publish part is ignored for some reason?

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: rules delay to post vcc on deepsleep

#23 Post by budman1758 » 12 Feb 2018, 08:10

Just for the hell of it have you tried turning deepsleep off and wait to see if VCC publishes at all? On boot and wake from sleep are different I imagine. Maybe it needs at least 60 seconds or so.
I'm just throwing stuff against the wall to see if anything sticks... :geek:
"The glass is twice as big as it needs to be".

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#24 Post by grovkillen » 12 Feb 2018, 08:31

budman1758 wrote: 12 Feb 2018, 08:10 Just for the hell of it have you tried turning deepsleep off and wait to see if VCC publishes at all? On boot and wake from sleep are different I imagine. Maybe it needs at least 60 seconds or so.
I'm just throwing stuff against the wall to see if anything sticks... :geek:
+1
Good thinking Bud!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: rules delay to post vcc on deepsleep

#25 Post by budman1758 » 12 Feb 2018, 08:57

I am wondering now what (if any) difference there is between "systemboot" and "wake from deepsleep" I think you may need a rule that fires when "wake from sleep" happens.
I noticed when I was watching the serial monitor on level 4 when I was testing my keypad app that only "some" system variables were called out in the log on a minute by minute basis. For instance, the ONLY time I ever saw the IP of the unit was on boot. Never saw it at all after that. Matter of fact I believe I only saw "time" and "uptime" regularly. Perhaps "vcc" is like that, only at boot.
Maybe it would work better set up as a regular task. Then you can control the delay time directly.
Hope some of my musings are helpful.
"The glass is twice as big as it needs to be".

Alpensepp
New user
Posts: 5
Joined: 12 Feb 2018, 08:32

same problem, no VCC data after awakening from deep sleep

#26 Post by Alpensepp » 12 Feb 2018, 09:41

Hi

Same problem here...

I use a ESP8266-12 and a BME280 Sensor with ESPEasy_mega-20180209.

The 8266 ist put in deep sleep, awakes every 300s and sends the BME280 data - perfect.

Now I started to use the ADC input to monitor the battery voltage. It works fine when the 8266 is awake all the time, but no ADC data is sent when awakening from deep sleep. The data from the BME280 is sent.

Any ideas?

best regards

Martin

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#27 Post by rene9900 » 12 Feb 2018, 10:23

budman1758 wrote: 12 Feb 2018, 08:10 Just for the hell of it have you tried turning deepsleep off and wait to see if VCC publishes at all? On boot and wake from sleep are different I imagine. Maybe it needs at least 60 seconds or so.
I'm just throwing stuff against the wall to see if anything sticks... :geek:
i try changing my delay to 60 in rules like this:
On System#Boot do
Publish /%sysname%/status,%sysname%_Online
timerSet,1,60
endon
On Rules#Timer=1 do
On bat#VCC do
Publish /%sysname%/bat/VCC,%vcc%
endon

the result is that it do not wait 60 sec from deepsleep wakeup, but go straight to sleep after the boot message ignoring vcc again..
on ordinary boot with no sleep it do wait 60 sec then post vcc....
im clueless by now :S

INIT : Booting Build nr:120
IP : Static IP :192.168.1.13
WIFI : Connecting... 1
WIFI : Connected!
MQTT : Connected to broker
Subscribed to: /8266-3/#
INIT : Boot OK
INIT : Deep sleep enabled
INIT : Reboot from deepsleep
EVENT: System#Boot
ACT : Publish /8266-3/status,8266-3_Online
ACT : timerSet,1,60
MQTT : Topic: /8266-3/status
MQTT : Payload: 8266-3_Online
SYS : 3.45
EVENT: bat#VCC=3.45
Enter deep sleep...

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#28 Post by grovkillen » 12 Feb 2018, 10:32

Please post all your setup using (if you want) my webdumper?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#29 Post by rene9900 » 12 Feb 2018, 10:50

grovkillen wrote: 12 Feb 2018, 10:32 Please post all your setup using (if you want) my webdumper?
i would but how? my mac can not run exe files :)

i tried adding Publish /%sysname%/Time,%systime%
within the timer1,10 event
the systime also do not get reported with sleep enabled..

if i put them all in rules before the timer the Console output do get systime and vcc but without any usable values, i get that the ntp need some secs to grab the time, and guess it is the same issue
with vcc reading, but how do i make a timer that holds deepsleep untill the unit has posted a reading?

EVENT: System#Boot
ACT : Publish /8266-3/status,8266-3_Online
ACT : Publish /8266-3/VCC,-1.00
ACT : Publish /8266-3/Time, 0:00
ACT : timerSet,1,10
NTP : NTP sync requested
NTP : NTP send to 192.36.143.130
NTP : NTP replied!
MQTT : Topic: /8266-3/status
MQTT : Payload: 8266-3_Online
MQTT : Topic: /8266-3/VCC
MQTT : Payload: -1.00
MQTT : Topic: /8266-3/Time
MQTT : Payload: ,0:00
SYS : 3.46
EVENT: #VCC=3.46
Enter deep sleep...
state: 5 -> 0 (0)
rm 0
del if0
usl

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#30 Post by grovkillen » 12 Feb 2018, 12:03

https://www.letscontrolit.com/wiki/index.php/SleepMode
Note that its recommended to set the Message Delay to 0 in the advanced settings page, since you want the unit to broadcast messages asap in order to save precious battery power.
Have you done this?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#31 Post by rene9900 » 12 Feb 2018, 12:37

grovkillen wrote: 12 Feb 2018, 12:03 https://www.letscontrolit.com/wiki/index.php/SleepMode
Note that its recommended to set the Message Delay to 0 in the advanced settings page, since you want the unit to broadcast messages asap in order to save precious battery power.
Have you done this?
yes the message delay in advanced and the delay in devices on the VCC is both on 0

but on the wiki it say :
It will send all the sensor-readings at once (delays are ignored, except for Message Delay at the advanced settings page)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#32 Post by grovkillen » 12 Feb 2018, 12:57

rene9900 wrote: 12 Feb 2018, 12:37
grovkillen wrote: 12 Feb 2018, 12:03 https://www.letscontrolit.com/wiki/index.php/SleepMode
Note that its recommended to set the Message Delay to 0 in the advanced settings page, since you want the unit to broadcast messages asap in order to save precious battery power.
Have you done this?
yes the message delay in advanced and the delay in devices on the VCC is both on 0

but on the wiki it say :
It will send all the sensor-readings at once (delays are ignored, except for Message Delay at the advanced settings page)
You're right. Maybe open a issue on Github?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#33 Post by rene9900 » 12 Feb 2018, 13:32

grovkillen wrote: 12 Feb 2018, 12:57

You're right. Maybe open a issue on Github?
i know not how :)

only way it works is by shortcutting positive and negative to coldboot it then it works . besides the missing delay

WIFI : Connected!
MQTT : Connected to broker
Subscribed to: /8266-3/#
INIT : Boot OK
INIT : Deep sleep enabled
INIT : Cold Boot
EVENT: System#Boot
ACT : timerSet,1,10
NTP : NTP sync requested
NTP : NTP send to 194.239.123.230
NTP : NTP replied!
EVENT: Clock#Time=Mon,13:30
pm open,type:2 0
EVENT: Rules#Timer=1
ACT : Publish /8266-3/status,8266-3_Online
ACT : Publish /8266-3/VCC,3.45
ACT : Publish /8266-3/Time,13:30
MQTT : Topic: /8266-3/status
MQTT : Payload: 8266-3_Online
MQTT : Topic: /8266-3/VCC
MQTT : Payload: 3.45
MQTT : Topic: /8266-3/Time
MQTT : Payload: 13:30
EVENT: Clock#Time=Mon,13:31
WD : Uptime 0 ConnectFailures 0 FreeMem 25624
SYS : 3.45
EVENT: #VCC=3.45
Enter deep sleep...

Alpensepp
New user
Posts: 5
Joined: 12 Feb 2018, 08:32

Re: same problem, no VCC data after awakening from deep sleep

#34 Post by Alpensepp » 13 Feb 2018, 09:06

Alpensepp wrote: 12 Feb 2018, 09:41 Hi

Same problem here...

I use a ESP8266-12 and a BME280 Sensor with ESPEasy_mega-20180209.

The 8266 ist put in deep sleep, awakes every 300s and sends the BME280 data - perfect.

Now I started to use the ADC input to monitor the battery voltage. It works fine when the 8266 is awake all the time, but no ADC data is sent when awakening from deep sleep. The data from the BME280 is sent.

Any ideas?

best regards

Martin
I am a step further now.

When I put the ADC/VCC device as the first device in ESPEasy, the data is sent when awakening from deep sleep. But now, the BME280 data is not sent any more.
It seems, like the 8266 is going to deep sleep too fast, and therefore the last (ore later) devices are not able to send their data.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#35 Post by grovkillen » 13 Feb 2018, 10:39

Please raise this issue up Github, referring to this thread.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: rules delay to post vcc on deepsleep

#36 Post by rene9900 » 14 Feb 2018, 10:53

grovkillen wrote: 13 Feb 2018, 10:39 Please raise this issue up Github, referring to this thread.
I made a ticket on github about it.
https://github.com/letscontrolit/ESPEasy/issues/870

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: rules delay to post vcc on deepsleep

#37 Post by grovkillen » 14 Feb 2018, 11:23

rene9900 wrote: 14 Feb 2018, 10:53
grovkillen wrote: 13 Feb 2018, 10:39 Please raise this issue up Github, referring to this thread.
I made a ticket on github about it.
https://github.com/letscontrolit/ESPEasy/issues/870
Great
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 91 guests