Tutorial adding HUE Motion sensor (Lux,Temp and Motion)

I had ipaddress/api/APIKEY/rules in the url. I took the ip address out and now I get error 0. I’ve just cut and paste the code directly, then changed the numbers to match my sensors. Is there something else I need to modify before posting?

Cheers

Did adding the sensor (First add a virtual motion sensor:) work?

When you press Post it says Error 0 in the Command response?

As far as I’m aware creating the virtual sensor worked. I did it last night, but I believe the response was basically “Success: 12.” I don’t remember exactly what it said, but it did give me a sensor 12 when my previous scan had topped out at 11.

Yes, it returns error 0.

I think I didn’t get the key right, because now I can’t even turn on the lights through the clip editor, it’s returning error 0 for <api/APIKEY/lights/1/state> with put command {“on”:true}.

hmm can you double check your key then? should have an account on Philips where you can check it.
You may also catch me on gitter. chatting may be easier to troubleshoot.

Thanks it works like a charm :slight_smile:

I actually don’t know how to check my key. When I log into my account at philips I only see profile settings which seem to relate to their forums, and then their terms of use.

Side note - how much do I need to personalize this command?

{“devicetype”:“my_hue_app#iphone peter”}

When I originally requested anapi key I just cut and paste, then replaced ‘peter’ with my name. I don’t actually plan on building an app so I wasn’t thinking too much when I did created the account.

Also, now on gitter, duquesne419, never used it before though.

Thank you for the help. I’m a little out of my depth.

Can you contact me on gitter? I can’t seem to find you.
I tried to login at meethue but somehow it doesn’t let me and the reset password doesn’t work.
I’ll wait a bit and see if I can get in again. That way I can tell you where you can find your api key.

I’m actually putting the project on hold. I was trying to set it up for my parents while home for the break, but this has quickly grown into a bigger project. Thank you again for the help, I may be around with some more questions when I pick this back up.

Hello,

I have been following this tutorial to add my Hue Motion Sensor and I receive this in the Home Assistant log for the Lux and Temp sensors:

17-01-17 20:28:24 homeassistant.helpers.template: Error parsing value: ‘dict object’ has no attribute ‘temperature’ (value: {“state”:{“presence”:false,“lastupdated”:“2017-01-18T02:15:40”},“config”:{“on”:true,“battery”:100,“reachable”:true,“alert”:“none”,“ledindication”:false,“usertest”:false,“sensitivity”:2,“sensitivitymax”:2,“pending”:},“name”:“Living Room sensor”,“type”:“ZLLPresence”,“modelid”:“SML001”,“manufacturername”:“Philips”,“swversion”:“6.1.0.18912”,“uniqueid”:“*****************”}, template: {{ value_json.state.temperature | float / 100 }})

also when linking the virtual and physical sensor I received the same error as duquesne, was a solution found? I don’t see the resolution.

Any assistance on this would be much appreciated.

Thank you

We couldn’t troubleshoot anymore because he put working on this on hold.

Can you send me a copy/paste of your rules and sensors?
You can do that in a private message.

I just found out mine has an error like this because i used the wrong ID for the physical sensor. Search for ZLLPresence. All works fine now

1 Like

Hi, I manage to add the motion sensor, it works but I have a problem.
It shows 1 or 0 how did you change it to show on off?
Thanks

I don’t show it anywhere and in my automation I just look for the 1 or the 0.

1 Like

Okej
Thanks

Hi all,

Is there any chance this will be added as a native componment to HA - I just purchased a hue motion sensor… Would be very cool to simply integrate it with HA if poss ?

Will do all these steps if necessary though.

Sounds like the API is exposed better now - something changed at philips ?

Am tempted to buy a few of these as seems cheaper than a AEON zwave stick and multisensor solution,

Well I coouldn’t use divide / that gave an error, but you can use multiply (0.1) that works for dividing values.

You mean for this part?
value_template: ‘{{ value_json.state.temperature | float / 100 }}’

Because in my config that still works fine.

1 Like

Ok - I’m trying this out - What’s the sensorid look like…

i see it in my hue app as…
sml001

tried a curl request to test but I get error type 3 … “not available”

Did you follow the guide carefully and step by step?

think i’ve sorted via the clip page api checker, seems the sensors are just called 1,2,3 etc

in my case,

6 is daylight
2 is a dimmer
3 is the dimmer
4 is temp
5 is presence

so for motion sensor i just need 6,4 and 5 I think…