Hi @niehelmey
I want to know if my fire tv stick is in standby or not, so i can switch to the correct hdmi port.
I am not sure how your script is working, because I get the following:
FireTV in standby
root@openhab-ansible:/var/log/openhab# adb shell “dumpsys activity activities | grep ResumedActivity”
ResumedActivity: ActivityRecord{538e336 u0 com.amazon.ftv.profilepicker/.ui.PickerActivity t355}
root@openhab-ansible:/var/log/openhab# adb shell dumpsys activity recents |grep Recent\ #0 | grep profilepicker
- Recent #0: TaskRecord{a4bdd35 #355 I=com.amazon.ftv.profilepicker/.ui.PickerActivity U=0 StackId=120 sz=1}
FireTV in profile view:
root@openhab-ansible:/var/log/openhab# adb shell dumpsys activity recents |grep Recent\ #0 | grep profilepicker
- Recent #0: TaskRecord{feb59ba #356 I=com.amazon.ftv.profilepicker/.ui.PickerActivity U=0 StackId=121 sz=1}
root@openhab-ansible:/var/log/openhab# adb shell “dumpsys activity activities | grep ResumedActivity”
mResumedActivity: ActivityRecord{453f2e7 u0 com.amazon.ftv.profilepicker/.ui.PickerActivity t356}
ResumedActivity: ActivityRecord{453f2e7 u0 com.amazon.ftv.profilepicker/.ui.PickerActivity t356}
FireTV in main menu
root@openhab-ansible:/var/log/openhab# adb shell dumpsys activity recents |grep Recent\ #0 | grep profilepicker
root@openhab-ansible:/var/log/openhab# adb shell “dumpsys activity activities | grep ResumedActivity”
mResumedActivity: ActivityRecord{a2b850f u0 com.amazon.tv.launcher/.ui.HomeActivity_vNext t243}
ResumedActivity: ActivityRecord{a2b850f u0 com.amazon.tv.launcher/.ui.HomeActivity_vNext t243}
But how is it converted to $STATE and $RECENT? I am not that familar with shell scripts. How does it work?