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

Sure, no problem. During the testing/transition phase, I just commented out the old setup and put bellow the new configuration.

Can you provide more information as to how I need to set this up?
Will it work with the lights, motion sensor and dimmers?
Will it also keep passing through lux, temp and battery levels?

Suggest you might be interested in the custom component (soon to be added to HA hopefully) on

1 Like

Interesting new component: Timer!

Just follow this :slightly_smiling_face:

So which would be better and less resource hungry?

This: Hue motion sensors + remotes: custom component
Or this: Tutorial adding HUE Motion sensor (Lux,Temp and Motion)

BTW I tried the latter but fail at command: npm install (it says it doesn’t exist).

I don’t know which one is better, but the solution with hue-mqtt-bridge is working great and works with Hue Tap and Hue Motion. If it fails at npm install, maybe you don’t have node installed on your pi. This should help:

curl -sL https://deb.nodesource.com/setup_9.x | bash -
apt-get install -y nodejs

These both work by polling the Hue API. The MQTT package recommends 500ms polling interval, which you can also set with the custom component if you wish.

I’ve added a Hue Motion sensor to Home Assistant using deConz Rest API and Node Red.
This is working ok, but I see that the reported temperature from my sensor is way off, I’d guess it is 4 or 5 °C too high.
Anyone else having this problem or is it just my sensor that has a bad thermometer?

Is it possible to install/use hue-mqtt-bridge on a system using https://github.com/home-assistant/hassio-build/releases/tag/1.1 ? I logged in via SSH to the host system as explained at https://home-assistant.io/developers/hassio/debugging/ but there’s no nodejs, npm, apt-get etc. available. I saw that it’s based on Resin OS and I can’t find a way to install NPM there.

If you can’t install npm. then unfortunately you can’t get hue-mqtt-bridge.

According to this, it seems that you can’t override the polling interval with the custom component, that’s why I’m using the hue-mqtt-bridge and I get much faster response time with the motion sensor.

You can override scan_interval:

sensor:
  - platform: hue_sensors
    scan_interval: 0.1

Btw the dev branch uses an interval of 0.1 by default. I welcome testing but please note this is a WIP.
https://github.com/robmarkcole/Hue-sensors-HASS/tree/dev-phue

Nice, thanks! I tried out the dev-phue branch and it seems to work fine. Including the scan interval of 0.1, so my switch now instantly triggers actions when I press a button :slight_smile: Will report back if I find any issues/bugs.

1 Like

I have recently setup the motion sensor via a rest template sensor. All is working fine the UI and i can see the motion sensor is updated from False to True when motion is detected however if i create an automation with a trigger state from ‘False’ to ‘True’ the automation doesnt run.

Should i be using False/True or On/Off?

Can someone share an example of what they have used to trigger automation from hue motion detection

I use this for my trigger:

  trigger:
    - platform: state
      entity_id: sensor.entry_motion
      to: 'True'
1 Like

Awesome, thanks - i didnt realise it was case sensitive. I was using ‘true’ and should have been using ‘True’

Took way longer than it should to figure that out. :roll_eyes:

I’ve had three philips hue motions sensors set up as temperature sensors in Hass and it’s been working perfectly until about a couple a weeks ago when the sensors disappeared in Hass. No errors in the log-file. If I paste the resource URL in my browser I get the response from the Hue bridge. Any idea whats’ wrong?

Which version of HA are you on? There was a major change to the Hue hub component at 0.60

I actually got it working again, I think it was an indentation error in the config-file, don’t know how that happened… Don’t understand why it didn’t generate anything in the log.

1 Like