-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for ZNCZ04LM #770
Conversation
Thanks! Could you provide an AliExpress link to the devive? Im interested in it. |
I got it in a local xiaomi shop. I have already tried to look up this device, but it does not seem to be anywhere online yet. |
Ok thanks, I guess its really new! Does it have the eu ground connectors? EDIT: and whats the price? EDIT 2: Could you make a photo of it? |
Looks great, thanks! |
@tomaae can you share which country you bought it in? i wait for this plug to show up on the market. |
Sure, Slovakia. |
@tomaae I think the power state is configurable from the Xiaomi gateway, once it is available on AliExpress I will buy it and figure it out. |
too bad they dont sell xiaomi gateway standalone here, otherwise I would give that a try. |
this plug in not in mi home yet. atm it is only supported by chinese aqara hub firmware, but we should get update for mi eu / aqara eu hubs as well. |
this is how mi home read/write plug props via hub (based on lumi.plug.v1)
|
sending it poweroff_memory option does nothing. |
send it like this, it should work {"poweroff_memory":"on"} |
I have already tried that, but I dont think it is supposed to work like that. |
this is log from serial console of lumi dev working on eu plug which shows poweroff_memory is being switched on. [12:08:06:694]send to sdk {"cmd":"read","model":"plug.mmeu01","sid":"4cf8cdf3c74639c","short_id":"53546","token":"10014523","data":"{"poweroff_memory":"status"}"} [12:08:11:582]send to sdk {"cmd":"write","model":"plug.mmeu01","sid":"4cf8cdf3c74639c","short_id":"53546","token":"10014530","data":"{"poweroff_memory":"on"}"} |
It doenst work like that, somebody needs to sniff the traffic while connected to the xiaomi gateway, then it can be added. |
I have 2 spare cc2531 on the way, I can turn one into a sniffer. Question is, which gateway version do I need that supports most mi/aqara devices so I can get configuration parameters for other devices too. |
most devices should be supported by new mi combo hub. sale starts on 12th december and it's priced ~18 USD in china. |
I see, there will be both new Mi and Aqara hub and bunch of new sensors available soon. I will wait then, thanks. |
Nice find. I will grab few from there once we get poweroff memory working |
do you have official xiaomi distributor on slovakia? i saw it already in 2 online .sk shops. strange i can't get it in any other eu country. in poland we have official distributor / mi stores, but still unknown when eu zigbee socket will be sold. |
I got it at mi-store.sk. Not sure if they are official, but it seems so. They don’t have it on their web yet tho. |
tx i'm not in such hurry and i don't think these shops ship abroad. it's kinda strange they sell it already, because this plug is still missing in mi home and current mi eu hub firmware won't pair with it afaik. it may only work with aqara hub via aqara app atm. |
there is also aqara brand new eu plug |
@tomaae i confirmed with polish reseller that they don't know anything about this product so it won't be fast till it's available here. i don't think that any .sk shop ships abroad. any chance you can order one for me? i should be able to make it work with my rooted eu hub. |
found another .sk shop, but they only ship to slovakia, czech, hungary. https://www.rychlypresun.sk/produkty/540-mi-smart-zastrcka-wi-fi.html there is also some info XIAOMi products on our website are imported by the official XIAOMI distributor for the Slovak market and all are properly certified for the EU market. so i guess there is official xiaomi distributor for slovakia and already have this plug in stock. |
Careful, thats a wifi version. zigbee one is square, see photo above. |
ohh i think they mixed up zigbee model ZNCZ04LM and description with wifi plug photo (i have it, made by chuangmi, model ZNCZ05CM). anyway i will contact you next week, have a nice vacation! |
managed to buy it from mobilonline.sk, i should have it next week :) |
got mi eu plug. works fine with mi eu hub. does not pair with mi cn hub. power memory option works fine. |
I have ordered that new mi hub yesterday, we see. I hope it work, since I cannot but eu hub standalone for sniffing. |
i've also ordered cc2531 with sniffer fw and will try to log zigbee payload for poweroff_memory ;) |
perfect, once we get poweroff_memory working in z2m parameter working, it will be a perfect plug :) |
Would be great to see powering_memory working. Closest I’ve ever seen was: |
I found a pcap here: |
poweroff_memory Attribute Field, Boolean: 0x01 en_night_tip_light Attribute Field, Boolean: 0x01 max_power Attribute Field, Float: 2300 |
Perfect, I will check if I’m able to get it working when I get home |
I have tried, but it does not do anything. No mention in debugs too, so not sure.
|
can you log raw hex payload being sent? in hex it looks like 01 02 10 01 for poweroff_memory true (reversed byte order of attribute 0x0201). i can provide full pcap if needed. i guess we need @Koenkk here ;) |
I dont have a sniffer yet, so I cant. but if you can give me pcap, I will have a look :) |
I have created #827 , hopefully someone can help |
I see my custom cluster implementation was recognized tho
I wonder what are those. Some settings I guess. 3rd is on/off state |
and this seems to be detection that something was plugged physically into the socket. Nice
|
poweroff_memory / en_night_tip_light state change does not lead to any changes in 0x00f7. btw 0x0202 is charge_protect. |
hmm, too bad, that means we cannot show them in UI. but thats not really important to see in UI. any idea what charge_protect is? protection against pulling over amp rating for that plug? Also, while looking for some things, I found this on google, saying it is in this thread for some reason. Seems to be a complete device config:
|
"lumi_plug_setting_maxPower": "Maximum power limit", it's config for lumi.plug.* from hub firmware, but looks like mmeu01 only supports these "method":"get_device_prop","params":["lumi.XXXX","channel_0","load_voltage","load_power","poweroff_memory","charge_protect","en_night_tip_light","max_power"] load_voltage / load_power are not sent to zigbee socket however. |
zigbee2mqtt:info 2019-11-23T00:00:18: Device 'Computer' joined
zigbee2mqtt:info 2019-11-23T00:00:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"Computer"}}'
zigbee2mqtt:info 2019-11-23T00:00:18: Starting interview of 'Computer'
zigbee2mqtt:info 2019-11-23T00:00:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"Computer"}}'
zigbee2mqtt:info 2019-11-23T00:00:19: Successfully interviewed 'Computer', device has successfully been paired
zigbee2mqtt:info 2019-11-23T00:00:19: Device 'Computer' is supported, identified as: Xiaomi Mi power plug ZigBee EU (ZNCZ04LM)
zigbee2mqtt:info 2019-11-23T00:00:19: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"Computer","model":"ZNCZ04LM","vendor":"Xiaomi","description":"Mi power plug ZigBee EU","supported":true}}'
zigbee2mqtt:info 2019-11-23T00:00:22: MQTT publish: topic 'zigbee2mqtt/Computer', payload '{"state":"OFF","linkquality":36,"power":4.67}'
zigbee2mqtt:info 2019-11-23T00:00:38: MQTT publish: topic 'zigbee2mqtt/Computer', payload '{"state":"ON","linkquality":2,"power":4.67}'
zigbee2mqtt:info 2019-11-23T00:00:47: MQTT publish: topic 'zigbee2mqtt/Computer', payload '{"state":"ON","linkquality":34,"power":4.75}'
zigbee2mqtt:info 2019-11-23T00:01:18: MQTT publish: topic 'zigbee2mqtt/Computer', payload '{"state":"ON","linkquality":23,"power":0}'
zigbee2mqtt:info 2019-11-23T00:01:32: MQTT publish: topic 'zigbee2mqtt/Computer', payload '{"state":"ON","linkquality":28,"power":4.67}'