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

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.

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:

1 Like

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

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.

1 Like

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.

2 Likes

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

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.

1 Like

Thanks @bobbles I will give that a try

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

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

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!

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

1 Like

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

Works great now!!

1 Like

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?

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

1 Like

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.

If you really don’t want to shift the motion sensors to the Smartthings hub a work around would be to have a rule setup that says when the bulb comes on that the sensor controls to action something. That worked well for me but you have a lot less control in the long run

1 Like

II’m starting to loose a bit of faith with these motion sensors being integrated with Smartthings.
I have configured a few different pistons as described above (see pics attached here) and only have one piston working at once for the room in question (other piston is paused so no conflict) but seem to have issues with it all - if the piston hasn’t been triggered for a few hours, when I walk into the room the lights don’t come on. I have to walk out and back in a few times before it works (almost like it’s having to wake up the sensor). I looked at the live logging in My Home - Device - Recently and don’t think the pistons or CoRE are the problem - the sensor just isn’t detecting motion - almost like it is still trying to poll to detect the Hue bridge where it knows its not connected to the hue bridge (sometimes the red led will come on on the sensor). Any suggestions anyone? I know a couple of weeks ago there was a Hue firmware update so the hub and sensors are all on the latest release - Hue hub is version 01036562 and the sensors are 6.1.0.18912

Does the red led on the front of the sensor light up with motion? It should.