Channels HTTP API

Because, I have a long list of channels and I don’t have one button per channel.

Just like most satellite/cable/terrestrial boxes, their remote comes with numbered buttons and I would like to access this via HTTP post.

I see this can be done via keyboard but would ideally like to go via above.

Have I cleared this up yet?

You have a fully customizable display upon which you can place any button you want, and you’d rather put a numerical keypad which force you to remember what each channel’s number is, and type them in manually, than place buttons with matching channel logos that take you to their corresponding channels?

2 Likes

The latency involved with any system that would make system REST calls to “dial numbers” would fall below the timeouts the channel changing requires in Channels.

Channels has an api for changing channels directly with numbers, there are no plans to allow single key inputs.

1 Like

Do I? How do you know what remote I have?

Ok thanks - so the only way to do this is via a Bluetooth keyboard control?

1 Like

You can also use USB keyboards. (Flirc will take remote IR signals and translate them to keyboard presses, too.)

Thanks for the tip!

1 Like

Bet I could integrate a clapper with Home Assistant with a bit of soldering.

Let’s do this!! Take a video of the process so I can copy you. I was figuring it might be possible with a pi and the pin outs but I don’t know anything about home assistant after that :+1:

1 Like

If your customizable remote has physical number buttons you’re hoping to be able to take advantage of, another idea that worked for me, was assigning those number keys to my top 10 favorite channels.

Instead of remembering my 10 favorite channel number assignments and having to type them in manually, I use the 0-9 buttons as sort of a “speed dial” instead.

2 Likes

Sorry. I find the Clapper to be pretty gawd-awful, so it won't be making it to my project list. But I will tell you how I would do it.

Rather than a Pi, I would use a Shelly Uni. It's a lot cheaper and is purpose built. I've used them for hard wired motion, door, and moisture sensors as well as garage door openers. You can use them to automate just about anything that produces voltage when triggered. Once you have it reliably detecting your claps, you can go wild with Home Assistant automatons.

1 Like

Why would an Android TV device respond to a toggle_record POST with a "not found", even though it is tuned to a channel via the API and can be stopped via the API as well?

1 Like

Does it appear as an option in the api help output?

What is the "api help output"? I don't see that documented.

Curl /api shows it

1 Like
Welcome to the Channels API

With this API, you can query Channels' status as well as control it.

## Info

Check out the current status of the player or fetch the favorite channels.

GET /api/status - Player's current status
GET /api/favorite_channels - List of favorite channels

## Controls

Control the playback of Channels. All control responses return the player's current status.

POST /api/toggle_mute - Toggle mute on and off
POST /api/toggle_cc - Toggle captions on and off
POST /api/toggle_pip - Toggle Picture in Picture on and off
POST /api/channel_up - Change the channel
POST /api/channel_down - Change the channel
POST /api/previous_channel - Jump to the previous channel
POST /api/toggle_pause - Pause or resume playback based on current playing state
POST /api/pause - Pause playback
POST /api/resume - Resume playback
POST /api/stop - Stop playback
POST /api/seek/{seconds} - Seek in timeline by seconds
POST /api/seek_forward - Seek ahead duration in settings
POST /api/seek_backward - Seek back duration in settings
POST /api/skip_forward - Skip to the next chapter mark
POST /api/skip_backward - Skip to the previous chapter mark
POST /api/play/channel/{channel_number} - Play a channel
POST /api/play/recording/{recording_id} - Play a recording
POST /api/navigate/{section_name} - Change to a section of the app by providing its name. EX, Guide, Library, Live TV
POST /api/notify - Present a notification while playing video - example payload: {"title":"Arrived home", "message":"Jon has arrived home"}

So, no toggle_record? Is this a version issue?, platform issue? has toggle_record been removed from the API?

1 Like

Okay it wasn't added to android then. I'll take a look today.

Try this build:

1 Like

Updated to the most recent Beta and now a toggle_record returns : "BAD REQUEST: Syntax error. HTTP verb Post unhandled"

But, this is possibly because I can't start a recording now play/channel/# returns a "status:stopped"

2 Likes

Can you try again with the latest beta

2 Likes