Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDMI-CEC commands #24

Open
crzdg opened this issue Apr 16, 2018 · 12 comments
Open

HDMI-CEC commands #24

crzdg opened this issue Apr 16, 2018 · 12 comments

Comments

@crzdg
Copy link

crzdg commented Apr 16, 2018

The sleep and suspend command does only turn the ATV off. The TV will stay on.
If I turn off the ATV with the remote (long press on TV button, then sleep) also the TV goes off over HDMI-CEC.

@MrDrache333
Copy link

Look for the Plugin homebridge-cec-accessory...its because the AppleTV sends another cec command to the TV...with this Plugin you send only one Command...with this cec Plugin you can add all HDMI Devices to homekit and for example control them over Scenes

@crzdg
Copy link
Author

crzdg commented Apr 16, 2018

I have seen this. But Homebridge isn't connected to the TV setup. Also not a real option for me here.

I thought more about the chance to send a long press command, if not possible already. That way I could send the ATV and TV to sleep over user interaction and that should do the trick.

@MrDrache333
Copy link

Hmmm...see your Problem here...in the Documentation of this plugin is only something to send Commands with Pause, Repeat and Interval...you can of cause try it if you send the TV Command like 2-3 Seconds very often and look what the ATV answers you to that :)

@joshbish
Copy link

Is there by chance a homebridge plug-in for your TV that can turn it off? I was able to find a plugin for my receiver which then turns off my TV. Just a thought if this can’t be fixed.

@jungopro
Copy link

jungopro commented May 10, 2018

Hi @crzdg I might have a solution for you...

I'm using the plugin and when pressing sleep in the home app it turns off / on both ATV and the TV (Samsung)

I played with the CEC plugin before and it didn't work for me, but I did install the cec-client as prereq to the npm plugin... maybe the fact that I have the cec-client is what making it work...

So bottom line, install the cec-client plugin sudo apt-get install cec-utils on your homebridge device and see if this solves the issue (it may be an implicit dependency)

I will be happy to know if this solves your issue as I want to include it in my backup process

Thanks
Omer

@jmaver
Copy link

jmaver commented May 10, 2018

I couldn't get a combination of repeat/interval to work for having sleep do CEC. My TV is too dumb to handle any commands itself, sadly. And my onkyo receiver isn't supported in the ONkyo plugin.

So, for now, I have a wake button. Maybe someone will figure out a CEC sleep later one.

@crzdg
Copy link
Author

crzdg commented May 22, 2018

Thanks for the replies!

@jmaver: Yes same for me. Wasn't able to find any information about Node-appletv for interval or repeat. So this workaround isn't working.

@jungopro: Hi! Just installed the dependencies. But I'm not at home in the moment, so can't actually see if the TV is turning off. Will let you know as soon I can check. It does sound interesting, though.
But you haven't connected your homebridge to the HDMI installation. As I stated before, the RPI with Homebridge is running downstairs in the data center.

@DarKOrange75
Copy link

Same issue here, sending sleep command to TV won't turn off the TV. It does with the TV remote.

@jungopro
Copy link

I’m using a combination of the ATV and HB CEC Plugin
Basically I created an automation in the home app that once ATV sleep command is pressed it triggers the TV power off function of the CEC plugin. I will test it and let you know how this works

@ersan
Copy link

ersan commented Jul 12, 2018

Ah, glad I found this thread - same problem here. I was hoping to replace my Harmony Hubs with a simple toggle to turn the TV on and off.

As stated above, if you hold down TV on the remote and select 'sleep' it will send the CEC command - so if there were some way to script that sequence of actions I think that could be a workaround. But there is no long press command in homebridge-apple-tv currently.

Installing cec-client on the Homebridge device isn't going to do anything unless it's connected to your TV by HDMI - mine (and probably most others') are not.

I think maybe the Samsung TV that is working is more sophisticated or has some function to turn off the TV when the connected device goes to sleep. I don't think that is the norm.

@MsCopernic
Copy link

MsCopernic commented Aug 31, 2018

After reading the comments from @jungopro, I did something similar without CEC, I didd it using automation in Apple HomeKit and is working perfectly. Now I can turn on/off all the required equipments needed for AppleTV and the Apple TV, so I hope that the following code can help some one:

First, I created two buttons in the Apple TV Plugin as follows (4TH generation APTV can be turned on using any button)

    {
      "deviceID":"Alcoba",
      "name":"APTV On",
      "command":"select"
    },
    {
      "deviceID":"Alcoba",
      "name":"APTV Off",
      "command":"sleep"
    }

I also created a new button in the Broadlink plugin section

    {
      "name":"Apple TV Uno",
      "type":"switch",
      "data":{
        "on":[ Turn on/set amplifier, TV ....  ],
        "off":[ Turn off amplifier, TV, .....] 
      }
    }

Finally, in the HomeKit App, I created two automations that define what happens when the last button (Apple TV Uno) is turned on/off

When turned On: Add the APTV On button and turn it on
When Turned Off: Add the APTV Off button and turn it on

Regards

@danielrobinson95
Copy link

Hey @crzdg check this out.
This simulates long pressing the TV button to put the ATV in sleep, you can combine the newly added action with an OK press. works beautifully for me.
#34 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants