Closed fmonday closed 6 days ago
The log you have posted does not contain any "full_poll": true
entries, so the full info that is received from the light is not visible.
The information about DPS mappings also seems to be from one of the API calls intended for "standard" cloud API use, and not the full details that are available from the QueryThingsDataModel API call (albiet in a less human readable format).
I do see "full_poll": true
in the third line of the HA log that I posted, but here's the result of the QueryThingsDataModel API call:
{
"result": {
"model": "{\"modelId\":\"000002rvu5\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":20,\"accessMode\":\"rw\",\"code\":\"switch_led\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"515\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":26,\"accessMode\":\"rw\",\"code\":\"countdown\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-a_nav_timer\",\"attribute\":\"514\"},\"name\":\"倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},
{\"abilityId\":28,\"accessMode\":\"wr\",\"code\":\"control_data\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_box2\",\"attribute\":\"608\"},\"name\":\"调节\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"lightcustomization\",\"description\":\"bit 1:显示灯泡;bit 0:关闭灯泡;\\n如 0b101......表示第1个灯泡开,第2个灯泡关,第3个灯泡关....\",\"name\":\"灯串显示\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"模式字符串:012345555……5555\\n0:模式(单字符0-b):Fade、Blink、Twinkle、Rainbow、Red White Blue、Red Green White、Mardi Gras、Valentines Day、Autumn、St Patrick Day、Spring、UserColor1、UserColor2、UserColor3、UserColor4、UserColor5\\n1:效果(单字符0-7):Solid、Twinkle、Blink、Pulse、Wave Chase、Chase、Wave、Fase chase\\n2:速度(单字符0-f)\\n3:亮度(单字符0-f)\\n4:颜色个数(单字符0-2)\\n5:颜色值(HSV白光)\\n\",\"name\":\"模式\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"lamp_number\",\"description\":\"默认值24\",\"name\":\"灯串头数\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"12\",\"18\",\"24\"]}}]}]}"
},
"success": true,
"t": 1720883560691,
"tid": "58cc7f61412a11ef8d05deff400716f1"
}
I think I can also eventually work out how to get a debug scan from tinytuya
if you need it...
The format of dp 106 is not parsable, as it is not a true hex value, it contains garbage in the middle. It also looks like it may be variable length which would make it difficult to work with even if it was pure hex.
So the best I can do for now is just on/off switches.
Across various sites there has been confusion about Tuya devices that deliver all their configuration parameters on a single DP as a line of JSON-encoded data. My device is the Enbrighten Café premium string lights which, oddly, are using DP 26 (? or 106) for this.
tuyalocal
recognizes these and turns them on & off but all the other controls are non-functional; the core integration seems to recognize the limitation and only displays it as on/off.Log Message
No errors in HA's log.
Information about DPS mappings
my cloud dev plan expired, so this is from "smart home basic service":
However, when setting up
localttuya
it saw something different: DP 106 looks like the pattern for DP 28 per the platform.Product ID
Thanks in advance