thegridelectric / gw-scada-spaceheat-python

GridWorks SCADA for space heating
MIT License
5 stars 2 forks source link

Handling of bad mqtt host is unhelpful. #144

Closed anschweitzer closed 1 year ago

anschweitzer commented 1 year ago

When the mqtt hostname is malformed, or the actual host is missing, the scada response and error reporting is unhelpful. In both cases the connect call just crashes. This might happen in the mqtt thread which might silently die. For a malformed host, e.g. "foo", we get socket.gaierror: [Errno 8] nodename nor servname provided, or not known. For a missing host, e.g. "www.foo.com", we get "TimeoutError: timed out", which is correct, but there is no appropriate propagation of the error. Both cases show "Task exception was never retrieved" on stderr.

anschweitzer commented 1 year ago

This is a probably a duplicate of #155, in which a comm issue causing a paho crash was discovered in the field. Closing this, but re-open if #155 turns out to be only partially related.