API to change channels?

I have the Channels app working well on AppleTV, with the HDHomerun.

I wonder if there's any way for the ATV app to accept an API call to change channels? That way, I could plug into home automation and say "Alexa turn on channel 4", etc.

If tvOS doesn't allow incoming connections, then being able to set a URL for channels app to call out to a websocket or similar would also work.

See:

Channels | Automation

  1. I promise I googled at least 30 minutes for this.
  2. That has got to be the fastest response I've ever had in a community support forum. Thanks!
2 Likes

I used to set one to wake up/turn on the downstairs TV and set it to the morning news in the morning.

1 Like

What search terms were you using? :face_with_peeking_eye:

1 Like

This is for the client app only right - I'm not looking to control a Channels DVR server.

Yes. The DVR server API is undocumented.

I've just tried HomeAssistant and what's playing shows up. Pause works, but "prev" and "next" track don't do anything, which I assume are meant to change channels?

1 Like

I think those are used to skip commercials in recordings, not change channels. But you can look at the plugin source and see what its doing.

I see - I don't see any other services it provides. On the page you linked it does say " Start a Channel, Show, and More Tune to a channel or kick off a show from your Home Assistant automations.". Maybe that's only if you're running DVR.

Will take a look at the code.

1 Like

Oh wow - it's as simple as curl -X POST http://192.168.1.nnn:57000/api/channel_up

Thanks!

1 Like