With the current version (0.34.4, and perhaps in previous versions but not in 0.28) I have found the lights become unreachable after some period of time.
I am starting to suspect that it may be connected to the loss of one of the configured lights on the network becoming unreachable after ha has started. I can’t yet pin it down, but I believe that if someone cut power to one of the flux lightbulbs by turning off the light switch, sometime after the flux_led component no longer can connect to any flux wifi light.
Below is the error in the log if I cut power to a bulb. But after 15 minutes, the others are still responsive, so my theory, admittedly, doesn’t yet have much validity - I’m sharing early at this point. I’ll check back in a while and report any changes. Not sure what to look for. Nonetheless, should the loss of one bulb really be generating this amount of errors in the log file? My logging is set to error only. A light being unreachable probably should simply be reported as “device unreachable.”
16-12-08 10:30:01 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 812, in __readResponse
chunk = self.__readRaw(remaining)
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 822, in __readRaw
return self.socket.recv(byte_count)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 486, in refreshState
rx = self.__readResponse(14)
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 814, in __readResponse
self.reconnect()
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 791, in reconnect
self.socket.connect((self.ipaddr, self.port))
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 386, in _update_entity_states
yield from update_coro
File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 213, in async_update_ha_state
yield from self.hass.loop.run_in_executor(None, self.update)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/light/flux_led.py", line 159, in update
self._bulb.refreshState()
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 489, in refreshState
self.reconnect()
File "/home/pi/.homeassistant/deps/flux_led/__init__.py", line 791, in reconnect
self.socket.connect((self.ipaddr, self.port))
OSError: [Errno 113] No route to host