Ok, rather than like my previous attempt (may be deleted now) here is the problem:
Two RPIs. They both ping the Gateway and another "real" IP address.
They both report their results and publish them to MQTT.
The messages range from:
OnLine, OffLine. (And if that RPI is powered down/turned off - in which case its messages are ignored.)
I am looking at "who's" message has higher weight than the other.
If both machines are both sending OnLine messages, which is the one I show?
If either sends OffLine then the other will get priority and it's message will be on-sent (that being OnLine.)
If BOTH are OffLine, then who's message is shown?
That's easy enough for me to determine, but please: Indulge me a bit more.
The above is (say) to the MODEM - say.
Then there is the "uplink", as I call it.
The above will need to be done to the message of the "uplink" status as well.
I'm stuck at how to do this: where both are the same.
Well, thinking about it: I think I don't really get the whole thing other than I concept of what it does. But no real understanding of how to do this.
Anyone - please?