Hi all.
So I have FireTV in the UK, and i am using it to watch iPlayer, ITVX, Netflix, Prime Video and so on.
I have HA configured so that I have a Camera Stream picking up the “now playing image” from the FireTV (through Android ADB).
However, the image is only valid when you are browsing around the FireTV… when you actually play something it goes black/blank. I think this is something to do with DRM.
I am wondering if there is a way to NOT update the Camera Image when the Now Playing image from ADB is blank, so that my (lets call it persistent) image on the camera feed is the latest image that shows what I was about to watch before I actually watched it (and before it went blank). ?
Obviously this is needed, since the Now Playing attributes from the Android ADB only tell you what SOURCE you are watching, not what CONTENT you are watching.
hmmm… not so easy. Right now the camera entity is tied to the URL that Android ADB gives out for the Now Playing Image. There’s no automation to speak of to break with a condition of “playing” (or not). I have to try to find out how to set the camera image through an automation rather than tying it in.
thanks… but the problem is that with the new ADB integration, it only provides a snapshot every (at most) 1 minute. So its not going to work if I get a camera to snapshot from that now-playing image if that only updates (at most) once per minute.
Does anyone know if you can manually send an ADB command to retrieve the now-playing image? if you can, then we can automate that retrieval only when the player is not playing, and not off… that way we should be able to capture the last moment before a movie plays and make that the persistent image of the “now playing”
ok, for anyone interested, i have it working - sort of…
I have an automation that fires every few seconds (as low as you dare). There is a conditional on the automation so that it only runs the action(s) if the ADB Media Player is in IDLE state… (because in Playing State DRM returns a Blank screen on iPlayer/Netflix/Prime etc).
The actions in the automation are three things;
ADB command to capture the current screenshot (screencap -p /sdcard/test.png)
(this tells the FireTV to take a snapshot and store it in internal memory)
Delay (500ms or 1s or something to give the snapshot time to be stored on the FireTV
ADB Download Command to retrieve the saved screenshot (device path /sdcard/test.png and local path /config/www/test.png)
This will save the screenshot onto the HA file system in a place that you can browse to it at http:///local/test.png.
Now set up a Generic Camera with the URL from the above
It works… so now the Now Playing Screenshot records everything up to the moment that you press PLAY on something, and then it persists that image.
I’ll admit, its not perfect by any means because of the lag and the real-life poll frequency that you can achieve… if you are too quick on the FireTV remote buttons then you’ll miss it before the FireTV enters Playing state and the screenshot stops.
But its a start.
Just a darn shame the adb_response doesn’t tell you what media you are watching because if it did that then a cooler implementation would be to use that to look up on IMDB or TMDB to retrieve everything properly !
Any suggestions for improvement gratefully accepted.