Andy Stanford-Clark <an...@stanford-clark.com
> Hi Chris
> this is one of the times you need end-to-end application-level
> acknowledgment... your python app needs to know that your
> node-red app is alive. If you want your python app to decide
> reasonably quickly that the other end isn't there, and shut
> down, then the recommended way to do this is...
> 1. subscribe to a topic that is unique to your device (e.g.
> reply/xxxxx where xxxxx is the mac address or serial number or
> something that won't get used by another device on your broker.
> 2. publish a QoS *0* message with the config info to node-RED
> 3. start a timer 4. at the node-red end, when you receive a
> config message from a device, publish back a message to say you
> got it, to the reply/xxxx topic of the device (usually we put
> that topic in the request message from the device, so node-red
> knows where to reply to) 5. If your device receives the
> response message from node-RED before the timer pops, you're up
> and running. 6. if the timer pops and you haven't heard from
> node-RED yet, assume it's not there, and shut yourself down.