Updated the example:
-- temperature=100 is the coldest color, not hottest
-- bulb method requires three parameters: address, code and type/kind of bulb
Handle disconnection and BrokenPipe/struct.errors
-- disconnection is perceived during the recv(), so at receiving zero bytes, we do a reconnect, reissue the command, and receive data again. Definitely not the best solution for this, but at least it is working now.
Updated the example: -- temperature=100 is the coldest color, not hottest -- bulb method requires three parameters: address, code and type/kind of bulb
Handle disconnection and BrokenPipe/struct.errors -- disconnection is perceived during the
recv()
, so at receiving zero bytes, we do a reconnect, reissue the command, and receive data again. Definitely not the best solution for this, but at least it is working now.