This is the extension of the extension of the extended protocol guide for the Logitech Harmony XMPP protocol, so here goes:
(the first protocol guide )
<iq type="get" id="YourRequestID">
<oa xmlns="connect.logitech.com" mime="vnd.logitech.harmony/vnd.logitech.harmony.automation?getState"/>
</iq>
Optional params: deviceIds
as an array of device ID strings.
returns json!
{
"device-id": {
"color": {
"xy": {
"y": 0.7106,
"x": 0.2152
},
"mode": "hs", // or ct (temperature) or xy, depending on what was last used to set
"temp": 300,
"hueSat": {
"hue": 25597,
"sat": 254
}
},
"brightness: 198, // 0-255
"on": false,
"status": 0
}
}
hamrony.automation?setState
{"deviceId": {"on": true}}
automation.state?notify
Contents is a JSON object with the new (full) state.
<iq type="get" id="someUniqueId">
<oa xmlns="connect.logitech.com" mime="vnd.logitech.setup/vnd.logitech.setup.content?getAllMetadata">
deviceId=theHarmonyDeviceId:all=true
</oa>
</iq>
When omitting the all param, only an object with the state of the given device is returned as musicMeta
.
response is json:
{
"musicMeta": [
{
"muteState": false,
"activity": false,
"group": [{
"id": "34596878",
"mute": false,
"vol": 31
}],
"service": "",
"conStatus": "ok",
"status": "pause",
"volumeLevel": 31,
"type": "sonos",
"groupId": "RINCON_000E58AF6A3401400:10",
"imageUrl": "",
"artist": "",
"coord": true,
"album": "",
"title": "",
"apiLevel": 1,
"shuffle": true,
"repeat": false,
"crossfade": false,
"deviceId": "34596878"
},
{
"muteState": false,
"activity": false,
"group": [{
"id": "53730463",
"mute": false,
"vol": 38
}],
"service": "",
"conStatus": "ok",
"status": "pause",
"volumeLevel": 38,
"type": "sonos",
"groupId": "RINCON_B8E93738C2AC01400:39",
"imageUrl": "",
"artist": "",
"coord": true,
"album": "",
"title": "",
"apiLevel": 1,
"shuffle": false,
"repeat": false,
"crossfade": false,
"deviceId": "53730463"
},
{
"muteState": false,
"activity": true,
"group": [{
"id": "53730464",
"mute": false,
"vol": 20
}],
"service": "",
"conStatus": "ok",
"crossfade": false,
"volumeLevel": 20,
"type": "sonos",
"groupId": "RINCON_B8E93738C2AC01400:37",
"imageUrl": "",
"artist": "",
"coord": true,
"album": "",
"title": "",
"apiLevel": 1,
"shuffle": false,
"repeat": false,
"status": "pause",
"deviceId": "53730464"
}
]
}
Stanza of type message
, which contains an event
of type harmonyengine.metadata?notify
.
Contains an array of JSON strings with a musicMeta
property.
The property contains an object with the deviceId
nd the changed properties (like crossfade
).