Page 1 of 1

Publishing event

Posted: 22 Oct 2019, 13:48
by Drum
I expect this has been brought up, I am probably searching for the wrong terms.
I can post from a rule and from an event to MQTT, but I setup an event to publish "uptime" and it sends 4 uptime messages, 1 with the actual value and 3 with 0.00.
Which is how it appears in the serial console (below)
Publishing with a rule, on the "UPTIME" event I only get one, which is correct. For the UPTIME device it is posting for the values with "None" in the output configuration.
Is this correct, known issue or.....

Code: Select all

2208094 : EVENT: Clock#Time=Tue,13:38
2221648 : WD   : Uptime 37 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
2251648 : WD   : Uptime 38 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
2259062 : SYS  : 38.00,0.00,0.00,0.00
2259065 : EVENT: UPTIME#uptime=38.00
2259077 : ACT  : Publish, /ESPFeather66-01 Testing/IP,192.168.1.109
2259086 : Command: publish
2259094 : EVENT: UPTIME#=0.00
2259104 : EVENT: UPTIME#=0.00
2259113 : EVENT: UPTIME#=0.00
2267935 : Rules : Save rulesSet: 1 currentSet: 1 rules.length(): 163 Write to file: rules1.txt
2267937 :  Webserver args: 0: 'set' length: 1 1: 'rules' length: 163 2: 'plain' length: 271
2268094 : EVENT: Clock#Time=Tue,13:39
2281648 : WD   : Uptime 38 ConnectFailures 0 FreeMem 21584 WiFiStatus 3
2311648 : WD   : Uptime 39 ConnectFailures 0 FreeMem 21584 WiFiStatus 3
2319062 : SYS  : 39.00,0.00,0.00,0.00
2319064 : EVENT: UPTIME#uptime=39.00
2319077 : ACT  : Publish, /ESPFeather66-01 Testing/IP,192.168.1.109
2319087 : Command: publish
2319095 : ACT  : Publish, /ESPFeather66-01 Testing/UPTIME,39
2319103 : Command: publish
2319111 : EVENT: UPTIME#=0.00
2319122 : EVENT: UPTIME#=0.00
2319132 : EVENT: UPTIME#=0.00
2328094 : EVENT: Clock#Time=Tue,13:40

Re: Publishing event

Posted: 22 Oct 2019, 14:13
by grovkillen
How does the task settings look?

Re: Publishing event

Posted: 22 Oct 2019, 15:00
by Drum
TashSetting.JPG
TashSetting.JPG (107.1 KiB) Viewed 8611 times

Re: Publishing event

Posted: 22 Oct 2019, 15:08
by Wiki
Just change the output data type to "Single"

Re: Publishing event

Posted: 22 Oct 2019, 15:13
by grovkillen
Yep, that should be good then.

Re: Publishing event

Posted: 22 Oct 2019, 15:21
by Drum
Okay, I looked for something on that but did not see anything in the Readthedocs, but I have not figured out the structure yet, and the note seemed to discourage changing.

It works, Thank you, I am just used to "none" taking care of that one. Whatever works is good with me!

This is my first install since 146, so I have a lot of catching up to do..

Re: Publishing event

Posted: 22 Oct 2019, 21:32
by TD-er
The output selector on some plugins is a bit buggy still.
It was added since having just 4 values instead of one was also causing a lot more issues so therefore I added the selector.
Still not perfect as you can see.