Internet Facing API for TWC/Charter/Spectrum STB

I was playing around on the watch.spectrum.net website and noticed that you could via the guide tune set top boxes on your account to selected channels. Giving this a try and capturing the network data in google chrome I found that spectrum is using a TWC api for sending channel-tune commands to the set top boxes. After capturing the cookies I was able to create simple shell script that allowed for changing the channel on the STB easily and eventually hooked it up to Alexa via the smart home skill entertainment API.

https://services.timewarnercable.com/ipvs/api/smarttv/epg/v0/stb/tune?apicall=tune-channel&channel=244&mac=MAC_OF_STB

Does anyone here with more knowledge on how to use python sessions/request to capture the cookies and tokens so that a component media_player could be made for spectrum devices to control the channel in HA?

Thank you!

1 Like

I was able to get this working and the current python code is here:

Not sure about making it into a component just yet for HA as there really isn’t a current good way to have a front-end view for channel changing, but I’ll look into it more if people would like to see it implemented.

1 Like

I would like to see it integrated.

Currently I’m unaware of a media component that allows for changing channels within HA. So integrating it into a real component for HA would mean creating a new view for the media player card in the HA interface. For the moment I might be better just to have a command line switch that can take a parameter for the channel number.

Is there any more information available about the Spectrum API? This thread is rather old, and something may have changed, and I can’t find a place on watch.spectrum.net that lets you control STBs. I can watch TV in a browser and in Settings / Devices, I see the MACs of my STBs, but is control still possible?

https://services.timewarnercable.com/ipvs/api/smarttv/epg/v0/stb/tune?apicall=tune-channel&channel=244&mac=MAC gives me “The supplied authentication is invalid” even though the MAC and login info is correct, so I can’t help but wonder if something changed.

This would be really handy to manage with command_line. Does it still work?