I have tried to follow the protocol docs for sending a command, but am having difficulty figuring out where to add the "{"type":"IRCommand","deviceId":"13154865","command":"PowerOff"}:status=press".
Any help would be appreciated.
Right now I have:
iq_cmd = self.Iq()
iq_cmd['type'] = 'get'
action_cmd = ET.Element('oa')
action_cmd.attrib['xmlns'] = 'connect.logitech.com'
action_cmd.attrib['mime'] = (
'vnd.logitech.harmony/vnd.logitech.harmony.engine?holdAction')
action_cmd.attrib['action'] = '{"type":"IRCommand","deviceId":"13154865","command":"PowerOff"}:status=press'
iq_cmd.set_payload(action_cmd)
result = iq_cmd.send(block=True)
payload = result.get_payload()
assert len(payload) == 1
action_cmd = payload[0]
assert action_cmd.attrib['errorcode'] == '200'
response = action_cmd.text
return json.loads(response)
I have tried to follow the protocol docs for sending a command, but am having difficulty figuring out where to add the "{"type":"IRCommand","deviceId":"13154865","command":"PowerOff"}:status=press".
Any help would be appreciated.
Right now I have: