发表于 2021-10-22 22:12:07
|
显示全部楼层
本帖最后由 zsqduke 于 2021-10-22 23:50 编辑
求助一下楼主,我的圈厨油烟机,成功接入了,但是有个小瑕疵:油烟机的灯没能接入,设备参数我复制在这里,你能否帮我看看参数该如何修改。可以确定灯就是那个“照明开关按钮”(siid7,piid4)
这是自动生成的参数
{"hood":{"switch_status":{"siid":2,"piid":1},"fault":{"siid":2,"piid":2},"mode":{"siid":2,"piid":4},"off_delay":{"siid":2,"piid":5},"off_delay_time":{"siid":2,"piid":6}}}
{"hood":{"switch_status":{"power_on":true,"power_off":false},"fault":{"LightingToRemind":0,"CleanRemind":1},"mode":{"Standby":0,"Low":1,"High":2,"Turbo":3,"HeatCleaning":4},"off_delay":{"access":7,"format":"bool","unit":null},"off_delay_time":{"access":7,"format":"uint32","unit":"minutes","value_range":[0,3,1]},"main":true}}
我尝试了在参数里面添加一个hood_light项目,siid7piid4,成功把油烟机灯变成一个attribute,正确反馈灯的状态。然后我又尝试单独创建一个light集成,但是失败了。
还有个小问题是用自动生成的参数生成两个实体,一个是油烟机一个是延时关机,延时关机的实体可以输入数字,但是输入完以后并没有改变设备上的延时,而如果在米家中设置了延时关机会正确反馈到ha。
这是设备属性
{"type":"urn:miot-spec-v2:device:hood:0000A01B:xckj-z90:1","description":"Hood","services":[{"iid":1,"type":"urn:miot-spec-v2:service:device-information:00007801:xckj-z90:1","description":"Device Information","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:manufacturer:00000001:xckj-z90:1","description":"Device Manufacturer","format":"string","access":["read"]},{"iid":2,"type":"urn:miot-spec-v2:property:model:00000002:xckj-z90:1","description":"Device Model","format":"string","access":["read"]},{"iid":3,"type":"urn:miot-spec-v2:property:serial-number:00000003:xckj-z90:1","description":"Device Serial Number","format":"string","access":["read"]},{"iid":4,"type":"urn:miot-spec-v2:property:firmware-revision:00000005:xckj-z90:1","description":"Current Firmware Version","format":"string","access":["read"]}]},{"iid":2,"type":"urn:miot-spec-v2:service:hood:0000782B:xckj-z90:1","description":"Hood","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:xckj-z90:1","description":"Switch Status","format":"bool","access":["read","write","notify"]},{"iid":2,"type":"urn:miot-spec-v2:property:fault:00000009:xckj-z90:1","description":"Device Fault","format":"uint8","access":["read","notify"],"value-list":[{"value":0,"description":"照明提醒"},{"value":1,"description":"油杯清洁提醒"}]},{"iid":4,"type":"urn:miot-spec-v2:property:mode:00000008:xckj-z90:1","description":"Mode","format":"uint8","access":["read","write","notify"],"value-list":[{"value":0,"description":"待机"},{"value":1,"description":"低速"},{"value":2,"description":"高速"},{"value":3,"description":"爆炒"},{"value":4,"description":"热清洗"}]},{"iid":5,"type":"urn:miot-spec-v2:property:off-delay:00000053:xckj-z90:1","description":"Power Off Delay","format":"bool","access":["read","write","notify"]}]},{"iid":7,"type":"urn:xckj-spec:service:informed:00007801:xckj-z90:1","description":"","properties":[{"iid":1,"type":"urn:xckj-spec:property:working-state:00000001:xckj-z90:1","description":"灶头1工作状态","format":"uint8","access":["read","notify"],"value-list":[{"value":0,"description":"机器不启动"},{"value":1,"description":"机器启动"},{"value":2,"description":"小火"},{"value":3,"description":"大火"}]},{"iid":2,"type":"urn:xckj-spec:property:other-state:00000002:xckj-z90:1","description":"灶头2工作状态","format":"uint8","access":["read","notify"],"value-list":[{"value":0,"description":"机器不启动"},{"value":1,"description":"机器启动"},{"value":2,"description":"小火"},{"value":3,"description":"大火"}]},{"iid":3,"type":"urn:xckj-spec:property:run-timer:00000003:xckj-z90:1","description":"机器运行时间","format":"uint32","access":["notify","read"],"unit":"minutes","value-range":[0,9999999,1]},{"iid":4,"type":"urn:xckj-spec:property:lighting:00000004:xckj-z90:1","description":"照明开关按钮","format":"bool","access":["read","notify","write"]},{"iid":5,"type":"urn:xckj-spec:property:linkage:00000005:xckj-z90:1","description":"","format":"bool","access":["read","notify"]}]}]}
复制代码