[BETA] Hue Motion Sensor (beta) (no hue bridge)

dth_motionsensor
dth_sensors

#13

Thanks for this DH!
Wanted to check if this DH allows enabling/disabling the motion sensor?

The native Hue App allows this feature which i found extremely useful. (Eg:- Disabling Motion during movie time etc)

Thanks again!
Shashank


(Stephen McLaughlin) #14

Currently it does not, I have never used this sensor on a hue hub (I am not entirely sure where my hue hub is).

I understand your use case but I think in the SmartThings ecosystem that functionality is supposed to be achieved with modes. I would love to hear opinions from others though.


#15

Hue bridge, not Hue hub.. Just sayin’, :wink:


(Stephen McLaughlin) #16

I have just update github with a version that improves the lux readings. I still have no idea if its calibrated but turning the lights on or off in the room is now updating the value,

Max update time is once per minute, requires a value change of at least 20, Otherwise it will update after 10 minutes.


#17

Correct, in the SmartThings paradigm individual devices are not disabled as they are in some other home automation systems. Instead, individual rules determine what to do with device reports, including whether or not to ignore them. This can be accomplished through modes, through the time of day when a rule runs, or, if you are using core, through many other conditionals.

For example, at my house there is a motion sensor in the bedroom. During the day, it is ignored. In the evening, and event from the motion sensor will turn on the overhead light. Late at night, an event for the motion sensor will not turn on the overhead light – – it will turn on a soft night light on the wall. But these decisions are made in the rule, not in the device type handler. :sunglasses:


#18

Thanks Stephen and JD for your responses!

Yes, currently my setup has become so complex that it may require a dedicated operations team to support it :slight_smile:
I do have many modes and rules setup running some other use cases.

Currently the use case I am struggling with is to disable the motion sensor which triggers a GE Z Wave Light Switch and 2 Hue Bulbs ONLY when I am watching a Movie (Currently Apps in Roku).

Hopefully, I will get an Android TV or OpenElec setup so that I can try the below integration which can help me

Thanks


#19

(Bob) #20

Hi Stephen.
Just some feedback for you.

Lux seems to be reporting OK and although it is giving a slightly different reading to my Fibaro one it is not that far away and I suppose its all relative anyway. If the lux value is used to trigger stuff then the level is set accordingly in the rule.
What i have done is added the bold italic bit in line 64. See below.
state(“illuminance”, label:’${currentValue} Lux’, unit:"lux"
This puts the word Lux in the Lux reading circle. Just my take. :wink:
Temperature seems to be reporting accurately too.
Motion seems to be quicker to react than my Fibaro or ST motion sensors.

The ony thing I have noticed is that under the live logging is the folllowing:-
Lux value appears OK in live logging as it does in the ‘Recently’ tab.
Motion does not appear in live logging. Does appear in recently tab.
Temperature does not appear in live logging. Does appear in recently tab.

As said above these are my observations on your DTH and are not meant in any way to be a criticism.
What I will also say is that you have done a brilliant job and you get my vote for ‘Ninja of the Week’. :turtle:

Thanks again.


#21

Thank you for your amazing work. I just got the sensor and loaded up your device handler. No issues finding and installing it right into my things!

Works great, just using the Smart Lighting App to turn on my nursery lights when detect motion but only below 100 lux. I’ll try it during the day to see if it triggers but overall it looks good.

The cheapest motion sensors here in Canada at $39.99 CDN a pop! I’m gonna go load up.


Philips Hue's New Motion Sensor (Extra! Extra! + New and improved versions of its White and Color Ambiance LEDs)
(James T) #23

So I have been using CoRE to control Hue lights but don’t think I have the right rules. I want the light to turn on when lux is below 50 and there is Motion and basically if Motion continues, keep the light on. When Motion stops I want to wait about 5 minutes (in case Motion starts again) then turn off at the end of the 5 minutes. This Sensor and bulb are for in a kitchen and directly faces the oven. Obviously you could end up standing in the same place for a couple of minutes (stiring etc) but that’s where the 5 minute catch all would come in. I have been using a Basic piston but the light still goes off after the 5 minutes and doesn’t seem to evaluate the conditions again. Any suggestions how the rule should be built?
Thanks


(Bob) #24

This works OK for me and the lights will keep on if there is motion.

Note the “State - change only”.
Give it a try. Like I said it works for me.


(James T) #25

Thanks @bobbles I will give that a try


(James T) #26

So I gave your code a go @bobbles and came up with the following:

However it still goes off after the 5 minutes, off for about 30 seconds then back on. However when I looked at the dashboard code I can see you have ‘when true’ etc all listed differently. How do you add the ‘when true’ part?
Thanks in advance


(Bob) #27

The way you have done the piston you need to to enable TCP in the THEN. i.e. cancel on piston state change.


(Hans Bouwmeester) #28

First of all: this is great! I recently started my SmartThings Home automation and bought some Hue Motions Sensors not realizing that where the bulbs are supported, the motion sensors were not (yet).

I’m still familiarizing myself with all this stuff though. Got stuck, did a lot of puzzling/reading but could use some help.

I managed to get the DTH installed and published (I think. As it’s listed and shows as “published” in the IDE). However, when I select “Add a Thing” in the mobile app, there’s no entry there for the sensor? I had expected it under “Sensors” but it isn’t there?

I then manually tried to add it but see I need a “Device ID”? If that’s the way to do it, where would I find it?

So I guess my question is how I get the device to be found or registered in the SmartThings App?

Thanks in advance!


(James T) #29

If it is already paired with the Hue hub you need to put a pin in the reset hole on the back and hold the button down until the led on the front starts flashing. Then go into the Smartthings app and search for devices


(Hans Bouwmeester) #30

Thanks!! Totally forgot the reset pin thing need for pairing it.

Works great now!!


#31

Does this require you to unpair from the existing Hue bridge to use it in ST or can it retain its default functionality with the Hue Hub?


(James T) #32

You can’t keep the Hue Motion controller paired to the hue bridge unfortunately


(Stephen McLaughlin) #33

As @Townsmcp said you need to remove the motion sensor from your Hue Bridge and pair it to the SmartThings Hub directly.

SmartThings supports Hue bulbs connected to the hue Bridge via a polling API, this api does not support outbound notifications. IE You cannot ask the hue bridge to tell you when something happens, you have to keep checking over and over - This would result in too much latency for a useful device handler.