Timed Stop - Sleep

Nope sorry.

1 Like

Thanks for the reply. Glad to know this is still being thought of.

1 Like

I tried this command with ip address and hostname.local and I get an error:

curl -XPOST http://192.168.7.36:57000/api/stop
“curl: (7) Failed to connect to 192.168.7.29 port 57000: Connection refused”

Do I need to authenticate first? I am on the machine where the DVR software is running.

Sounds like either that is not the IP of your ATV, or the Channels app is not running.

1 Like

It was the channel app on appletv was not running.

Any ideas on why I get this error?
PS C:> curl -XPOST http://192.168.1.28:57000/api/stop
Invoke-WebRequest : A parameter cannot be found that matches parameter name ‘XPOST’.
At line:1 char:6

  • curl -XPOST http://192.168.1.28:57000/api/stop
  •  ~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

On windows PowerShell, use:

iwr -usebasicparsing -method post http://192.168.1.28:57000/api/stop

It’s been over a year and a half, has no one come up with a better solution than the homebridge work around??

Hey everyone. We just released the Channels API.

This should make scripting the Channels app a little easier to do things like what the Homebridge hack above does. I know it’s not the same as having a sleep timer inside the app, but it’s at least accomplishable easier.

Also, instead of setting a sleep timer every night you watch, you could create an automation to just attempt to stop Channels every night at a specific time of night. Set it and forget it!

Also a native Homebridge plugin will be made available sometime soon, so you’d be able to do this even easier with Homebridge.

A Home Assistant media player is already in the core of Home Assistant and will be available with it’s next release. Using Home Assistant, you can do ALL KINDS of cool stuff with Channels really easily, including stopping playback when your TV turns off.

You can learn more here:

Channels API: https://getchannels.com/api
Community Announcement: Channels HTTP API

Thank you! I’m excited to play with this!

Does anyone do this? Does it work well?

Would be nice to have that just in the settings...
stop playback x hours and x minutes after last interaction...
really nice would be an optical warning 10 Minutes before switching of...
of course I could fiddle with homekit and external automation... i just want to not wake up to a running TV after going to sleep when watching tv...

A sleep timer is a great feature. Is this something that's even possible with the plethora of devices that run Channels?

So it turns out, on the Fire stick 4k anyways, that if Channels had a sleep timer where the user could set it to shutdown Channels, disconnecting the client from the server, the Fire stick will eventually sleep itself. This would be really helpful for anyone falling asleep watching TV that doesn't want it to continue playing all night, something built right into Channels natively.

EDIT: Whoops. I see I entered this in the feature requests for Apple TV. Probably should have been in the general features request, but there are so many votes here ...

Thanks for Implementing the Sleep timer in the IOS app.

Would it be possible to have a option in Settings to set that as a default.
And a field for the length... so with ever channel switch it would reset set to the full length...

usually I plan to switch off myself... so I don't set it...
and even if i set it.. it is reset to of with every channel switch...
it is a bummer to use right now...

There's no plans to make the sleep timer to always be on every time you play something.

If you change the channel via the quick guide, the sleep timer will persist.

Just want to say. (in a kidding and very happy way). I am very happy to see this implemented. While our timelines for features may not always be the same priorities as those of the Developers. They always listen!!!

Huge Kuddos, and Thanks!!!!!!

2 Likes

Made the transition from TiVo back to Channels yesterday. I used the the sleep timer feature last night. It's great! My only complaint is it's too deep in the UI. There are several options, one might be to give it a tab next to Quick Guide and Options.

1 Like

Is this still on the roadmap by any chance?

Most likely no at this point. Mostly because HomeKit still has not real MediaPlayer object for devices.

But everything is there for someone else to give it a go as the Channels API is documented, the Channels component on Home Assistant is open source and viewable, and there's libraries for the Channels API written for both Python and Ruby to be examples for anyone that wants to write a library in another language.