Having most of my media player devices working, but not my EETV box was a bit annoying, especially as I’d managed to get some form of control via PHP…
So a wet weekend playing with python3, pyCharm, setup.py sdist bdist_wheel, twine, and pypi and I’ve wrote my first python bindings (well based off @pschmitt 's bindings for the LiveBoxPlay TV - took a punt that Orange in France and EE (which is part owned by France Telcom) might have a similar box - nah turns out the APIs aren’t at all similar, but it got me in the right ball park from the python/Hass side and those got me controlling EETV from the command Line, Cloning the same devices Hass Components and amending them to use the same bindings got it working in Home Assistant!
Component code at :- https://github.com/kevjs1982/python-eetv
And as it appears in Home Assistant:-
So far I can
- Turn it on / off
- Channel + / Channel -
- Directly jump to a chosen channel by name
- Change the volume
The biggest issue I have found is that you can easily tell when :-
- The set top box is in low power standby (Total Disk Space is 0 Bytes)
- Watching a TV Channel
- Watching a recorded programme
However when you are doing the following the API returns no useful information, all you can really tell is that it’s not in low power standby (as the disk reports it’s actual capacity)
- Is display an on screen menu (e.g. the Apps List, Recordings List, EPG)
- Is displaying a streamed TV channel (e.g. TV Player channels, Box Plus Channels, TNT World)
- Is using an app (e.g. YouTube, Demand 5)
- Is tuned to a radio station (e.g. Kisstory)
- Is in high power standby (e.g. you’ve recently turned, it’s recording, it’s checking for updates)
So during all those states you’ve get the image every EE TV viewer has seen many times before…
(You can however use this component to “tune” to the TVPlayer / Box+ Channels)
Alas even EE’s own app (which hasn’t worked or been updated since Android Nougart was launched in 2016) can’t display any information in those modes either.
Just in case EE ever update their app you may need to change the APPKEY to stop it putting up OSDs telling you to update the app - this is (currently) the SHA-1 has of the appKey buried in the Android APK (handily exposed as part of the user agent).
I should also be able to list and play all the recordings on the device, but I can’t figure out how I would display that in Haas (are there any Media Player components which do this already?) I’ve also had it playing MP4’s from the network before now, so need to work out how to integrate that into Haas too. e.g. streaming a recording from my TVH PVR https://www.youtube.com/watch?v=ohs_O1coNDQ