I am using broadlink mini rm3 component to switch some devices on or off, The switches for turning on or off my Samsung TV are the same, so if the tv is on, switch turn it off and viceversa.
I have many scripts using those switches so i am finding a way to know if the TV is on or off before using switches so i can automate many things…
Is there a way to do what i am looking for?
I use some hidden input_booleans to track what is on/off, which works pretty well in the most part. Obviously it can go out of sync if things are switched by other means, but it’s fairly reliable.
Can you give me some examples?
So I have a button on the dashboard for ‘watch a movie’, pressing this should switch on the a surround sound / tv / bluray player and switch everything to the correct channels etc.
If I then press ‘off’ or ‘watch tv’ it should switch off the bluray player.
The bluray player has a toggle rather than power on and power off so the button needs to know whether it is already on, or not.
To do this I have an input_boolean called bluray_power. When I press ‘watch a movie’ I don’t actually call the ir code, I switch on the boolean. For ‘off’ or ‘watch TV’ or ‘show cctv’ I switch the boolean off.
I then have an automation that sends the ir code to toggle the bluray player power whenever the input_boolean changes state.
Hope that makes sense.
Thanks… i hope i can do it…
For me this is one of the most frustrating aspects of Home Automation. I’m actually doing some changes and switching things around because of it.
The current issue as has been raised is “out of sync”. With whatever setup you have whether it being a Harmony setup or broadlink rm things get out of sync. All it takes is one person using the wrong remote or doing something manually and the whole system is out of sync.
And with today’s TV’s and STB’s being little PC’s their startup time is just stupid and so you turn something on and wait a minute plus to get a screen. This results in people hitting the buttons multiple times… AHH frustrating.
Yes power toggle IR codes rather than discrete on and off IR codes are a pain. A few things to check:
-
Search on-line IR code databases for your equipment. Just because your remote has no discrete on and off buttons does not necessarily mean the IR codes don’t exist. If discrete codes exist for similar models - try them. Sometimes you get lucky.
-
If your equipment turns on with another function (e.g. the play button would to turn on my old DVD player) use that as the discrete on code. For a discrete off code create a script that calls the alternative on code (to make sure the device is on) then send the power toggle code to turn the device off.
-
Use the aux power output of your receiver audio amp if it has one (usually can only switch 100-200W or so) to switch other equipment. Receiver amps nearly always have discrete on off codes. If you need to switch more power, buy a power sensing and switching powerboard (they’re not that expensive). Plug a device with discrete codes into the master socket. Plug the other devices into the switched slave sockets.
None of this will help with devices getting out of sync because of people using equipment remotes or front panel buttons rather than HA. Education is the key here.