Lookin for ideas to power on TV

I have a Panasonic Viera TV, Denon AVR and chromecase all connected and bindings are working with OpenHab2. The only function I am not able to do so far is power on my TV, this is because this model of Viera does not have wake on lan function and does not get IP connectivity while on standby. The Denon can be configured to get an IP on standby and can be powered on from OpenHab.

I am looking for a way to power on the TV without any additional components like Harmony or ESP8266 or Pi, etc. Using a smart TV, smart AVR and chromecast there should be way to do this.

There is one workaround I am aware of, the chromecast has the capability to power on the TV and I am able to do that when I cast something from my phone or Home while TV is off, it automatically powers it on and starts casting, however, I am not able to trigger this from OpenHab.

Any ideas?

Hi Ahmad

Just giving you some ideas, not sure if it could work, but it is an idea.

Most modern TVs support something which is called HDMI CEC, which means that appliances connected via HDMI can send commands to the TV. This is also how the Chromecast powers on your TV. Here you can find some more info on HDMI CEC: http://www.howtogeek.com/207186/how-to-enable-hdmi-cec-on-your-tv-and-why-you-should/

What if you could find a way to have your DENON AVR send a command via HDMI to power on your TV? You will have to find out: first, if your DENON AVR is able to send this command, and secondly how the openHAB binding can invoke this command. I did something similar via my Raspberry 3 with Kodi and my Philips TV: https://community.openhab.org/t/switch-on-philips-tv-with-hdmi-cec-via-kodi/19603

Have fun!

Thanks Maurits. I am aware that Chromecast is powering on the TV using CEC, but I am not aware of any way to trigger this from OpenHab. I have checked the Denon and Chromecast API documentations and did not find any command to do this.

Ok tough luck. Then I ran out of ideas. Only thing I see is that you invest a few bucks in some hardware to make this work. But I’m not sure about you, but I like to keep the amount of hardware as minimum as possible, not necessarily because of the cost, but more from a minimalistic point of view and the idea: “it should be possible with this hardware somehow” :smile:.

I had a similar problem, and went to all the bother of a raspberry pi with IR board hidden in my bookcase facing the TV. Stupidly over-the-top solution, but it works.

If you have a spare Raspberry Pi, you can also plug it into a spare HDMI port on your TV and use the onboard CEC controller to turn on your TV using CEC. I know that you said that you do not want to add any extra hardware, but between openELEC or the Raspberry Pi Plex client, you can probably justify adding a Raspberry Pi to the mix.

Yes I am also trying to keep hardware as minimum as possible.

Understood. One other thought, does your receiver have a power outlet that is powered on/off based on whether the receiver is on or off? If so, maybe there is a setting on your TV that would have it automatically turn on after power restore. Other than that, I can’t think of a way to do this without extra hardware.

I found a way to do it!!
It’s not working perfectly yet but managed to power on the TV. I am using an external tool called castnow which I call from OpenHab rule using executeCommandLine("<command here ex. castnow c:\image.jpg>"). You can specify which exact chromecast using --address <hostname/IP> option. This starts casting to the chromecast which uses CEC to power on the TV.

It is taking a little too long to do this all this, I think it is because the panasonictv binding first tries to connect to the TV but cannot because it is off, after that times out the rules get executed. Not sure how to skip the ON command on the binding but keep the OFF command.

There’s more talk about doing this here as well.

Let us know if you buy one as I’m curious if they work as advertised or not.

@Ahmad_Khalaf, did you have any luck finding how this works?

I have the same problem with my Samsung TV, that it can not be swithed on with binding. But Chromecast can switch tv on.

So my workaround is using Google Home device. I named my Chromecast “TV”. Now I tell “Switch TV on” and it is on with the last settings. Still no idea how to initiate it through openhab, which would be useful - as I need to switch TV off - and this is what openhab binding can do, while Chromecast cannot.

regards

There was a tool I used (can’t recall the name now) which allowed casting images and videos from openhab to chromecast and that switched on the TV but with a few seconds delay. I have also now stopped using that and am using google assistant to switch it on and off.

I have no problem using the chromecast to turn my samsung on.

I have a half second silent MP3 file which I play using:

ChromecastPlay.sendCommand("http://localhost:8080/static/silent.mp3")

the file is placed in the /etc/openhab2/html folder.

That then turns the TV on. You then need to wait a couple of seconds and use the samsung binding to switch the input away from the Chromecast onto your chosen input.

The items file reads:

String ChromecastPlay { channel="chromecast:audio:myCC:playuri" }

1 Like