Closed grgmll closed 3 years ago
Hey. I think it can be done. It might be an update or a new plugins in the future.
I did similar thing with my NVIDIA Shield on separate script to monitor app that play sound so I can switch on/off my receiver automatically.
But the playback activities that you mention might be device specific? Could you explain more what kind of variable/string that needed to be monitor via ADB?
For example, there’s an ADB command that can return current app id that is on foreground or app id that currently playing sound, just like what I wrote in README.md. Those are available in all android devices.
adb -s your-device-ip shell dumpsys media_session | grep "state=PlaybackState"
return:
state=PlaybackState {state=3, position=569, buffered position=0, speed=1.0, updated=164836137, actions=173350, custom actions=[], active item id=-1, error=null}
state=3 => play state=2 => pause and stop
thank you for adding this feature.
You’re welcome
Could you add a occupancy sensor to monitor Amazon Video playback activity (com.amazon.avod/.playbackclient.FireTvPlaybackActivity) in order to do an automation in homekit?
Thanks