I just used the ‘Other’ driver to add a couple of devices and was able to add them to flows successfully using the associated cards. Worked well for me because the codes I needed were provided in the card’s drop down.
When I look at the device in the Homey developer tools, I see a chunk of slash-escaped JSON under Settings/deviceSpecification. Putting that text through an ‘unescape’ page I get:
"device": {
"active_time": 1705156292,
"biz_type": 18,
"category": "tdq",
"create_time": 1705156292,
"icon": "smart/icon/ay1521618643672lvY0O/09169141a15e708d9bd1559cce74c82b.png",
"id": "bfc20dd880dfadd6e8ltrs",
"ip": "86.165.239.159",
"lat": "50.79",
"local_key": "sVyD':%#^]3%BeR6",
"lon": "-0.99",
"model": "",
"name": "USB switch",
"online": true,
"owner_id": "11054790",
"product_id": "flcvzjtnkhsreazp",
"product_name": "",
"status": [
{
"code": "switch_1",
"value": false
},
{
"code": "countdown_1",
"value": 0
},
{
"code": "test_bit",
"value": 0
},
{
"code": "relay_status",
"value": "2"
},
{
"code": "random_time",
"value": ""
},
{
"code": "cycle_time",
"value": ""
}
],
"sub": false,
"time_zone": "+00:00",
"uid": "eu1584011896823Zmpri",
"update_time": 1721210722,
"uuid": "cbb16e166d1bdcb6"
},
"specifications": {
"category": "tdq",
"functions": [
{
"code": "switch_1",
"desc": "{}",
"name": "开关1",
"type": "Boolean",
"values": "{}"
},
{
"code": "countdown_1",
"desc": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
"name": "开关1倒计时",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "relay_status",
"desc": "{\"range\":[\"0\",\"1\",\"2\"]}",
"name": "上电状态设置",
"type": "Enum",
"values": "{\"range\":[\"0\",\"1\",\"2\"]}"
},
{
"code": "random_time",
"desc": "{\"maxlen\":255}",
"name": "随机定时",
"type": "String",
"values": "{\"maxlen\":255}"
},
{
"code": "cycle_time",
"desc": "{\"maxlen\":255}",
"name": "循环定时",
"type": "String",
"values": "{\"maxlen\":255}"
}
],
"status": [
{
"code": "switch_1",
"name": "开关1",
"type": "Boolean",
"values": "{}"
},
{
"code": "countdown_1",
"name": "开关1倒计时",
"type": "Integer",
"values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
},
{
"code": "test_bit",
"name": "产测结果位",
"type": "Integer",
"values": "{\"min\":0,\"max\":5,\"scale\":0,\"step\":1}"
},
{
"code": "relay_status",
"name": "上电状态设置",
"type": "Enum",
"values": "{\"range\":[\"0\",\"1\",\"2\"]}"
},
{
"code": "random_time",
"name": "随机定时",
"type": "String",
"values": "{\"maxlen\":255}"
},
{
"code": "cycle_time",
"name": "循环定时",
"type": "String",
"values": "{\"maxlen\":255}"
}
]
}
}"
That looks an awful lot like the JSON people have been posting to github and I didn’t have to work with CLI. Would that be acceptable?
Andy