These sensors need native HA support. I was really surprised when HA didn’t support all of the Hue features especially considering the fact that it’s listed as a Platinum component.
Is someone working on this?
These sensors need native HA support. I was really surprised when HA didn’t support all of the Hue features especially considering the fact that it’s listed as a Platinum component.
Is someone working on this?
Completely agree
I have a number of automation all depending on the sensors. It really does need official support.
Bit of an HA noob so I’m sure I have missed something obvious, but I cannot find any instructions on how to install the Hue Sensors component. Even the post I originally found (https://www.hackster.io/robin-cole/hijack-a-hue-remote-to-control-anything-with-home-assistant-5239a4) says “I have now created a Component” but doesn’t say how it is installed.
Download hue.py from Rob’s GIT:
That can be found in custom_components / sensor/hue.py
You need to setup a custom components folder in your local config directory:
https://developers.home-assistant.io/docs/en/creating_component_loading.html
You’ll have to look that up depending on what platform you’re running, but its the same folder with the config.yaml file.
Place hue.py from Rob’s GIT here:
config_directory / custom_components / sensor/hue.py
Reboot.
As long as you have a Hue bridge setup, your sensors show pop up on the default view page.
Looks like some people are having an issue with 0.81.x, so you might try running an older version of Home Assistant if you get errors.
you also need to add this in your sensors configuration:
- platform: hue
ip_address: !secret hue_ip
token: !secret hue_api_key
(and of course the correct entries in your secrets file)
Hi all, I created a seperate thread to discuss development of a next gen component. Lets keep this thread for discussion about the custom component.
Cheers
I’ve changed the scan interval - lowering and raising … all it does is change the # of errors that show up… It’s showing two errors per scan interval for whatever reason… initially (with no scan_interval set) - it was doing two per Second… Changing it, to say 60 - makes it output two errors per minute. Doesn’t change anything else though.
Also - since I have philips hue integration through discovery already established (for lights) – should I be using that token it already uses? and if so, which file and which # is the token I could use? or should they be different (as they are now).
Also - with the introduction of the new thread regarding official implementation - does that mean that if this isn’t working (like it is for many ppl) - is there no support going forward. ie should I stop posting in this thread?
My Hue kit is in a box as recently moved house, can anyone on the thread help?
I’l get my kit together and start on the new component soon
I just figured it out… After looking at your other reported issues in github - this one: https://github.com/robmarkcole/Hue-sensors-HASS/issues/16
Is why its not connecting,… I turned off (in the Hue app) one of the motion sensors I haven’t setup in the new house, the other day… since then it errors out like this… As soon as I re-enable them - the custom component works perfectly fine…
Hi guys, I have a question regarding the switch.
Via the hue app you are able to cycle through the light setting with each press of the first button.
Is it possible to do the same via HA as I would like an automation that with 1 click turns on the light, yet sets it to dimmed if after a certain time, but still have the option to cycle through if needed.
What delay times are you experiencing from when motion occurs and when Home Assistant shows motion?
Hello guys!
I´m new to HA but somehow managed to get the custom component working. Only thing I did not get (in the otherwise very good documentation) is where and how do I get the names for my sensors from? In HA there are no values for temp and lux in the frontend (see screenshot).
All examples I could find use something like this “states.sensor.kitchen_motion_sensor.attributes.temperature”. Does this mean this sensor needs to be assigned to the room “kitchen” in the Philips Hue app? What if I use 2 sensors in one room? How do I adress a specific sensor in my house?
Thanks in advance for your help and greetings from Germany!
P.S: Sorry if this is the wrong place to put this question. This is all new to me
Can anyone confirm the delay time with the Hue motion sensor? Specifically the time between when motion physically occurs and when Home Assistant updates?
I can’t say specifically but I have an automation which turns on/off a light using a python script with motion from a Hue sensor and as soon as we walk into the area the light comes on. That’s probably the most delay sensitive use-case and it works fine in our household.
I too would like to know if this is possible.
thanks
I’d like to share a small update that I made today in the code. I saw the Niko had released a new switch! Being as I am I bought it and saw that it wasn’t compatible with the script used above. I adapted it to be compatible with FOH products (it’s a new ‘modelid’).
Result:
The adapted code looks like this:
def parse_hue_api_response(response):
"""Take in the Hue API json response."""
data_dict = {} # The list of sensors, referenced by their hue_id.
# Loop over all keys (1,2 etc) to identify sensors and get data.
for key in response.keys():
sensor = response[key]
modelid = sensor['modelid'][0:3]
if modelid in ['RWL', 'SML', 'ZGP', 'FOH']:
_key = modelid + '_' + sensor['uniqueid'][:-5]
if modelid == 'RWL':
data_dict[_key] = parse_rwl(sensor)
elif modelid == 'ZGP':
data_dict[_key] = parse_zgp(sensor)
elif modelid == 'FOH':
data_dict[_key] = parse_foh(sensor)
elif modelid == 'SML':
if _key not in data_dict.keys():
data_dict[_key] = parse_sml(sensor)
else:
data_dict[_key].update(parse_sml(sensor))
elif sensor['modelid'] == 'HA_GEOFENCE':
data_dict['Geofence'] = parse_geofence(sensor)
return data_dict
def parse_foh(response):
"""Parse the json response for a ZGPSWITCH Friends of Hue switch."""
name_raw = response['name']
arr = name_raw.split()
arr.insert(-1, 'switch')
name = ' '.join(arr)
TAP_BUTTONS = {20: 'top_left', 21: 'bottom_left', 22: 'bottom_right', 23: 'top_right'}
press = response['state']['buttonevent']
if press is None:
button = 'No data'
else:
button = TAP_BUTTONS[press]
data = {'model': 'ZGP',
'name': name,
'state': button,
'last_updated': response['state']['lastupdated'].split('T')}
return data
Can you share the (relevant parts of the) involved yaml-files?
My HA on a Rpi3 makes for variable delays, i guess depending on other stuff the Rpi is doing. I also sometimes have it miss automation (to turn on a light as soon as a sendos measures below a certain lux value)… I have a Hue motion sensor that should turn on a lamp, but often it simply doesn’t. For the stuff you can do in Hue, so without HA involved, the response time of lights to motion are very fast.
This has been great to make my Hue dimmer switch infinitely more useful.
The only thing that would improve this is if there were an idle state, or some more accurate way of telling when a button is pressed more than once. I am trying to replicate the original Hue dimmer functionality where pressing the brightness up/down multiple times will increase/decrease the brightness.
Where did you purchase the new Niko Switch?