Access Hue Motion Signals

Posted on
Wed Mar 29, 2017 10:16 am
joesan offline
Posts: 98
Joined: Feb 12, 2008

Access Hue Motion Signals

The Hue Motion Sensor works great with our Hue lights and Indigo plays well with them thanks to the great Hue plugin.

But is there any way to use the signals that the Hue Motion sensor triggers to interact with other bits in Indigo?

Scenario: Hue motion sensor switches on the Hue lights, changing their status in Indigo. Is there a way I can use that event/trigger to tell Indigo to turn on some other (non-Hue) lights in Indigo at the same time?

If not by directly accessing the Hue Motion Sensor itself, perhaps off one of the event logs in Indigo?

Posted on
Wed Mar 29, 2017 9:10 pm
CliveS offline
Posts: 761
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Access Hue Motion Signals

I don't have a Hue motion sensor but I have 4 Hue outside lights, I have just setup 3 temp triggers set for Off, 50% and 100% output to look at the Right driveway Light and if I turn it on it triggers the other three via an action. So try Trigger Type "Device State Changed" and use the Hue light as your Device.
This is a log when using On/Off state and Brightness Level.

Code: Select all
new trigger off   device  1632734776 - Driveway Right Light - state: onOffState - changeType: BecomesFalse - compareTo:   
new trigger on 100%  device  1632734776 - Driveway Right Light - state: onOffState - changeType: BecomesTrue - compareTo:   
new trigger on 50%     device  1632734776 - Driveway Right Light - state: brightnessLevel - changeType: BecomesEqual - compareTo: 50


Code: Select all
30 Mar 2017, 03:43:22
 
   Trigger                         new trigger on 100%
   Action Group                    Driveway Lights On 100%
   Sent Hue Lights                 "Driveway Left Light" on to 100 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Right Light" on to 100 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Garage Light" on to 100 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Entrance Light" on to 100 at ramp rate 5.0 sec.
 
   Trigger                         new trigger on 50%
   Action Group                    Driveway Lights On 50%
   Sent Hue Lights                 "Driveway Left Light" on to 50 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Right Light" on to 50 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Garage Light" on to 50 at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Entrance Light" on to 50 at ramp rate 5.0 sec.
 
   Trigger                         new trigger off
   Action Group                    Driveway Lights Off
   Sent Hue Lights                 "Driveway Left Light" off at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Right Light" off at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Garage Light" off at ramp rate 5.0 sec.
   Sent Hue Lights                 "Driveway Entrance Light" off at ramp rate 5.0 sec.


CliveS

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Thu Mar 30, 2017 1:05 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

@joesan: In short... no, not reliably. The Hue Motion sensor communicates directly with the Hue hub (a.k.a. bridge), but Philips has not developed any mechanism for the bridge to notify any external applications like the Hue Lights plugin that a motion sensor (or any sensor or switch, for that matter) has been triggered. So the only solution developers have is to very frequently ask the Hue bridge the status oaf all sensors and compare the reported status to the last reported status. The problem is that the bridge will only allow you to ask it for status updates so often before it stops answering. So at best, any application wanting to know if a motion sensor has detected motion can only ask the bridge about once every 2 or 3 seconds, or longer if you're nearing the maximum of 50 connected Hue devices. That's not fast enough for real-time actions like turning on lights as you enter a room or hallway. It may be okay for a security alarm, but that's about it. The Hue Lights plugin only asks for status updates about every 8 seconds and for people with lots of Hue devices, that's nearing the fastest I'd like to do updates (more due to plugin performance issues than to the Hue bridge).

If Philips ever adds the ability for the bridge to send notifications to external applications, I'd likely add support for that. But for now, there's no sensor support. CliveS's type of solution is the one most Indigo people use, from what I've seen so far anyway.

Posted on
Thu Mar 30, 2017 3:24 pm
joesan offline
Posts: 98
Joined: Feb 12, 2008

Re: Access Hue Motion Signals

@CliveS Thank you very much. That pretty much does what I needed. There's a bit of a lag for the activation of the triggered light (about 5 seconds via RFXCOM) but it does work fairly consistently.


@nsheldon Thanks for the information. I can see how that would be problematic. Thanks for your generosity in providing the Hue Plugin - it's great and really adds to the value of Indigo for us.

Posted on
Thu May 18, 2017 2:58 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

Public Beta 1.6.0 Test Request

Hello everyone. I'm releasing a public beta version of the Hue Lights plugin (version 1.6.0 beta 2) for anyone who'd like to volunteer to test it out before the final version is released. Here are the changes from the current release version 1.5.3.

Download Hue Lights 1.6.0b2.zip

  • Added support for the Hue Motion Sensor, including the motion, temperature and luminance sensors that are part of the Hue Motion Sensor. NOTE: the following caveats with the motion sensor.
    • Motion detection works, but is delayed by 2 seconds or more (depending on how many other devices you have connected to your Hue hub).
    • Motion detection activity can be somewhat "chatty", at least in my tests, possibly causing more log activity than you're used to. The Hue Motion Sensor changes to the "off" state within a few seconds of when motion stops in the room, so it's not like INSTEON or Z-Wave sensors that have a long delay before sending the "off" message after motion stops.
  • Fixed a bug that caused repeated errors and high CPU load if a Hue Lights device was duplicated in the Indigo UI then the model was changed to a different type of Hue Lights device.
  • Greatly improved the rewritten device update timing from (private beta version) 1.6.0b1 so all device types are updated on a more consistent basis.
  • Improved device update efficiency so that states that haven’t changed are repeatedly updated.
  • Rewrote device update timing to better support sensor devices.
  • Rewrote status update methods for all Hue devices to improve code readability and efficiency.
  • Fixed a bug that allowed you to pick a Hue Group as a Recall Preset destination then return an error when attempting to execute the Recall Preset action. The Recall Preset action does not currently support Hue Groups as a destination device.
  • Fixed a bug in the update check function that would incorrectly notify of updates for older versions if the installed version was a pre-release beta.

Posted on
Mon May 22, 2017 5:53 am
marketability offline
User avatar
Posts: 198
Joined: Dec 08, 2015
Location: UK

Re: Access Hue Motion Signals

Hi - beta seems to be working fine
no errors as yet
tested with motion detectors for temp and motion - all seems good
Thanks

Posted on
Mon May 22, 2017 9:53 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

Great! Thanks for testing it out!

Posted on
Fri May 26, 2017 3:21 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

Version 1.6.0 Posted

  • Added support for the Hue Motion Sensor, including the motion, temperature and luminance sensors that are part of the Hue Motion Sensor. NOTE: the following caveats with the motion sensor.
    • Motion detection works, but is delayed by 2 seconds or more (depending on how many other devices you have connected to your Hue hub).
    • Motion detection activity can be somewhat "chatty", at least in my tests, possibly causing more log activity than you're used to. The Hue Motion Sensor changes to the "off" state within a few seconds of when motion stops in the room, so it's not like INSTEON or Z-Wave sensors that have a long delay before sending the "off" message after motion stops.
  • Improved device update efficiency so that states that haven’t changed aren't repeatedly updated.
  • Reworked device update timing to better support sensor devices.
  • Fixed a bug that allowed you to pick a Hue Group as a Recall Preset destination then return an error when attempting to execute the Recall Preset action. The Recall Preset action does not currently support Hue Groups as a destination device.
  • Fixed a bug in the update check function that would incorrectly notify of updates for older versions if the installed version was a pre-release beta.

Posted on
Sat Jun 03, 2017 12:09 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

Version 1.6.1 Posted

  • Fixed a bug that caused an error when clicking the Send Status Request button in the Indigo UI for Hue Motion Sensor devices.
  • Added support for another Hue Ambiance bulb (model ID LTC001).

Posted on
Tue Sep 11, 2018 12:41 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Access Hue Motion Signals

Version 1.6.17 Posted

  • Fixed a bug in the sensor device update function that could cause errors when updating motion sensor status in some situations.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest