In follow up to: this
It is still not consistent in what is happening. Or that's what I am seeing it as.
This is a lot of screen shots. That may better. It may be worse.
The scenario:
I turn on this machine. The MQTT broker
(host) is on another machine.
This is what I see on my dashboard from a powered off condition. So: machine is off. I turn it on. Load browser and this is what I see.
This is some of the code (screen shot)
Note red
marks.
I get that it is saying the bulb is on
and the message is not retained
.
Yeah, I'll cop that. But it isn't that easy/simple.
That is that part of the code. A bit more looking at what is happening.
That is the MQTT
node. Note: I specify the topic/path.
This is the other MQTT
node which looks at/for the LWT message.
Note here it is Offline
and the message is retained
.
There you see it is looking at/for the LWT
Here it is switched
if the payload is Offline
to output 2.
You can see the LWT
(switch) node going to the function
node (BAN)
Here you see the msg.icon
is set to the font-awesome ban
icon.
Now you see that msg.enabled
is set to false
And (finally) you see that message is sent into the button
node.
So: Ok, the other message is/was sent in error. Ok. But the message was also sent that the button is disabled
and the msg.icon
is set to the ban
icon.
Even if the timing is wrong, the button should be disabled. It isn't
I can post the flow (or part there of) but there are a couple of foreign nodes.
But I need to set the topic (path) in the second MQTT in
node or the message just doesn't seem to be received/actioned.