Values are sent twice after deep sleep

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
grumpazoid
Normal user
Posts: 10
Joined: 05 Jan 2019, 16:20

Values are sent twice after deep sleep

#1 Post by grumpazoid » 04 Feb 2021, 12:35

I have a single controller entered - MQTT and I am monitoring the domoticz/in topic. All values in the controller are default apart from IP of controller. Board is Wemos D1 mini.
Device interval is set to 0.

When it wakes from deep sleep I get 2 messages sent of the current device state(s).
Is there a way to reduce this to a single message on wake up?

Thanks
G

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Values are sent twice after deep sleep

#2 Post by TD-er » 04 Feb 2021, 15:01

Can you give an example of the MQTT messages sent?
Also, what task/plugin is sending the values?

grumpazoid
Normal user
Posts: 10
Joined: 05 Jan 2019, 16:20

Re: Values are sent twice after deep sleep

#3 Post by grumpazoid » 04 Feb 2021, 16:07

Here is an example output from node red with just ADC device enabled :

04/02/2021, 14:56:01node: 9a9d8fa6.08821
domoticz/in : msg.payload : Object
object
idx: 501
RSSI: 10
nvalue: 0
svalue: "4.78"
04/02/2021, 14:56:02node: 9a9d8fa6.08821
domoticz/in : msg.payload : Object
object
idx: 501
RSSI: 8
nvalue: 0
svalue: "4.78"

If I disable the ADC device, and add a switch in its place the result is the same - I get it twice.
04/02/2021, 15:05:58node: 9a9d8fa6.08821
domoticz/in : msg.payload : Object
object
idx: 500
RSSI: 10
command: "switchlight"
switchcmd: "Off"
04/02/2021, 15:05:58node: 9a9d8fa6.08821
domoticz/in : msg.payload : Object
object
idx: 500
RSSI: 8
command: "switchlight"
switchcmd: "Off"

User avatar
Ath
Normal user
Posts: 3520
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Values are sent twice after deep sleep

#4 Post by Ath » 04 Feb 2021, 16:35

What version of ESPEasy are you using (name of the .bin file please)?
/Ton (PayPal.me)

grumpazoid
Normal user
Posts: 10
Joined: 05 Jan 2019, 16:20

Re: Values are sent twice after deep sleep

#5 Post by grumpazoid » 04 Feb 2021, 17:04

Sorry, Am using ESP_Easy_mega_20210114_normal_ESP8266_4M1M.bin

grumpazoid
Normal user
Posts: 10
Joined: 05 Jan 2019, 16:20

Re: Values are sent twice after deep sleep

#6 Post by grumpazoid » 05 Feb 2021, 12:43

I have just tried removing domoticz/out from controller subscribe but leaving the controller publish value (domoticz/in) alone.
With this setup I get no messages at all being published to domoticz/in.


I have verified that 2 messages are sent using MQTT explorer.

I'm also getting the 2 messages from a cold boot.

Anything else I could try? An older version maybe?

grumpazoid
Normal user
Posts: 10
Joined: 05 Jan 2019, 16:20

Re: Values are sent twice after deep sleep

#7 Post by grumpazoid » 05 Feb 2021, 16:49

I have just tested with ESP_Easy_v2.0.0-dev13_normal_ESP8266_4096.bin

I can confirm that this version only sends 1 message on the publish topic at restart.

However for some reason it sends two messages on the subscription topic. First is "Connection Lost" and then "connected"
If the default domoticz/out is used I get lots of errors in node red as I have lots of nodes listening on that topic and they expect a something json formatted.

Is there any way to stop it publishing on the subscribe domoticz/out topic?


Also rules work for me on this version - they don't on latest mega.

Maybe there is a mega version that solves all the above issues?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 30 guests