HARMONY POWER AND ACTIVITY STATUS - WORKING
If I use this HTTP command it lists all the Activities on my Lounge Harmony Hub.
http://VERA-IP/port_3480/data_request?id=lr_Harmony184&cmd=list_activities
{ "status": "OK", "msg": "OK", "data": { "activities": [ { "ID": "27585584", "Activity": "ChromeCast Video" }, { "ID": "23834935", "Activity": "Media Center" }, { "ID": "23834936", "Activity": "XBOX" }, { "ID": "23864128", "Activity": "Wii-U" }, { "ID": "43190809", "Activity": "Nintendo Switch" }, { "ID": "23834933", "Activity": "Freeview" }, { "ID": "-1", "Activity": "PowerOff" }, { "ID": "42772934", "Activity": "Fire TV" }, { "ID": "36455394", "Activity": "ChromeCast Audio" }, { "ID": "42766865", "Activity": "BT TV" } ] }, "code": 200 }
In MSR I can see x_vera_plugin_harmony.activity_status ServiceID
When there are no activities running e.g. OFF the status returned is 0
And when I am in my Watch TV "BT TV" activity, the status is 2, so you should be able to work out which activity is what status number ?
Activities OFF - Status = 0
Watch TV Activity - Status = 2
So I created a rule that when my Harmony hub is OFF then turn off some LED strip lights.
Alternatively there is a ServiceID called x_vera_plugin_harmony.power_status
It is FALSE when all my Harmony Activities are turned OFF, so we can potentially use this instead.
And finally I looked at x_vera_plugin_harmony.current_activity this will return the activity ID numbers.
I know -1 = Powered OFF so I could have used this also.
When my Harmony is in Watch TV activity "BT TV" its showing a number ID of 42766865 which is correct. If you look at my output at the start listing all the activities and their ID numbers.
So I could now create an MSR rule that does something only when I am in the Watch TV Harmony activity etc.