I have downloaded your code and been able to get it working with covers. I have some more devices (lights and one gate). This is what I get in the first message exchange (msg_config) on top of all the covers.
It did not work with these devices for several reasons. The list of devices is retrieved using a 'msg_config' incoming data and this needed some amendment, otherwise the data is classified as msg_data. This made it work.
# Detect type of incoming data
if (data != ''):
if ("id_catalog" in first):
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print('Incoming message type : data detected')
msg_type = 'msg_config'
elif ("id" in first):
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print('Incoming message type : data detected')
msg_type = 'msg_data'
elif ("date" in first):
Then, there is a device type alarm_control_panel and cover. A light may be needed. For the device 1572022259 (light) I get these attributes.
{
'id' : 1572022259,
'endpoints' : [{
'id' : 1572022259,
'error' : 0,
'data' : [{
'name' : 'thermicDefect',
'validity' : 'upToDate',
'value' : False
}, {
'name' : 'level',
'validity' : 'upToDate',
'value' : 0
}, {
'name' : 'onFavPos',
'validity' : 'upToDate',
'value' : False
}
]
}
]
}
If needed, I could provide you with json samples of these devices or any log output. For instance, mqtt topics, etc.
Hi,
I have downloaded your code and been able to get it working with covers. I have some more devices (lights and one gate). This is what I get in the first message exchange (msg_config) on top of all the covers.
{ 'last_usage' : 'light', 'id_endpoint' : 1572022259, 'name' : 'Luz Sotano', 'id_device' : 1572022259, 'first_usage' : 'light', 'picto' : 'picto_lamp' }
{ 'last_usage' : 'garage_door', 'id_endpoint' : 1572022498, 'id_device' : 1572022498, 'first_usage' : 'garage_door', 'picto' : 'picto_sectional_door', 'name' : 'Garaje' }
}
It did not work with these devices for several reasons. The list of devices is retrieved using a 'msg_config' incoming data and this needed some amendment, otherwise the data is classified as msg_data. This made it work.
Then, there is a device type alarm_control_panel and cover. A light may be needed. For the device 1572022259 (light) I get these attributes. { 'id' : 1572022259, 'endpoints' : [{ 'id' : 1572022259, 'error' : 0, 'data' : [{ 'name' : 'thermicDefect', 'validity' : 'upToDate', 'value' : False }, { 'name' : 'level', 'validity' : 'upToDate', 'value' : 0 }, { 'name' : 'onFavPos', 'validity' : 'upToDate', 'value' : False } ] } ] }
If needed, I could provide you with json samples of these devices or any log output. For instance, mqtt topics, etc.