Im am still new to this stuff but interested how thing work technically.
So after reading some documention (Introduction - deCONZ C++ Documentation) I concluded that the characteristics of supported devices now can be defined using DDF files which I found in directory /deCONZ/devices, for tuya subdir ‘tuya’
I copied _TZ3000_ygvf9xzp_4gang_remote.json to _TZ3000_famkxci2_3gang_remote.json and modified it to a 3 button switch:
{
“schema”: “devcap1.schema.json”,
“manufacturername”: ["_TZ3000_famkxci2"],
“modelid”: [“TS0043”, “TS0043”],
“product”: “Tuya remote 3 gangs”,
“sleeper”: true,
“status”: “Gold”,
“subdevices”: [
{
“type”: “$TYPE_SWITCH”,
“restapi”: “/sensors”,
“uuid”: [
“$address.ext”,
“0x01”,
“0x0006”
],
“items”: [
{
“name”: “attr/id”
},
{
“name”: “attr/lastannounced”
},
{
“name”: “attr/lastseen”
},
{
“name”: “attr/manufacturername”
},
{
“name”: “attr/modelid”
},
{
“name”: “attr/name”
},
{
“name”: “attr/swversion”,
“parse”: {“fn”: “zcl”, “ep”: 1, “cl”: “0x0000”, “at”: “0x0001”, “script”: “tuya_swversion.js”},
“read”: {“fn”: “zcl”, “ep”: 1, “cl”: “0x0000”, “at”: “0x0001”}
},
{
“name”: “attr/type”
},
{
“name”: “attr/uniqueid”
},
{
“name”: “config/battery”,
“awake”: true,
“parse”: {
“at”: “0x0021”,
“cl”: “0x0001”,
“ep”: 1,
“eval”: “Item.val = Attr.val / 2;”,
“fn”: “zcl”
}
},
{
“name”: “config/on”
},
{
“name”: “config/reachable”
},
{
“name”: “state/buttonevent”
},
{
“name”: “state/lastupdated”
}
]
}
],
“bindings”: [
{
“bind”: “unicast”,
“src.ep”: 1,
“cl”: “0x0001”,
“report”: [
{
“at”: “0x0021”,
“dt”: “0x20”,
“min”: 60,
“max”: 3600,
“change”: “0x00000001”
}
]
},
{
“bind”: “unicast”,
“src.ep”: 1,
“dst.ep”: 1,
“cl”: “0x0006”
},
{
“bind”: “unicast”,
“src.ep”: 2,
“dst.ep”: 1,
“cl”: “0x0006”
},
{
“bind”: “unicast”,
“src.ep”: 3,
“dst.ep”: 1,
“cl”: “0x0006”
}
]
}
After performing discovery of switch it is now named Switch2 (with battery indication) and also shown as switch in the Phoscon app and in IObroker:
But when trying to link the switch to a group using Phoscon app no switch is shown to be selected:
Obviously there is something wrong with the device definition.
Am I trying in the right direction ?
Anyone an idea how go on ?
Thx in advance,
Gerrit