In between taking down the Christmas tree and decorations this afternoon I decided to play around with my Homebridge setup and see if I could figure out how to get a plugin to change the channels via Siri voice command using the Channels API.
After much trial and error I have a setup that seems to be working, although as of yet I can't do this via Siri on the AppleTV itself. So far I have only been able to get it to work via iPhone and Apple Watch. I have only added a few channels to the setup but I can invoke Siri on my watch and say "ABC" or "ESPN" and it changes the Channels app to the right station.
This was done using a Homebridge plugin named HTTP Switch which can be found at the link below, you will need to have Homebridge up and running or install it prior to installing this plugin. Do some searching on Google on how to set this up if you've never done it before as I am not going to try and explain that here.
https://github.com/Supereg/homebridge-http-switch
If you get Homebridge & HTTP Switch all installed without issue you can use the config.json file below as a basis for re-creating this yourself. You can change the "name" just below the "bridge" section to whatever you like, the "username" can be anything you want but is formatted like a MAC address and can only use A-F and 0-9, letters must be in CAPS. You can change the "port" and "pin" if you like, just make sure the "pin" is formatted the same.
The only other thing you would need to change is the IP address of your AppleTV that is running Channels and the channel number to match your setup. Just remember this won't work unless you already have the AppleTV on and currently have the Channels app open.
Good luck, and enjoy.
{
"bridge": {
"name": "Channels",
"username": "xx:xx:xx:xx:xx:xx",
"port": 51826,
"pin": "031-01-001"
},
"accessories": [{
"accessory": "HTTP-SWITCH",
"name": "ESPN",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1205",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "ABC",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1002",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "NBC",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1004",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "CBS",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1005",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "FOX",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1017",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "PBS",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1008",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "HGTV",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/play/channel/1492",
"method": "POST"
}
},
{
"accessory": "HTTP-SWITCH",
"name": "PREVIOUS",
"switchType": "stateless",
"onUrl": {
"url": "http://192.168.1.15:57000/api/previous_channel",
"method": "POST"
}
}
]
}