# Movie light automation

**URL:** <https://discourse.nodered.org/t/movie-light-automation/18115>\
**Category:** General\
**Created:** [18 November 2019 20:11 UTC](https://discourse.nodered.org/t/movie-light-automation/18115 "2019-11-18T20:11:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cranks](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cranks](https://discourse.nodered.org/u/cranks)\
**Post date:** [18 November 2019 20:11 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/1 "2019-11-18T20:11:16Z")

</div>

Previously I had Home Assistant installed with NR on a Pi3, but it was becoming increasingly sluggish and it was suggested I install NR as a standalone product on my Pi. I've done this and have set up a simple light scheduler that works well.

Now I would like to create a flow that emulates this flow I had in HA.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d13ba5c887cc70d44818faa39f77a5e310920ae8.png)

It uses a Hue bridge to connect to all light switches (HT lights), GPO (HT Power) and Zigbee Smart Outlet Socket (Millen Falc Switch).

So…What I’d like is:

- When I turn on HT Power from the Hue app, it will turn on my equip rack and HT Lights & Millen Falc Switch.  
Then when Kodi was running
- Turn off lights when a movie or tv show is playing
- Turn lights on when a movie or tv show is paused
- Turn lights on when a movie or tv show is finished or stopped - idle

This worked most of the time but now I have migrated from a Libreelec Kodi installed on a HTPC to an Nvidia Shield TV Pro that has 3 streaming services Netflix, Amazon Prime & Disney+ (today I hope in Oz!!) and Kodi to stream media from my QNAPNAS.

So, now my conundrum, how/what do I use to create a flow for the above scenario?? I have searched for days but cannot find any references of how to use an Nvidia Shield TV pro to accomplish this.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 November 2019 07:17 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/2 "2019-11-19T07:17:49Z")

</div>

There is a hue plugin for node-red, but [also for Kodi](https://hotstickybun.com/hardware/how-to-setup-and-use-phillips-hue-lights-with-kodi/), isn't easier to control it from there ?

---

<div class="post-metadata">

**Author:** ![cranks](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cranks](https://discourse.nodered.org/u/cranks)\
**Post date:** [19 November 2019 20:50 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/3 "2019-11-19T20:50:05Z")

</div>

> [@bakman2](#):
>
> There is a hue plugin for node-red, but [also for Kodi](https://hotstickybun.com/hardware/how-to-setup-and-use-phillips-hue-lights-with-kodi/), isn't easier to control it from there ?

There is and I have used the NR option in HA...but now I want to run NR without HA.

What would be great is if I can do this on the Shield TV for all apps as listed...not just Kodi.

Is it possible?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 November 2019 23:52 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/4 "2019-11-19T23:52:48Z")

</div>

Doubt it, as it would require an API that you can read when something is stopped/started.  
Easier to control that part from/via a remote control (like a harmony)

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [19 November 2019 23:56 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/5 "2019-11-19T23:56:44Z")

</div>

the big trick becomes detecting whether the app is playing or not. Kodi provides that, but for other apps, it's up to them. I know netflix does have something like that built in (it's how casting actually works behind the scenes) but i'm not sure if it's open. As for disney+, it's early days.  
I've had some personal success using logitech harmony as my remote, but to simulate my play/pause detection i'm actually just splitting the output from a dashboard button to multiple events (until I get an IR receiver set up to sniff all IR traffic, using the harmony remote itself doesn't give me this option.)

---

<div class="post-metadata">

**Author:** ![cranks](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cranks](https://discourse.nodered.org/u/cranks)\
**Post date:** [20 November 2019 05:04 UTC](https://discourse.nodered.org/t/movie-light-automation/18115/6 "2019-11-20T05:04:56Z")

</div>

Thanks bakman2 & JayDickson for your comments.

I will resort to doing it old school using Hue app along with Shield remote for now.

Just a thought on the Shield remote, it is a bluetooth device .... can the play, pause, stop functions be used in any way to achieve what I would like??
