lumi.plug ZNCZ02LM Support
Closed this issue · 6 comments
I have a few of these now. I've been trying to get them to work with zha_new with some success.
Whilst I'm a programmer, I don't know python and really don't follow the zha code very well at all.
Anyway, I hacked together the following which mostly makes it work and also supports the instantaneous power reporting feature. Seems to work well enough for me.
lumi_plug.zip
I end up with an extra blue "sensor" that doesn't seem to do much/anything in HA, but not really a problem (I just have too many of them in total).
Attributes as recorded
ieee endpoint_id cluster attrid value
----------------------- ----------- ---------- ---------- ----------
00:15:8d:00:02:xx:yy:zz 1 0 5 lumi.plug
00:15:8d:00:02:xx:yy:zz 1 0 4 LUMI
00:15:8d:00:02:xx:yy:zz 2 12 85 0.0
00:15:8d:00:02:xx:yy:zz 1 0 65281 d
00:15:8d:00:02:xx:yy:zz 1 6 61440 117440606
clusters
ieee endpoint_id cluster
----------------------- ----------- ----------
00:15:8d:00:02:xx:yy:zz 1 0
00:15:8d:00:02:xx:yy:zz 1 4
00:15:8d:00:02:xx:yy:zz 1 3
00:15:8d:00:02:xx:yy:zz 1 6
00:15:8d:00:02:xx:yy:zz 1 16
00:15:8d:00:02:xx:yy:zz 1 5
00:15:8d:00:02:xx:yy:zz 1 10
00:15:8d:00:02:xx:yy:zz 1 1
00:15:8d:00:02:xx:yy:zz 1 2
00:15:8d:00:02:xx:yy:zz 2 12
00:15:8d:00:02:xx:yy:zz 2 1280
00:15:8d:00:02:xx:yy:zz 3 12
00:15:8d:00:02:xx:yy:zz 100 15
00:15:8d:00:02:xx:yy:zz 100 1280
output_clusters
ieee endpoint_id cluster
----------------------- ----------- ----------
00:15:8d:00:02:xx:yy:zz 1 25
00:15:8d:00:02:xx:yy:zz 1 10
00:15:8d:00:02:xx:yy:zz 2 12
00:15:8d:00:02:xx:yy:zz 2 4
00:15:8d:00:02:xx:yy:zz 3 12
00:15:8d:00:02:xx:yy:zz 100 15
00:15:8d:00:02:xx:yy:zz 100 4
endpoints
ieee endpoint_id profile_id device_type status
----------------------- ----------- ---------- ----------- ----------
00:15:8d:00:02:xx:yy:zz 1 260 81 1
00:15:8d:00:02:xx:yy:zz 2 260 9 1
00:15:8d:00:02:xx:yy:zz 3 260 83 1
00:15:8d:00:02:xx:yy:zz 100 260 263 1
many thanks. I will add it to the DH folder for the next update
Hi guys,
I've got additional question according to this zigbee plug.
It should work as a repeater, shouldn't it?
- Does the plug need to be paired to the network to act as a repeater, or it just repeats all signals it gets?
- Assuming it needs to be in the network, can I pair other sensor like usual, then if they get out of range repeater takes it over?
- Repeating works with zha-new? :)
Thanks in advance
It should act as a repeater but it's hard to know with this Xiaomi stuff whether it does it properly. To repeat it will need to be part of the same network - it won't just repeat anything it hears. Repeating is more complex than that as there are actual paths between devices.
I'm only just getting some of my devices transferred over from using the gateway so only have a few connected. I have modified the topology script a bit to add a bit more info.
Enter
digraph finite_state_machine {
rankdir=TB;
labeldistance=10;
packMode="node";
node [shape = doublecircle]; "Coordinator\n0";
node [shape = circle];
"lumi.plug\n55677" -> "lumi.plug\n12332" [ label = "108/2" ];
"lumi.plug\n48835" -> "lumi.plug\n12332" [ label = "56/3" ];
"lumi.plug\n48835" -> "Coordinator\n0" [ label = "217/None" ];
"lumi.plug\n55677" -> "lumi.plug\n48835" [ label = "61/2" ];
"lumi.plug\n12332" -> "lumi.plug\n48835" [ label = "58/3" ];
"Coordinator\n0" -> "lumi.plug\n48835" [ label = "75/3" ];
"lumi.plug\n55677" -> "Coordinator\n0" [ label = "234/None" ];
"?\n19042" -> "lumi.plug\n55677" [ label = "85/3" ];
"lumi.plug\n12332" -> "lumi.plug\n55677" [ label = "105/3" ];
"Coordinator\n0" -> "lumi.plug\n55677" [ label = "87/2" ];
"lumi.plug\n48835" -> "lumi.plug\n55677" [ label = "58/2" ];
"lumi.plug\n12332" -> "Coordinator\n0" [ label = "47/None" ];
}
into http://webgraphviz.com/ and it shows multiple paths. I don't have enough devices yet to truly know.
All that said, I didn't have a lot of luck trying to use one as a repeater with the Xiaomi gateway. I tried one of the pushbuttons to use as a doorbell but it didn't seem to help much.
there is a list of routers with an extended check-in timeout so the won't drop xiaomy sensors.
Alternatively you could get a CC2530 board and flash a router firmware to it, see for details had to do it for one of my sensors
from what I see in the chart it acts as router, as @Adminiuga mentioned, the question is how long. but it's easy to test. A xiaomi sensor drops off after 15min of inactivity on a router without extended timeout.
added to master release, closing ticket