The Python-based SCALE Client software for acquiring data from various sensors (i.e. via Raspberry Pi platform), processing it, and sharing it through multiple networks and data exchange protocols.
Since many different components in the SCALE client system care about the status of the network connection, we should monitor this in some way (pinging some server? listening for disconnected sockets in MQTT, etc.?) and locally publish a network_(dis)connected event when the status changes so that other components can react accordingly. For example, the MQTTEventSink should always return "False" when asked check_available() so that the EventReporter doesn't block the entire client waiting for the Sink to time out while trying to reconnect.
I wrote an InternetAccessVirtualSensor that pings 8.8.4.4. MQTTEventSink now listen to Internet access status events and returns False when there's no Internet connection.
Since many different components in the SCALE client system care about the status of the network connection, we should monitor this in some way (pinging some server? listening for disconnected sockets in MQTT, etc.?) and locally publish a network_(dis)connected event when the status changes so that other components can react accordingly. For example, the MQTTEventSink should always return "False" when asked check_available() so that the EventReporter doesn't block the entire client waiting for the Sink to time out while trying to reconnect.