Closed mosmuell closed 4 months ago
The component could be called Connection
or so. This would be an ABC and needs implementation of connect()
and is_available()
.
Concrete implementations could include TCPConnection
or SerialConnection
which define those methods already and just need user input in the constructor (hostname or serial port, respectively).
Is your feature request related to a problem? Please describe. If not configured correctly, services crash when the connection to a device gets lost. This might cause trouble and is not easily debuggable as the frontend is unreachable.
Describe the solution you'd like To solve this problem, a component could be introduced that allows the user to define what it means that the device is connected, and define how to connect to the device. The service will then automatically check if the device is connected and try to reconnect. The frontend will show the component regardless of whether the device is connected or not. If it is not connected, the component will show some user-defined message and greyed-out content.