One hue light on/off all night

Odd thing this morning, one of the 3 lights in the kitchen was already on when I walked. They are normally activated by a Fibaro sensor. I checked the logs and all it had was

17-02-24 22:53:22 ERROR (Thread-23) [pychromecast.socket_client] Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py", line 246, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
ConnectionRefusedError: [Errno 111] Connection refused
17-02-24 22:53:53 WARNING (Thread-23) [pychromecast.socket_client] Heartbeat timeout, resetting connection
17-02-24 22:54:11 ERROR (Thread-23) [pychromecast.socket_client] Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/deps/pychromecast/socket_client.py", line 246, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
OSError: [Errno 113] No route to host

which is irrelevant

then the logbook

00:08
Kitchen 1 turned on
00:08
Lights turned off
00:08
Kitchen 1 turned off
00:07
Lights turned on
00:07
Kitchen 1 turned on
00:06
Lights turned off
00:06
Kitchen 1 turned off
00:04
Lights turned on
00:04
Kitchen 1 turned on
00:03
Lights turned off
00:03
Kitchen 1 turned off
00:02
Lights turned on
00:02
Kitchen 1 turned on
00:01
Lights turned off
00:01
Kitchen 1 turned off

repeat all night long… Anyone seen something like this before and what could cause it please?

Cheers
Mark

Just a guess, but can your motion sensor see a light, possibly? Lights turning on/off could appear to be motion and every time out triggers an off, which triggers an on.

Another possibility is you’ve got unexpected (aka forgotten) automation possibly with another controller or hub or …? I know in my system, any of four or five computers could be turning things on/off at any given time.

Or there can be an unexpected “motion source” like the fridge or hot air duct that trips the IR sensor. Radiant heat from behind your fridge would cycle over night.

I’d tend to cover the sensor and see if it continues. Or find a quiet place, out of sensor range, and just watch for a bit, perhaps following your log on a pad or phone.

thanks for the reply. I’ve had the sensor in the same place for a couple of weeks now and it was the 1st time it happened.

I’ll keep my eye on it and see if it happens again tonight.

Well, don’t want to hijack that thread but I have a strange thing happening as well. Sometimes, one light - it might be, always the same, goes on (again) shortly after being switched off.
Today, for exaple we’ve left our house, a locative automation turned all our lights off and set the thermostate to away mode, about a minute later the following happened:

Feb 25 18:30:06 cs hass[29985]: 17-02-25 18:30:06 INFO (Thread-6) [homeassistant.components.cover.command_line] Running state command: /home/cs/.homeassistant/state.sh
Feb 25 18:30:08 cs hass[29985]: 17-02-25 18:30:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.wohnzimmer_3=off; friendly_name=Wohnzimmer 3, emulated_hue=False, supported_features=127, homebridge_hidden=True @ 2017-02-25T18:29:39.177471+01:00>, new_state=<state light.wohnzimmer_3=on; friendly_name=Wohnzimmer 3, supported_features=127, homebridge_hidden=True, xy_color=[0.4573, 0.41], rgb_color=(255, 200, 118), emulated_hue=False, color_temp=366, brightness=254 @ 2017-02-25T18:30:08.972866+01:00>, entity_id=light.wohnzimmer_3>
Feb 25 18:30:08 cs hass[29985]: 17-02-25 18:30:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state group.licht_wohnzimmer=off; friendly_name=Licht Wohnzimmer, emulated_hue=False, order=1, entity_id=('light.wohnzimmer_1', 'light.wohnzimmer_2', 'light.wohnzimmer_3') @ 2017-02-25T18:29:39.200547+01:00>, new_state=<state group.licht_wohnzimmer=on; friendly_name=Licht Wohnzimmer, emulated_hue=False, order=1, entity_id=('light.wohnzimmer_1', 'light.wohnzimmer_2', 'light.wohnzimmer_3') @ 2017-02-25T18:30:08.985608+01:00>, entity_id=group.licht_wohnzimmer>
Feb 25 18:30:08 cs hass[29985]: 17-02-25 18:30:08 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state light.wohnzimmer=off; friendly_name=Wohnzimmer, emulated_hue=False, supported_features=127, is_hue_group=True @ 2017-02-25T18:29:39.181697+01:00>, new_state=<state light.wohnzimmer=on; friendly_name=Wohnzimmer, supported_features=127, is_hue_group=True, xy_color=[0.4573, 0.41], rgb_color=(255, 200, 118), emulated_hue=False, color_temp=366, brightness=254 @ 2017-02-25T18:30:08.991142+01:00>, entity_id=light.wohnzimmer>

I have no chance to see what triggered that light on, do I? It hasn’t been homebridge, as far as I can see.
It happens from time to time, always the same light goes on again, and I guess it always happens some seconds after an automation switched off exactly that light.
Strange.

Could be conflicting automations; your away state is, I expect, event driven based on presence detection. You may have another automation for sunset activation? Keep in mind that your presence can be … unreliable near the edge; your phone can get/lose your home wifi as your leaving, for example. If you are using a Hue hub, you may be seeing “dueling updates” where HA is telling the lights to turn off, but Hue is turning it back on for some reason; it does seem odd to me it’s just one light.

I have no Hue devices, so not the most helpful, I guess. I use a Wink hub that supports “robots” that can easily be built to have unplanned interactions, but they seem easier to create than HA automations.

Yes, that’s quite obvious, but I can’t think of an automation. And if it were a location based automation that should be visible in the hass logs, shouldn’t it?
Right now - if it’s not a strange bug in hass - I can only imagine hue itself having a bug.
(I guess the way the log looks the light is switched by someone else and hass is just reporting the change… or can’t one be sure about that from the log?)

You may need to check more than one source; does Hue offer the same kind of history? Assuming you’re on a pi, the /var/log/syslog for the time? HA is verbose almost to a fault, but looking several minutes before/after may help.

If you have Geofencing set up, your phone/app can turn lights on, supposedly since you’re arriving home (inside the fence)? There is also the disconnect wifi/reconnect mobile data, too, about the same time HA says you left; so the app loses wifi as HA turns the light off, and the app pushes “this should be on” over cell data which is slow enough to be last and “win”.

I have had some light anomalies when HA has some network issues; but I think those have always been to turn things Off.

Yes but I can see clearly in the logs that I’ve been away, lights out, 30 seconds later 1 light on again without any other geofence related message. Unfortunately I haven’t found any logs for from hue. But there, geofencing isn’t active.

Hi,

For me same problem since the last update.
My automations don’t change…

Only one light switch on / off with no reasons and permanetly :stuck_out_tongue:

perhaps a little bug from the last update …