I know I've asked before but this is the next step/stage.
TASKER for my phone and apps.
I've installed the MQTT part for it and things seem to work. But not always.
At certain battery levels the phone sends messages to Node-Red.
(Note WiFi is not always on, but I'll get to that soon.)
There are x conditions:
Battery low - stage 1
Battery low - stage 2
Of course power can be connected/removed when ever.
And usually only stage 1 is invoked.
The battery gets low.
"Battery low - stage 1" sent.
An LED is turned on. (Orange)
LED turns YELLOW.
LED turns GREEN.
LED goes out.
Normally this works - in testing.
But not always.
What got me initially is that I have to turn on the phone's WiFi and wait 8 seconds before sending the message.
Fair enough I guess. Allows negotiation to happen, etc.
But the other night I connected power, the LED went YELLOW.
An hour or so later it went GREEN - Battery full.
A few minutes later I got up and removed the power.
LED didn't go out.
I invoked the phone to run the code again and it didn't go out.
This morning I did it and it did go out.
So there seems to be something else happening in MQTT, or the negotiation/comms side.
Sorry, I guess this is not the right place. It is probably more on the phone side of things.
But I have to start somewhere.