Homey Community Forum

Theater modus; let's watch Netflix!

Dear readers,

First; sorry for my English. I think you’ll understand what i’m saying, but you might find a lot of typo’s along the story. If you need any more explanation feel free to ask!

Theater modus explanation
In our case, when our daughter is off to bed we’re off to the couch… We’re big Netflixers (is that a word? lol…). Soo when she’s a sleep and we’re starting Netflix, we want te house to respond to that. These flows are taking care of this!

What do you need for this functionality?
The following devices are necessary to complete this tutorial. Maybe there are parts you wish to use for your own, but I write my posts as if you’re going to copy it exactly! :smiley:

  1. A Homey (ofcourse :slight_smile:)
  2. The ‘Virtuele Apparaten’ app on Homey by Arjan Kranenburg
  3. Lights that work on Homey, in my case Ikea

For the lamps I use Ikea lamps… I am very happy with these! As you may (or may not) know, these lamps are pretty much the same as the Philips Hues, but a lot cheaper. They are available nearby (in my case), are stable, work good and fast and aren’t very expensive. I only use the white ones that are dimmable, I found it useless to color the lights in my house… But that’s to your own taste ofcourse!

I am not sure if the app I provided is available in multiple languages, but it’s pretty straight forward soo there is no need to understand Dutch for it. Once installed, add a new device, choose ‘Modus’ as option, give the modus a name (for example, mine is simply ‘Theater’) and add an icon. Since i’ve been using a lot of different modus buttons I have been downloading icons from the FontAwesome library in order to give everything a nice looking button. For example, I used the icon in the link below. Once you’re on this page find the download button that’s located right underneath the title of the icon. This will download a .SVG icon that the app in Homey can use. You get the icon upload functionality when you’re installing a modus. You could ofcourse also just use the built in icons but I found myself using the same icons over and over again since there are not many to choose from.

The flows of this switch
We are going to start flows that are triggering lights and in our case roller blinds and other stuff. First, make sure you’ve created the virtual device as explained above.

The first flow: Switching the theater modus
When we activate or deactivate the theater modus, we want stuff to happen!

If The modus is changing
And Theater modus is on
Then Turn off lights, dimm other lights and lower the roller blinds

Soo I used a way of handling a trigger the way I handle them mostly; ‘when modus is changed’. This way I can use one flow to trigger two actions. When the modus is AND the modus is on (Modus on > Modus changed > Modus is on) then do A, if it’s off do B.

When the modus is started; turn off some lights in the kitchen, dimm lights in the living room and last but not least; use TUYA to lower the blinds to 80% soo people outside can’t see what we’re watching and it’s a little bit more intimate.

If the switch is turned off, reset the roller blind flows and reset the flows that take care of our lights at home. More about these two flows in other tutorials i’ve written.

The second flow: Casting has started
Soo this is actually were the real magic happens; something is casting to your TV! We want to trigger the theater modus when this happens.

If Something starts playing on the living room
And Our daughter is a sleep
Then Turn the switch for theater on

The first ‘If’ is pretty logical. Search for your Chromecast and setup a trigger when something starts playing. In our case, we have a ‘and Pepper is a sleep’. Pepper is our daughter. We have some special flows for childeren bedtime which we like to explain in other tutorials. You might just add something like ‘it’s after sundown’ or ‘it’s between X and X o’clock’. Do this to your liking. We’ve used this AND specifically because we only want this modus to start when we’re alone and not when our daughter is watching a last cartoon before bedtime.

When this all starts, let’s switch on the theater modus!

The second flow: Casting is stopped
Soo you stopped casting? Then it’s time to exit the theater modus!

If The chromecast stops playing
And Theater modus is turned on
Then Turn the switch for theater off

I don’t think this flow needs any explanation? Only run it when it’s turned on in the AND part. If we say ‘Oke Google, STOP’ the casting will stop and Homey does the rest!

Activate TUYA devices without struggles
Soo I found it hard to find TUYA device keys and I do not like to add static IP addresses to my flows in order to make stuff work. As soon as my router resets IPs somehow, my devices stop working.

Install the Tuya Cloud app and login with your Tuya credentials.

I found a solution in Tuya Smart Scenes. Inside the TUYA app, create scenes that do the smart work for you. For example, for this tutorial, i’ve created two scenes for activating and deactivating the alarm. Inside your flow, add a Then card and scroll down to your Tuya cloud app. Here you can choose a scene to activate.

This solution works for anything… Setting a percentage for your roller blinds, changing lights, activate alarms or whatever action you wish to use and all without IPs and hard to find keys :slight_smile:.

That’s all folks!
Soo that’s all. In my flows you’ll find some other interesting triggers which I will explain in other tutorials. Feel free to search for them. I will write them in the upcoming days.

If you have any questions, feel free to ask them below!

1 Like