I have 2 Xiaomi "zero-fire" Wall Switch
1 is one button and another one is 2 buttons.
2 buttons works fine and can be auto discovered but 1 button wall switch cant be discovered.
Manually add the thing and show online but actually not working.
openhab.log :
[ERROR] [ndler.XiaomiAqaraActorSwitch1Handler] - Can't handle command ON on channel mihome:ctrl_ln1:158d0001f99045:ch1
MI Home APPS gateway information :
version code:158
网关ID57831448
Zigbee通道:0
网关信息:
null
子设备信息:
[{"model":"lumi.ctrl_ln1.aq1","did":"lumi.158d0001f99045","name":"AC3"}, ------> not working
{"model":"lumi.ctrl_ln2.v1","did":"lumi.158d0001da64da","name":"AC2 \/ AC1"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001c2c368","name":"A1"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001c2aeea","name":"A2"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001c2b7ea","name":"A3"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001b70b02","name":"MIS Temperature"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001b70b32","name":"Server Room Temperature"},{"model":"lumi.sensor_ht.v1","did":"lumi.158d0001c2af3c","name":"Voice Temperature"}]
I'm using OH2 snapshot and uploaded the latest mihome binding from
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.mihome/2.2.0-SNAPSHOT/
Thanks.
cc: @dimalo @tavalin @pboos
Here's the Thing definition.
Here's the handler class - XiaomiAqaraActorSwitch1Handler.java
Maybe the channel name shouldn't be channel_0 in the latest firmware?
Hi, Anyone can help?
Debug Log :
15:24:35.456 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Adding item listener for device 158d0001f99045
15:24:35.460 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Having 9 Item listeners
15:24:35.463 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Device 158d0001f99045 on channel mihome:ctrl_ln1:158d0001f99045:ch1 received command REFRESH
15:24:35.469 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Update Item 158d0001f99045 with retented message
15:24:35.472 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"","sid":"158d0001f99045","short_id":21824,"data":"{\"voltage\":3600,\"channel_0\":\"off\"}"}
15:24:39.724 [DEBUG] [g.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.128.132:4321 on Port 9898
15:24:39.730 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"report","model":"sensor_ht","sid":"158d0001b70b02","short_id":42769,"data":"{\"temperature\":\"2036\"}"}
15:24:39.737 [DEBUG] [g.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.128.132:4321 on Port 9898
15:24:39.742 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"report","model":"sensor_ht","sid":"158d0001b70b02","short_id":42769,"data":"{\"humidity\":\"4340\"}"}
15:24:41.002 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Device 158d0001f99045 on channel mihome:ctrl_ln1:158d0001f99045:ch1 received command REFRESH
15:24:44.592 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Device 158d0001f99045 on channel mihome:ctrl_ln1:158d0001f99045:ch1 received command ON
15:24:44.605 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:34ce00907c65: {"cmd": "write", "sid": "158d0001f99045", "data": "{\"channel_0\": \"on\", \"key\": \"AED9B93938D009E135F6A92BC4052939"}"}
15:24:44.616 [ERROR] [andler.XiaomiAqaraActorSwitch1Handler] - Can't handle command ON on channel mihome:ctrl_ln1:158d0001f99045:ch1
15:24:44.625 [DEBUG] [g.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.128.132:9898 on Port 9898
15:24:44.630 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Device 158d0001f99045 honored write request
15:24:44.634 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"write_ack","sid":"158d0001f99045","data":"{\"error\":\"Unsupported device\"}"}
15:24:45.194 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Device 158d0001f99045 on channel mihome:ctrl_ln1:158d0001f99045:ch1 received command OFF
15:24:45.198 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:34ce00907c65: {"cmd": "write", "sid": "158d0001f99045", "data": "{\"channel_0\": \"off\", \"key\": \"AED9B93938D009E135F6A92BC4052939"}"}
15:24:45.203 [ERROR] [andler.XiaomiAqaraActorSwitch1Handler] - Can't handle command OFF on channel mihome:ctrl_ln1:158d0001f99045:ch1
15:24:45.217 [DEBUG] [g.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.128.132:9898 on Port 9898
15:24:45.219 [DEBUG] [ng.mihome.handler.XiaomiBridgeHandler] - Device 158d0001f99045 honored write request
15:24:45.221 [DEBUG] [ihome.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"write_ack","sid":"158d0001f99045","data":"{\"error\":\"Unsupported device\"}"}
hi @kokkuen!
Thanks for the log!
In it you can see, that the switch seems to not be sending it's model:
{"cmd":"read_ack","model":"","sid":"158d0001f99045","short_id":21824,"data":"{"voltage":3600,"channel_0":"off"}"}
while other models send:
{"cmd":"report","model":"sensor_ht","sid":"158d0001b70b02","short_id":42769,"data":"{"temperature":"2036"}"}
Perhaps this is a hint for a bug in the firmware version?
As you can see the gateway responds but with "Unsupported device".
Possibly @kubawolanin is right and the channel should be named differently in the command for the gateway to accept. But then I wonder why the device actually reports "channel_0":"off". The specification also tells us that it has to be "channel_0".
I think we might have to wait for a newer firmware version 😞
Hello,
@kokkuen the new Gateway firmware version: 1.4.1_153.0143 is fixing that issue.
Tell me, what should I do after updating the firmware to make this switch work? By pressing the button of the switch, I see the following message in the log:
2018-03-01 20:27:06.300 [DEBUG] [discovery.XiaomiItemDiscoveryService] - Unknown discovered model: ctrl_ln1.aq1
Hello,
@dimalo for information in firmware version: 1.4.1_153.0143 this type of switch is discovered as "Unknown discovered model: ctrl_ln1.aq1" probably Xiaomi binding needs update.
@servim as workaround use file configuration instead the build-in configuration tool.
The switch ID, you can get on gateway information from Mi Home app.
Thanks, I'll try! But still I hope that @dimalo will add this switch model to the binding in the near future.
Hi all,
please check out my latest PR and test, if the unknown model is now discovered correctly!
Thanks!
pls add ctrl_ln2.aq1 as well, it supported by the latest firmaware
Most helpful comment
Hello,
@kokkuen the new Gateway firmware version: 1.4.1_153.0143 is fixing that issue.