mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-29 15:18:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da4d26af62 | ||
|
|
f64bf16f6f | ||
|
|
0b9997b7a5 | ||
|
|
6f33529c79 | ||
|
|
1972eb450c | ||
|
|
f4f910f014 | ||
|
|
087d1b8761 | ||
|
|
4334e01759 | ||
|
|
6fd059967a | ||
|
|
61f5776310 | ||
|
|
3f2d50900d | ||
|
|
be601cffb0 | ||
|
|
6b7bd9da37 | ||
|
|
3a9dfb04a7 | ||
|
|
67f8e97b12 | ||
|
|
37089e440a | ||
|
|
d17eec5310 | ||
|
|
bcf79a7e34 | ||
|
|
6bd9e74e0c | ||
|
|
6aad019328 | ||
|
|
d05a3a066a | ||
|
|
5440aadec0 | ||
|
|
be30067a39 | ||
|
|
17560ca885 | ||
|
|
e00dbbf4a9 | ||
|
|
33201367f1 | ||
|
|
60627ab6e3 | ||
|
|
88a1c2884a | ||
|
|
a53a19026c | ||
|
|
1459ffea7a | ||
|
|
ba26887ea5 | ||
|
|
694c45fd96 | ||
|
|
5e165810ec | ||
|
|
99fd93f9a7 | ||
|
|
c2be95777f | ||
|
|
acce25737f | ||
|
|
134f86a580 | ||
|
|
2a81a54609 | ||
|
|
2fcddb5ad5 | ||
|
|
ac0291f09c | ||
|
|
7d1635aff8 | ||
|
|
6c56c95e3f | ||
|
|
d37d9ee859 | ||
|
|
e179e053ce | ||
|
|
546a72ff53 | ||
|
|
c9122eecda | ||
|
|
46d7176976 | ||
|
|
2df1acf532 | ||
|
|
c5bd3a2450 | ||
|
|
260d2904f3 | ||
|
|
8ae57e7ef0 | ||
|
|
b23276f7f3 | ||
|
|
fdc8fcc02b | ||
|
|
ef16fcd505 | ||
|
|
c5898598ae | ||
|
|
461544ed6a | ||
|
|
661b2f1cc0 | ||
|
|
eea660374f | ||
|
|
878a88632b | ||
|
|
22c8f14659 | ||
|
|
d2c4133e56 | ||
|
|
44db557a0c | ||
|
|
31246efc64 | ||
|
|
a7486d723f | ||
|
|
e33b49e2ff | ||
|
|
e51ed89641 | ||
|
|
b459c35219 | ||
|
|
d8512c73df | ||
|
|
fdcaaee955 | ||
|
|
e2858dc90f | ||
|
|
3dbf454d07 | ||
|
|
fc98b951ff | ||
|
|
0b0a9bca4d | ||
|
|
be1c81a778 | ||
|
|
b61723923e | ||
|
|
551a58a4a4 | ||
|
|
d562541178 | ||
|
|
720e3930e3 | ||
|
|
6c453738d4 | ||
|
|
6245c6a59f | ||
|
|
dcf1c83a25 | ||
|
|
2b7d9e6ee7 | ||
|
|
019b087af1 | ||
|
|
af770acd2d | ||
|
|
23cf8eade9 | ||
|
|
45c6f2345c | ||
|
|
00bc4de943 | ||
|
|
5cdf820bf6 | ||
|
|
99118a0ad8 | ||
|
|
34166a5535 | ||
|
|
5ad97325be | ||
|
|
2fb4e20e1d | ||
|
|
467c0062bb | ||
|
|
afbfdda0d7 | ||
|
|
4265fe05c6 | ||
|
|
833769af0c | ||
|
|
8a5f39f6aa | ||
|
|
857fc230d4 | ||
|
|
6162dcc4f0 | ||
|
|
7669682716 | ||
|
|
4ca8e8e43e | ||
|
|
5f054862f0 | ||
|
|
964367fc66 | ||
|
|
84915dd1d4 | ||
|
|
344cd60088 | ||
|
|
754db956b5 | ||
|
|
646cd34715 | ||
|
|
cb3ec45294 | ||
|
|
9eac34a5bb | ||
|
|
7e9dfd4f41 | ||
|
|
63ffe279ea | ||
|
|
6f92a41ca9 | ||
|
|
ca19b77e8c | ||
|
|
4983048191 | ||
|
|
78531a0878 | ||
|
|
505be311a4 | ||
|
|
02bf8a88bc | ||
|
|
a813663de5 | ||
|
|
ec5064bc4d | ||
|
|
ebd2f264a9 | ||
|
|
5bd87d338b | ||
|
|
ada9316148 | ||
|
|
b476bc2bf8 | ||
|
|
2076bbae5d | ||
|
|
593dd858d9 | ||
|
|
c80be7bda2 | ||
|
|
01dfcd18ce | ||
|
|
3effa07cf8 | ||
|
|
6b97df7b47 | ||
|
|
35a1dd6b0a | ||
|
|
ff9e6cdacc | ||
|
|
f219e5df9f | ||
|
|
f64285703c | ||
|
|
f02ec9a8dd | ||
|
|
3ca35ad72f | ||
|
|
da58dcbd7c | ||
|
|
7ffe255d93 | ||
|
|
512f31fbb9 | ||
|
|
f415171036 | ||
|
|
4164f01a6b | ||
|
|
f1b4cd0480 | ||
|
|
1428e0bb87 | ||
|
|
d16981d539 | ||
|
|
2f52878140 | ||
|
|
9ebb1b96dd | ||
|
|
0527b89b49 | ||
|
|
8bcbb5930a | ||
|
|
09b7fe699e | ||
|
|
4abafa9527 | ||
|
|
f3a51f66fd | ||
|
|
d5925efca7 | ||
|
|
5e0d72c41c | ||
|
|
ba92f73961 | ||
|
|
f2132f6c50 | ||
|
|
6e6305253e | ||
|
|
dcebba857b | ||
|
|
8d97262d39 | ||
|
|
a9b4188434 | ||
|
|
997c5d3e44 | ||
|
|
a3bbb93f99 | ||
|
|
41c8c2a146 | ||
|
|
8833fb57b5 | ||
|
|
4a996bd84d | ||
|
|
732a97ba0c | ||
|
|
e7bf5ee648 | ||
|
|
159a846c50 | ||
|
|
a6d3e7209f | ||
|
|
1a48c85365 | ||
|
|
6a8abd8ff4 | ||
|
|
b492b0ce5f | ||
|
|
518232e15e | ||
|
|
90c70e8629 | ||
|
|
fe4f43843d | ||
|
|
a5ce7e6890 | ||
|
|
fc3a826f50 | ||
|
|
ebd0415945 | ||
|
|
ce08668543 | ||
|
|
80aa023f7f | ||
|
|
e4df2ac66e | ||
|
|
9a21e9d956 | ||
|
|
a7e9ad70e3 | ||
|
|
61e2087242 | ||
|
|
99ebc46981 | ||
|
|
c8eb503ae7 | ||
|
|
7507ad6dcb | ||
|
|
92fcf5a85a | ||
|
|
42bc5f274b | ||
|
|
7b8b2c5213 | ||
|
|
9d8e56408a | ||
|
|
caf92c5e30 | ||
|
|
67f6ccc8a8 | ||
|
|
bf36f1e8a3 | ||
|
|
d444969151 | ||
|
|
d12943556c | ||
|
|
9964d8e462 | ||
|
|
3083655072 | ||
|
|
265bcf1de3 | ||
|
|
bd93d09290 | ||
|
|
ca481d7f76 | ||
|
|
62e67e99d2 | ||
|
|
d4011fabc7 | ||
|
|
cfefaeb73c | ||
|
|
34111159ae | ||
|
|
9d4705fc1c | ||
|
|
007bc42bf7 | ||
|
|
3001e2d3a0 | ||
|
|
f60b4ddd80 | ||
|
|
e56e620f54 | ||
|
|
41e68c8ffe | ||
|
|
63acd4a43b | ||
|
|
c5218bbd31 | ||
|
|
4dd9f0ee57 | ||
|
|
e441cf1752 | ||
|
|
e65f9d36d0 | ||
|
|
9e94148459 | ||
|
|
e3d0b97085 | ||
|
|
5b71eeeed8 | ||
|
|
d4f01e6893 | ||
|
|
e9a336fd16 | ||
|
|
5f203d15c4 | ||
|
|
d7401c817c | ||
|
|
bd29a5d35c | ||
|
|
983f55ce3d | ||
|
|
130366575e | ||
|
|
7fb7dbbe0d | ||
|
|
a7b3304b57 | ||
|
|
c09f55873b | ||
|
|
ef7049f899 | ||
|
|
1a7331609a | ||
|
|
ff83840f76 | ||
|
|
c8a07a5c2d | ||
|
|
11aacb8620 | ||
|
|
d24c41cbba | ||
|
|
e758443190 | ||
|
|
21dadd631c | ||
|
|
c32f8961b6 | ||
|
|
1f1c771075 | ||
|
|
de8dd74968 | ||
|
|
f5463dbf0e | ||
|
|
9c5b3bf4d1 | ||
|
|
798a4ee565 | ||
|
|
09743f13f9 | ||
|
|
8f4cf5e520 | ||
|
|
d53e1330f5 | ||
|
|
17f1a865b4 | ||
|
|
8b4e0fd865 | ||
|
|
cfae1bf3b0 | ||
|
|
411f1fab73 | ||
|
|
053e646f50 | ||
|
|
d83085ea7f | ||
|
|
e26ad2aca2 | ||
|
|
eb69ea6808 | ||
|
|
d0242fbd54 | ||
|
|
bd8801698f | ||
|
|
b77be8e673 | ||
|
|
1189d16839 | ||
|
|
b00d4d55fa | ||
|
|
4f7e3a179f | ||
|
|
1bdbeae144 | ||
|
|
48fc7d8d3b | ||
|
|
8ee3158783 | ||
|
|
7d04185f2c | ||
|
|
377e9d50dc | ||
|
|
9628cf2c95 | ||
|
|
4d4a63f913 | ||
|
|
22bed9a347 | ||
|
|
d96c3da8d5 | ||
|
|
6abe7d2fd7 | ||
|
|
a62d6aad91 | ||
|
|
c55691daec | ||
|
|
c9f56f0bbf | ||
|
|
c53c4c894f | ||
|
|
6ae307d893 | ||
|
|
511f9406e2 | ||
|
|
9e63a4646e | ||
|
|
da5ca2f0bf | ||
|
|
ecbee780db | ||
|
|
a604fd6345 | ||
|
|
36e52ba4fb | ||
|
|
f67eeffed6 | ||
|
|
5e55e1655f | ||
|
|
519eb4eecf | ||
|
|
fd3019dce8 | ||
|
|
1ca1be2ea2 | ||
|
|
967bf1083c | ||
|
|
c1e8dd990f | ||
|
|
fcb6c37ef0 | ||
|
|
c9ec198c1f | ||
|
|
a60fdd75dc | ||
|
|
7853f41a0e | ||
|
|
3ed5705253 | ||
|
|
5254eea6e0 | ||
|
|
92e930ede3 | ||
|
|
ac3b924065 | ||
|
|
dd8a55cf08 | ||
|
|
3ae2d2b946 | ||
|
|
31b8352f5a | ||
|
|
503fef807c | ||
|
|
4aab81d9e3 | ||
|
|
8d705ade39 | ||
|
|
d3e97953c3 | ||
|
|
1b859c4dc2 | ||
|
|
225919bb23 | ||
|
|
74b8340afb | ||
|
|
08c0f2b614 | ||
|
|
61b54c50a5 | ||
|
|
6400f52a28 | ||
|
|
97f9f83181 | ||
|
|
90c3fc0320 | ||
|
|
94a7cd8ec9 | ||
|
|
1df43bdbc4 | ||
|
|
3daf97283c | ||
|
|
aca0c39291 | ||
|
|
9624384c3f | ||
|
|
3b4ee3bc2e | ||
|
|
7a19c8876a | ||
|
|
51df6b7e8a | ||
|
|
7cabe3a523 | ||
|
|
7b2522f712 | ||
|
|
5a132ad34b | ||
|
|
362b910e48 | ||
|
|
241b300f7b | ||
|
|
0e9931af6c | ||
|
|
f4f297e8a2 | ||
|
|
5934efa41e | ||
|
|
38a1aec823 | ||
|
|
3c398df658 | ||
|
|
91d415404c | ||
|
|
ef01346776 | ||
|
|
801e97143c | ||
|
|
304b2efa48 | ||
|
|
a36ed2032d | ||
|
|
17d01e937e | ||
|
|
110f80ec84 | ||
|
|
b28da0265e | ||
|
|
1c529c4873 | ||
|
|
3981c1c6e4 | ||
|
|
c48f73e36b | ||
|
|
94e03d4189 | ||
|
|
e30ff9e722 | ||
|
|
1f63a32170 | ||
|
|
e9b5a588cc | ||
|
|
4357064203 | ||
|
|
86a65ebec0 | ||
|
|
259ba9d658 | ||
|
|
9fe76c29ef | ||
|
|
dd49a76e5c | ||
|
|
6976f8e70a | ||
|
|
82dc8437a1 | ||
|
|
fb12d15d9d | ||
|
|
852950fc09 | ||
|
|
b663e37fd9 | ||
|
|
70fbe714e3 | ||
|
|
ee8161b807 | ||
|
|
8ad6aee43a | ||
|
|
4497214588 | ||
|
|
08e55e469f | ||
|
|
c29bfe1455 | ||
|
|
82ed260d47 | ||
|
|
caff94559e | ||
|
|
c2b4d63e12 | ||
|
|
825f096434 | ||
|
|
4b14222bda | ||
|
|
927c4dbc05 | ||
|
|
c4e9ea208a | ||
|
|
af09624cff | ||
|
|
e4a50b662d | ||
|
|
22b64d09f2 | ||
|
|
dc028d5046 | ||
|
|
0352a738a7 | ||
|
|
6adfdacb3c | ||
|
|
18913a1577 | ||
|
|
1e04c229dd | ||
|
|
31d21546b9 | ||
|
|
7f9104367b | ||
|
|
92d0002bbb | ||
|
|
0074c32136 | ||
|
|
faa6aa41a9 | ||
|
|
3ed9bbde1a | ||
|
|
8f39ae9d63 | ||
|
|
a09da4fe10 | ||
|
|
9cc82701c1 | ||
|
|
190dda5104 | ||
|
|
3d74a6e031 | ||
|
|
6b7546547d | ||
|
|
3649fb1bc9 | ||
|
|
eb2c4cbdee | ||
|
|
f93a3e1c07 | ||
|
|
ee9584121a | ||
|
|
ba1eca82eb | ||
|
|
68d2d0a73d | ||
|
|
d8d78af4ec | ||
|
|
80e682688d | ||
|
|
c6617fb7d9 | ||
|
|
26d8d27e85 | ||
|
|
87232988e7 | ||
|
|
a3d26ceeb2 | ||
|
|
1f6e64b4c0 | ||
|
|
919b8a9b4c | ||
|
|
31088255ab | ||
|
|
39fe50600e | ||
|
|
a54e256b40 | ||
|
|
4472c01076 | ||
|
|
801be951a4 | ||
|
|
cb16ba2f71 | ||
|
|
0d587f304e | ||
|
|
21dc1a8c8e | ||
|
|
32b76edb7c | ||
|
|
0eaf0ad5d6 | ||
|
|
1ebd774d6f | ||
|
|
950b3c7ace | ||
|
|
f8106feb18 | ||
|
|
69e9dbc5b2 | ||
|
|
75718b360e | ||
|
|
beb2713cdd | ||
|
|
2cdbe49385 | ||
|
|
d0e66ed1da | ||
|
|
39d6a8e218 | ||
|
|
2f187ae282 | ||
|
|
3a5bdffd4e | ||
|
|
a1b43d12f6 | ||
|
|
310f9892d6 | ||
|
|
c2edaed866 | ||
|
|
2d4c447ee1 | ||
|
|
b13d87d461 | ||
|
|
da9425290e | ||
|
|
811692fed8 | ||
|
|
78ff9b1937 | ||
|
|
c6011c0911 | ||
|
|
9f16f99424 | ||
|
|
08ad3a877d | ||
|
|
24780e6eac | ||
|
|
2554cf8e8b | ||
|
|
4aa5877797 | ||
|
|
61942f8411 | ||
|
|
00ebd441a0 | ||
|
|
4843d85fe9 | ||
|
|
32db1fd07a | ||
|
|
cee35c66e6 | ||
|
|
76d7861671 | ||
|
|
35fd1a68fc | ||
|
|
8828ee60ae | ||
|
|
55c3edfa95 | ||
|
|
2f52b851a9 | ||
|
|
91bc56a09f | ||
|
|
c737f569f9 | ||
|
|
de4f9f44fd | ||
|
|
21714855bf | ||
|
|
50986591c1 | ||
|
|
e10999f0f2 | ||
|
|
7015741a08 | ||
|
|
64fa02abab | ||
|
|
7e6dc67861 | ||
|
|
3c5727b320 | ||
|
|
9ef4d2b810 | ||
|
|
e96dac2596 | ||
|
|
9a15e8c118 | ||
|
|
25408769e6 | ||
|
|
2328ecb2ee | ||
|
|
b2a453bec3 | ||
|
|
20d9bac317 | ||
|
|
40596bab6a | ||
|
|
69d04d0648 | ||
|
|
363f4e1c3b | ||
|
|
008fda4d90 | ||
|
|
c64158b75d | ||
|
|
1ea694cb1a | ||
|
|
e537784d34 | ||
|
|
0277591085 | ||
|
|
7b2480be52 | ||
|
|
70c30736a1 | ||
|
|
24cf72f166 | ||
|
|
e5081b2856 | ||
|
|
4048cb81a4 | ||
|
|
2af2a8ea05 | ||
|
|
1b066d9f59 | ||
|
|
5c9b31b2fc | ||
|
|
61d85af3fd | ||
|
|
789ec0cc90 | ||
|
|
b97f5d1afa | ||
|
|
4cb0c0bbb0 | ||
|
|
6d24a49062 | ||
|
|
bee722c9c4 | ||
|
|
36bba0154d | ||
|
|
a2a90bcdbd | ||
|
|
1043053812 | ||
|
|
e6044da604 | ||
|
|
a8cf925fcb | ||
|
|
ad835e090b | ||
|
|
3a96473e2b | ||
|
|
661f79ce93 | ||
|
|
7461fec28b | ||
|
|
8b4b9bea19 | ||
|
|
fdcf2e8c3d | ||
|
|
b39e195763 | ||
|
|
f2cdbeab38 | ||
|
|
f37d52b870 | ||
|
|
969585c84e | ||
|
|
d4d85633d2 | ||
|
|
f54f3bd40f | ||
|
|
03ca8ec24d | ||
|
|
a65fbd6e2c | ||
|
|
ac28ca2841 | ||
|
|
79d11e295b | ||
|
|
9f31cd86a3 | ||
|
|
c722b611dd | ||
|
|
3c4fa40a32 | ||
|
|
d81a972f1b | ||
|
|
0f9333f8b9 | ||
|
|
6e60063337 | ||
|
|
438626691e | ||
|
|
a978b26001 | ||
|
|
7cec70aba8 | ||
|
|
df1825d65e | ||
|
|
532b3b2484 | ||
|
|
84a5277d45 | ||
|
|
acbab01b7e | ||
|
|
6a4073b305 | ||
|
|
18aee4803b | ||
|
|
e5ca977579 | ||
|
|
1e1e0e4ca9 | ||
|
|
3b1fae1452 | ||
|
|
cf2f10394a | ||
|
|
9eed7e271e | ||
|
|
07765093be | ||
|
|
5f19d9cc82 | ||
|
|
e2ebe5e1ff | ||
|
|
a93838be15 | ||
|
|
044e8466ed | ||
|
|
c0bdf2e3a2 | ||
|
|
9321a04ecc | ||
|
|
184eef72b0 | ||
|
|
bb6c226d55 | ||
|
|
e892a54013 | ||
|
|
2c6176ff10 | ||
|
|
83b8fc9778 | ||
|
|
f0e9ebe4ed | ||
|
|
8902bd1d60 | ||
|
|
1857ac525b | ||
|
|
6427da244f | ||
|
|
339816c160 | ||
|
|
2a3670d3d7 | ||
|
|
889e972176 | ||
|
|
e213356c40 | ||
|
|
1cde620d70 | ||
|
|
ae14fa5cd6 | ||
|
|
672a0cac4f | ||
|
|
4ea55fe22a | ||
|
|
05769ce1a3 | ||
|
|
61116ec670 | ||
|
|
709046db2a | ||
|
|
bef8a682ca | ||
|
|
8f0794cb8f | ||
|
|
cd2fb54615 | ||
|
|
7893f9256f | ||
|
|
09f26a104c | ||
|
|
5ffae5a09a | ||
|
|
f7ceb62eec | ||
|
|
b8f689fe6e | ||
|
|
09e0fe8e3f | ||
|
|
fdf97180b0 | ||
|
|
5a9aef6d3b | ||
|
|
863230eaa3 | ||
|
|
cb0cc149a1 | ||
|
|
516bd704c6 | ||
|
|
46e75374b6 | ||
|
|
ee167e603a | ||
|
|
9b12933a99 | ||
|
|
ea7a4b1955 | ||
|
|
147a130628 | ||
|
|
1fda02ae7c | ||
|
|
4a664cf230 | ||
|
|
1a0baee788 | ||
|
|
1287a596f9 | ||
|
|
1862c8b035 | ||
|
|
8c848b8368 | ||
|
|
bdfabeb3da | ||
|
|
ec0ee53c7a | ||
|
|
14f5c4d3c9 | ||
|
|
f3e13f16f3 | ||
|
|
061285bd17 | ||
|
|
25448f823e | ||
|
|
99006895b5 | ||
|
|
26bed2d998 | ||
|
|
cc45413e2d | ||
|
|
ba77860489 | ||
|
|
14377c04a0 | ||
|
|
3238687f60 | ||
|
|
0632f83baf | ||
|
|
259a3417e2 | ||
|
|
a20ec7caa1 | ||
|
|
b08bf33ccf | ||
|
|
577bb0d12c | ||
|
|
92d88b680a | ||
|
|
00900958ef | ||
|
|
11a6e36a82 | ||
|
|
d6b9627146 | ||
|
|
15cad740ee | ||
|
|
ab14cca0ee | ||
|
|
87889c0688 | ||
|
|
17a6fff3ce | ||
|
|
f171d54e4b | ||
|
|
9faeb53ddb | ||
|
|
21a782d2c6 | ||
|
|
88cec5dfa6 | ||
|
|
a62f4289a7 | ||
|
|
1b5e010cd3 | ||
|
|
0f053425f3 | ||
|
|
04e68014da | ||
|
|
54dbb9732f | ||
|
|
8703847337 | ||
|
|
a85c68cca0 | ||
|
|
4592b00fe1 | ||
|
|
d9ddce5797 | ||
|
|
b3310c49ca | ||
|
|
781b542f92 | ||
|
|
43726d8bb1 | ||
|
|
8137b6f417 | ||
|
|
c439508129 | ||
|
|
e5233494af | ||
|
|
a2d378cc86 | ||
|
|
3d151298ae | ||
|
|
5554579683 | ||
|
|
ce2455510b | ||
|
|
bf526f6f50 | ||
|
|
004f4a5eb9 | ||
|
|
059e4719c6 | ||
|
|
a0278b7577 | ||
|
|
0f89053d05 | ||
|
|
e1ff6bdac5 | ||
|
|
73221f50f5 | ||
|
|
37405ee079 | ||
|
|
52fb19360e | ||
|
|
e47b672bcb | ||
|
|
63c88cba5b | ||
|
|
f0d0a62471 | ||
|
|
a497cf0457 | ||
|
|
ed5675960e | ||
|
|
ba5bf3c209 | ||
|
|
e40a3ba3bf | ||
|
|
ecf1b9ded4 | ||
|
|
314ab1b705 | ||
|
|
b6fda868ed | ||
|
|
443a14e40a | ||
|
|
c68790f2c4 | ||
|
|
c9d00875c0 | ||
|
|
0120284356 | ||
|
|
aa9e81d64d | ||
|
|
f4bf504642 | ||
|
|
5fc7760db6 | ||
|
|
ffa4fe35d9 | ||
|
|
778720b1b5 | ||
|
|
0826db07d0 | ||
|
|
7642b295e1 | ||
|
|
c9c599b60b | ||
|
|
c0a87ff520 | ||
|
|
4fbb6667ef | ||
|
|
1357b06185 | ||
|
|
6d16875a37 | ||
|
|
f7f9a1699b | ||
|
|
46b96640f3 | ||
|
|
51c91e685e | ||
|
|
8a6582739f | ||
|
|
c569840d6c | ||
|
|
2302240897 | ||
|
|
60349171d2 | ||
|
|
35f0def29f | ||
|
|
a512ca2bd5 | ||
|
|
96dcb93859 | ||
|
|
37d516d770 | ||
|
|
6c59bff223 | ||
|
|
f16616d3a6 | ||
|
|
959e7458a4 | ||
|
|
5828ee9989 | ||
|
|
054892641b | ||
|
|
c0326ec2bb | ||
|
|
189c0f360e | ||
|
|
dc70840c8a | ||
|
|
0b3c8df810 | ||
|
|
4405e71610 | ||
|
|
fd4a88acd0 | ||
|
|
3963a8d26f | ||
|
|
720addd906 | ||
|
|
4558bffd41 | ||
|
|
89c66094c6 | ||
|
|
ae08deb2fd | ||
|
|
ff02e54f25 | ||
|
|
963064dc22 | ||
|
|
0d9741e511 | ||
|
|
7d9c21ba24 | ||
|
|
b8744ce890 | ||
|
|
dd8ee60535 | ||
|
|
d5c6e39e7d | ||
|
|
588124b971 | ||
|
|
a7eea5ecad | ||
|
|
e13bdf1a31 | ||
|
|
30823a5a0c | ||
|
|
5bee8ccafe | ||
|
|
8ffd7653ac | ||
|
|
99a29293dd | ||
|
|
9d61184013 | ||
|
|
4f300aa72d | ||
|
|
cf7e0d1aa9 | ||
|
|
17874cfdc1 | ||
|
|
e12a371093 | ||
|
|
7e74b8c549 | ||
|
|
cdf64823ef | ||
|
|
5d195fc299 | ||
|
|
fd932926e7 | ||
|
|
38159a536c | ||
|
|
7e2ca5a97e | ||
|
|
b95dcd0f9b | ||
|
|
73f0f8fe43 | ||
|
|
16f3e884fc | ||
|
|
c5e6b9dd13 | ||
|
|
cae5d1a004 | ||
|
|
85375ffbae | ||
|
|
43fc66c436 | ||
|
|
5718cd0157 | ||
|
|
dd6e34a152 | ||
|
|
1ddf60bef0 | ||
|
|
6ff3954b71 | ||
|
|
6dd2926a1d | ||
|
|
5970e498f3 | ||
|
|
dcd81cbbf2 | ||
|
|
9e5fb04314 | ||
|
|
d324a91a5f | ||
|
|
fcfeac81e4 | ||
|
|
c44816efee | ||
|
|
86f19affa1 | ||
|
|
e21bfc1567 | ||
|
|
329c290505 | ||
|
|
b624a8ccad | ||
|
|
a43cd5a864 | ||
|
|
5f6b37bf83 | ||
|
|
653dfc7b6f | ||
|
|
aa87443c95 | ||
|
|
f5a5668359 | ||
|
|
5f2e93f64d | ||
|
|
7cd30a3a05 | ||
|
|
34a3e3c00b | ||
|
|
28e32884d9 | ||
|
|
dda2e064b2 | ||
|
|
9605e724e1 | ||
|
|
6912f8108d | ||
|
|
3c0e784afb | ||
|
|
be50d650a4 | ||
|
|
a5057ac101 | ||
|
|
72a74d7dc1 | ||
|
|
dccdc5aafa | ||
|
|
6dd60c09bf | ||
|
|
4ec905efca | ||
|
|
f62eabcb6d | ||
|
|
fd2cf41f0f | ||
|
|
755d101738 | ||
|
|
6fdd58be8a | ||
|
|
26083a62d9 | ||
|
|
30b35e7272 | ||
|
|
f6c01a02c9 | ||
|
|
35b9e6204d | ||
|
|
84f9d09b3f | ||
|
|
f260bf974b | ||
|
|
a2ea9c548f | ||
|
|
932a66a5c4 | ||
|
|
3d0541a32d | ||
|
|
3bb1f0f10b | ||
|
|
85b042ac25 | ||
|
|
f1fe1edb49 | ||
|
|
70d177485d | ||
|
|
fd44537984 | ||
|
|
dc20816043 | ||
|
|
c6d09df01a | ||
|
|
74cdde23b9 | ||
|
|
57aefe477d | ||
|
|
d5a3ce3871 | ||
|
|
92de1ca942 | ||
|
|
6f477c2923 | ||
|
|
5453c082c4 | ||
|
|
07fbc1b9a3 | ||
|
|
afeed4f372 | ||
|
|
2a197a4ba8 | ||
|
|
5e4e6d81de | ||
|
|
faede151f3 | ||
|
|
ea4aaf2cfa | ||
|
|
ac94b95bba | ||
|
|
708c497614 | ||
|
|
bd8aaea767 | ||
|
|
ac4ca88b8a | ||
|
|
8651fd7162 | ||
|
|
03ff4e6e5a | ||
|
|
3bc2ec8c79 | ||
|
|
c4804e574e | ||
|
|
5d3461c4c6 | ||
|
|
9380bbcadf | ||
|
|
3a0fe60b22 | ||
|
|
a1eea76dd4 | ||
|
|
69e805c882 | ||
|
|
0fe3a9b45c | ||
|
|
ecf64c8058 | ||
|
|
d3f705162d | ||
|
|
bd8282a41a | ||
|
|
82e87d563e | ||
|
|
d6c2b536ee | ||
|
|
919178840f | ||
|
|
84593a55ee | ||
|
|
1b8154bac1 | ||
|
|
8a133de1d1 | ||
|
|
75dddf462e | ||
|
|
91bbb0d4a8 | ||
|
|
d25d093a1a | ||
|
|
0bf91fd300 | ||
|
|
bf285681b4 | ||
|
|
cf9a5b7553 | ||
|
|
c2a0a6b2d1 | ||
|
|
eaff35421f | ||
|
|
ec20bfdd15 | ||
|
|
1f2d3ec850 | ||
|
|
d9b418cdde | ||
|
|
56ea61be3e | ||
|
|
b59afbd10d | ||
|
|
21fc5f0275 | ||
|
|
9d6f6186b0 | ||
|
|
590a897e9b | ||
|
|
753e8c3da7 | ||
|
|
ef57083ae9 | ||
|
|
1fa13f3f96 | ||
|
|
0fb84294f0 | ||
|
|
828df38e09 | ||
|
|
a13bd85ef3 | ||
|
|
65526e7f68 | ||
|
|
81d04d3dae | ||
|
|
16c222d3b3 | ||
|
|
0e61618935 | ||
|
|
bede1032e6 | ||
|
|
0786f22ce6 | ||
|
|
c9c4fad7df | ||
|
|
a52d3ea073 | ||
|
|
dcc410f6c5 | ||
|
|
c7743e6734 | ||
|
|
cc56141c39 | ||
|
|
60c2593669 | ||
|
|
db945c90be | ||
|
|
9df1065634 | ||
|
|
65f23171e6 | ||
|
|
920d1c91c7 | ||
|
|
698b40554e | ||
|
|
cb9beaa2ad | ||
|
|
d652856e90 | ||
|
|
7d09d065c5 | ||
|
|
352fa2db50 | ||
|
|
349ebad659 | ||
|
|
8fefa16fbc | ||
|
|
99b330e85e | ||
|
|
3f49e2e596 | ||
|
|
dcb75b19d3 | ||
|
|
c213a96133 | ||
|
|
78984a65ab | ||
|
|
6c059c3898 | ||
|
|
ac6eb19aff | ||
|
|
6df4e39f18 | ||
|
|
b0d3c2f964 | ||
|
|
f797a12250 | ||
|
|
081d3c3dfe | ||
|
|
7ca966ce39 | ||
|
|
fc664bdc68 | ||
|
|
2cb27b14f9 | ||
|
|
86a102e081 | ||
|
|
9119e54c2c | ||
|
|
f379bc0391 | ||
|
|
2e736bf501 | ||
|
|
1e7f985d4e | ||
|
|
61c4ff33e0 | ||
|
|
73ae48f387 | ||
|
|
0a1c60b2cf | ||
|
|
4eb56319c4 | ||
|
|
d8ea36af29 | ||
|
|
d0cf61bf10 | ||
|
|
ddb83cc6e4 | ||
|
|
e54de4bea7 | ||
|
|
97cc56b691 | ||
|
|
c9df5c8221 | ||
|
|
7f13e2c3e6 | ||
|
|
0aab565083 | ||
|
|
153f8bcfb5 | ||
|
|
c04ed81adb | ||
|
|
a1cf75456b | ||
|
|
b063e67e24 | ||
|
|
a4da482225 | ||
|
|
98302bebd1 | ||
|
|
2197328db5 | ||
|
|
c5b9176614 | ||
|
|
0322354c37 | ||
|
|
b692c94fe9 | ||
|
|
1496861811 | ||
|
|
5459152f01 | ||
|
|
1db926173d | ||
|
|
da9ee71d80 | ||
|
|
d9f02230a0 | ||
|
|
bf68f4575f | ||
|
|
33ea08ad22 | ||
|
|
3a17db7c79 | ||
|
|
e55252b9ff | ||
|
|
71d12c3c71 | ||
|
|
bc7b2bd5e0 | ||
|
|
50d58d3dff | ||
|
|
4180bd8933 | ||
|
|
172d11677b | ||
|
|
ab5537e18c | ||
|
|
b06e3b61f2 | ||
|
|
03d913defc | ||
|
|
e4bcac5411 | ||
|
|
5ed29d045b | ||
|
|
75acffa8c7 | ||
|
|
ade84dc6c0 | ||
|
|
7d49e136a6 | ||
|
|
0c1dba7208 | ||
|
|
63f4f681c4 | ||
|
|
1afbe05318 | ||
|
|
8376b7c5f6 | ||
|
|
b71a9920de | ||
|
|
2fd59cb7ef | ||
|
|
60e72c612c | ||
|
|
fbbc1fad73 | ||
|
|
d5de918247 | ||
|
|
f916ec5f4c | ||
|
|
469a01ebb6 | ||
|
|
6ede5a373e | ||
|
|
6e1af542e5 | ||
|
|
53051e9192 | ||
|
|
542a5f1564 | ||
|
|
b82f0e46aa | ||
|
|
f0f2dc847b | ||
|
|
8433571b1e | ||
|
|
2141d670bf | ||
|
|
fccb4de565 | ||
|
|
236afaacaf | ||
|
|
f463ca68a5 | ||
|
|
7502ba5312 | ||
|
|
c05b70b30b | ||
|
|
c22f8b36ba | ||
|
|
7276d116c2 | ||
|
|
1b7549dd73 | ||
|
|
7e4fff8454 | ||
|
|
ad43d61f28 | ||
|
|
ed5c52654f | ||
|
|
4f1b521bee | ||
|
|
a46f06a312 | ||
|
|
6311dfb0f1 | ||
|
|
ee82a885f7 | ||
|
|
88e6c10fb2 | ||
|
|
88524b7aed | ||
|
|
b2a27dd64a | ||
|
|
2a520b0e81 | ||
|
|
0c32f25203 | ||
|
|
1aa020875a | ||
|
|
9e5acdc94e | ||
|
|
417879b6a8 | ||
|
|
4ee7845b2a | ||
|
|
fb9600d55d | ||
|
|
47de3e20ae | ||
|
|
c8c8417192 | ||
|
|
c00f091d7f | ||
|
|
b0b2bd2444 | ||
|
|
1e0c64caf5 | ||
|
|
db1fd6dd12 | ||
|
|
9ee0049248 | ||
|
|
56a0f6256b | ||
|
|
197a3cdebc | ||
|
|
c520985a4f | ||
|
|
931926cd96 | ||
|
|
427c99cd83 | ||
|
|
c2cd02e790 | ||
|
|
a921394240 | ||
|
|
21f047f4aa | ||
|
|
9a70c95672 | ||
|
|
fc2e93d96f | ||
|
|
494c15a731 | ||
|
|
23a2feb7cf | ||
|
|
f4ceccaa9b | ||
|
|
b4398e21c3 | ||
|
|
3900d56d6e | ||
|
|
08f64b96be | ||
|
|
8411c0b30d | ||
|
|
43260a3a83 | ||
|
|
6f4013fd94 | ||
|
|
426a89914f | ||
|
|
4fa1a4c57a | ||
|
|
5ddfcea8f3 | ||
|
|
502c0cb852 | ||
|
|
07d8fd5605 | ||
|
|
445ccb5bbd | ||
|
|
74c8758a3b | ||
|
|
1f6f73e8d2 | ||
|
|
04b2f24d6b | ||
|
|
5e96c46a7a | ||
|
|
ec4f5e1472 | ||
|
|
32a512ea6b | ||
|
|
46a3461e76 | ||
|
|
fe92e9c421 | ||
|
|
2f02168fcb | ||
|
|
2ba86a13eb | ||
|
|
7dd1c75be0 | ||
|
|
b5f0e9b958 | ||
|
|
bd901ec9dd | ||
|
|
a3d89c0137 | ||
|
|
f1ae2194c9 | ||
|
|
738c31c758 | ||
|
|
f8fcf3a7c8 | ||
|
|
ae863ba5ab | ||
|
|
5e66019390 | ||
|
|
696e6b4787 | ||
|
|
7403fc7ce4 | ||
|
|
79d8cb69c0 | ||
|
|
b33878304f | ||
|
|
6e71c48108 | ||
|
|
2b7aeed4fb | ||
|
|
b3cedc4ad1 | ||
|
|
8ea62f535e | ||
|
|
de879858a5 | ||
|
|
d4ba3ae069 | ||
|
|
0e608c7b2e | ||
|
|
aab18de88d | ||
|
|
6d684b7c11 | ||
|
|
396e4b1bed | ||
|
|
04d7a87765 | ||
|
|
49878e093d | ||
|
|
209624cbef | ||
|
|
65a9645677 | ||
|
|
ad41ed6dcf | ||
|
|
b494136c22 | ||
|
|
356ed9fa39 | ||
|
|
8b5938f73f | ||
|
|
51d8c79ef2 | ||
|
|
3897541366 | ||
|
|
0eee507edb | ||
|
|
caf87e805d | ||
|
|
ae41b7bc43 | ||
|
|
50b12a757c | ||
|
|
9e933ea1ab | ||
|
|
713263c428 | ||
|
|
74e7c7d73a | ||
|
|
bf2d733c0e | ||
|
|
6be6472fa3 | ||
|
|
7cec5f2d96 | ||
|
|
ca59993863 | ||
|
|
c1f9f630b1 | ||
|
|
fef68c122f | ||
|
|
8f45de6a3f | ||
|
|
a15dcf8345 | ||
|
|
f2ec895ec0 | ||
|
|
52c51b687d | ||
|
|
a1cb4ca214 | ||
|
|
2ba2864f87 | ||
|
|
ecc734cff9 | ||
|
|
420171e060 | ||
|
|
8a2e9075bf | ||
|
|
4f7328fe60 | ||
|
|
f03ade2775 | ||
|
|
094c288c3c | ||
|
|
19f6d5f72a | ||
|
|
01a26adefd | ||
|
|
a43e3969ed | ||
|
|
9dbdfc0a2e | ||
|
|
bf6cc8fee3 | ||
|
|
7d2474060a | ||
|
|
4c4fcd7216 | ||
|
|
8bd08910a4 | ||
|
|
6985ee1b6e | ||
|
|
026fb1bd78 | ||
|
|
b5a3fa67d9 | ||
|
|
d980d0abcc | ||
|
|
0d6c001f2c | ||
|
|
95db22e12b | ||
|
|
9f120826c1 | ||
|
|
885f50839c | ||
|
|
d1993e81da | ||
|
|
df99c7edf5 | ||
|
|
c372618eac | ||
|
|
deab0004f2 | ||
|
|
d69111f577 | ||
|
|
96191a2836 | ||
|
|
c6592029ea | ||
|
|
b6aabcca64 | ||
|
|
01effab24c | ||
|
|
3591f4f976 | ||
|
|
ae9f071ffc | ||
|
|
b12d868866 | ||
|
|
949d236697 | ||
|
|
4cb98b6257 | ||
|
|
7fe9d6731a | ||
|
|
15fca170ad | ||
|
|
2071b0f69f | ||
|
|
2b4fc21585 | ||
|
|
f40de00d32 | ||
|
|
1d49f349b9 | ||
|
|
e29d5f70ae | ||
|
|
dc5a090d44 | ||
|
|
06142115af | ||
|
|
c1b597c02f | ||
|
|
744444ceb9 | ||
|
|
7a13626da7 | ||
|
|
d86aa10875 | ||
|
|
85e86dbdc2 | ||
|
|
b0cdcf2e21 | ||
|
|
b3108a26d0 | ||
|
|
3196c0a974 | ||
|
|
7041637e5b | ||
|
|
501b9652b8 | ||
|
|
3c062a330d | ||
|
|
cd13286ca7 | ||
|
|
b7252379b9 | ||
|
|
cbc1b3ab39 | ||
|
|
db0d8c1cdd | ||
|
|
3b1b9db992 | ||
|
|
7bf5b2fd76 | ||
|
|
e7ba350770 | ||
|
|
884e3aa475 | ||
|
|
aec871cd27 | ||
|
|
7d706b8ff4 | ||
|
|
63c0a962ae | ||
|
|
cf3775e0b8 | ||
|
|
7c53e9bb15 | ||
|
|
9bc87b765a | ||
|
|
0f2f7462a5 | ||
|
|
34feef6cf4 | ||
|
|
0328ad7cb6 | ||
|
|
ca27f9faf2 | ||
|
|
125f15b61f | ||
|
|
fb1feca3ca | ||
|
|
584a5f1b19 | ||
|
|
a976c1db93 | ||
|
|
eae8a80588 | ||
|
|
bb9b6dd550 | ||
|
|
d15cbe0a29 | ||
|
|
324180c292 | ||
|
|
d243f08f17 | ||
|
|
977d26eeda | ||
|
|
b7c525de65 | ||
|
|
49685cb681 | ||
|
|
7334d50fbf | ||
|
|
eab7665726 | ||
|
|
54342f6fe9 | ||
|
|
95f9bc2535 | ||
|
|
b5661d297b | ||
|
|
4fee0ff501 | ||
|
|
8ada85e1ce | ||
|
|
a8dca627d9 | ||
|
|
95f21947fc | ||
|
|
ab64d079aa | ||
|
|
898081fcb4 | ||
|
|
993908eb19 | ||
|
|
f0b19cc696 | ||
|
|
811cf2943f | ||
|
|
3377853dab | ||
|
|
d6c7e75e22 | ||
|
|
ffa6012079 | ||
|
|
7b2763a053 | ||
|
|
77f344198c | ||
|
|
6d73dd143c | ||
|
|
625b6c51d8 | ||
|
|
9396bde1f3 | ||
|
|
ae01f30f71 | ||
|
|
b8fb13043b | ||
|
|
2d7a6ecaf3 | ||
|
|
7801493a7a | ||
|
|
5666a59524 | ||
|
|
995649d0da | ||
|
|
fd894a9ce3 | ||
|
|
9c249328e3 | ||
|
|
0bc6cf7a69 | ||
|
|
08f3f96d73 | ||
|
|
312ed033db | ||
|
|
fb27bd292f | ||
|
|
06f6329241 | ||
|
|
92d0e44184 | ||
|
|
ad4f77b5ce | ||
|
|
f25e6a50b9 | ||
|
|
5be2c412c1 | ||
|
|
3fdfc6f57f | ||
|
|
bc4dff65ff | ||
|
|
bcbe3eb075 | ||
|
|
567bdca276 | ||
|
|
b912386786 | ||
|
|
b38eb76274 | ||
|
|
02818ddaf5 | ||
|
|
78c4f43496 | ||
|
|
26f378237f | ||
|
|
f886259f92 | ||
|
|
2f607c4cad | ||
|
|
1b111c1250 | ||
|
|
f58b0fa4f2 | ||
|
|
8207321c30 | ||
|
|
7f5865aaf9 | ||
|
|
0fdec7c225 | ||
|
|
55a1709103 | ||
|
|
c5cb60e998 | ||
|
|
5a95e2fc8c | ||
|
|
f750bb34f9 | ||
|
|
5ee79b28d9 | ||
|
|
a70bccd2b6 | ||
|
|
efd2fba1b5 | ||
|
|
9d82ad32d0 | ||
|
|
8559ea2301 | ||
|
|
ca40cf622a | ||
|
|
e3c9448656 | ||
|
|
2521af7d78 | ||
|
|
debc96c232 | ||
|
|
17aba009af | ||
|
|
ff61f24b74 | ||
|
|
604fa925e4 | ||
|
|
b01b1a07bb | ||
|
|
44002ed1c3 | ||
|
|
d3f271f984 | ||
|
|
d0306aedea | ||
|
|
03123fb783 | ||
|
|
d583a61c9f | ||
|
|
8d0623f24e | ||
|
|
0d92109323 | ||
|
|
aa08151049 | ||
|
|
1efe6867ed | ||
|
|
e01a4ec5b2 | ||
|
|
1a688cf363 | ||
|
|
624f1ced68 | ||
|
|
54f3843a03 | ||
|
|
8b8604dbf4 | ||
|
|
02a747066a | ||
|
|
c8df9747ad | ||
|
|
b41cacd992 | ||
|
|
06fb89da3a | ||
|
|
50103e381c | ||
|
|
080feddf28 | ||
|
|
4e214a0686 | ||
|
|
80149c3579 | ||
|
|
896a7a097c | ||
|
|
41ad606137 | ||
|
|
4fc4c7b83a | ||
|
|
8436768dc0 | ||
|
|
beb2c5efb0 | ||
|
|
b3257c714a | ||
|
|
6b1570b259 | ||
|
|
e371fcae30 | ||
|
|
8523aa61b0 | ||
|
|
8ad1d49870 | ||
|
|
f55ec62c6c | ||
|
|
254c0e9fa5 | ||
|
|
17cb59b958 | ||
|
|
78b0e00d14 | ||
|
|
0ee1d27099 | ||
|
|
ce370750c0 | ||
|
|
f36a23ce7b | ||
|
|
640ce11e34 | ||
|
|
03af9da97d | ||
|
|
97bca73ba2 | ||
|
|
5d41c97655 | ||
|
|
305fb70d78 | ||
|
|
0a9f2d497a | ||
|
|
6a90937cfa | ||
|
|
0bac4ba9bf | ||
|
|
975bc741e2 | ||
|
|
c3ca0249c4 | ||
|
|
bc1e3d68f9 | ||
|
|
875ca536e0 | ||
|
|
a13080f399 | ||
|
|
d20012e4d8 | ||
|
|
87fb513758 | ||
|
|
3322d6cb20 | ||
|
|
e0feacea0b | ||
|
|
8673fa27e2 | ||
|
|
97f54facde | ||
|
|
df797617f5 | ||
|
|
7a6cc080d4 | ||
|
|
1543373b7f | ||
|
|
59f16f76f1 | ||
|
|
500bce2418 | ||
|
|
41b2fb3fc9 | ||
|
|
df819e3318 | ||
|
|
b29a5a9c1b | ||
|
|
b80d16c4b3 | ||
|
|
8109bf68e7 | ||
|
|
f584b5dcca | ||
|
|
2e20798aef | ||
|
|
1319f8087c | ||
|
|
2e579b66ad | ||
|
|
d71fadd73f | ||
|
|
5fa8ce9913 | ||
|
|
4d3d15f5b9 | ||
|
|
5b52defe9e | ||
|
|
fc9a0be1e9 | ||
|
|
65ad81a7b6 | ||
|
|
79d405afe9 | ||
|
|
bc3fca9d68 | ||
|
|
14f14e909d | ||
|
|
679182d2d4 | ||
|
|
823a9ea248 | ||
|
|
aebce9099b | ||
|
|
e6e558eae7 | ||
|
|
b9552f8ab3 | ||
|
|
7cd8e74a7e | ||
|
|
f9860f5b9d | ||
|
|
21575673b3 | ||
|
|
6499b78108 | ||
|
|
c49b3f4ae3 | ||
|
|
3133cb7dae | ||
|
|
eb063efeb4 | ||
|
|
0771e2c5a0 | ||
|
|
69736a883e | ||
|
|
31c6d794a9 | ||
|
|
90cc4ad0e1 | ||
|
|
3b068daa12 | ||
|
|
3b317535d3 | ||
|
|
dec470fb51 | ||
|
|
3872d58561 | ||
|
|
abe9655bc1 | ||
|
|
d06522d488 | ||
|
|
bc52e11693 | ||
|
|
0a73511609 | ||
|
|
7057b2f9d7 | ||
|
|
49f37047cc | ||
|
|
dd6d6cd407 | ||
|
|
8d9911b4b5 | ||
|
|
fa61d17f0b | ||
|
|
8356fda183 | ||
|
|
39600b394e | ||
|
|
905feb3701 | ||
|
|
6290f6beec | ||
|
|
6c8f1733d4 | ||
|
|
fbb6b27b44 | ||
|
|
d7031d259b | ||
|
|
4c2948145a | ||
|
|
5c8da2d36a | ||
|
|
dd7388c802 | ||
|
|
7026f42db3 | ||
|
|
f5aa448ec0 | ||
|
|
93624ddaca | ||
|
|
c7fc392c5f | ||
|
|
0055302bdc | ||
|
|
2cfd078b2d | ||
|
|
3d3a8d6e95 | ||
|
|
dc211027ed | ||
|
|
4c6ab0ee49 | ||
|
|
a8bbd85b15 | ||
|
|
1b6365b136 | ||
|
|
ecae4d1c3b | ||
|
|
7dae18c6b5 | ||
|
|
808370307b | ||
|
|
26027bfb85 | ||
|
|
d6b26239a1 | ||
|
|
3ee7c54e22 | ||
|
|
e56162d222 | ||
|
|
3f5dda0c51 | ||
|
|
1ca19a792d | ||
|
|
43f45f5860 | ||
|
|
e17f2c30c0 | ||
|
|
63a05fc443 | ||
|
|
366b5be765 | ||
|
|
3f4fc31835 | ||
|
|
658b3624ac | ||
|
|
55e1657c80 | ||
|
|
bc40911f2f | ||
|
|
3f37c439c9 | ||
|
|
fb60982077 | ||
|
|
fd68c243a8 | ||
|
|
c516973b4a | ||
|
|
c8c51e0118 | ||
|
|
2b843781e0 | ||
|
|
4eda443b3f | ||
|
|
d160efbde6 | ||
|
|
59926ffeea | ||
|
|
c446539c95 | ||
|
|
2aa7366a82 | ||
|
|
91799d6d96 | ||
|
|
3fcc8278d8 | ||
|
|
0b1a4f772e | ||
|
|
aa5db1624a | ||
|
|
42722b78e6 | ||
|
|
e44636eb4c | ||
|
|
22e73009da | ||
|
|
b52bd61e34 | ||
|
|
d7cb4b5b4f |
@@ -0,0 +1,15 @@
|
||||
.eslintignore
|
||||
.eslintrc.json
|
||||
.git
|
||||
.github
|
||||
.gitignore
|
||||
.npmrc
|
||||
.travis*
|
||||
.travis.yml
|
||||
README.md
|
||||
docker/Dockerfile*
|
||||
images
|
||||
node_modules
|
||||
scripts
|
||||
test
|
||||
update.sh
|
||||
@@ -0,0 +1,2 @@
|
||||
node_modules/*
|
||||
test/
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"env": {
|
||||
"jest/globals": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": ["eslint:recommended", "google", "plugin:jest/recommended", "plugin:jest/style"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"require-jsdoc": "off",
|
||||
"indent": ["error", 4],
|
||||
"max-len": ["error", { "code": 120 }],
|
||||
"no-prototype-builtins": "off"
|
||||
},
|
||||
"plugins": [
|
||||
"jest"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
github: [koenkk]
|
||||
custom: https://www.paypal.me/koenkk
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
Did you read the FAQ?
|
||||
https://www.zigbee2mqtt.io/information/FAQ.html
|
||||
|
||||
Unsupported device?
|
||||
https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
|
||||
|
||||
A question?
|
||||
Read the documentation: https://www.zigbee2mqtt.io/
|
||||
|
||||
Bug report:
|
||||
- First make sure you are on the latest version of zigbee2mqtt.
|
||||
- Make sure you are running the latest CC253X firmware from https://github.com/koenkk/z-stack-firmware.
|
||||
- Provide a clear description of the problem.
|
||||
- If applicable, provide steps how to reproduce the problem.
|
||||
- Provide a log with `log_level` set to `debug`, see https://www.zigbee2mqtt.io/configuration/configuration.html
|
||||
- DON'T copy logs directly here, post a link to https://hastebin.com/ or https://pastebin.com/.
|
||||
-->
|
||||
|
||||
<!--Start your bug report below this line-->
|
||||
# Bug Report
|
||||
## What happened
|
||||
|
||||
## What did you expect to happen
|
||||
|
||||
## How to reproduce it (minimal and precise)
|
||||
|
||||
## Debug Info
|
||||
zigbee2mqtt version:
|
||||
CC253X firmware version:
|
||||
@@ -0,0 +1,13 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# data
|
||||
data/database.db
|
||||
data/config.json
|
||||
data/log*.txt
|
||||
data/state.json
|
||||
data/log
|
||||
data-backup/
|
||||
data/coordinator_backup.json
|
||||
data/.storage
|
||||
data/database.db.backup
|
||||
|
||||
# MacOS indexing file
|
||||
.DS_Store
|
||||
@@ -0,0 +1,72 @@
|
||||
<div align="center">
|
||||
<a href="https://github.com/koenkk/zigbee2mqtt">
|
||||
<img width="150" height="150" src="images/logo.png">
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
<div style="display: flex;">
|
||||
<a href="https://dev.azure.com/koenkk/zigbee/_build?definitionId=5">
|
||||
<img src="https://dev.azure.com/koenkk/zigbee/_apis/build/status/Koenkk.zigbee2mqtt?branchName=dev">
|
||||
</a>
|
||||
<a href="https://github.com/Koenkk/zigbee2mqtt/releases">
|
||||
<img src="https://img.shields.io/github/release/koenkk/zigbee2mqtt.svg">
|
||||
</a>
|
||||
<a href="https://github.com/Koenkk/zigbee2mqtt/stargazers">
|
||||
<img src="https://img.shields.io/github/stars/koenkk/zigbee2mqtt.svg">
|
||||
</a>
|
||||
<a href="https://www.paypal.me/koenkk">
|
||||
<img src="https://img.shields.io/badge/donate-PayPal-blue.svg">
|
||||
</a>
|
||||
<a href="https://discord.gg/dadfWYE">
|
||||
<img src="https://img.shields.io/discord/556563650429583360.svg">
|
||||
</a>
|
||||
<a href="http://zigbee2mqtt.discourse.group/">
|
||||
<img src="https://img.shields.io/discourse/https/zigbee2mqtt.discourse.group/status.svg">
|
||||
</a>
|
||||
<a>
|
||||
<img src="https://img.shields.io/badge/Coverage-100%25-brightgreen.svg">
|
||||
</a>
|
||||
<a href="https://www.codacy.com/manual/Koenkk/zigbee2mqtt?utm_source=github.com&utm_medium=referral&utm_content=Koenkk/zigbee2mqtt&utm_campaign=Badge_Grade">
|
||||
<img src="https://api.codacy.com/project/badge/Grade/24f1e0fe39f04daa810e8a1416693d3f">
|
||||
</a>
|
||||
</div>
|
||||
<h1>Zigbee2mqtt 🌉 🐝</h1>
|
||||
<p>
|
||||
Allows you to use your Zigbee devices <b>without</b> the vendors bridge or gateway.
|
||||
</p>
|
||||
<p>
|
||||
It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## [Getting started](https://www.zigbee2mqtt.io/#getting-started)
|
||||
The [documentation](https://www.zigbee2mqtt.io/) provides you all the information needed to get up and running! Make sure you don't skip sections if this is your first visit, as there might be important details in there for you.
|
||||
|
||||
If you aren't familiar with **Zigbee** terminology make sure you [read this](https://www.zigbee2mqtt.io/information/zigbee_network.html) to help you out.
|
||||
|
||||
## [Integrations](https://www.zigbee2mqtt.io/#integration)
|
||||
Zigbee2mqtt integrates well with (almost) every home automation solution because it uses MQTT. However the following integrations are worth mentioning:
|
||||
|
||||
<img align="left" height="100px" width="100px" src="https://user-images.githubusercontent.com/7738048/40914297-49e6e560-6800-11e8-8904-36cce896e5a8.png">
|
||||
|
||||
### [Home Assistant](https://www.home-assistant.io/)
|
||||
- [Hassio](https://www.home-assistant.io/hassio/): Using [the official addon](https://github.com/danielwelch/hassio-zigbee2mqtt) from [danielwelch](https://github.com/danielwelch)
|
||||
- Generic install or Hassbian: Using instructions [here](https://www.zigbee2mqtt.io/integration/home_assistant.html)
|
||||
|
||||
<img align="left" height="100px" width="100px" src="https://user-images.githubusercontent.com/2734836/47615848-b8dd8700-dabd-11e8-9d77-175002dd8987.png">
|
||||
|
||||
### [Domoticz](https://www.domoticz.com/)
|
||||
- Integration implemented in [domoticz-zigbee2mqtt-plugin](https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin)
|
||||
|
||||
<br>
|
||||
|
||||
## Architecture
|
||||

|
||||
|
||||
## Supported devices
|
||||
See [Supported devices](https://www.zigbee2mqtt.io/information/supported_devices.html) to check whether your device is supported. There is quite an extensive list, including devices from vendors like Xiaomi, Ikea, Philips, OSRAM and more.
|
||||
|
||||
If it's not listed in [Supported devices](https://www.zigbee2mqtt.io/information/supported_devices.html), support can be added (fairly) easy, see [How to support new devices](https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html).
|
||||
|
||||
## Support & help
|
||||
If you need assistance you can check [opened issues](https://github.com/Koenkk/zigbee2mqtt/issues). Feel free to help with Pull Requests when you were able to fix things or add new devices or just share the love on social media.
|
||||
@@ -0,0 +1,82 @@
|
||||
trigger:
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
branches:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
||||
steps:
|
||||
|
||||
# Prepare
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '10.x'
|
||||
displayName: 'Install Node.js'
|
||||
- bash: npm install
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
# Verify
|
||||
- bash: npm run test-with-coverage
|
||||
displayName: 'Test'
|
||||
- bash: npm run eslint
|
||||
displayName: 'Lint'
|
||||
|
||||
# Docker
|
||||
- task: DockerInstaller@0
|
||||
displayName: Docker install
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
inputs:
|
||||
dockerVersion: 19.03.2
|
||||
releaseType: stable
|
||||
- task: Docker@2
|
||||
displayName: Docker registry login
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
inputs:
|
||||
command: login
|
||||
containerRegistry: docker_registry
|
||||
- bash: |
|
||||
sudo wget -O /usr/local/bin/buildx https://github.com/docker/buildx/releases/download/v0.3.1/buildx-v0.3.1.linux-amd64
|
||||
sudo chmod a+x /usr/local/bin/buildx
|
||||
docker run --rm --privileged hypriot/qemu-register
|
||||
buildx create --use
|
||||
buildx ls
|
||||
displayName: 'Docker setup'
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
- bash: |
|
||||
buildx build \
|
||||
--build-arg COMMIT=$(git rev-parse --short HEAD) \
|
||||
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 \
|
||||
-f docker/Dockerfile \
|
||||
--push \
|
||||
-t koenkk/zigbee2mqtt:latest-dev \
|
||||
.
|
||||
displayName: 'Docker build dev'
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
- bash: |
|
||||
TAG="$(git describe --tags)"
|
||||
buildx build \
|
||||
--build-arg COMMIT=$(git rev-parse --short HEAD) \
|
||||
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 \
|
||||
-f docker/Dockerfile \
|
||||
--push \
|
||||
-t koenkk/zigbee2mqtt:latest -t "koenkk/zigbee2mqtt:$TAG" \
|
||||
.
|
||||
displayName: 'Docker build release'
|
||||
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
|
||||
# Trigger downstream
|
||||
- bash: |
|
||||
BODY="{\"request\": {\"branch\": \"master\"}}"
|
||||
curl -s -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Travis-API-Version: 3" \
|
||||
-H "Authorization: token $(TRAVIS_TOKEN)" \
|
||||
-d "$BODY" \
|
||||
"https://api.travis-ci.org/repo/danielwelch%2Fhassio-zigbee2mqtt/requests"
|
||||
displayName: 'Trigger Hass.io build'
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
@@ -0,0 +1,20 @@
|
||||
# Home Assistant integration (MQTT discovery)
|
||||
homeassistant: false
|
||||
|
||||
# allow new devices to join
|
||||
permit_join: true
|
||||
|
||||
# MQTT settings
|
||||
mqtt:
|
||||
# MQTT base topic for zigbee2mqtt MQTT messages
|
||||
base_topic: zigbee2mqtt
|
||||
# MQTT server URL
|
||||
server: 'mqtt://localhost'
|
||||
# MQTT server authentication, uncomment if required:
|
||||
# user: my_user
|
||||
# password: my_password
|
||||
|
||||
# Serial settings
|
||||
serial:
|
||||
# Location of CC2531 USB sniffer
|
||||
port: /dev/ttyACM0
|
||||
Vendored
-30
@@ -1,30 +0,0 @@
|
||||
import EventBus from "./eventBus";
|
||||
import type Extension from "./extension/extension";
|
||||
import Mqtt, { type MqttPublishOptions } from "./mqtt";
|
||||
import State from "./state";
|
||||
import Zigbee from "./zigbee";
|
||||
export declare class Controller {
|
||||
#private;
|
||||
readonly eventBus: EventBus;
|
||||
readonly zigbee: Zigbee;
|
||||
readonly state: State;
|
||||
readonly mqtt: Mqtt;
|
||||
private restartCallback;
|
||||
private exitCallback;
|
||||
readonly extensions: Set<Extension>;
|
||||
readonly extensionArgs: ConstructorParameters<typeof Extension>;
|
||||
private sdNotify;
|
||||
constructor(restartCallback: () => Promise<void>, exitCallback: (code: number, restart: boolean) => Promise<void>);
|
||||
start(): Promise<void>;
|
||||
enableDisableExtension(enable: boolean, name: string): Promise<void>;
|
||||
getExtension(name: string): Extension | undefined;
|
||||
addExtension(extension: Extension): Promise<void>;
|
||||
removeExtension(extension: Extension): Promise<void>;
|
||||
private startExtension;
|
||||
private stopExtension;
|
||||
stop(restart?: boolean, code?: number, signal?: NodeJS.Signals | undefined): Promise<void>;
|
||||
exit(code: number, restart?: boolean): Promise<void>;
|
||||
publishEntityState(entity: Group | Device, payload: KeyValue, stateChangeReason?: StateChangeReason): Promise<void>;
|
||||
iteratePayloadAttributeOutput(topicRoot: string, payload: KeyValue, options: Partial<MqttPublishOptions>): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=controller.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../lib/controller.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAUnD,OAAO,IAAI,EAAE,EAAC,KAAK,kBAAkB,EAAC,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,MAAM,SAAS,CAAC;AAO5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,qBAAa,UAAU;;IAGnB,SAAgB,QAAQ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AE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8E9H;IAEK,6BAA6B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B7H;CACJ"}
|
||||
Vendored
-69
@@ -1,69 +0,0 @@
|
||||
type ListenerKey = object;
|
||||
type Stats = {
|
||||
devices: Map<string, // IEEE address
|
||||
{
|
||||
lastSeenChanges?: {
|
||||
messages: number;
|
||||
first: number;
|
||||
};
|
||||
leaveCounts: number;
|
||||
networkAddressChanges: number;
|
||||
}>;
|
||||
mqtt: {
|
||||
published: number;
|
||||
received: number;
|
||||
};
|
||||
};
|
||||
export default class EventBus {
|
||||
private callbacksByExtension;
|
||||
private emitter;
|
||||
readonly stats: Stats;
|
||||
constructor();
|
||||
emitAdapterDisconnected(): void;
|
||||
onAdapterDisconnected(key: ListenerKey, callback: () => Promise<void>): void;
|
||||
emitPermitJoinChanged(data: eventdata.PermitJoinChanged): void;
|
||||
onPermitJoinChanged(key: ListenerKey, callback: (data: eventdata.PermitJoinChanged) => void): void;
|
||||
emitEntityRenamed(data: eventdata.EntityRenamed): void;
|
||||
onEntityRenamed(key: ListenerKey, callback: (data: eventdata.EntityRenamed) => void): void;
|
||||
emitEntityRemoved(data: eventdata.EntityRemoved): void;
|
||||
onEntityRemoved(key: ListenerKey, callback: (data: eventdata.EntityRemoved) => void): void;
|
||||
emitLastSeenChanged(data: eventdata.LastSeenChanged): void;
|
||||
onLastSeenChanged(key: ListenerKey, callback: (data: eventdata.LastSeenChanged) => void): void;
|
||||
emitDeviceNetworkAddressChanged(data: eventdata.DeviceNetworkAddressChanged): void;
|
||||
onDeviceNetworkAddressChanged(key: ListenerKey, callback: (data: eventdata.DeviceNetworkAddressChanged) => void): void;
|
||||
emitDeviceAnnounce(data: eventdata.DeviceAnnounce): void;
|
||||
onDeviceAnnounce(key: ListenerKey, callback: (data: eventdata.DeviceAnnounce) => void): void;
|
||||
emitDeviceInterview(data: eventdata.DeviceInterview): void;
|
||||
onDeviceInterview(key: ListenerKey, callback: (data: eventdata.DeviceInterview) => void): void;
|
||||
emitDeviceJoined(data: eventdata.DeviceJoined): void;
|
||||
onDeviceJoined(key: ListenerKey, callback: (data: eventdata.DeviceJoined) => void): void;
|
||||
emitEntityOptionsChanged(data: eventdata.EntityOptionsChanged): void;
|
||||
onEntityOptionsChanged(key: ListenerKey, callback: (data: eventdata.EntityOptionsChanged) => void): void;
|
||||
emitExposesChanged(data: eventdata.ExposesChanged): void;
|
||||
onExposesChanged(key: ListenerKey, callback: (data: eventdata.ExposesChanged) => void): void;
|
||||
emitDeviceLeave(data: eventdata.DeviceLeave): void;
|
||||
onDeviceLeave(key: ListenerKey, callback: (data: eventdata.DeviceLeave) => void): void;
|
||||
emitDeviceMessage(data: eventdata.DeviceMessage): void;
|
||||
onDeviceMessage(key: ListenerKey, callback: (data: eventdata.DeviceMessage) => void): void;
|
||||
emitMQTTMessage(data: eventdata.MQTTMessage): void;
|
||||
onMQTTMessage(key: ListenerKey, callback: (data: eventdata.MQTTMessage) => void): void;
|
||||
emitMQTTMessagePublished(data: eventdata.MQTTMessagePublished): void;
|
||||
onMQTTMessagePublished(key: ListenerKey, callback: (data: eventdata.MQTTMessagePublished) => void): void;
|
||||
emitPublishEntityState(data: eventdata.PublishEntityState): void;
|
||||
onPublishEntityState(key: ListenerKey, callback: (data: eventdata.PublishEntityState) => void): void;
|
||||
emitGroupMembersChanged(data: eventdata.GroupMembersChanged): void;
|
||||
onGroupMembersChanged(key: ListenerKey, callback: (data: eventdata.GroupMembersChanged) => void): void;
|
||||
emitDevicesChanged(): void;
|
||||
onDevicesChanged(key: ListenerKey, callback: () => void): void;
|
||||
emitScenesChanged(data: eventdata.ScenesChanged): void;
|
||||
onScenesChanged(key: ListenerKey, callback: (data: eventdata.ScenesChanged) => void): void;
|
||||
emitReconfigure(data: eventdata.Reconfigure): void;
|
||||
onReconfigure(key: ListenerKey, callback: (data: eventdata.Reconfigure) => void): void;
|
||||
emitStateChange(data: eventdata.StateChange): void;
|
||||
onStateChange(key: ListenerKey, callback: (data: eventdata.StateChange) => void): void;
|
||||
emitExposesAndDevicesChanged(device: Device): void;
|
||||
private on;
|
||||
removeListeners(key: ListenerKey): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=eventBus.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../lib/eventBus.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,MAAM,CAAC;AAgC1B,KAAK,KAAK,GAAG;IACT,OAAO,EAAE,GAAG,CACR,MAAM,EAAE,eAAe;IACvB;QACI,eAAe,CAAC,EAAE;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC;QACpD,WAAW,EAAE,MAAM,CAAC;QACpB,qBAAqB,EAAE,MAAM,CAAC;KACjC,CACJ,CAAC;IACF,IAAI,EAAE;QACF,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,QAAQ;IACzB,OAAO,CAAC,oBAAoB,CAAkG;IAC9H,OAAO,CAAC,OAAO,CAA0C;IACzD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAA2D;IAEhF,cAEC;IAEM,uBAAuB,IAAI,IAAI,CAErC;IACM,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAElF;IAEM,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAEpE;IACM,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,iBAAiB,KAA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AAE;IAqBH,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAQ7C;CACJ"}
|
||||
Vendored
-34
@@ -1,34 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default class Availability extends Extension {
|
||||
/** Mapped by IEEE address */
|
||||
private readonly timers;
|
||||
/** Mapped by IEEE address or Group ID */
|
||||
private readonly lastPublishedAvailabilities;
|
||||
/** Mapped by IEEE address */
|
||||
private readonly pingBackoffs;
|
||||
/** IEEE addresses, waiting for last seen changes to take them out of "availability sleep" */
|
||||
private readonly backoffPausedDevices;
|
||||
/** Mapped by IEEE address */
|
||||
private readonly retrieveStateDebouncers;
|
||||
private pingQueue;
|
||||
private pingQueueExecuting;
|
||||
private stopped;
|
||||
private getTimeout;
|
||||
private getMaxJitter;
|
||||
private getBackoff;
|
||||
private getPauseOnBackoffGt;
|
||||
private isActiveDevice;
|
||||
private isAvailable;
|
||||
private resetTimer;
|
||||
private clearTimer;
|
||||
private addToPingQueue;
|
||||
private removeFromPingQueue;
|
||||
private pingQueueExecuteNext;
|
||||
start(): Promise<void>;
|
||||
private publishAvailabilityForAllEntities;
|
||||
private publishAvailability;
|
||||
private onLastSeenChanged;
|
||||
stop(): Promise<void>;
|
||||
private retrieveState;
|
||||
}
|
||||
//# sourceMappingURL=availability.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../lib/extension/availability.ts"],"names":[],"mappings":"AASA,OAAO,SAAS,MAAM,aAAa,CAAC;AAcpC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IAC/C,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,yCAAyC;IACzC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAuC;IACnF,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,6FAA6F;IAC7F,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAqB;IAC1D,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAiC;IACzE,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,UAAU;IAqClB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,mBAAmB;YAOb,oBAAoB;IA4DnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA+BpC;YAEa,iCAAiC;YAQjC,mBAAmB;YAoCb,iBAAiB;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CASnC;IAED,OAAO,CAAC,aAAa;CAoDxB"}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default class Bind extends Extension {
|
||||
#private;
|
||||
private pollDebouncers;
|
||||
start(): Promise<void>;
|
||||
private parseMQTTMessage;
|
||||
private onMQTTMessage;
|
||||
private publishResponse;
|
||||
onGroupMembersChanged(data: eventdata.GroupMembersChanged): Promise<void>;
|
||||
getSetupReportingEndpoints(bind: zh.Bind, coordinatorEp: zh.Endpoint): zh.Endpoint[];
|
||||
setupReporting(binds: zh.Bind[]): Promise<void>;
|
||||
disableUnnecessaryReportings(target: zh.Group | zh.Endpoint): Promise<void>;
|
||||
poll(data: eventdata.DeviceMessage): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=bind.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../lib/extension/bind.ts"],"names":[],"mappings":"AAaA,OAAO,SAAS,MAAM,aAAa,CAAC;AA4KpC,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAS;;IAEvC,OAAO,CAAC,cAAc,CAAiC;IAGxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpC;IAED,OAAO,CAAC,gBAAgB;YAiFJ,aAAa;YA+InB,eAAe;IAcjB,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpF;IAED,0BAA0B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAkBnF;IAEK,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCpD;IAEK,4BAA4B,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDhF;IAEW,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwE7D;CACJ"}
|
||||
Vendored
-59
@@ -1,59 +0,0 @@
|
||||
import Device from "../model/device";
|
||||
import type Group from "../model/group";
|
||||
import type { Zigbee2MQTTDevice, Zigbee2MQTTResponse } from "../types/api";
|
||||
import Extension from "./extension";
|
||||
export default class Bridge extends Extension {
|
||||
#private;
|
||||
private zigbee2mqttVersion;
|
||||
private zigbeeHerdsmanVersion;
|
||||
private zigbeeHerdsmanConvertersVersion;
|
||||
private coordinatorVersion;
|
||||
private restartRequired;
|
||||
private lastJoinedDeviceIeeeAddr?;
|
||||
private lastBridgeLoggingPayload?;
|
||||
private logTransport;
|
||||
private requestLookup;
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
|
||||
/**
|
||||
* Requests
|
||||
*/
|
||||
deviceOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/device/options">>;
|
||||
groupOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/group/options">>;
|
||||
bridgeOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/options">>;
|
||||
deviceRemove(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/remove">>;
|
||||
groupRemove(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/remove">>;
|
||||
healthCheck(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/health_check">>;
|
||||
coordinatorCheck(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/coordinator_check">>;
|
||||
groupAdd(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/add">>;
|
||||
deviceRename(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/rename">>;
|
||||
groupRename(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/rename">>;
|
||||
restart(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/restart">>;
|
||||
backup(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/backup">>;
|
||||
installCodeAdd(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/install_code/add">>;
|
||||
permitJoin(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/permit_join">>;
|
||||
touchlinkIdentify(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/identify">>;
|
||||
touchlinkFactoryReset(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/factory_reset">>;
|
||||
touchlinkScan(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/scan">>;
|
||||
/**
|
||||
* Utils
|
||||
*/
|
||||
changeEntityOptions<T extends "device" | "group">(entityType: T, message: KeyValue | string): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/options" : "bridge/response/group/options">>;
|
||||
deviceReportingConfigure(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/reporting/configure">>;
|
||||
deviceReportingRead(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/reporting/read">>;
|
||||
deviceInterview(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/interview">>;
|
||||
deviceGenerateExternalDefinition(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/generate_external_definition">>;
|
||||
action(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/action">>;
|
||||
renameEntity<T extends "device" | "group">(entityType: T, message: string | KeyValue): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/rename" : "bridge/response/group/rename">>;
|
||||
removeEntity<T extends "device" | "group">(entityType: T, message: string | KeyValue): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/remove" : "bridge/response/group/remove">>;
|
||||
getEntity(type: "group", id: string): Group;
|
||||
getEntity(type: "device", id: string): Device;
|
||||
getEntity(type: "group" | "device", id: string): Device | Group;
|
||||
publishInfo(): Promise<void>;
|
||||
publishDevices(): Promise<void>;
|
||||
publishGroups(): Promise<void>;
|
||||
publishDefinitions(): Promise<void>;
|
||||
getDefinitionPayload(device: Device): Zigbee2MQTTDevice["definition"] | undefined;
|
||||
}
|
||||
//# sourceMappingURL=bridge.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../lib/extension/bridge.ts"],"names":[],"mappings":"AASA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAiB,iBAAiB,EAAE,mBAAmB,EAA+B,MAAM,cAAc,CAAC;AAOvH,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;;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QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9C,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;IAS1D,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAiCjC;IAEK,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CA6DpC;IAEK,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBnC;IAEK,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYxC;IAED,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAC,YAAY,CAAC,GAAG,SAAS,CA6BhF;CACJ"}
|
||||
Vendored
-14
@@ -1,14 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
/**
|
||||
* This extension calls the zigbee-herdsman-converters definition configure() method
|
||||
*/
|
||||
export default class Configure extends Extension {
|
||||
private configuring;
|
||||
private attempts;
|
||||
private topic;
|
||||
private onReconfigure;
|
||||
private onMQTTMessage;
|
||||
start(): Promise<void>;
|
||||
private configure;
|
||||
}
|
||||
//# sourceMappingURL=configure.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../lib/extension/configure.ts"],"names":[],"mappings":"AAOA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;IAC5C,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,KAAK,CAAuE;YAEhE,aAAa;YAUb,aAAa;IA8BxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA0B9B;YAEa,SAAS;CAqE1B"}
|
||||
Vendored
-34
@@ -1,34 +0,0 @@
|
||||
declare abstract class Extension {
|
||||
protected zigbee: Zigbee;
|
||||
protected mqtt: Mqtt;
|
||||
protected state: State;
|
||||
protected publishEntityState: PublishEntityState;
|
||||
protected eventBus: EventBus;
|
||||
protected enableDisableExtension: (enable: boolean, name: string) => Promise<void>;
|
||||
protected restartCallback: () => Promise<void>;
|
||||
protected addExtension: (extension: Extension) => Promise<void>;
|
||||
/**
|
||||
* Besides initializing variables, the constructor should do nothing!
|
||||
*
|
||||
* @param {Zigbee} zigbee Zigbee controller
|
||||
* @param {Mqtt} mqtt MQTT controller
|
||||
* @param {State} state State controller
|
||||
* @param {Function} publishEntityState Method to publish device state to MQTT.
|
||||
* @param {EventBus} eventBus The event bus
|
||||
* @param {enableDisableExtension} enableDisableExtension Enable/disable extension method
|
||||
* @param {restartCallback} restartCallback Restart Zigbee2MQTT
|
||||
* @param {addExtension} addExtension Add an extension
|
||||
*/
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
|
||||
/**
|
||||
* Is called once the extension has to start
|
||||
*/
|
||||
start(): Promise<void>;
|
||||
/**
|
||||
* Is called once the extension has to stop
|
||||
*/
|
||||
stop(): Promise<void>;
|
||||
adjustMessageBeforePublish(_entity: Group | Device, _message: KeyValue): void;
|
||||
}
|
||||
export default Extension;
|
||||
//# sourceMappingURL=extension.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../lib/extension/extension.ts"],"names":[],"mappings":"AAAA,uBAAe,SAAS;IACpB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACvB,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACjD,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,SAAS,CAAC,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,SAAS,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;;;;;;;;;OAWG;IACH,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAUxD;IAED;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IAE/B;;OAEG;IAGG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1B;IAEM,0BAA0B,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAG;CAC1F;eAEc,SAAS"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import type { ExternalDefinitionWithExtend } from "zigbee-herdsman-converters";
|
||||
import ExternalJSExtension from "./externalJS";
|
||||
type TModule = ExternalDefinitionWithExtend | ExternalDefinitionWithExtend[];
|
||||
export default class ExternalConverters extends ExternalJSExtension<TModule> {
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
|
||||
protected removeJS(name: string, _mod: TModule): Promise<void>;
|
||||
protected loadJS(name: string, mod: TModule, newName?: string): Promise<void>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=externalConverters.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"externalConverters.d.ts","sourceRoot":"","sources":["../../lib/extension/externalConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,4BAA4B,CAAC;AAK7E,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAE/C,KAAK,OAAO,GAAG,4BAA4B,GAAG,4BAA4B,EAAE,CAAC;AAE7E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IACxE,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAcxD;IAED,UAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAInE;IAED,UAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBlF;CACJ"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import type Extension from "./extension";
|
||||
import ExternalJSExtension from "./externalJS";
|
||||
type TModule = new (...args: ConstructorParameters<typeof Extension>) => Extension;
|
||||
export default class ExternalExtensions extends ExternalJSExtension<TModule> {
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
|
||||
protected removeJS(_name: string, mod: TModule): Promise<void>;
|
||||
protected loadJS(name: string, mod: TModule, newName?: string): Promise<void>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=externalExtensions.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"externalExtensions.d.ts","sourceRoot":"","sources":["../../lib/extension/externalExtensions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAE/C,KAAK,OAAO,GAAG,KAAK,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,SAAS,CAAC,KAAK,SAAS,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IACxE,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAcxD;IAED,UAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;IAED,UAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BlF;CACJ"}
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default abstract class ExternalJSExtension<M> extends Extension {
|
||||
protected folderName: string;
|
||||
protected mqttTopic: string;
|
||||
protected requestRegex: RegExp;
|
||||
protected basePath: string;
|
||||
protected nodeModulesSymlinked: boolean;
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>, mqttTopic: string, folderName: string);
|
||||
/**
|
||||
* In case the external JS is not in the Z2M install dir (e.g. when `ZIGBEE2MQTT_DATA` is used), the external
|
||||
* JS cannot import from `node_modules`.
|
||||
* To workaround this create a symlink to `node_modules` in the external JS dir.
|
||||
* https://nodejs.org/api/esm.html#no-node_path
|
||||
*/
|
||||
private symlinkNodeModulesIfNecessary;
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
private getFilePath;
|
||||
protected getFileCode(name: string): string;
|
||||
protected getFiles(): Generator<{
|
||||
name: string;
|
||||
code: string;
|
||||
}>;
|
||||
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
|
||||
protected abstract removeJS(name: string, mod: M): Promise<void>;
|
||||
protected abstract loadJS(name: string, mod: M, newName?: string): Promise<void>;
|
||||
private remove;
|
||||
private save;
|
||||
private loadFiles;
|
||||
private publishExternalJS;
|
||||
private importFile;
|
||||
}
|
||||
//# sourceMappingURL=externalJS.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"externalJS.d.ts","sourceRoot":"","sources":["../../lib/extension/externalJS.ts"],"names":[],"mappings":"AAUA,OAAO,SAAS,MAAM,aAAa,CAAC;AAKpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,mBAAmB,CAAC,CAAC,CAAE,SAAQ,SAAS;IAClE,SAAS,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GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAE7D,MAAM;YAwBN,IAAI;YA+BV,SAAS;YAqBT,iBAAiB;YAQjB,UAAU;CAc3B"}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
/**
|
||||
* This extension servers the frontend
|
||||
*/
|
||||
export declare class Frontend extends Extension {
|
||||
private mqttBaseTopic;
|
||||
private server;
|
||||
private wss;
|
||||
private baseUrl;
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
private onUpgrade;
|
||||
private onWebSocketConnection;
|
||||
private onMQTTPublishMessageOrEntityState;
|
||||
}
|
||||
export default Frontend;
|
||||
//# sourceMappingURL=frontend.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../lib/extension/frontend.ts"],"names":[],"mappings":"AAeA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,qBAAa,QAAS,SAAQ,SAAS;IACnC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAAS;IAExB,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAQxD;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAqFpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAanC;IAEK,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,qBAAqB;IAsC7B,OAAO,CAAC,iCAAiC;CA4BlD;eAEc,QAAQ"}
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default class Groups extends Extension {
|
||||
#private;
|
||||
private lastOptimisticState;
|
||||
start(): Promise<void>;
|
||||
onStateChange(data: eventdata.StateChange): Promise<void>;
|
||||
private shouldPublishPayloadForGroup;
|
||||
private areAllMembersOffOrClosed;
|
||||
private parseMQTTMessage;
|
||||
private onMQTTMessage;
|
||||
private publishResponse;
|
||||
}
|
||||
//# sourceMappingURL=groups.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../lib/extension/groups.ts"],"names":[],"mappings":"AAWA,OAAO,SAAS,MAAM,aAAa,CAAC;AA0BpC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;;IAEzC,OAAO,CAAC,mBAAmB,CAA+B;IAG3C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAoGpE;IAED,OAAO,CAAC,4BAA4B;IASpC,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,gBAAgB;YAsEJ,aAAa;YA6DnB,eAAe;CAahC"}
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default class Health extends Extension {
|
||||
#private;
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
clearStats(): void;
|
||||
}
|
||||
//# sourceMappingURL=health.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../lib/extension/health.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,aAAa,CAAC;AAOpC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;;IAG1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAGnC;IAED,UAAU,IAAI,IAAI,CAIjB;CA+CJ"}
|
||||
Vendored
-86
@@ -1,86 +0,0 @@
|
||||
import type { Zh } from "zigbee-herdsman-converters/lib/types";
|
||||
import Extension from "./extension";
|
||||
interface MockProperty {
|
||||
property: string;
|
||||
value: KeyValue | string | null;
|
||||
}
|
||||
interface DiscoveryEntry {
|
||||
mockProperties: MockProperty[];
|
||||
type: string;
|
||||
object_id: string;
|
||||
discovery_payload: KeyValue;
|
||||
endpoint?: Zh.Endpoint;
|
||||
}
|
||||
interface ActionData {
|
||||
action: string;
|
||||
button?: string;
|
||||
scene?: string;
|
||||
region?: string;
|
||||
}
|
||||
/**
|
||||
* This class handles the bridge entity configuration for Home Assistant Discovery.
|
||||
*/
|
||||
declare class Bridge {
|
||||
private coordinatorIeeeAddress;
|
||||
private coordinatorType;
|
||||
private coordinatorFirmwareVersion;
|
||||
private discoveryEntries;
|
||||
readonly options: {
|
||||
ID?: string;
|
||||
homeassistant?: KeyValue;
|
||||
};
|
||||
get ID(): string;
|
||||
get name(): string;
|
||||
get hardwareVersion(): string;
|
||||
get firmwareVersion(): string;
|
||||
get configs(): DiscoveryEntry[];
|
||||
constructor(ieeeAdress: string, version: zh.CoordinatorVersion, discovery: DiscoveryEntry[]);
|
||||
isDevice(): this is Device;
|
||||
isGroup(): this is Group;
|
||||
}
|
||||
/**
|
||||
* This extensions handles integration with HomeAssistant
|
||||
*/
|
||||
export declare class HomeAssistant extends Extension {
|
||||
private discovered;
|
||||
private discoveryTopic;
|
||||
private discoveryRegex;
|
||||
private discoveryRegexWoTopic;
|
||||
private groupMemberLookup;
|
||||
private statusTopic;
|
||||
private legacyActionSensor;
|
||||
private experimentalEventEntities;
|
||||
private zigbee2MQTTVersion;
|
||||
private discoveryOrigin;
|
||||
private bridge;
|
||||
private bridgeIdentifier;
|
||||
private actionValueTemplate;
|
||||
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
|
||||
start(): Promise<void>;
|
||||
private getDiscovered;
|
||||
private exposeToConfig;
|
||||
onEntityRemoved(data: eventdata.EntityRemoved): Promise<void>;
|
||||
onGroupMembersChanged(data: eventdata.GroupMembersChanged): Promise<void>;
|
||||
onPublishEntityState(data: eventdata.PublishEntityState): Promise<void>;
|
||||
onEntityRenamed(data: eventdata.EntityRenamed): Promise<void>;
|
||||
private getConfigs;
|
||||
private discover;
|
||||
private onMQTTMessage;
|
||||
onZigbeeEvent(data: {
|
||||
device: Device;
|
||||
}): Promise<void>;
|
||||
onScenesChanged(data: eventdata.ScenesChanged): Promise<void>;
|
||||
private getDevicePayload;
|
||||
adjustMessageBeforePublish(entity: Device | Group | Bridge, message: KeyValue): void;
|
||||
private getEncodedBaseTopic;
|
||||
private getDiscoveryTopic;
|
||||
private publishDeviceTriggerDiscover;
|
||||
private getBridgeEntity;
|
||||
parseActionValue(action: string): ActionData;
|
||||
private buildAction;
|
||||
private prepareActionEventTypes;
|
||||
private parseGroupsFromRegex;
|
||||
private getActionValueTemplate;
|
||||
}
|
||||
export default HomeAssistant;
|
||||
//# sourceMappingURL=homeassistant.d.ts.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"homeassistant.d.ts","sourceRoot":"","sources":["../../lib/extension/homeassistant.ts"],"names":[],"mappings":"AAGA,OAAO,K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AO,CAAC,IAAI,CAAC,CA0BxE;IAED,OAAO,CAAC,UAAU;YA8HJ,QAAQ;YAuSF,aAAa;IAkErB,aAAa,CAAC,IAAI,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D;IAEW,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBxE;IAED,OAAO,CAAC,gBAAgB;IAoDf,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAoB5F;IAED,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,iBAAiB;YAKX,4BAA4B;IA2C1C,OAAO,CAAC,eAAe;IA0IvB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAwB3C;IAED,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,sBAAsB;CA0BjC;eAEc,aAAa"}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
import type { Zigbee2MQTTNetworkMap } from "../types/api";
|
||||
import Extension from "./extension";
|
||||
/**
|
||||
* This extension creates a network map
|
||||
*/
|
||||
export default class NetworkMap extends Extension {
|
||||
#private;
|
||||
start(): Promise<void>;
|
||||
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
|
||||
raw(topology: Zigbee2MQTTNetworkMap): Zigbee2MQTTNetworkMap;
|
||||
graphviz(topology: Zigbee2MQTTNetworkMap): string;
|
||||
plantuml(topology: Zigbee2MQTTNetworkMap): string;
|
||||
networkScan(includeRoutes: boolean): Promise<Zigbee2MQTTNetworkMap>;
|
||||
}
|
||||
//# sourceMappingURL=networkMap.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"networkMap.d.ts","sourceRoot":"","sources":["../../lib/extension/networkMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAKxE,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS;;IAI9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpC;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCpE;IAED,GAAG,CAAC,QAAQ,EAAE,qBAAqB,GAAG,qBAAqB,CAE1D;IAED,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAqEhD;IAED,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAmDhD;IAEK,WAAW,CAAC,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8IxE;CACJ"}
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
/**
|
||||
* This extension calls the zigbee-herdsman-converters onEvent.
|
||||
*/
|
||||
export default class OnEvent extends Extension {
|
||||
#private;
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
private callOnEvent;
|
||||
}
|
||||
//# sourceMappingURL=onEvent.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../lib/extension/onEvent.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;;IAW3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAuCpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CASnC;YAEa,WAAW;CAmB5B"}
|
||||
Vendored
-22
@@ -1,22 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
type UpdateState = "updating" | "idle" | "available" | "scheduled";
|
||||
export interface UpdatePayload {
|
||||
update: {
|
||||
progress?: number;
|
||||
remaining?: number;
|
||||
state: UpdateState;
|
||||
installed_version: number | null;
|
||||
latest_version: number | null;
|
||||
latest_source: string | null;
|
||||
latest_release_notes: string | null;
|
||||
};
|
||||
}
|
||||
export default class OTAUpdate extends Extension {
|
||||
#private;
|
||||
start(): Promise<void>;
|
||||
clearState(): void;
|
||||
private onZigbeeEvent;
|
||||
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=otaUpdate.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"otaUpdate.d.ts","sourceRoot":"","sources":["../../lib/extension/otaUpdate.ts"],"names":[],"mappings":"AAaA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,KAAK,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,WAAW,CAAC;QACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;KACvC,CAAC;CACL;AAuBD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;;IAS7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAepC;IAGD,UAAU,IAAI,IAAI,CAGjB;YAWmB,aAAa;IAmJrB,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsPpE;CAwDJ"}
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export declare const loadTopicGetSetRegex: () => void;
|
||||
interface ParsedTopic {
|
||||
ID: string;
|
||||
endpoint: string | undefined;
|
||||
attribute: string;
|
||||
type: "get" | "set";
|
||||
}
|
||||
export default class Publish extends Extension {
|
||||
start(): Promise<void>;
|
||||
parseTopic(topic: string): ParsedTopic | undefined;
|
||||
parseMessage(parsedTopic: ParsedTopic, data: eventdata.MQTTMessage): KeyValue | undefined;
|
||||
updateMessageHomeAssistant(message: KeyValue, entityState: KeyValue): void;
|
||||
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
|
||||
private getDefinitionConverters;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=publish.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../lib/extension/publish.ts"],"names":[],"mappings":"AAQA,OAAO,SAAS,MAAM,aAAa,CAAC;AAKpC,eAAO,MAAM,oBAAoB,QAAO,IAEvC,CAAC;AAKF,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAE3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAED,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAsBjD;IAED,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS,CAcxF;IAED,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,GAAG,IAAI,CAezE;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqNpE;IAED,OAAO,CAAC,uBAAuB;CAOlC"}
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
import Extension from "./extension";
|
||||
export default class Receive extends Extension {
|
||||
private elapsed;
|
||||
private debouncers;
|
||||
private throttlers;
|
||||
start(): Promise<void>;
|
||||
onPublishEntityState(data: eventdata.PublishEntityState): void;
|
||||
publishDebounce(device: Device, payload: KeyValue, time: number, debounceIgnore: string[] | undefined): void;
|
||||
publishThrottle(device: Device, payload: KeyValue, time: number): Promise<void>;
|
||||
isPayloadConflicted(newPayload: KeyValue, oldPayload: KeyValue, debounceIgnore: string[] | undefined): boolean;
|
||||
onDeviceMessage(data: eventdata.DeviceMessage): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=receive.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../lib/extension/receive.ts"],"names":[],"mappings":"AASA,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAE1C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,UAAU,CAAqE;IACvF,OAAO,CAAC,UAAU,CAAoD;IAGvD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAEK,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAgBnE;IAED,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CA0B3G;IAEK,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYpF;IAMD,mBAAmB,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAU7G;IAEW,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAuFxE;CACJ"}
|
||||
Vendored
-28
@@ -1,28 +0,0 @@
|
||||
import type { OtaExtraMetas } from "zigbee-herdsman/dist/controller/tstype";
|
||||
import type { CustomClusters } from "zigbee-herdsman/dist/zspec/zcl/definition/tstype";
|
||||
import * as zhc from "zigbee-herdsman-converters";
|
||||
export default class Device {
|
||||
#private;
|
||||
zh: zh.Device;
|
||||
definition?: zhc.Definition;
|
||||
private _definitionModelID?;
|
||||
get ieeeAddr(): string;
|
||||
get ID(): string;
|
||||
get options(): DeviceOptionsWithId;
|
||||
get name(): string;
|
||||
get isSupported(): boolean;
|
||||
get customClusters(): CustomClusters;
|
||||
get otaExtraMetas(): OtaExtraMetas;
|
||||
get interviewed(): boolean;
|
||||
constructor(device: zh.Device);
|
||||
exposes(): zhc.Expose[];
|
||||
resolveDefinition(ignoreCache?: boolean): Promise<void>;
|
||||
reInterview(eventBus: EventBus): Promise<void>;
|
||||
ensureInSettings(): void;
|
||||
endpoint(key?: string | number): zh.Endpoint | undefined;
|
||||
endpointName(endpoint: zh.Endpoint): string | undefined;
|
||||
getEndpointNames(): string[];
|
||||
isDevice(): this is Device;
|
||||
isGroup(): this is Group;
|
||||
}
|
||||
//# sourceMappingURL=device.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../lib/model/device.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,kDAAkD,CAAC;AACrF,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAYlD,MAAM,CAAC,OAAO,OAAO,MAAM;;IAChB,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IACnC,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAGpC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,EAAE,IAAI,MAAM,CAEf;IACD,IAAI,OAAO,IAAI,mBAAmB,CAGjC;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,cAAc,IAAI,cAAc,CAEnC;IACD,IAAI,aAAa,IAAI,aAAa,CAEjC;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,YAAY,MAAM,EAAE,EAAE,CAAC,MAAM,EAE5B;IAED,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,CAWtB;IAEK,iBAAiB,CAAC,WAAW,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1D;IAEK,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAenD;IAED,gBAAgB,IAAI,IAAI,CAIvB;IAED,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,QAAQ,GAAG,SAAS,CAgBvD;IAED,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,CAgBtD;IAED,gBAAgB,IAAI,MAAM,EAAE,CAY3B;IAED,QAAQ,IAAI,IAAI,IAAI,MAAM,CAEzB;IAED,OAAO,IAAI,IAAI,IAAI,KAAK,CAEvB;CACJ"}
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
import type * as zhc from "zigbee-herdsman-converters";
|
||||
export default class Group {
|
||||
zh: zh.Group;
|
||||
private resolveDevice;
|
||||
get ID(): number;
|
||||
get options(): GroupOptions;
|
||||
get name(): string;
|
||||
constructor(group: zh.Group, resolveDevice: (ieeeAddr: string) => Device | undefined);
|
||||
ensureInSettings(): void;
|
||||
hasMember(device: Device): boolean;
|
||||
membersDevices(): Generator<Device>;
|
||||
membersDefinitions(): zhc.Definition[];
|
||||
isDevice(): this is Device;
|
||||
isGroup(): this is Group;
|
||||
}
|
||||
//# sourceMappingURL=group.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../lib/model/group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,KAAK;IACf,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;IACpB,OAAO,CAAC,aAAa,CAA2C;IAGhE,IAAI,EAAE,IAAI,MAAM,CAEf;IACD,IAAI,OAAO,IAAI,YAAY,CAG1B;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,YAAY,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EAGnF;IAED,gBAAgB,IAAI,IAAI,CAIvB;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjC;IAEA,cAAc,IAAI,SAAS,CAAC,MAAM,CAAC,CAQnC;IAED,kBAAkB,IAAI,GAAG,CAAC,UAAU,EAAE,CAUrC;IAED,QAAQ,IAAI,IAAI,IAAI,MAAM,CAEzB;IACD,OAAO,IAAI,IAAI,IAAI,KAAK,CAEvB;CACJ"}
|
||||
Vendored
-43
@@ -1,43 +0,0 @@
|
||||
import type { IClientPublishOptions } from "mqtt";
|
||||
export interface MqttPublishOptions {
|
||||
clientOptions: IClientPublishOptions;
|
||||
baseTopic: string;
|
||||
skipLog: boolean;
|
||||
skipReceive: boolean;
|
||||
meta: {
|
||||
isEntityState?: boolean;
|
||||
};
|
||||
}
|
||||
export default class Mqtt {
|
||||
private publishedTopics;
|
||||
private connectionTimer?;
|
||||
private client;
|
||||
private eventBus;
|
||||
private republishRetainedTimer?;
|
||||
private defaultPublishOptions;
|
||||
retainedMessages: {
|
||||
[s: string]: {
|
||||
topic: string;
|
||||
payload: string;
|
||||
options: MqttPublishOptions;
|
||||
};
|
||||
};
|
||||
get info(): {
|
||||
version: 3 | 4 | 5 | undefined;
|
||||
server: string;
|
||||
};
|
||||
get stats(): {
|
||||
connected: boolean;
|
||||
queued: number;
|
||||
};
|
||||
constructor(eventBus: EventBus);
|
||||
connect(): Promise<void>;
|
||||
disconnect(): Promise<void>;
|
||||
subscribe(topic: string): Promise<void>;
|
||||
unsubscribe(topic: string): Promise<void>;
|
||||
private onConnect;
|
||||
onMessage(topic: string, message: Buffer): void;
|
||||
isConnected(): boolean;
|
||||
publish(topic: string, payload: string, options?: Partial<MqttPublishOptions>): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=mqtt.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../lib/mqtt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,qBAAqB,EAAa,MAAM,MAAM,CAAC;AAU5E,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,qBAAqB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,sBAAsB,CAAC,CAAiB;IAChD,OAAO,CAAC,qBAAqB,CAAqB;IAC3C,gBAAgB,EAAE;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,kBAAkB,CAAA;SAAC,CAAA;KAAC,CAAM;IAE3G,IAAI,IAAI;QAEA,OAAO;QACP,MAAM;MAEb;IAED,IAAI,KAAK;QAED,SAAS;QACT,MAAM;MAEb;IAED,YAAY,QAAQ,EAAE,QAAQ,EAS7B;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAiG7B;IAEK,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAchC;IAEK,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5C;IAEK,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9C;YAEmB,SAAS;IAShB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAY3D;IAED,WAAW,IAAI,OAAO,CAErB;IAEK,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkDtG;CACJ"}
|
||||
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
declare class State {
|
||||
private readonly eventBus;
|
||||
private readonly zigbee;
|
||||
private readonly state;
|
||||
private readonly file;
|
||||
private timer?;
|
||||
constructor(eventBus: EventBus, zigbee: Zigbee);
|
||||
start(): void;
|
||||
stop(): void;
|
||||
clear(): void;
|
||||
private load;
|
||||
private save;
|
||||
exists(entity: Device | Group): boolean;
|
||||
get(entity: Group | Device): KeyValue;
|
||||
set(entity: Group | Device, update: KeyValue, reason?: string): KeyValue;
|
||||
remove(id: string | number): boolean;
|
||||
}
|
||||
export default State;
|
||||
//# sourceMappingURL=state.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../lib/state.ts"],"names":[],"mappings":"AA8BA,cAAM,KAAK;IAMH,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAN3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwC;IAC9D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IACpD,OAAO,CAAC,KAAK,CAAC,CAAiB;IAE/B,YACqB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EAIlC;IAED,KAAK,IAAI,IAAI,CAKZ;IAED,IAAI,IAAI,IAAI,CAcX;IAED,KAAK,IAAI,IAAI,CAEZ;IAED,OAAO,CAAC,IAAI;IAoBZ,OAAO,CAAC,IAAI;IAgBZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAEtC;IAED,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAEpC;IAED,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAWvE;IAED,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAEnC;CACJ;eAEc,KAAK"}
|
||||
Vendored
-942
@@ -1,942 +0,0 @@
|
||||
import type * as zigbeeHerdsman from "zigbee-herdsman/dist";
|
||||
import type { ZclPayload } from "zigbee-herdsman/dist/adapter/events";
|
||||
import type { Eui64 } from "zigbee-herdsman/dist/zspec/tstypes";
|
||||
import type { Cluster, ClusterName, CustomClusters } from "zigbee-herdsman/dist/zspec/zcl/definition/tstype";
|
||||
import type { GenericZdoResponse, RoutingTableEntry } from "zigbee-herdsman/dist/zspec/zdo/definition/tstypes";
|
||||
import type * as zigbeeHerdsmanConverter from "zigbee-herdsman-converters";
|
||||
import type { Base } from "zigbee-herdsman-converters/lib/exposes";
|
||||
export type * as ZSpec from "zigbee-herdsman/dist/zspec";
|
||||
export type * as Zcl from "zigbee-herdsman/dist/zspec/zcl";
|
||||
export type * as Zdo from "zigbee-herdsman/dist/zspec/zdo";
|
||||
export type Zigbee2MQTTFeatures = {
|
||||
base: Base;
|
||||
switch: zigbeeHerdsmanConverter.Switch;
|
||||
lock: zigbeeHerdsmanConverter.Lock;
|
||||
binary: zigbeeHerdsmanConverter.Binary;
|
||||
list: zigbeeHerdsmanConverter.List;
|
||||
numeric: zigbeeHerdsmanConverter.Numeric;
|
||||
enum: zigbeeHerdsmanConverter.Enum;
|
||||
text: zigbeeHerdsmanConverter.Text;
|
||||
composite: zigbeeHerdsmanConverter.Composite;
|
||||
light: zigbeeHerdsmanConverter.Light;
|
||||
cover: zigbeeHerdsmanConverter.Cover;
|
||||
fan: zigbeeHerdsmanConverter.Fan;
|
||||
climate: zigbeeHerdsmanConverter.Climate;
|
||||
};
|
||||
import type { UpdatePayload } from "../extension/otaUpdate";
|
||||
import type { LogLevel, schemaJson } from "../util/settings";
|
||||
type KeyValue = Record<string, any>;
|
||||
export interface OnboardInitData {
|
||||
page: "form";
|
||||
settings: Zigbee2MQTTSettings;
|
||||
settingsSchema: typeof schemaJson;
|
||||
devices: {
|
||||
name: string;
|
||||
path: Zigbee2MQTTSettings["serial"]["port"];
|
||||
adapter?: Zigbee2MQTTSettings["serial"]["adapter"];
|
||||
baudRate?: Zigbee2MQTTSettings["serial"]["baudrate"];
|
||||
rtscts?: Zigbee2MQTTSettings["serial"]["rtscts"];
|
||||
}[];
|
||||
}
|
||||
export interface OnboardDoneData {
|
||||
page: "done";
|
||||
frontendUrl: string | null;
|
||||
}
|
||||
export interface OnboardFailureData {
|
||||
page: "failure";
|
||||
errors: string[];
|
||||
}
|
||||
export type OnboardData = OnboardInitData | OnboardDoneData | OnboardFailureData;
|
||||
export type OnboardSubmitResponse = {
|
||||
success: true;
|
||||
frontendUrl: string | null;
|
||||
} | {
|
||||
success: false;
|
||||
error: string;
|
||||
};
|
||||
export type Zigbee2MQTTDeviceOptions = {
|
||||
disabled?: boolean;
|
||||
retention?: number;
|
||||
availability?: boolean | {
|
||||
timeout: number;
|
||||
max_jitter?: number;
|
||||
backoff?: boolean;
|
||||
pause_on_backoff_gt?: number;
|
||||
};
|
||||
optimistic?: boolean;
|
||||
debounce?: number;
|
||||
debounce_ignore?: string[];
|
||||
throttle?: number;
|
||||
filtered_attributes?: string[];
|
||||
filtered_cache?: string[];
|
||||
filtered_optimistic?: string[];
|
||||
icon?: string;
|
||||
homeassistant?: KeyValue;
|
||||
friendly_name: string;
|
||||
description?: string;
|
||||
qos?: 0 | 1 | 2;
|
||||
disable_automatic_update_check?: boolean;
|
||||
};
|
||||
export type Zigbee2MQTTGroupOptions = {
|
||||
ID: number;
|
||||
optimistic?: boolean;
|
||||
off_state?: "all_members_off" | "last_member_state";
|
||||
filtered_attributes?: string[];
|
||||
filtered_cache?: string[];
|
||||
filtered_optimistic?: string[];
|
||||
homeassistant?: KeyValue;
|
||||
friendly_name: string;
|
||||
description?: string;
|
||||
qos?: 0 | 1 | 2;
|
||||
};
|
||||
export type Zigbee2MQTTSettings = {
|
||||
version?: number;
|
||||
/** only used internally during startup, removed on successful Z2M start */
|
||||
onboarding?: true;
|
||||
homeassistant: {
|
||||
enabled: boolean;
|
||||
discovery_topic: string;
|
||||
status_topic: string;
|
||||
experimental_event_entities: boolean;
|
||||
legacy_action_sensor: boolean;
|
||||
};
|
||||
availability: {
|
||||
enabled: boolean;
|
||||
active: {
|
||||
timeout: number;
|
||||
max_jitter: number;
|
||||
backoff: boolean;
|
||||
pause_on_backoff_gt: number;
|
||||
};
|
||||
passive: {
|
||||
timeout: number;
|
||||
};
|
||||
};
|
||||
mqtt: {
|
||||
base_topic: string;
|
||||
include_device_information: boolean;
|
||||
force_disable_retain: boolean;
|
||||
version?: 3 | 4 | 5;
|
||||
user?: string;
|
||||
password?: string;
|
||||
server: string;
|
||||
ca?: string;
|
||||
keepalive?: number;
|
||||
key?: string;
|
||||
cert?: string;
|
||||
client_id?: string;
|
||||
reject_unauthorized?: boolean;
|
||||
server_name?: string;
|
||||
maximum_packet_size: number;
|
||||
};
|
||||
serial: {
|
||||
disable_led: boolean;
|
||||
port?: string;
|
||||
adapter?: "deconz" | "zstack" | "ezsp" | "zigate" | "ember" | "zboss" | "zoh";
|
||||
baudrate?: number;
|
||||
rtscts?: boolean;
|
||||
};
|
||||
passlist: string[];
|
||||
blocklist: string[];
|
||||
map_options: {
|
||||
graphviz: {
|
||||
colors: {
|
||||
fill: {
|
||||
enddevice: string;
|
||||
coordinator: string;
|
||||
router: string;
|
||||
};
|
||||
font: {
|
||||
coordinator: string;
|
||||
router: string;
|
||||
enddevice: string;
|
||||
};
|
||||
line: {
|
||||
active: string;
|
||||
inactive: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
ota: {
|
||||
update_check_interval: number;
|
||||
disable_automatic_update_check: boolean;
|
||||
zigbee_ota_override_index_location?: string;
|
||||
image_block_request_timeout?: number;
|
||||
image_block_response_delay?: number;
|
||||
default_maximum_data_size?: number;
|
||||
};
|
||||
frontend: {
|
||||
enabled: boolean;
|
||||
package: "zigbee2mqtt-frontend" | "zigbee2mqtt-windfront";
|
||||
auth_token?: string;
|
||||
host?: string;
|
||||
port: number;
|
||||
base_url: string;
|
||||
url?: string;
|
||||
ssl_cert?: string;
|
||||
ssl_key?: string;
|
||||
notification_filter?: string[];
|
||||
disable_ui_serving?: boolean;
|
||||
};
|
||||
devices: {
|
||||
[s: string]: Zigbee2MQTTDeviceOptions;
|
||||
};
|
||||
groups: {
|
||||
[s: string]: Omit<Zigbee2MQTTGroupOptions, "ID">;
|
||||
};
|
||||
device_options: KeyValue;
|
||||
advanced: {
|
||||
log_rotation: boolean;
|
||||
log_console_json: boolean;
|
||||
log_symlink_current: boolean;
|
||||
log_output: ("console" | "file" | "syslog")[];
|
||||
log_directory: string;
|
||||
log_file: string;
|
||||
log_level: LogLevel;
|
||||
log_namespaced_levels: Record<string, LogLevel>;
|
||||
log_syslog: KeyValue;
|
||||
log_debug_to_mqtt_frontend: boolean;
|
||||
log_debug_namespace_ignore: string;
|
||||
log_directories_to_keep: number;
|
||||
pan_id: number | "GENERATE";
|
||||
ext_pan_id: number[] | "GENERATE";
|
||||
channel: number;
|
||||
adapter_concurrent?: number;
|
||||
adapter_delay?: number;
|
||||
cache_state: boolean;
|
||||
cache_state_persistent: boolean;
|
||||
cache_state_send_on_startup: boolean;
|
||||
last_seen: "disable" | "ISO_8601" | "ISO_8601_local" | "epoch";
|
||||
elapsed: boolean;
|
||||
network_key: number[] | "GENERATE";
|
||||
timestamp_format: string;
|
||||
output: "json" | "attribute" | "attribute_and_json";
|
||||
transmit_power?: number;
|
||||
/** 3.0: default to false (JSON schema & settings `defaults`) */
|
||||
enable_external_js: boolean;
|
||||
};
|
||||
health: {
|
||||
/** in minutes */
|
||||
interval: number;
|
||||
reset_on_check: boolean;
|
||||
};
|
||||
};
|
||||
export interface Zigbee2MQTTScene {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
export interface Zigbee2MQTTDeviceEndpoint {
|
||||
name?: string;
|
||||
bindings: Zigbee2MQTTDeviceEndpointBinding[];
|
||||
configured_reportings: Zigbee2MQTTDeviceEndpointConfiguredReporting[];
|
||||
clusters: {
|
||||
input: string[];
|
||||
output: string[];
|
||||
};
|
||||
scenes: Zigbee2MQTTScene[];
|
||||
}
|
||||
export interface Zigbee2MQTTDeviceEndpointBinding {
|
||||
cluster: string;
|
||||
target: Zigbee2MQTTDeviceEndpointBindingTarget;
|
||||
}
|
||||
export type Zigbee2MQTTDeviceEndpointBindingTarget = {
|
||||
type: "endpoint";
|
||||
ieee_address: string;
|
||||
endpoint: number;
|
||||
} | {
|
||||
type: "group";
|
||||
id: number;
|
||||
};
|
||||
export interface Zigbee2MQTTDeviceEndpointConfiguredReporting {
|
||||
cluster: string;
|
||||
attribute: string | number;
|
||||
minimum_report_interval: number;
|
||||
maximum_report_interval: number;
|
||||
reportable_change: number;
|
||||
}
|
||||
export interface Zigbee2MQTTDeviceDefinition {
|
||||
source: "native" | "generated" | "external";
|
||||
model: string;
|
||||
vendor: string;
|
||||
description: string;
|
||||
exposes: zigbeeHerdsmanConverter.Expose[];
|
||||
supports_ota: boolean;
|
||||
options: zigbeeHerdsmanConverter.Option[];
|
||||
version: `0.0.${number}`;
|
||||
icon: string;
|
||||
}
|
||||
export interface Zigbee2MQTTDevice {
|
||||
ieee_address: zigbeeHerdsman.Models.Device["ieeeAddr"];
|
||||
type: zigbeeHerdsman.Models.Device["type"];
|
||||
network_address: zigbeeHerdsman.Models.Device["networkAddress"];
|
||||
supported: boolean;
|
||||
friendly_name: string;
|
||||
disabled: boolean;
|
||||
description?: string;
|
||||
definition?: Zigbee2MQTTDeviceDefinition;
|
||||
power_source: zigbeeHerdsman.Models.Device["powerSource"];
|
||||
software_build_id: zigbeeHerdsman.Models.Device["softwareBuildID"];
|
||||
date_code: zigbeeHerdsman.Models.Device["dateCode"];
|
||||
model_id: zigbeeHerdsman.Models.Device["modelID"];
|
||||
interviewing: boolean;
|
||||
interview_completed: boolean;
|
||||
interview_state: zigbeeHerdsman.Models.Device["interviewState"];
|
||||
manufacturer: zigbeeHerdsman.Models.Device["manufacturerName"];
|
||||
endpoints: Record<number, Zigbee2MQTTDeviceEndpoint>;
|
||||
}
|
||||
export interface Zigbee2MQTTGroupMember {
|
||||
ieee_address: zigbeeHerdsman.Models.Device["ieeeAddr"];
|
||||
endpoint: number;
|
||||
}
|
||||
export interface Zigbee2MQTTGroup {
|
||||
id: number;
|
||||
friendly_name: "default_bind_group" | string;
|
||||
description?: string;
|
||||
scenes: Zigbee2MQTTScene[];
|
||||
members: Zigbee2MQTTGroupMember[];
|
||||
}
|
||||
export interface Zigbee2MQTTNetworkMap {
|
||||
nodes: {
|
||||
ieeeAddr: string;
|
||||
friendlyName: string;
|
||||
type: string;
|
||||
networkAddress: number;
|
||||
manufacturerName?: string;
|
||||
modelID?: string;
|
||||
failed?: string[];
|
||||
lastSeen?: number;
|
||||
definition?: {
|
||||
model: string;
|
||||
vendor: string;
|
||||
supports: string;
|
||||
description: string;
|
||||
};
|
||||
}[];
|
||||
links: {
|
||||
source: {
|
||||
ieeeAddr: string;
|
||||
networkAddress: number;
|
||||
};
|
||||
target: {
|
||||
ieeeAddr: string;
|
||||
networkAddress: number;
|
||||
};
|
||||
deviceType: number;
|
||||
rxOnWhenIdle: number;
|
||||
relationship: number;
|
||||
permitJoining: number;
|
||||
depth: number;
|
||||
lqi: number;
|
||||
routes: RoutingTableEntry[];
|
||||
/** @deprecated 3.0 */
|
||||
linkquality: number;
|
||||
/** @deprecated 3.0 */
|
||||
sourceIeeeAddr: string;
|
||||
/** @deprecated 3.0 */
|
||||
targetIeeeAddr: string;
|
||||
/** @deprecated 3.0 */
|
||||
sourceNwkAddr: number;
|
||||
}[];
|
||||
}
|
||||
/**
|
||||
* Zigbee2MQTT state/request/response API endpoints
|
||||
*/
|
||||
export interface Zigbee2MQTTAPI {
|
||||
"bridge/logging": {
|
||||
message: string;
|
||||
level: LogLevel;
|
||||
namespace: string;
|
||||
};
|
||||
"bridge/state": {
|
||||
state: "online" | "offline";
|
||||
};
|
||||
"bridge/definitions": {
|
||||
clusters: Readonly<Record<ClusterName, Cluster>>;
|
||||
custom_clusters: Record<string, CustomClusters>;
|
||||
actions: string[];
|
||||
};
|
||||
"bridge/event": {
|
||||
type: "device_leave" | "device_joined" | "device_announce";
|
||||
data: {
|
||||
friendly_name: string;
|
||||
ieee_address: string;
|
||||
};
|
||||
} | {
|
||||
type: "device_interview";
|
||||
data: {
|
||||
friendly_name: string;
|
||||
ieee_address: string;
|
||||
status: "started" | "failed";
|
||||
} | {
|
||||
friendly_name: string;
|
||||
ieee_address: string;
|
||||
status: "successful";
|
||||
supported: boolean;
|
||||
definition: Zigbee2MQTTDeviceDefinition | undefined;
|
||||
};
|
||||
};
|
||||
"bridge/info": {
|
||||
os: {
|
||||
version: string;
|
||||
node_version: string;
|
||||
cpus: string;
|
||||
memory_mb: number;
|
||||
};
|
||||
mqtt: {
|
||||
version: number | undefined;
|
||||
server: string;
|
||||
};
|
||||
version: string;
|
||||
commit: string | undefined;
|
||||
zigbee_herdsman_converters: {
|
||||
version: string;
|
||||
};
|
||||
zigbee_herdsman: {
|
||||
version: string;
|
||||
};
|
||||
coordinator: {
|
||||
ieee_address: string;
|
||||
type: string;
|
||||
meta: {
|
||||
[s: string]: number | string;
|
||||
};
|
||||
};
|
||||
network: {
|
||||
pan_id: number;
|
||||
/** `0x${string}` 8-len */
|
||||
extended_pan_id: string;
|
||||
channel: number;
|
||||
};
|
||||
log_level: "debug" | "info" | "warning" | "error";
|
||||
permit_join: boolean;
|
||||
permit_join_end: number | undefined;
|
||||
restart_required: boolean;
|
||||
config: Zigbee2MQTTSettings;
|
||||
config_schema: typeof schemaJson;
|
||||
};
|
||||
"bridge/health": {
|
||||
/** time of message, msec from epoch, UTC */
|
||||
response_time: number;
|
||||
os: {
|
||||
load_average: number[];
|
||||
memory_used_mb: number;
|
||||
memory_percent: number;
|
||||
};
|
||||
process: {
|
||||
uptime_sec: number;
|
||||
memory_used_mb: number;
|
||||
memory_percent: number;
|
||||
};
|
||||
mqtt: {
|
||||
connected: boolean;
|
||||
queued: number;
|
||||
received: number;
|
||||
published: number;
|
||||
};
|
||||
devices: Record<string, {
|
||||
messages: number;
|
||||
messages_per_sec: number;
|
||||
leave_count: number;
|
||||
network_address_changes: number;
|
||||
}>;
|
||||
};
|
||||
"bridge/devices": Zigbee2MQTTDevice[];
|
||||
"bridge/groups": Zigbee2MQTTGroup[];
|
||||
"bridge/converters": {
|
||||
name: string;
|
||||
code: string;
|
||||
}[];
|
||||
"bridge/extensions": {
|
||||
name: string;
|
||||
code: string;
|
||||
}[];
|
||||
"bridge/request/permit_join": {
|
||||
/** [0-254], 0 meaning disable */
|
||||
time: number;
|
||||
device?: string;
|
||||
} | `${number}`;
|
||||
"bridge/response/permit_join": {
|
||||
/** [0-254], 0 meaning disable */
|
||||
time: number;
|
||||
device?: string;
|
||||
};
|
||||
"bridge/request/health_check": "";
|
||||
"bridge/response/health_check": {
|
||||
/** XXX: currently always returns true */
|
||||
healthy: boolean;
|
||||
};
|
||||
"bridge/request/coordinator_check": "";
|
||||
"bridge/response/coordinator_check": {
|
||||
missing_routers: {
|
||||
ieee_address: string;
|
||||
friendly_name: string;
|
||||
}[];
|
||||
};
|
||||
"bridge/request/restart": "";
|
||||
"bridge/response/restart": Record<string, never>;
|
||||
"bridge/request/networkmap": {
|
||||
type: "raw" | "graphviz" | "plantuml";
|
||||
routes: boolean;
|
||||
} | "raw" | "graphviz" | "plantuml";
|
||||
"bridge/response/networkmap": {
|
||||
type: "raw";
|
||||
routes: boolean;
|
||||
value: Zigbee2MQTTNetworkMap;
|
||||
} | {
|
||||
type: "graphviz" | "plantuml";
|
||||
routes: boolean;
|
||||
value: string;
|
||||
};
|
||||
"bridge/request/extension/save": {
|
||||
name: string;
|
||||
code: string;
|
||||
};
|
||||
"bridge/response/extension/save": Record<string, never>;
|
||||
"bridge/request/extension/remove": {
|
||||
name: string;
|
||||
};
|
||||
"bridge/response/extension/remove": Record<string, never>;
|
||||
"bridge/request/converter/save": {
|
||||
name: string;
|
||||
code: string;
|
||||
};
|
||||
"bridge/response/converter/save": Record<string, never>;
|
||||
"bridge/request/converter/remove": {
|
||||
name: string;
|
||||
};
|
||||
"bridge/response/converter/remove": Record<string, never>;
|
||||
"bridge/request/backup": "";
|
||||
"bridge/response/backup": {
|
||||
/** base64 encoded ZIP archive */
|
||||
zip: string;
|
||||
};
|
||||
"bridge/request/install_code/add": {
|
||||
value: string;
|
||||
};
|
||||
"bridge/response/install_code/add": {
|
||||
value: string;
|
||||
};
|
||||
/**
|
||||
* Applied on-the-fly:
|
||||
* - newSettings.homeassistant
|
||||
* - newSettings.advanced?.log_level
|
||||
* - newSettings.advanced?.log_namespaced_levels
|
||||
* - newSettings.advanced?.log_debug_namespace_ignore
|
||||
*/
|
||||
"bridge/request/options": {
|
||||
options: Record<string, unknown>;
|
||||
};
|
||||
"bridge/response/options": {
|
||||
restart_required: boolean;
|
||||
};
|
||||
"bridge/request/device/bind": {
|
||||
from: string;
|
||||
from_endpoint: string | number | "default";
|
||||
to: string | number;
|
||||
to_endpoint?: string | number;
|
||||
clusters?: string[];
|
||||
skip_disable_reporting?: boolean;
|
||||
};
|
||||
"bridge/response/device/bind": {
|
||||
from: string;
|
||||
from_endpoint: string | number;
|
||||
to: string | number;
|
||||
to_endpoint: string | number | undefined;
|
||||
clusters: string[];
|
||||
failed: string[];
|
||||
};
|
||||
"bridge/request/device/unbind": {
|
||||
from: string;
|
||||
from_endpoint: string | number | "default";
|
||||
to: string | number;
|
||||
to_endpoint?: string | number;
|
||||
clusters?: string[];
|
||||
skip_disable_reporting?: boolean;
|
||||
};
|
||||
"bridge/response/device/unbind": {
|
||||
from: string;
|
||||
from_endpoint: string | number;
|
||||
to: string | number;
|
||||
to_endpoint: string | number | undefined;
|
||||
clusters: string[];
|
||||
failed: string[];
|
||||
};
|
||||
"bridge/request/device/binds/clear": {
|
||||
target: string;
|
||||
ieee_list?: Eui64[];
|
||||
};
|
||||
"bridge/response/device/binds/clear": {
|
||||
target: string;
|
||||
ieee_list?: Eui64[];
|
||||
};
|
||||
"bridge/request/device/configure": {
|
||||
id: string | number;
|
||||
} | string;
|
||||
"bridge/response/device/configure": {
|
||||
id: string | number;
|
||||
};
|
||||
"bridge/request/device/remove": {
|
||||
id: string;
|
||||
block?: boolean;
|
||||
force?: boolean;
|
||||
keep_config?: boolean;
|
||||
clear_cache?: boolean;
|
||||
};
|
||||
"bridge/response/device/remove": {
|
||||
id: string;
|
||||
block: boolean;
|
||||
force: boolean;
|
||||
keep_config: boolean;
|
||||
clear_cache: boolean;
|
||||
};
|
||||
"bridge/request/device/ota_update/check": {
|
||||
id: string;
|
||||
/** expected to point to an index json if provided */
|
||||
url?: string | null;
|
||||
};
|
||||
"bridge/request/device/ota_update/check/downgrade": {
|
||||
id: string;
|
||||
/** expected to point to an index json if provided */
|
||||
url?: string | null;
|
||||
};
|
||||
"bridge/response/device/ota_update/check": {
|
||||
id: string;
|
||||
update_available: boolean;
|
||||
downgrade?: boolean;
|
||||
source?: string;
|
||||
release_notes?: string;
|
||||
};
|
||||
"bridge/request/device/ota_update/update": {
|
||||
id: string;
|
||||
url?: string | null;
|
||||
/**
|
||||
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
|
||||
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
|
||||
*/
|
||||
hex?: {
|
||||
data: string;
|
||||
file_name?: string;
|
||||
} | null;
|
||||
image_block_request_timeout?: number | null;
|
||||
image_block_response_delay?: number | null;
|
||||
/** may be overridden internally to match specific device needs */
|
||||
default_maximum_data_size?: number | null;
|
||||
};
|
||||
"bridge/request/device/ota_update/update/downgrade": {
|
||||
id: string;
|
||||
url?: string | null;
|
||||
/**
|
||||
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
|
||||
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
|
||||
*/
|
||||
hex?: {
|
||||
data: string;
|
||||
file_name?: string;
|
||||
} | null;
|
||||
image_block_request_timeout?: number | null;
|
||||
image_block_response_delay?: number | null;
|
||||
/** may be overridden internally to match specific device needs */
|
||||
default_maximum_data_size?: number | null;
|
||||
};
|
||||
"bridge/request/device/ota_update/update/abort": {
|
||||
id: string;
|
||||
};
|
||||
"bridge/response/device/ota_update/update/abort": {
|
||||
id: string;
|
||||
};
|
||||
"bridge/response/device/ota_update/update": {
|
||||
id: string;
|
||||
from: {
|
||||
file_version: number;
|
||||
software_build_id?: string;
|
||||
date_code?: string;
|
||||
} | undefined;
|
||||
to: {
|
||||
file_version: number;
|
||||
software_build_id?: string;
|
||||
date_code?: string;
|
||||
} | undefined;
|
||||
};
|
||||
"bridge/request/device/ota_update/schedule": {
|
||||
id: string;
|
||||
url?: string | null;
|
||||
/**
|
||||
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
|
||||
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
|
||||
*/
|
||||
hex?: {
|
||||
data: string;
|
||||
file_name?: string;
|
||||
} | null;
|
||||
};
|
||||
"bridge/request/device/ota_update/schedule/downgrade": {
|
||||
id: string;
|
||||
url?: string | null;
|
||||
/**
|
||||
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
|
||||
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
|
||||
*/
|
||||
hex?: {
|
||||
data: string;
|
||||
file_name?: string;
|
||||
} | null;
|
||||
};
|
||||
"bridge/response/device/ota_update/schedule": {
|
||||
id: string;
|
||||
url?: string;
|
||||
};
|
||||
"bridge/request/device/ota_update/unschedule": {
|
||||
id: string;
|
||||
};
|
||||
"bridge/response/device/ota_update/unschedule": {
|
||||
id: string;
|
||||
};
|
||||
"bridge/request/device/interview": {
|
||||
id: string | number;
|
||||
};
|
||||
"bridge/response/device/interview": {
|
||||
id: string | number;
|
||||
};
|
||||
"bridge/request/device/generate_external_definition": {
|
||||
id: string | number;
|
||||
};
|
||||
"bridge/response/device/generate_external_definition": {
|
||||
id: string | number;
|
||||
source: string;
|
||||
};
|
||||
"bridge/request/device/options": {
|
||||
id: string;
|
||||
options: Record<string, unknown>;
|
||||
};
|
||||
"bridge/response/device/options": {
|
||||
id: string;
|
||||
from: Record<string, unknown>;
|
||||
to: Record<string, unknown>;
|
||||
restart_required: boolean;
|
||||
};
|
||||
"bridge/request/device/rename": {
|
||||
last: true;
|
||||
from?: string;
|
||||
to: string;
|
||||
homeassistant_rename?: boolean;
|
||||
} | {
|
||||
last: false | undefined;
|
||||
from: string;
|
||||
to: string;
|
||||
homeassistant_rename?: boolean;
|
||||
};
|
||||
"bridge/response/device/rename": {
|
||||
from: string;
|
||||
to: string;
|
||||
homeassistant_rename: boolean;
|
||||
};
|
||||
"bridge/request/device/reporting/configure": {
|
||||
id: string;
|
||||
endpoint: string | number;
|
||||
cluster: string | number;
|
||||
attribute: string | number | {
|
||||
ID: number;
|
||||
type: number;
|
||||
};
|
||||
minimum_report_interval: number;
|
||||
maximum_report_interval: number;
|
||||
reportable_change?: number;
|
||||
option: Record<string, unknown>;
|
||||
};
|
||||
"bridge/response/device/reporting/configure": {
|
||||
id: string;
|
||||
endpoint: string | number;
|
||||
cluster: string | number;
|
||||
attribute: string | number | {
|
||||
ID: number;
|
||||
type: number;
|
||||
};
|
||||
minimum_report_interval: number;
|
||||
maximum_report_interval: number;
|
||||
reportable_change?: number;
|
||||
};
|
||||
"bridge/request/device/reporting/read": {
|
||||
id: string;
|
||||
endpoint: string | number;
|
||||
cluster: string | number;
|
||||
configs: {
|
||||
direction?: number;
|
||||
attribute: string | number | {
|
||||
ID: number;
|
||||
type: number;
|
||||
};
|
||||
}[];
|
||||
manufacturer_code?: number;
|
||||
};
|
||||
"bridge/response/device/reporting/read": {
|
||||
id: string;
|
||||
endpoint: string | number;
|
||||
cluster: string | number;
|
||||
configs: zigbeeHerdsman.Zcl.ClustersTypes.TFoundation["readReportConfigRsp"];
|
||||
manufacturer_code?: number;
|
||||
};
|
||||
"bridge/request/group/remove": {
|
||||
id: string;
|
||||
force?: boolean;
|
||||
};
|
||||
"bridge/response/group/remove": {
|
||||
id: string;
|
||||
force: boolean;
|
||||
};
|
||||
"bridge/request/group/add": {
|
||||
friendly_name: string;
|
||||
id?: string;
|
||||
};
|
||||
"bridge/response/group/add": {
|
||||
friendly_name: string;
|
||||
id: number;
|
||||
};
|
||||
"bridge/request/group/rename": {
|
||||
from: string;
|
||||
to: string;
|
||||
homeassistant_rename?: boolean;
|
||||
};
|
||||
"bridge/response/group/rename": {
|
||||
from: string;
|
||||
to: string;
|
||||
homeassistant_rename: boolean;
|
||||
};
|
||||
"bridge/request/group/options": {
|
||||
id: string;
|
||||
options: Record<string, unknown>;
|
||||
};
|
||||
"bridge/response/group/options": {
|
||||
id: string;
|
||||
from: Record<string, unknown>;
|
||||
to: Record<string, unknown>;
|
||||
restart_required: boolean;
|
||||
};
|
||||
"bridge/request/group/members/add": {
|
||||
device: string;
|
||||
group: string;
|
||||
endpoint: string | number | "default";
|
||||
skip_disable_reporting?: boolean;
|
||||
};
|
||||
"bridge/response/group/members/add": {
|
||||
device: string;
|
||||
group: string;
|
||||
endpoint: string | number | "default";
|
||||
};
|
||||
"bridge/request/group/members/remove": {
|
||||
device: string;
|
||||
group: string;
|
||||
endpoint: string | number | "default";
|
||||
skip_disable_reporting?: boolean;
|
||||
};
|
||||
"bridge/response/group/members/remove": {
|
||||
device: string;
|
||||
group: string;
|
||||
endpoint: string | number | "default";
|
||||
};
|
||||
"bridge/request/group/members/remove_all": {
|
||||
device: string;
|
||||
endpoint: string | number | "default";
|
||||
skip_disable_reporting?: boolean;
|
||||
};
|
||||
"bridge/response/group/members/remove_all": {
|
||||
device: string;
|
||||
endpoint: string | number | "default";
|
||||
};
|
||||
"bridge/request/touchlink/factory_reset": {
|
||||
ieee_address: string;
|
||||
channel: number;
|
||||
} | "";
|
||||
"bridge/response/touchlink/factory_reset": {
|
||||
ieee_address: string;
|
||||
channel: number;
|
||||
} | Record<string, never>;
|
||||
"bridge/request/touchlink/scan": "";
|
||||
"bridge/response/touchlink/scan": {
|
||||
found: {
|
||||
ieee_address: string;
|
||||
channel: number;
|
||||
}[];
|
||||
};
|
||||
"bridge/request/touchlink/identify": {
|
||||
ieee_address: string;
|
||||
channel: number;
|
||||
};
|
||||
"bridge/response/touchlink/identify": {
|
||||
ieee_address: string;
|
||||
channel: number;
|
||||
};
|
||||
"bridge/request/action": {
|
||||
action: string;
|
||||
params?: Record<string, unknown>;
|
||||
};
|
||||
"bridge/response/action": GenericZdoResponse | ZclPayload | undefined;
|
||||
/**
|
||||
* entity state response
|
||||
*/
|
||||
"{friendlyName}": {
|
||||
[key: string]: unknown;
|
||||
update?: UpdatePayload["update"];
|
||||
};
|
||||
"{friendlyName}/availability": {
|
||||
state: "online" | "offline";
|
||||
};
|
||||
/** entity set request (tries to match endpoint to definition, else uses "default") */
|
||||
"{friendlyNameOrId}/set": {
|
||||
[attribute: string]: {
|
||||
[key: string]: unknown;
|
||||
} | string | boolean;
|
||||
};
|
||||
/** entity set request (tries to match endpoint to definition, else uses "default") */
|
||||
"{friendlyNameOrId}/set/{attribute}": {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
/** entity set request */
|
||||
"{friendlyNameOrId}/{endpoint}/set": {
|
||||
[attribute: string]: {
|
||||
[key: string]: unknown;
|
||||
} | string | boolean;
|
||||
};
|
||||
/** entity set request */
|
||||
"{friendlyNameOrId}/{endpoint}/set/{attribute}": {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
/** entity get request (tries to match endpoint to definition, else uses "default") */
|
||||
"{friendlyNameOrId}/get": {
|
||||
[attribute: string]: {
|
||||
[key: string]: unknown;
|
||||
} | string | boolean;
|
||||
};
|
||||
/** entity get request (tries to match endpoint to definition, else uses "default") */
|
||||
"{friendlyNameOrId}/get/{attribute}": {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
/** entity get request */
|
||||
"{friendlyNameOrId}/{endpoint}/get": {
|
||||
[attribute: string]: {
|
||||
[key: string]: unknown;
|
||||
} | string | boolean;
|
||||
};
|
||||
/** entity get request */
|
||||
"{friendlyNameOrId}/{endpoint}/get/{attribute}": {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
export type Zigbee2MQTTRequestEndpoints = "bridge/request/permit_join" | "bridge/request/health_check" | "bridge/request/coordinator_check" | "bridge/request/restart" | "bridge/request/networkmap" | "bridge/request/extension/save" | "bridge/request/extension/remove" | "bridge/request/converter/save" | "bridge/request/converter/remove" | "bridge/request/backup" | "bridge/request/install_code/add" | "bridge/request/options" | "bridge/request/device/bind" | "bridge/request/device/unbind" | "bridge/request/device/binds/clear" | "bridge/request/device/configure" | "bridge/request/device/remove" | "bridge/request/device/ota_update/check" | "bridge/request/device/ota_update/check/downgrade" | "bridge/request/device/ota_update/update" | "bridge/request/device/ota_update/update/downgrade" | "bridge/request/device/ota_update/update/abort" | "bridge/request/device/ota_update/schedule" | "bridge/request/device/ota_update/schedule/downgrade" | "bridge/request/device/ota_update/unschedule" | "bridge/request/device/interview" | "bridge/request/device/generate_external_definition" | "bridge/request/device/options" | "bridge/request/device/rename" | "bridge/request/device/reporting/configure" | "bridge/request/device/reporting/read" | "bridge/request/group/remove" | "bridge/request/group/add" | "bridge/request/group/rename" | "bridge/request/group/options" | "bridge/request/group/members/add" | "bridge/request/group/members/remove" | "bridge/request/group/members/remove_all" | "bridge/request/touchlink/factory_reset" | "bridge/request/touchlink/scan" | "bridge/request/touchlink/identify" | "bridge/request/action" | "{friendlyNameOrId}/set" | "{friendlyNameOrId}/set/{attribute}" | "{friendlyNameOrId}/{endpoint}/set" | "{friendlyNameOrId}/{endpoint}/set/{attribute}" | "{friendlyNameOrId}/get" | "{friendlyNameOrId}/get/{attribute}" | "{friendlyNameOrId}/{endpoint}/get" | "{friendlyNameOrId}/{endpoint}/get/{attribute}";
|
||||
export type Zigbee2MQTTResponseEndpoints = "bridge/response/permit_join" | "bridge/response/health_check" | "bridge/response/coordinator_check" | "bridge/response/restart" | "bridge/response/networkmap" | "bridge/response/extension/save" | "bridge/response/extension/remove" | "bridge/response/converter/save" | "bridge/response/converter/remove" | "bridge/response/backup" | "bridge/response/install_code/add" | "bridge/response/options" | "bridge/response/device/bind" | "bridge/response/device/unbind" | "bridge/response/device/binds/clear" | "bridge/response/device/configure" | "bridge/response/device/remove" | "bridge/response/device/ota_update/check" | "bridge/response/device/ota_update/update" | "bridge/response/device/ota_update/update/abort" | "bridge/response/device/ota_update/schedule" | "bridge/response/device/ota_update/unschedule" | "bridge/response/device/interview" | "bridge/response/device/generate_external_definition" | "bridge/response/device/options" | "bridge/response/device/rename" | "bridge/response/device/reporting/configure" | "bridge/response/device/reporting/read" | "bridge/response/group/remove" | "bridge/response/group/add" | "bridge/response/group/rename" | "bridge/response/group/options" | "bridge/response/group/members/add" | "bridge/response/group/members/remove" | "bridge/response/group/members/remove_all" | "bridge/response/touchlink/factory_reset" | "bridge/response/touchlink/scan" | "bridge/response/touchlink/identify" | "bridge/response/action";
|
||||
export type Zigbee2MQTTRequest<T extends Zigbee2MQTTRequestEndpoints> = {
|
||||
transaction?: string;
|
||||
} & Zigbee2MQTTAPI[T];
|
||||
export type Zigbee2MQTTResponseOK<T extends Zigbee2MQTTResponseEndpoints> = {
|
||||
status: "ok";
|
||||
data: Zigbee2MQTTAPI[T];
|
||||
transaction?: string;
|
||||
};
|
||||
export type Zigbee2MQTTResponseError = {
|
||||
status: "error";
|
||||
data: Record<string, never>;
|
||||
error: string;
|
||||
transaction?: string;
|
||||
};
|
||||
export type Zigbee2MQTTResponse<T extends Zigbee2MQTTResponseEndpoints> = Zigbee2MQTTResponseOK<T> | Zigbee2MQTTResponseError;
|
||||
//# sourceMappingURL=api.d.ts.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
declare function joinPath(file: string): string;
|
||||
declare function getPath(): string;
|
||||
declare function _testReload(): void;
|
||||
declare const _default: {
|
||||
joinPath: typeof joinPath;
|
||||
getPath: typeof getPath;
|
||||
_testReload: typeof _testReload;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=data.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../lib/util/data.ts"],"names":[],"mappings":"AAQA,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtC;AAED,iBAAS,OAAO,IAAI,MAAM,CAEzB;AAED,iBAAS,WAAW,IAAI,IAAI,CAE3B"}
|
||||
Vendored
-34
@@ -1,34 +0,0 @@
|
||||
import winston from "winston";
|
||||
import * as settings from "./settings";
|
||||
declare class Logger {
|
||||
private level;
|
||||
private output;
|
||||
private directory;
|
||||
private logger;
|
||||
private fileTransport;
|
||||
private debugNamespaceIgnoreRegex?;
|
||||
private namespacedLevels;
|
||||
private cachedNamespacedLevels;
|
||||
init(): void;
|
||||
get winston(): winston.Logger;
|
||||
addTransport(transport: winston.transport): void;
|
||||
removeTransport(transport: winston.transport): void;
|
||||
getDebugNamespaceIgnore(): string;
|
||||
setDebugNamespaceIgnore(value: string): void;
|
||||
getLevel(): settings.LogLevel;
|
||||
setLevel(level: settings.LogLevel): void;
|
||||
getNamespacedLevels(): Record<string, settings.LogLevel>;
|
||||
setNamespacedLevels(nsLevels: Record<string, settings.LogLevel>): void;
|
||||
private resetCachedNamespacedLevels;
|
||||
private cacheNamespacedLevel;
|
||||
private log;
|
||||
error(messageOrLambda: string | (() => string), namespace?: string): void;
|
||||
warning(messageOrLambda: string | (() => string), namespace?: string): void;
|
||||
info(messageOrLambda: string | (() => string), namespace?: string): void;
|
||||
debug(messageOrLambda: string | (() => string), namespace?: string): void;
|
||||
private cleanup;
|
||||
end(): Promise<void>;
|
||||
}
|
||||
declare const _default: Logger;
|
||||
export default _default;
|
||||
//# sourceMappingURL=logger.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/util/logger.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AAIvC,cAAM,MAAM;IACR,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,aAAa,CAAuD;IAC5E,OAAO,CAAC,yBAAyB,CAAC,CAAS;IAC3C,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,sBAAsB,CAAqC;IAE5D,IAAI,IAAI,IAAI,CA6GlB;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,CAE5B;IAEM,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI,CAEtD;IAEM,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI,CAEzD;IAEM,uBAAuB,IAAI,MAAM,CAEvC;IAEM,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAElD;IAEM,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAEnC;IAEM,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAG9C;IAEM,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAE9D;IAEM,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAG5E;IAED,OAAO,CAAC,2BAA2B;IAInC,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,GAAG;IASJ,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAE9E;IAEM,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAEhF;IAEM,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAE7E;IAEM,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAM9E;IAGD,OAAO,CAAC,OAAO;IA0BF,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBhC;CAEJ"}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
/** Anything mergeable: a plain-ish object, explicitly not an array or another iterable. */
|
||||
export type UnknownRecord = Record<string | number, unknown> & {
|
||||
[Symbol.iterator]?: never;
|
||||
};
|
||||
/**
|
||||
* Merge all sources into `target` recursively.
|
||||
*
|
||||
* Key behavior:
|
||||
* - ignore properties `__proto__`, `constructor` & `prototype`
|
||||
* - assumes no infinite circular possible (unhandled for perf)
|
||||
*
|
||||
* Pass empty object `{}` as `target` to return a new object without modifying any existing objects.
|
||||
*/
|
||||
export declare function objectAssignDeep<T extends UnknownRecord, S extends readonly UnknownRecord[]>(target: T, ...sources: S): T & UnionToIntersection<S[number]>;
|
||||
//# sourceMappingURL=objectAssignDeep.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"objectAssignDeep.d.ts","sourceRoot":"","sources":["../../lib/util/objectAssignDeep.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAA;CAAC,CAAC;AA+B3F;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,SAAS,aAAa,EAAE,EACxF,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,CAAC,GACd,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAsBpC"}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
export declare function onboard(): Promise<boolean>;
|
||||
//# sourceMappingURL=onboarding.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../lib/util/onboarding.ts"],"names":[],"mappings":"AAgQA,wBAAsB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAgEhD"}
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Handle sd_notify protocol, @see https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html
|
||||
* No-op if running on unsupported platforms or without Type=notify
|
||||
* Soft-fails if improperly setup (this is not necessary for Zigbee2MQTT to function properly)
|
||||
*/
|
||||
export declare function initSdNotify(): Promise<{
|
||||
notifyStopping: () => void;
|
||||
stop: () => void;
|
||||
} | undefined>;
|
||||
//# sourceMappingURL=sd-notify.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"sd-notify.d.ts","sourceRoot":"","sources":["../../lib/util/sd-notify.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAC,GAAG,SAAS,CAAC,CA0DxG"}
|
||||
Vendored
-238
@@ -1,238 +0,0 @@
|
||||
import schemaJson from "./settings.schema.json";
|
||||
export { schemaJson };
|
||||
export declare const CURRENT_VERSION = 5;
|
||||
/** NOTE: by order of priority, lower index is lower level (more important) */
|
||||
export declare const LOG_LEVELS: readonly string[];
|
||||
export type LogLevel = "error" | "warning" | "info" | "debug";
|
||||
export declare const defaults: {
|
||||
homeassistant: {
|
||||
enabled: false;
|
||||
discovery_topic: string;
|
||||
status_topic: string;
|
||||
legacy_action_sensor: false;
|
||||
experimental_event_entities: false;
|
||||
};
|
||||
availability: {
|
||||
enabled: false;
|
||||
active: {
|
||||
timeout: number;
|
||||
max_jitter: number;
|
||||
backoff: true;
|
||||
pause_on_backoff_gt: number;
|
||||
};
|
||||
passive: {
|
||||
timeout: number;
|
||||
};
|
||||
};
|
||||
frontend: {
|
||||
enabled: false;
|
||||
package: "zigbee2mqtt-windfront";
|
||||
port: number;
|
||||
base_url: string;
|
||||
};
|
||||
mqtt: {
|
||||
base_topic: string;
|
||||
include_device_information: false;
|
||||
force_disable_retain: false;
|
||||
maximum_packet_size: number;
|
||||
keepalive: number;
|
||||
reject_unauthorized: true;
|
||||
version: 4;
|
||||
};
|
||||
serial: {
|
||||
disable_led: false;
|
||||
};
|
||||
passlist: never[];
|
||||
blocklist: never[];
|
||||
map_options: {
|
||||
graphviz: {
|
||||
colors: {
|
||||
fill: {
|
||||
enddevice: string;
|
||||
coordinator: string;
|
||||
router: string;
|
||||
};
|
||||
font: {
|
||||
coordinator: string;
|
||||
router: string;
|
||||
enddevice: string;
|
||||
};
|
||||
line: {
|
||||
active: string;
|
||||
inactive: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
ota: {
|
||||
update_check_interval: number;
|
||||
disable_automatic_update_check: false;
|
||||
image_block_request_timeout: number;
|
||||
image_block_response_delay: number;
|
||||
default_maximum_data_size: number;
|
||||
};
|
||||
device_options: {};
|
||||
advanced: {
|
||||
log_rotation: true;
|
||||
log_console_json: false;
|
||||
log_symlink_current: false;
|
||||
log_output: ("console" | "file")[];
|
||||
log_directory: string;
|
||||
log_file: string;
|
||||
log_level: "debug" | "info";
|
||||
log_namespaced_levels: {};
|
||||
log_syslog: {};
|
||||
log_debug_to_mqtt_frontend: false;
|
||||
log_debug_namespace_ignore: string;
|
||||
log_directories_to_keep: number;
|
||||
pan_id: number;
|
||||
ext_pan_id: number[];
|
||||
channel: number;
|
||||
adapter_concurrent: undefined;
|
||||
adapter_delay: undefined;
|
||||
cache_state: true;
|
||||
cache_state_persistent: true;
|
||||
cache_state_send_on_startup: true;
|
||||
last_seen: "disable";
|
||||
elapsed: false;
|
||||
network_key: number[];
|
||||
timestamp_format: string;
|
||||
output: "json";
|
||||
enable_external_js: true;
|
||||
};
|
||||
health: {
|
||||
interval: number;
|
||||
reset_on_check: false;
|
||||
};
|
||||
};
|
||||
export declare function writeMinimalDefaults(): void;
|
||||
export declare function setOnboarding(value: boolean): void;
|
||||
export declare function write(): void;
|
||||
export declare function validate(): string[];
|
||||
export declare function validateNonRequired(): string[];
|
||||
/**
|
||||
* Get the settings actually written in the yaml.
|
||||
* Env vars are applied on top.
|
||||
* Defaults merged on startup are not included.
|
||||
*/
|
||||
export declare function getPersistedSettings(): Partial<Settings>;
|
||||
export declare function get(): Settings;
|
||||
export declare function set(path: string[], value: string | number | boolean | KeyValue): void;
|
||||
export declare function apply(settings: Record<string, unknown>, throwOnError?: boolean): boolean;
|
||||
export declare function getGroup(IDorName: string | number): GroupOptions | undefined;
|
||||
export declare function getDevice(IDorName: string): DeviceOptionsWithId | undefined;
|
||||
export declare function addDevice(id: string): DeviceOptionsWithId;
|
||||
export declare function blockDevice(id: string): void;
|
||||
export declare function removeDevice(IDorName: string): void;
|
||||
export declare function addGroup(name: string, id?: string): GroupOptions;
|
||||
export declare function removeGroup(IDorName: string | number): void;
|
||||
export declare function changeEntityOptions(IDorName: string, newOptions: KeyValue): boolean;
|
||||
export declare function changeFriendlyName(IDorName: string, newName: string): void;
|
||||
export declare function reRead(): void;
|
||||
export declare const testing: {
|
||||
write: typeof write;
|
||||
clear: () => void;
|
||||
defaults: {
|
||||
homeassistant: {
|
||||
enabled: false;
|
||||
discovery_topic: string;
|
||||
status_topic: string;
|
||||
legacy_action_sensor: false;
|
||||
experimental_event_entities: false;
|
||||
};
|
||||
availability: {
|
||||
enabled: false;
|
||||
active: {
|
||||
timeout: number;
|
||||
max_jitter: number;
|
||||
backoff: true;
|
||||
pause_on_backoff_gt: number;
|
||||
};
|
||||
passive: {
|
||||
timeout: number;
|
||||
};
|
||||
};
|
||||
frontend: {
|
||||
enabled: false;
|
||||
package: "zigbee2mqtt-windfront";
|
||||
port: number;
|
||||
base_url: string;
|
||||
};
|
||||
mqtt: {
|
||||
base_topic: string;
|
||||
include_device_information: false;
|
||||
force_disable_retain: false;
|
||||
maximum_packet_size: number;
|
||||
keepalive: number;
|
||||
reject_unauthorized: true;
|
||||
version: 4;
|
||||
};
|
||||
serial: {
|
||||
disable_led: false;
|
||||
};
|
||||
passlist: never[];
|
||||
blocklist: never[];
|
||||
map_options: {
|
||||
graphviz: {
|
||||
colors: {
|
||||
fill: {
|
||||
enddevice: string;
|
||||
coordinator: string;
|
||||
router: string;
|
||||
};
|
||||
font: {
|
||||
coordinator: string;
|
||||
router: string;
|
||||
enddevice: string;
|
||||
};
|
||||
line: {
|
||||
active: string;
|
||||
inactive: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
ota: {
|
||||
update_check_interval: number;
|
||||
disable_automatic_update_check: false;
|
||||
image_block_request_timeout: number;
|
||||
image_block_response_delay: number;
|
||||
default_maximum_data_size: number;
|
||||
};
|
||||
device_options: {};
|
||||
advanced: {
|
||||
log_rotation: true;
|
||||
log_console_json: false;
|
||||
log_symlink_current: false;
|
||||
log_output: ("console" | "file")[];
|
||||
log_directory: string;
|
||||
log_file: string;
|
||||
log_level: "debug" | "info";
|
||||
log_namespaced_levels: {};
|
||||
log_syslog: {};
|
||||
log_debug_to_mqtt_frontend: false;
|
||||
log_debug_namespace_ignore: string;
|
||||
log_directories_to_keep: number;
|
||||
pan_id: number;
|
||||
ext_pan_id: number[];
|
||||
channel: number;
|
||||
adapter_concurrent: undefined;
|
||||
adapter_delay: undefined;
|
||||
cache_state: true;
|
||||
cache_state_persistent: true;
|
||||
cache_state_send_on_startup: true;
|
||||
last_seen: "disable";
|
||||
elapsed: false;
|
||||
network_key: number[];
|
||||
timestamp_format: string;
|
||||
output: "json";
|
||||
enable_external_js: true;
|
||||
};
|
||||
health: {
|
||||
interval: number;
|
||||
reset_on_check: false;
|
||||
};
|
||||
};
|
||||
CURRENT_VERSION: number;
|
||||
};
|
||||
//# sourceMappingURL=settings.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../lib/util/settings.ts"],"names":[],"mappings":"AAKA,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAIhD,OAAO,EAAC,UAAU,EAAC,CAAC;AAGpB,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,8EAA8E;AAC9E,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAmD,CAAC;AAC5F,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAY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Y,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAKnD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAiChE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO3D;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,GAAG,OAAO,CAiCnF;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAwB1E;AAED,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,eAAO,MAAM,OAAO;;iBAEL,IAAI;;;;;;;;;;;;;;;;;;gBA/pBD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;YAwBjB,QAAQ;gBACJ,MAAM;oBACF,IAAI;wBACA,SAAS;wBACT,WAAW;wBACX,MAAM;;oBAEV,IAAI;wBACA,WAAW;wBACX,MAAM;wBACN,SAAS;;oBAEb,IAAI;wBACA,MAAM;wBACN,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+nB3B,CAAC"}
|
||||
Vendored
-1019
File diff suppressed because it is too large
Load Diff
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Order of execution:
|
||||
* - Transfer
|
||||
* - Change
|
||||
* - Add
|
||||
* - Remove
|
||||
*
|
||||
* Should allow the most flexibility whenever combination of migrations is necessary (e.g. Transfer + Change)
|
||||
*/
|
||||
export declare function migrateIfNecessary(): void;
|
||||
//# sourceMappingURL=settingsMigration.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"settingsMigration.d.ts","sourceRoot":"","sources":["../../lib/util/settingsMigration.ts"],"names":[],"mappings":"AAshBA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAoGzC"}
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
export type StaticFileServer = (request: IncomingMessage, response: ServerResponse) => void;
|
||||
/** Terminal `404` handler for requests no file matched, mirroring the response `finalhandler` used to produce. */
|
||||
export declare function sendNotFound(request: IncomingMessage, response: ServerResponse): void;
|
||||
/**
|
||||
* Serves `dir` on top of a plain `node:http` server, preferring the precompressed `.br`/`.gz` variant of a file when the client accepts it.
|
||||
*
|
||||
* Requests that match no file are answered by {@link sendNotFound}.
|
||||
*/
|
||||
export declare function createStaticFileServer(dir: string, logError: (message: string) => void): StaticFileServer;
|
||||
//# sourceMappingURL=staticFileServer.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"staticFileServer.d.ts","sourceRoot":"","sources":["../../lib/util/staticFileServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAI/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;AAI5F,kHAAkH;AAClH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAYrF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAoCzG"}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
export declare function stringify(value: object): string;
|
||||
//# sourceMappingURL=stringify.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../lib/util/stringify.ts"],"names":[],"mappings":"AA2JA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
||||
Vendored
-96
@@ -1,96 +0,0 @@
|
||||
import type * as zhc from "zigbee-herdsman-converters";
|
||||
import type { Zigbee2MQTTAPI, Zigbee2MQTTResponse, Zigbee2MQTTResponseEndpoints, Zigbee2MQTTScene } from "../types/api";
|
||||
export declare const DEFAULT_BIND_GROUP_ID = 901;
|
||||
declare function capitalize(s: string): string;
|
||||
export declare function getZigbee2MQTTVersion(includeCommitHash?: boolean): Promise<{
|
||||
commitHash?: string;
|
||||
version: string;
|
||||
}>;
|
||||
declare function getDependencyVersion(depend: string): Promise<{
|
||||
version: string;
|
||||
}>;
|
||||
declare function formatDate(time: number, type: "ISO_8601" | "ISO_8601_local" | "epoch" | "relative"): string | number;
|
||||
declare function objectIsEmpty(object: object): boolean;
|
||||
declare function objectHasProperties(object: {
|
||||
[s: string]: unknown;
|
||||
}, properties: string[]): boolean;
|
||||
declare function equalsPartial(object: KeyValue, expected: KeyValue): boolean;
|
||||
declare function getObjectProperty<T>(object: KeyValue, key: string, defaultValue: NoInfer<T>): T;
|
||||
declare function getResponse<T extends Zigbee2MQTTResponseEndpoints>(request: KeyValue | string, data: Zigbee2MQTTAPI[T], error?: string): Zigbee2MQTTResponse<T>;
|
||||
declare function parseJSON(value: string, fallback: string): KeyValue | string;
|
||||
/**
|
||||
* Delete all keys from passed object that have null/undefined values.
|
||||
*
|
||||
* @param {KeyValue} obj Object to process (in-place)
|
||||
* @param {string[]} [ignoreKeys] Recursively ignore these keys in the object (keep null/undefined values).
|
||||
*/
|
||||
declare function removeNullPropertiesFromObject(obj: KeyValue, ignoreKeys?: string[]): void;
|
||||
declare function toNetworkAddressHex(value: number): string;
|
||||
declare function getAllFiles(path_: string): string[];
|
||||
declare function validateFriendlyName(name: string, throwFirstError?: boolean): string[];
|
||||
declare function sleep(seconds: number): Promise<void>;
|
||||
declare function sanitizeImageParameter(parameter: string): string;
|
||||
declare function isAvailabilityEnabledForEntity(entity: Device | Group, settings: Settings): boolean;
|
||||
declare function isZHEndpoint(obj: unknown): obj is zh.Endpoint;
|
||||
declare function flatten<Type>(arr: Type[][]): Type[];
|
||||
declare function arrayUnique<Type>(arr: Type[]): Type[];
|
||||
declare function isZHGroup(obj: unknown): obj is zh.Group;
|
||||
export declare const hours: (hours: number) => number;
|
||||
export declare const minutes: (minutes: number) => number;
|
||||
export declare const seconds: (seconds: number) => number;
|
||||
declare function publishLastSeen(data: eventdata.LastSeenChanged, settings: Settings, allowMessageEmitted: boolean, publishEntityState: PublishEntityState): Promise<void>;
|
||||
declare function filterProperties(filter: string[] | undefined, data: KeyValue): void;
|
||||
export declare function isNumericExpose(expose: zhc.Expose): expose is zhc.Numeric;
|
||||
export declare function assertEnumExpose(expose: zhc.Expose): asserts expose is zhc.Enum;
|
||||
export declare function assertNumericExpose(expose: zhc.Expose): asserts expose is zhc.Numeric;
|
||||
export declare function assertBinaryExpose(expose: zhc.Expose): asserts expose is zhc.Binary;
|
||||
export declare function isEnumExpose(expose: zhc.Expose): expose is zhc.Enum;
|
||||
export declare function isBinaryExpose(expose: zhc.Expose): expose is zhc.Binary;
|
||||
export declare function isLightExpose(expose: zhc.Expose): expose is zhc.Light;
|
||||
export declare function assertString(value: unknown, property: string): asserts value is string;
|
||||
declare function getScenes(entity: zh.Endpoint | zh.Group): Zigbee2MQTTScene[];
|
||||
declare function deviceNotCoordinator(device: zh.Device): boolean;
|
||||
declare function matchBase64File(value: string | undefined): {
|
||||
extension: string;
|
||||
data: string;
|
||||
} | false;
|
||||
declare function saveBase64DeviceIcon(base64Match: {
|
||||
extension: string;
|
||||
data: string;
|
||||
}): string;
|
||||
declare const noop: () => void;
|
||||
declare const _default: {
|
||||
matchBase64File: typeof matchBase64File;
|
||||
saveBase64DeviceIcon: typeof saveBase64DeviceIcon;
|
||||
capitalize: typeof capitalize;
|
||||
getZigbee2MQTTVersion: typeof getZigbee2MQTTVersion;
|
||||
getDependencyVersion: typeof getDependencyVersion;
|
||||
formatDate: typeof formatDate;
|
||||
objectIsEmpty: typeof objectIsEmpty;
|
||||
objectHasProperties: typeof objectHasProperties;
|
||||
equalsPartial: typeof equalsPartial;
|
||||
getObjectProperty: typeof getObjectProperty;
|
||||
getResponse: typeof getResponse;
|
||||
parseJSON: typeof parseJSON;
|
||||
removeNullPropertiesFromObject: typeof removeNullPropertiesFromObject;
|
||||
toNetworkAddressHex: typeof toNetworkAddressHex;
|
||||
isZHEndpoint: typeof isZHEndpoint;
|
||||
isZHGroup: typeof isZHGroup;
|
||||
hours: typeof hours;
|
||||
minutes: typeof minutes;
|
||||
seconds: typeof seconds;
|
||||
validateFriendlyName: typeof validateFriendlyName;
|
||||
sleep: typeof sleep;
|
||||
sanitizeImageParameter: typeof sanitizeImageParameter;
|
||||
isAvailabilityEnabledForEntity: typeof isAvailabilityEnabledForEntity;
|
||||
publishLastSeen: typeof publishLastSeen;
|
||||
getAllFiles: typeof getAllFiles;
|
||||
filterProperties: typeof filterProperties;
|
||||
flatten: typeof flatten;
|
||||
arrayUnique: typeof arrayUnique;
|
||||
getScenes: typeof getScenes;
|
||||
deviceNotCoordinator: typeof deviceNotCoordinator;
|
||||
noop: typeof noop;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/util/utils.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,GAAG,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAC,cAAc,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAMtH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAkBzC,iBAAS,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAErC;AAED,wBAAsB,qBAAqB,CAAC,iBAAiB,UAAO,GAAG,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CA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IAAI,QAAO,IAAU,CAAC"}
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
import { YAMLException } from "js-yaml";
|
||||
export declare class YAMLFileException extends YAMLException {
|
||||
file: string;
|
||||
constructor(error: YAMLException, file: string);
|
||||
}
|
||||
declare function read(file: string): KeyValue;
|
||||
declare function readIfExists(file: string, fallback?: KeyValue): KeyValue;
|
||||
declare function writeIfChanged(file: string, content: KeyValue): void;
|
||||
declare function updateIfChanged(file: string, key: string, value: KeyValue): void;
|
||||
declare const _default: {
|
||||
read: typeof read;
|
||||
readIfExists: typeof readIfExists;
|
||||
updateIfChanged: typeof updateIfChanged;
|
||||
writeIfChanged: typeof writeIfChanged;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=yaml.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../lib/util/yaml.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,aAAa,EAAC,MAAM,SAAS,CAAC;AAElD,qBAAa,iBAAkB,SAAQ,aAAa;IAChD,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAQ7C;CACJ;AAED,iBAAS,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAYpC;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,QAAa,GAAG,QAAQ,CAErE;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAM7D;AAED,iBAAS,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAMzE"}
|
||||
Vendored
-57
@@ -1,57 +0,0 @@
|
||||
import { Controller } from "zigbee-herdsman";
|
||||
import Device from "./model/device";
|
||||
import Group from "./model/group";
|
||||
export default class Zigbee {
|
||||
#private;
|
||||
private eventBus;
|
||||
private groupLookup;
|
||||
private deviceLookup;
|
||||
private coordinatorIeeeAddr;
|
||||
constructor(eventBus: EventBus);
|
||||
get zhController(): Controller;
|
||||
start(abortSignal: AbortSignal): Promise<boolean>;
|
||||
private logDeviceInterview;
|
||||
private generateNetworkKey;
|
||||
private generateExtPanID;
|
||||
private generatePanID;
|
||||
getCoordinatorVersion(): Promise<zh.CoordinatorVersion>;
|
||||
isStopping(): boolean;
|
||||
backup(): Promise<void>;
|
||||
coordinatorCheck(): Promise<{
|
||||
missingRouters: Device[];
|
||||
}>;
|
||||
getNetworkParameters(): Promise<zh.NetworkParameters>;
|
||||
stop(): Promise<void>;
|
||||
getPermitJoin(): boolean;
|
||||
getPermitJoinEnd(): number | undefined;
|
||||
permitJoin(time: number, device?: Device): Promise<void>;
|
||||
resolveDevicesDefinitions(ignoreCache?: boolean, abortSignal?: AbortSignal | undefined): Promise<void>;
|
||||
private resolveDevice;
|
||||
private resolveGroup;
|
||||
resolveEntity(key: string | number | zh.Device): Device | Group | undefined;
|
||||
resolveEntityAndEndpoint(id: string): {
|
||||
ID: string;
|
||||
entity: Device | Group | undefined;
|
||||
endpointID?: string;
|
||||
endpoint?: zh.Endpoint;
|
||||
};
|
||||
firstCoordinatorEndpoint(): zh.Endpoint;
|
||||
devicesAndGroupsIterator(devicePredicate?: (value: zh.Device) => boolean, groupPredicate?: (value: zh.Group) => boolean): Generator<Device | Group>;
|
||||
groupsIterator(predicate?: (value: zh.Group) => boolean): Generator<Group>;
|
||||
devicesIterator(predicate?: (value: zh.Device) => boolean): Generator<Device>;
|
||||
private acceptJoiningDeviceHandler;
|
||||
touchlinkFactoryResetFirst(): Promise<boolean>;
|
||||
touchlinkFactoryReset(ieeeAddr: string, channel: number): Promise<boolean>;
|
||||
addInstallCode(installCode: string): Promise<void>;
|
||||
touchlinkIdentify(ieeeAddr: string, channel: number): Promise<void>;
|
||||
touchlinkScan(): Promise<{
|
||||
ieeeAddr: string;
|
||||
channel: number;
|
||||
}[]>;
|
||||
createGroup(id: number): Group;
|
||||
deviceByNetworkAddress(networkAddress: number): Device | undefined;
|
||||
groupByID(id: number): Group | undefined;
|
||||
removeDeviceFromLookup(ieee: string): boolean;
|
||||
removeGroupFromLookup(id: number): boolean;
|
||||
}
|
||||
//# sourceMappingURL=zigbee.d.ts.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"zigbee.d.ts","sourceRoot":"","sources":["../lib/zigbee.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,KAAK,MAAM,eAAe,CAAC;AASlC,MAAM,CAAC,OAAO,OAAO,MAAM;;IAEvB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,WAAW,CAA2C;IAC9D,OAAO,CAAC,YAAY,CAAgD;IACpE,OAAO,CAAC,mBAAmB,CAAU;IAErC,YAAY,QAAQ,EAAE,QAAQ,EAE7B;IAED,IAAI,YAAY,eAEf;IAEK,KAAK,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CA6JtD;IAED,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,aAAa;IAMf,qBAAqB,IAAI,OAAO,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAE5D;IAED,UAAU,IAAI,OAAO,CAEpB;IAEK,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5B;IAEK,gBAAgB,IAAI,OAAO,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAI5D;IAEK,oBAAoB,IAAI,OAAO,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAE1D;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAI1B;IAED,a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,CAAC,CAEnD;IAEK,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/E;IAEK,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvD;IAEK,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExE;IAEK,aAAa,IAAI,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC,CAEpE;IAED,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAI7B;IAED,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGjE;IAED,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAEvC;IAED,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5C;IAED,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEzC;CACJ"}
|
||||
@@ -0,0 +1,21 @@
|
||||
FROM node:10-alpine
|
||||
|
||||
# Copy files
|
||||
ADD . /app
|
||||
RUN cp /app/data/configuration.yaml /app
|
||||
RUN cp /app/docker/run.sh /app
|
||||
RUN chmod +x /app/run.sh
|
||||
WORKDIR /app
|
||||
|
||||
# Write .hash.json
|
||||
ARG COMMIT
|
||||
RUN echo "{\"hash\": \"$COMMIT\"}" > .hash.json
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --update --no-cache tzdata udev eudev && \
|
||||
apk add --update --no-cache --virtual .buildtools make gcc g++ python linux-headers udev git && \
|
||||
npm install --unsafe-perm --production && \
|
||||
apk del .buildtools
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
@@ -0,0 +1 @@
|
||||
qemu-aarch64-static and qemu-arm-static are taken from https://github.com/resin-io/qemu/releases/tag/v2.9.0%2Bresin1
|
||||
@@ -0,0 +1,14 @@
|
||||
version: '3'
|
||||
services:
|
||||
zigbee2mqtt:
|
||||
container_name: zigbee2mqtt
|
||||
image: koenkk/zigbee2mqtt
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
devices:
|
||||
# CC251
|
||||
#- /dev/ttyUSB_cc2531:/dev/ttyACM0
|
||||
# CC2530 / GBAN GB2530S
|
||||
#- /dev/ttyUSB_cc2530:/dev/ttyACM0
|
||||
restart: always
|
||||
network_mode: host
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -z "$ZIGBEE2MQTT_DATA" ]; then
|
||||
DATA="$ZIGBEE2MQTT_DATA"
|
||||
else
|
||||
DATA="/app/data"
|
||||
fi
|
||||
|
||||
echo "Using '$DATA' as data directory"
|
||||
|
||||
if [ ! -f "$DATA/configuration.yaml" ]; then
|
||||
echo "Creating configuration file..."
|
||||
cp /app/configuration.yaml "$DATA/configuration.yaml"
|
||||
fi
|
||||
|
||||
exec npm start
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 244 KiB |
Executable
+146
@@ -0,0 +1,146 @@
|
||||
<svg class="thumb" width="1000" height="1000" viewBox="0,0,600,600" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns1="http://www.inkscape.org/namespaces/inkscape" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<defs></defs>
|
||||
<g transform="matrix(1.8288,0,0,1.8288,-76.3478,13.5303)">
|
||||
<g transform="matrix(1.6652,0,0,1.6704,50.2843,0.6537)">
|
||||
<svg width="186.77" height="186.769" viewBox="-5,-5,186.77,186.769">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk4">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<polygon points="51.774,176.769 0,124.995 0,51.774 51.774,0 124.995,0 176.77,51.774 176.77,124.995 124.995,176.769 " fill="url('#linearGradientSk1zes2vk4')"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6204,0,0,1.6204,53.946,5.3)">
|
||||
<svg width="186.77" height="186.769" viewBox="-5,-5,186.77,186.769">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vka">
|
||||
<stop offset="0%" stop-color="#ffc038"></stop>
|
||||
<stop offset="100%" stop-color="#ffc038"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<polygon points="51.774,176.769 0,124.995 0,51.774 51.774,0 124.995,0 176.77,51.774 176.77,124.995 124.995,176.769 " fill="url('#linearGradientSk1zes2vka')"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6146,0,0,1.6146,185.8484,123.0829)">
|
||||
<svg width="27.265" height="16.606891038197716" viewBox="36.308,71.828,27.265,16.606891038197716">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vkg">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<path d="M41.308,76.828c1.197,2.07,2.931,3.953,5.371,5.497c0,0,1.453,1.163,3.373,1.108c1.918,0.051,3.375-1.107,3.375-1.107 c2.289-1.446,3.958-3.192,5.146-5.112c-2.274,0.496-4.875,0.754-7.556,0.754C47.714,77.968,44.316,77.583,41.308,76.828z" fill="url('#linearGradientSk1zes2vkg')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6146,0,0,1.6146,182.6191,109.0829)">
|
||||
<svg width="31.991999999999997" height="16.800092191011956" viewBox="34.051,63.36,31.991999999999997,16.800092191011956">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vkm">
|
||||
<stop offset="0%" stop-color="#ffffff"></stop>
|
||||
<stop offset="100%" stop-color="#ffffff"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<path d="M39.051,68.36c0.055,1.736,0.307,3.47,0.818,5.141c5.94,2.063,15.1,2.206,20.244,0.407c0.563-1.692,0.85-3.453,0.93-5.221 c-2.995,0.938-6.551,1.364-10.114,1.364C46.659,70.052,42.394,69.434,39.051,68.36z" fill="url('#linearGradientSk1zes2vkm')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6146,0,0,1.6146,182.6191,96.0829)">
|
||||
<svg width="31.867999999999995" height="16.630912092367097" viewBox="34.128,55.641000000000005,31.867999999999995,16.630912092367097">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vks">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<path d="M50.929,62.06c-3.902,0-7.81-0.511-11.006-1.419c-0.373,1.537-0.658,3.156-0.795,4.812 c5.78,2.114,15.619,2.598,21.868,0.309c-0.119-1.662-0.384-3.297-0.745-4.846C57.427,61.692,54.187,62.06,50.929,62.06z" fill="url('#linearGradientSk1zes2vks')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6146,0,0,1.6146,185.041,84.8902)">
|
||||
<svg width="28.836000000000006" height="15.788046460420631" viewBox="35.678,48.491,28.836000000000006,15.788046460420631">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vky">
|
||||
<stop offset="0%" stop-color="#ffffff"></stop>
|
||||
<stop offset="100%" stop-color="#ffffff"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<path d="M59.514,58.241c-0.571-1.815-1.232-3.435-1.862-4.75c-2.599,0.543-5.42,0.809-8.212,0.809 c-2.458,0-4.881-0.204-7.097-0.579c-0.564,1.205-1.146,2.646-1.665,4.246C46.062,59.501,53.848,59.813,59.514,58.241z" fill="url('#linearGradientSk1zes2vky')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(1.6146,0,0,1.6146,120.4554,23.9828)">
|
||||
<svg width="108.32981691822947" height="57.54144295152284" viewBox="-4.359346882061053,10.889,108.32981691822947,57.54144295152284">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk14">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g>
|
||||
<path d="M58.786,38.047c-0.651-1.481-1.406-2.589-1.406-2.589c-0.11-0.123-0.253-0.232-0.394-0.342 c0.422-1.017,0.659-2.14,0.659-3.324c0-3.374-1.896-6.271-4.6-7.523l2.116-7.369l6.143-0.228c0.215-0.007,0.382-0.188,0.378-0.405 c-0.008-0.215-0.19-0.375-0.406-0.378l-6.396,0.238c-0.152,0.006-0.287,0.095-0.346,0.239l-3.563,7.305 c-0.302-0.039-0.607-0.065-0.92-0.065c-0.314,0-0.621,0.026-0.924,0.066l-3.565-7.308c-0.058-0.138-0.193-0.23-0.349-0.237 l-6.393-0.236c-0.216-0.001-0.396,0.161-0.407,0.376c-0.006,0.218,0.163,0.398,0.38,0.405l6.143,0.23l2.118,7.368 c-2.703,1.252-4.598,4.147-4.597,7.52c0,1.184,0.239,2.307,0.659,3.323c-0.148,0.11-0.288,0.223-0.393,0.344 c0,0-0.739,1.108-1.38,2.663C29.184,41.662-2.639,46.12,0.916,55.936c3.944,10.877,25.455,7.546,29.052,4.598 c5.007-4.104,9.231-7.95,11.843-11c0.224,0.512,0.459,0.979,0.694,1.396c4.583,0.822,10.289,0.82,14.998-0.245 c0.166-0.346,0.332-0.731,0.496-1.137c2.625,3.011,6.768,6.769,11.648,10.77c3.596,2.949,25.106,6.275,29.048-4.599 C102.202,46.038,71.295,41.566,58.786,38.047z" fill="url('#linearGradientSk1zes2vk14')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(0.5515,-0.0096,0.0096,0.5515,184.0296,161.5473)">
|
||||
<svg width="91.9" height="160" style="overflow: visible;">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk1g">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g transform="matrix(1,0,0,1,0,75)">
|
||||
<path d="M 28.2-77.4L 28.2-77.4L 28.2 5.4Q 28.2 7.3 27.35 8.15Q 26.5 9 24.6 9L 24.6 9L 10.1 9Q 8.2 9 7.35 8.15Q 6.5 7.3 6.5 5.4L 6.5 5.4L 6.5-77.4Q 6.5-79.3 7.35-80.15Q 8.2-81 10.1-81L 10.1-81L 24.6-81Q 26.5-81 27.35-80.15Q 28.2-79.3 28.2-77.4ZM 85.39999999999998-77.4L 85.39999999999998-77.4L 85.39999999999998 5.4Q 85.39999999999998 7.3 84.54999999999998 8.15Q 83.69999999999999 9 81.79999999999998 9L 81.79999999999998 9L 67.29999999999998 9Q 65.39999999999998 9 64.54999999999998 8.15Q 63.69999999999998 7.3 63.69999999999998 5.4L 63.69999999999998 5.4L 63.69999999999998-77.4Q 63.69999999999998-79.3 64.54999999999998-80.15Q 65.39999999999998-81 67.29999999999998-81L 67.29999999999998-81L 81.79999999999998-81Q 83.69999999999999-81 84.54999999999998-80.15Q 85.39999999999998-79.3 85.39999999999998-77.4Z" data-textpath="| |" data-text-anchor="middle" data-font-size="100" data-letterspacing="0" data-side="left" data-offset="0.5" data-dx="0" data-dy="0" data-xmlspace="preserve" data-href="" data-font="Bungee" data-font-src="/Content/clientfonts/bungee.woff" data-font-scale="contain" transform="translate(0,0)" data-x="0" data-y="0" fill="url('#linearGradientSk1zes2vk1g')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
<g transform="matrix(0.5,0,0,0.5,136.759,231)">
|
||||
<svg width="289.30000000000007" height="160" style="overflow: visible;">
|
||||
<defs>
|
||||
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk1j">
|
||||
<stop offset="0%" stop-color="#000000"></stop>
|
||||
<stop offset="100%" stop-color="#000000"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g transform="matrix(1,0,0,1,0,75)">
|
||||
<path d="M 25.4 0L 25.4 0L 10.5 0Q 8.6 0 7.75-0.85Q 6.9-1.7 6.9-3.6L 6.9-3.6L 6.9-68.4Q 6.9-70.3 7.75-71.15Q 8.6-72 10.5-72L 10.5-72L 26.6-72Q 28.2-72 29.25-71.3Q 30.3-70.6 31.2-69L 31.2-69L 40.2-52.7Q 40.7-51.8 41.05-51.4Q 41.4-51 42-51L 42-51L 42.9-51Q 43.5-51 43.85-51.4Q 44.2-51.8 44.7-52.7L 44.7-52.7L 53.6-69Q 54.5-70.6 55.55-71.3Q 56.6-72 58.2-72L 58.2-72L 74.4-72Q 76.3-72 77.15-71.15Q 78-70.3 78-68.4L 78-68.4L 78-3.6Q 78-1.7 77.15-0.85Q 76.3 0 74.4 0L 74.4 0L 59 0Q 57.1 0 56.25-0.85Q 55.4-1.7 55.4-3.6L 55.4-3.6L 55.4-38.8L 49.5-27.9Q 48.6-26.2 47.35-25.45Q 46.1-24.7 44.2-24.7L 44.2-24.7L 40.2-24.7Q 38.3-24.7 37.05-25.45Q 35.8-26.2 34.9-27.9L 34.9-27.9L 29-38.8L 29-3.6Q 29-1.7 28.15-0.85Q 27.3 0 25.4 0ZM 129.4 9L 129.4 9L 114 9Q 112.10000000000001 9 111.25 8.15Q 110.4 7.3 110.4 5.4L 110.4 5.4L 110.4-0.1Q 98.80000000000001-1.8 94.75-7.05Q 90.7-12.3 90.7-19.8L 90.7-19.8L 90.7-53Q 90.7-57.6 92.05000000000001-61.35Q 93.4-65.1 96.85000000000001-67.8Q 100.30000000000001-70.5 106.4-72Q 112.5-73.5 121.80000000000001-73.5L 121.80000000000001-73.5Q 131.10000000000002-73.5 137.15-72Q 143.2-70.5 146.65-67.8Q 150.10000000000002-65.1 151.45-61.35Q 152.8-57.6 152.8-53L 152.8-53L 152.8-19.8Q 152.8-16 151.9-12.75Q 151-9.5 148.8-7Q 146.60000000000002-4.5 142.75-2.7Q 138.9-0.9 133-0.1L 133-0.1L 133 5.4Q 133 7.3 132.15 8.15Q 131.3 9 129.4 9ZM 113.4-49.3L 113.4-22Q 113.4-20 114.9-18.65Q 116.4-17.3 121.80000000000001-17.3L 121.80000000000001-17.3Q 127.2-17.3 128.7-18.65Q 130.2-20 130.2-22L 130.2-22L 130.2-49.3Q 130.2-51.2 128.7-52.55Q 127.2-53.9 121.80000000000001-53.9L 121.80000000000001-53.9Q 116.4-53.9 114.9-52.55Q 113.4-51.2 113.4-49.3L 113.4-49.3ZM 199 0L 199 0L 182.79999999999998 0Q 180.9 0 180.04999999999998-0.85Q 179.2-1.7 179.2-3.6L 179.2-3.6L 179.2-52.7L 164.5-52.7Q 162.6-52.7 161.75-53.55Q 160.9-54.4 160.9-56.3L 160.9-56.3L 160.9-68.4Q 160.9-70.3 161.75-71.15Q 162.6-72 164.5-72L 164.5-72L 217.3-72Q 219.2-72 220.05-71.15Q 220.89999999999998-70.3 220.89999999999998-68.4L 220.89999999999998-68.4L 220.89999999999998-56.3Q 220.89999999999998-54.4 220.05-53.55Q 219.2-52.7 217.3-52.7L 217.3-52.7L 202.6-52.7L 202.6-3.6Q 202.6-1.7 201.75-0.85Q 200.89999999999998 0 199 0ZM 264.6 0L 264.6 0L 248.40000000000003 0Q 246.50000000000006 0 245.65000000000003-0.85Q 244.80000000000004-1.7 244.80000000000004-3.6L 244.80000000000004-3.6L 244.80000000000004-52.7L 230.10000000000005-52.7Q 228.20000000000005-52.7 227.35000000000005-53.55Q 226.50000000000006-54.4 226.50000000000006-56.3L 226.50000000000006-56.3L 226.50000000000006-68.4Q 226.50000000000006-70.3 227.35000000000005-71.15Q 228.20000000000005-72 230.10000000000005-72L 230.10000000000005-72L 282.90000000000003-72Q 284.80000000000007-72 285.65000000000003-71.15Q 286.50000000000006-70.3 286.50000000000006-68.4L 286.50000000000006-68.4L 286.50000000000006-56.3Q 286.50000000000006-54.4 285.65000000000003-53.55Q 284.80000000000007-52.7 282.90000000000003-52.7L 282.90000000000003-52.7L 268.20000000000005-52.7L 268.20000000000005-3.6Q 268.20000000000005-1.7 267.35-0.85Q 266.50000000000006 0 264.6 0Z" data-textpath="MQTT" data-text-anchor="middle" data-font-size="100" data-letterspacing="0" data-side="left" data-offset="0.5" data-dx="0" data-dy="0" data-xmlspace="preserve" data-href="" data-font="Bungee" data-font-src="/Content/clientfonts/bungee.woff" data-font-scale="contain" transform="translate(0,0)" data-x="0" data-y="0" fill="url('#linearGradientSk1zes2vk1j')"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,23 @@
|
||||
const semver = require('semver');
|
||||
const engines = require('./package.json').engines;
|
||||
|
||||
const version = engines.node;
|
||||
if (!semver.satisfies(process.version, version)) {
|
||||
console.log(`\t\tZigbee2mqtt requires node version ${version}, you are running ${process.version}!\n`); // eslint-disable-line
|
||||
}
|
||||
|
||||
const Controller = require('./lib/controller');
|
||||
const controller = new Controller();
|
||||
controller.start();
|
||||
|
||||
process.on('SIGINT', handleQuit);
|
||||
process.on('SIGTERM', handleQuit);
|
||||
|
||||
let stopping = false;
|
||||
|
||||
function handleQuit() {
|
||||
if (!stopping) {
|
||||
stopping = true;
|
||||
controller.stop();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,336 @@
|
||||
const MQTT = require('./mqtt');
|
||||
const Zigbee = require('./zigbee');
|
||||
const State = require('./state');
|
||||
const logger = require('./util/logger');
|
||||
const settings = require('./util/settings');
|
||||
const objectAssignDeep = require('object-assign-deep');
|
||||
const utils = require('./util/utils');
|
||||
|
||||
// Extensions
|
||||
const ExtensionEntityPublish = require('./extension/entityPublish');
|
||||
const ExtensionDeviceReceive = require('./extension/deviceReceive');
|
||||
const ExtensionNetworkMap = require('./extension/networkMap');
|
||||
const ExtensionSoftReset = require('./extension/softReset');
|
||||
const ExtensionHomeAssistant = require('./extension/homeassistant');
|
||||
const ExtensionDeviceConfigure = require('./extension/deviceConfigure');
|
||||
const ExtensionDeviceGroupMembership = require('./extension/deviceGroupMembership');
|
||||
const ExtensionBridgeConfig = require('./extension/bridgeConfig');
|
||||
const ExtensionGroups = require('./extension/groups');
|
||||
const ExtensionDeviceAvailability = require('./extension/deviceAvailability');
|
||||
const ExtensionDeviceBind = require('./extension/deviceBind');
|
||||
const ExtensionDeviceReport = require('./extension/deviceReport');
|
||||
const ExtensionDeviceEvent = require('./extension/deviceEvent');
|
||||
|
||||
class Controller {
|
||||
constructor() {
|
||||
this.zigbee = new Zigbee();
|
||||
this.mqtt = new MQTT();
|
||||
this.state = new State();
|
||||
|
||||
this.publishEntityState = this.publishEntityState.bind(this);
|
||||
this.onZigbeeAdapterDisconnected = this.onZigbeeAdapterDisconnected.bind(this);
|
||||
|
||||
// Initialize extensions.
|
||||
this.extensions = [
|
||||
new ExtensionEntityPublish(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionDeviceReceive(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionDeviceGroupMembership(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionDeviceConfigure(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionNetworkMap(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionBridgeConfig(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionGroups(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionDeviceBind(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
new ExtensionDeviceEvent(this.zigbee, this.mqtt, this.state, this.publishEntityState),
|
||||
];
|
||||
|
||||
if (settings.get().advanced.report) {
|
||||
this.extensions.push(new ExtensionDeviceReport(
|
||||
this.zigbee, this.mqtt, this.state, this.publishEntityState,
|
||||
));
|
||||
}
|
||||
|
||||
if (settings.get().homeassistant) {
|
||||
this.extensions.push(new ExtensionHomeAssistant(
|
||||
this.zigbee, this.mqtt, this.state, this.publishEntityState,
|
||||
));
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
if (settings.get().advanced.soft_reset_timeout !== 0) {
|
||||
this.extensions.push(new ExtensionSoftReset(
|
||||
this.zigbee, this.mqtt, this.state, this.publishEntityState,
|
||||
));
|
||||
}
|
||||
|
||||
if (settings.get().advanced.availability_timeout) {
|
||||
this.extensions.push(new ExtensionDeviceAvailability(
|
||||
this.zigbee, this.mqtt, this.state, this.publishEntityState,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
async start() {
|
||||
const settingsErrors = settings.validate();
|
||||
if (settingsErrors) {
|
||||
logger.error(`Refusing to start, configuration.yaml is not valid, found the following errors:`);
|
||||
for (const error of settingsErrors) {
|
||||
logger.error(`\t - ${error}`);
|
||||
}
|
||||
logger.error(
|
||||
`If you don't know how to solve this, read https://www.zigbee2mqtt.io/configuration/configuration.html`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
this.state.start();
|
||||
|
||||
const info = await utils.getZigbee2mqttVersion();
|
||||
logger.info(`Starting zigbee2mqtt version ${info.version} (commit #${info.commitHash})`);
|
||||
|
||||
// Start zigbee
|
||||
try {
|
||||
this.zigbee.on('event', this.onZigbeeEvent.bind(this));
|
||||
this.zigbee.on('adapterDisconnected', this.onZigbeeAdapterDisconnected);
|
||||
await this.zigbee.start();
|
||||
} catch (error) {
|
||||
logger.error('Failed to start zigbee');
|
||||
logger.error('Exiting...');
|
||||
logger.error(error.stack);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Log zigbee clients on startup
|
||||
const devices = this.zigbee.getClients();
|
||||
logger.info(`Currently ${devices.length} devices are joined:`);
|
||||
for (const device of devices) {
|
||||
const entity = this.zigbee.resolveEntity(device);
|
||||
logger.info(
|
||||
(entity.settings ? entity.settings.friendlyName : entity.device.ieeeAddr) +
|
||||
` (${entity.device.ieeeAddr}): ` +
|
||||
(entity.mapped ?
|
||||
`${entity.mapped.model} - ${entity.mapped.vendor} ${entity.mapped.description} ` :
|
||||
'Not supported ') +
|
||||
`(${entity.device.type})`,
|
||||
);
|
||||
}
|
||||
|
||||
// Enable zigbee join.
|
||||
if (settings.get().permit_join) {
|
||||
logger.warn('`permit_join` set to `true` in configuration.yaml.');
|
||||
logger.warn('Allowing new devices to join.');
|
||||
logger.warn('Set `permit_join` to `false` once you joined all devices.');
|
||||
}
|
||||
|
||||
this.zigbee.permitJoin(settings.get().permit_join);
|
||||
|
||||
// Call extensions
|
||||
this.callExtensionMethod('onZigbeeStarted', []);
|
||||
|
||||
// MQTT
|
||||
this.mqtt.on('message', this.onMQTTMessage.bind(this));
|
||||
await this.mqtt.connect();
|
||||
|
||||
// Send all cached states.
|
||||
if (settings.get().advanced.cache_state) {
|
||||
for (const device of this.zigbee.getClients()) {
|
||||
if (this.state.exists(device.ieeeAddr)) {
|
||||
this.publishEntityState(device.ieeeAddr, this.state.get(device.ieeeAddr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Call extensions
|
||||
await this.callExtensionMethod('onMQTTConnected', []);
|
||||
}
|
||||
|
||||
async stop() {
|
||||
// Call extensions
|
||||
await this.callExtensionMethod('stop', []);
|
||||
|
||||
// Wrap-up
|
||||
this.state.stop();
|
||||
await this.mqtt.disconnect();
|
||||
|
||||
try {
|
||||
await this.zigbee.stop();
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
logger.error('Failed to stop zigbee');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async onZigbeeAdapterDisconnected() {
|
||||
logger.error('Adapter disconnected, stopping');
|
||||
await this.stop();
|
||||
}
|
||||
|
||||
async onZigbeeEvent(type, data) {
|
||||
const entity = this.zigbee.resolveEntity(data.device || data.ieeeAddr);
|
||||
if (data.device && !entity.settings) {
|
||||
// Only deviceLeave doesn't have a device (not interesting to add to settings)
|
||||
entity.settings = settings.addDevice(data.device.ieeeAddr);
|
||||
}
|
||||
|
||||
const name = entity && entity.settings ? entity.settings.friendlyName : null;
|
||||
|
||||
if (type === 'message') {
|
||||
logger.debug(
|
||||
`Received Zigbee message from '${name}', type '${data.type}', cluster '${data.cluster}'` +
|
||||
`, data '${JSON.stringify(data.data)}' from endpoint ${data.endpoint.ID}` +
|
||||
(data.hasOwnProperty('groupID') ? ` with groupID ${data.groupID}` : ``),
|
||||
);
|
||||
} else if (type === 'deviceJoined') {
|
||||
logger.info(`Device '${name}' joined`);
|
||||
this.mqtt.log('device_connected', {friendly_name: name});
|
||||
} else if (type === 'deviceInterview') {
|
||||
if (data.status === 'successful') {
|
||||
logger.info(`Successfully interviewed '${name}', device has successfully been paired`);
|
||||
|
||||
if (entity.mapped) {
|
||||
const {vendor, description, model} = entity.mapped;
|
||||
logger.info(
|
||||
`Device '${name}' is supported, identified as: ${vendor} ${description} (${model})`,
|
||||
);
|
||||
|
||||
const log = {friendly_name: name, model, vendor, description, supported: true};
|
||||
this.mqtt.log('pairing', 'interview_successful', log);
|
||||
} else {
|
||||
logger.warn(
|
||||
`Device '${name}' with Zigbee model '${data.device.modelID}' is NOT supported, ` +
|
||||
`please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html`,
|
||||
);
|
||||
this.mqtt.log('pairing', 'interview_successful', {friendly_name: name, supported: false});
|
||||
}
|
||||
} else if (data.status === 'failed') {
|
||||
logger.error(`Failed to interview '${name}', device has not successfully been paired`);
|
||||
this.mqtt.log('pairing', 'interview_failed', {friendly_name: name});
|
||||
} else {
|
||||
/* istanbul ignore else */
|
||||
if (data.status === 'started') {
|
||||
logger.info(`Starting interview of '${name}'`);
|
||||
this.mqtt.log('pairing', 'interview_started', {friendly_name: name});
|
||||
}
|
||||
}
|
||||
} else if (type === 'deviceAnnounce') {
|
||||
logger.debug(`Device '${name}' announced itself`);
|
||||
} else {
|
||||
/* istanbul ignore else */
|
||||
if (type === 'deviceLeave') {
|
||||
logger.warn(`Device '${name || data.ieeeAddr}' left the network`);
|
||||
this.mqtt.log('device_removed', 'left_network', {friendly_name: name || data.ieeeAddr});
|
||||
}
|
||||
}
|
||||
|
||||
// Call extensions
|
||||
this.callExtensionMethod(
|
||||
'onZigbeeEvent',
|
||||
[type, data, entity ? entity.mapped : null, entity ? entity.settings : null],
|
||||
);
|
||||
}
|
||||
|
||||
onMQTTMessage(payload) {
|
||||
const {topic, message} = payload;
|
||||
logger.debug(`Received MQTT message on '${topic}' with data '${message}'`);
|
||||
|
||||
// Call extensions
|
||||
this.callExtensionMethod('onMQTTMessage', [topic, message]);
|
||||
}
|
||||
|
||||
async publishEntityState(IDorName, payload, stateChangeReason=null) {
|
||||
const entity = this.zigbee.resolveEntity(IDorName);
|
||||
if (!entity || !entity.settings) {
|
||||
logger.error(`'${IDorName}' does not exist, skipping publish`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (entity.type === 'device' && settings.get().advanced.last_seen !== 'disable' && entity.device.lastSeen) {
|
||||
payload.last_seen = utils.formatDate(entity.device.lastSeen, settings.get().advanced.last_seen);
|
||||
}
|
||||
|
||||
let messagePayload = {...payload};
|
||||
const currentState = this.state.exists(entity.settings.ID) ? this.state.get(entity.settings.ID) : {};
|
||||
const newState = objectAssignDeep.noMutate(currentState, payload);
|
||||
|
||||
// Update state cache with new state.
|
||||
this.state.set(entity.settings.ID, newState, stateChangeReason);
|
||||
|
||||
if (settings.get().advanced.cache_state) {
|
||||
// Add cached state to payload
|
||||
messagePayload = newState;
|
||||
}
|
||||
|
||||
const options = {
|
||||
retain: entity.settings.hasOwnProperty('retain') ? entity.settings.retain : false,
|
||||
qos: entity.settings.hasOwnProperty('qos') ? entity.settings.qos : 0,
|
||||
};
|
||||
|
||||
if (entity.type === 'device' && settings.get().mqtt.include_device_information) {
|
||||
const device = this.zigbee.getDeviceByIeeeAddr(entity.device.ieeeAddr);
|
||||
const attributes = [
|
||||
'ieeeAddr', 'networkAddress', 'type', 'manufacturerID', 'manufacturerName', 'powerSource',
|
||||
'applicationVersion', 'stackVersion', 'zclVersion', 'hardwareVersion', 'dateCode', 'softwareBuildID',
|
||||
];
|
||||
|
||||
messagePayload.device = {
|
||||
friendlyName: entity.name,
|
||||
model: entity.mapped ? entity.mapped.model : 'unknown',
|
||||
};
|
||||
|
||||
attributes.forEach((a) => messagePayload.device[a] = device[a]);
|
||||
}
|
||||
|
||||
if (Object.entries(messagePayload).length) {
|
||||
if (settings.get().experimental.output === 'json') {
|
||||
await this.mqtt.publish(entity.name, JSON.stringify(messagePayload), options);
|
||||
} else {
|
||||
/* istanbul ignore else */
|
||||
if (settings.get().experimental.output === 'attribute') {
|
||||
await this.iteratePayloadAttributeOutput(`${entity.name}/`, messagePayload, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async iteratePayloadAttributeOutput(topicRoot, payload, options) {
|
||||
for (const [key, value] of Object.entries(payload)) {
|
||||
let subPayload = value;
|
||||
let message;
|
||||
|
||||
// Special cases
|
||||
if (key === 'color' && utils.objectHasProperties(subPayload, ['r', 'g', 'b'])) {
|
||||
subPayload = [subPayload.r, subPayload.g, subPayload.b];
|
||||
}
|
||||
|
||||
// Check Array first, since it is also an Object
|
||||
if (Array.isArray(subPayload)) {
|
||||
message = subPayload.map((x) => `${x}`).join(',');
|
||||
} else if (typeof subPayload === 'object') {
|
||||
return this.iteratePayloadAttributeOutput(`${topicRoot}${key}-`, subPayload, options);
|
||||
} else {
|
||||
message = typeof subPayload === 'string' ? subPayload : JSON.stringify(subPayload);
|
||||
}
|
||||
|
||||
await this.mqtt.publish(`${topicRoot}${key}`, message, options);
|
||||
}
|
||||
}
|
||||
|
||||
async callExtensionMethod(method, parameters) {
|
||||
for (const extension of this.extensions) {
|
||||
if (extension[method]) {
|
||||
try {
|
||||
await extension[method](...parameters);
|
||||
} catch (error) {
|
||||
/* istanbul ignore next */
|
||||
logger.error(`Failed to call '${extension.constructor.name}' '${method}' (${error.stack})`);
|
||||
/* istanbul ignore next */
|
||||
if (process.env.JEST_WORKER_ID !== undefined) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Controller;
|
||||
@@ -0,0 +1,50 @@
|
||||
class BaseExtension {
|
||||
/**
|
||||
* Besides intializing variables, the constructor should do nothing!
|
||||
*
|
||||
* @param {Zigbee} zigbee Zigbee controller
|
||||
* @param {MQTT} mqtt MQTT controller
|
||||
* @param {State} state State controller
|
||||
* @param {Function} publishEntityState Method to publish device state to MQTT.
|
||||
*/
|
||||
constructor(zigbee, mqtt, state, publishEntityState) {
|
||||
this.zigbee = zigbee;
|
||||
this.mqtt = mqtt;
|
||||
this.state = state;
|
||||
this.publishEntityState = publishEntityState;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by the controller once Zigbee has been started.
|
||||
*/
|
||||
// onZigbeeStarted() {}
|
||||
|
||||
/**
|
||||
* This method is called by the controller once connected to the MQTT server.
|
||||
*/
|
||||
// onMQTTConnected() {}
|
||||
|
||||
/**
|
||||
* Is called when a Zigbee message from a device is received.
|
||||
* @param {string} type Type of the message
|
||||
* @param {Object} data Data of the message
|
||||
* @param {Object?} mappedDevice The mapped device
|
||||
* @param {Object?} settingsDevice Device settings
|
||||
*/
|
||||
// onZigbeeEvent(type, data, mappedDevice, settingsDevice) {}
|
||||
|
||||
/**
|
||||
* Is called when a MQTT message is received
|
||||
* @param {string} topic Topic on which the message was received
|
||||
* @param {Object} message The received message
|
||||
* @return {boolean} if the message was handled
|
||||
*/
|
||||
// onMQTTMessage(topic, message) {}
|
||||
|
||||
/**
|
||||
* Is called once the extension has to stop
|
||||
*/
|
||||
// stop() {}
|
||||
}
|
||||
|
||||
module.exports = BaseExtension;
|
||||
@@ -0,0 +1,371 @@
|
||||
const settings = require('../util/settings');
|
||||
const logger = require('../util/logger');
|
||||
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
|
||||
const utils = require('../util/utils');
|
||||
const assert = require('assert');
|
||||
const BaseExtension = require('./baseExtension');
|
||||
|
||||
const configRegex =
|
||||
new RegExp(`${settings.get().mqtt.base_topic}/bridge/config/((?:\\w+/get)|(?:\\w+/factory_reset)|(?:\\w+))`);
|
||||
const allowedLogLevels = ['error', 'warn', 'info', 'debug'];
|
||||
|
||||
class BridgeConfig extends BaseExtension {
|
||||
constructor(zigbee, mqtt, state, publishEntityState) {
|
||||
super(zigbee, mqtt, state, publishEntityState);
|
||||
|
||||
// Bind functions
|
||||
this.permitJoin = this.permitJoin.bind(this);
|
||||
this.lastSeen = this.lastSeen.bind(this);
|
||||
this.elapsed = this.elapsed.bind(this);
|
||||
this.reset = this.reset.bind(this);
|
||||
this.logLevel = this.logLevel.bind(this);
|
||||
this.devices = this.devices.bind(this);
|
||||
this.groups = this.groups.bind(this);
|
||||
this.rename = this.rename.bind(this);
|
||||
this.renameLast = this.renameLast.bind(this);
|
||||
this.remove = this.remove.bind(this);
|
||||
this.forceRemove = this.forceRemove.bind(this);
|
||||
this.ban = this.ban.bind(this);
|
||||
this.deviceOptions = this.deviceOptions.bind(this);
|
||||
this.addGroup = this.addGroup.bind(this);
|
||||
this.removeGroup = this.removeGroup.bind(this);
|
||||
this.whitelist = this.whitelist.bind(this);
|
||||
this.touchlinkFactoryReset = this.touchlinkFactoryReset.bind(this);
|
||||
|
||||
this.lastJoinedDeviceName = null;
|
||||
|
||||
// Set supported options
|
||||
this.supportedOptions = {
|
||||
'permit_join': this.permitJoin,
|
||||
'last_seen': this.lastSeen,
|
||||
'elapsed': this.elapsed,
|
||||
'reset': this.reset,
|
||||
'log_level': this.logLevel,
|
||||
'devices': this.devices,
|
||||
'groups': this.groups,
|
||||
'devices/get': this.devices,
|
||||
'rename': this.rename,
|
||||
'rename_last': this.renameLast,
|
||||
'remove': this.remove,
|
||||
'force_remove': this.forceRemove,
|
||||
'ban': this.ban,
|
||||
'device_options': this.deviceOptions,
|
||||
'add_group': this.addGroup,
|
||||
'remove_group': this.removeGroup,
|
||||
'whitelist': this.whitelist,
|
||||
'touchlink/factory_reset': this.touchlinkFactoryReset,
|
||||
};
|
||||
}
|
||||
|
||||
whitelist(topic, message) {
|
||||
try {
|
||||
const entity = settings.getEntity(message);
|
||||
assert(entity, `Entity '${message}' does not exist`);
|
||||
settings.whitelistDevice(entity.ID);
|
||||
logger.info(`Whitelisted '${entity.friendlyName}'`);
|
||||
this.mqtt.log('device_whitelisted', {friendly_name: entity.friendlyName});
|
||||
} catch (error) {
|
||||
logger.error(`Failed to whitelist '${message}' '${error}'`);
|
||||
}
|
||||
}
|
||||
|
||||
deviceOptions(topic, message) {
|
||||
let json = null;
|
||||
try {
|
||||
json = JSON.parse(message);
|
||||
} catch (e) {
|
||||
logger.error('Failed to parse message as JSON');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!json.hasOwnProperty('friendly_name') || !json.hasOwnProperty('options')) {
|
||||
logger.error('Invalid JSON message, should contain "friendly_name" and "options"');
|
||||
return;
|
||||
}
|
||||
|
||||
const entity = settings.getEntity(json.friendly_name);
|
||||
assert(entity, `Entity '${json.friendly_name}' does not exist`);
|
||||
settings.changeDeviceOptions(entity.ID, json.options);
|
||||
logger.info(`Changed device specific options of '${json.friendly_name}' (${JSON.stringify(json.options)})`);
|
||||
}
|
||||
|
||||
async permitJoin(topic, message) {
|
||||
await this.zigbee.permitJoin(message.toLowerCase() === 'true');
|
||||
this.publish();
|
||||
}
|
||||
|
||||
async reset(topic, message) {
|
||||
try {
|
||||
await this.zigbee.reset('soft');
|
||||
logger.info('Soft resetted ZNP');
|
||||
} catch (error) {
|
||||
logger.error('Soft reset failed');
|
||||
}
|
||||
}
|
||||
|
||||
lastSeen(topic, message) {
|
||||
const allowed = ['disable', 'ISO_8601', 'epoch', 'ISO_8601_local'];
|
||||
if (!allowed.includes(message)) {
|
||||
logger.error(`${message} is not an allowed value, possible: ${allowed}`);
|
||||
return;
|
||||
}
|
||||
|
||||
settings.set(['advanced', 'last_seen'], message);
|
||||
logger.info(`Set last_seen to ${message}`);
|
||||
}
|
||||
|
||||
elapsed(topic, message) {
|
||||
const allowed = ['true', 'false'];
|
||||
if (!allowed.includes(message)) {
|
||||
logger.error(`${message} is not an allowed value, possible: ${allowed}`);
|
||||
return;
|
||||
}
|
||||
|
||||
settings.set(['advanced', 'elapsed'], message === 'true');
|
||||
logger.info(`Set elapsed to ${message}`);
|
||||
}
|
||||
|
||||
logLevel(topic, message) {
|
||||
const level = message.toLowerCase();
|
||||
if (allowedLogLevels.includes(level)) {
|
||||
logger.info(`Switching log level to '${level}'`);
|
||||
logger.setLevel(level);
|
||||
} else {
|
||||
logger.error(`Could not set log level to '${level}'. Allowed level: '${allowedLogLevels.join(',')}'`);
|
||||
}
|
||||
|
||||
this.publish();
|
||||
}
|
||||
|
||||
async devices(topic, message) {
|
||||
const coordinator = await this.zigbee.getCoordinatorVersion();
|
||||
const devices = this.zigbee.getDevices().map((device) => {
|
||||
const payload = {
|
||||
ieeeAddr: device.ieeeAddr,
|
||||
type: device.type,
|
||||
networkAddress: device.networkAddress,
|
||||
};
|
||||
|
||||
if (device.type !== 'Coordinator') {
|
||||
const mappedDevice = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
|
||||
const friendlyDevice = settings.getDevice(device.ieeeAddr);
|
||||
payload.model = mappedDevice ? mappedDevice.model : device.modelID;
|
||||
payload.friendly_name = friendlyDevice ? friendlyDevice.friendly_name : device.ieeeAddr;
|
||||
payload.manufacturerID = device.manufacturerID;
|
||||
payload.manufacturerName = device.manufacturerName;
|
||||
payload.powerSource = device.powerSource;
|
||||
payload.modelID = device.modelID;
|
||||
payload.hardwareVersion = device.hardwareVersion;
|
||||
payload.softwareBuildID = device.softwareBuildID;
|
||||
payload.dateCode = device.dateCode;
|
||||
payload.lastSeen = device.lastSeen;
|
||||
} else {
|
||||
payload.friendly_name = 'Coordinator';
|
||||
payload.softwareBuildID = coordinator.type;
|
||||
payload.dateCode = coordinator.meta.revision.toString();
|
||||
payload.lastSeen = Date.now();
|
||||
}
|
||||
|
||||
return payload;
|
||||
});
|
||||
|
||||
if (topic.split('/').pop() == 'get') {
|
||||
this.mqtt.publish(`bridge/config/devices`, JSON.stringify(devices), {});
|
||||
} else {
|
||||
this.mqtt.log('devices', devices);
|
||||
}
|
||||
}
|
||||
|
||||
groups(topic, message) {
|
||||
this.mqtt.log('groups', settings.getGroups().map((g) => {
|
||||
const group = {...g};
|
||||
delete group.friendlyName;
|
||||
return group;
|
||||
}));
|
||||
}
|
||||
|
||||
rename(topic, message) {
|
||||
const invalid = `Invalid rename message format expected {old: 'friendly_name', new: 'new_name} got ${message}`;
|
||||
|
||||
let json = null;
|
||||
try {
|
||||
json = JSON.parse(message);
|
||||
} catch (e) {
|
||||
logger.error(invalid);
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate message
|
||||
if (!json.new || !json.old) {
|
||||
logger.error(invalid);
|
||||
return;
|
||||
}
|
||||
|
||||
this._renameInternal(json.old, json.new);
|
||||
}
|
||||
|
||||
renameLast(topic, message) {
|
||||
if (!this.lastJoinedDeviceName) {
|
||||
logger.error(`Cannot rename last joined device, no device has joined during this session`);
|
||||
return;
|
||||
}
|
||||
|
||||
this._renameInternal(this.lastJoinedDeviceName, message);
|
||||
}
|
||||
|
||||
_renameInternal(from, to) {
|
||||
try {
|
||||
settings.changeFriendlyName(from, to);
|
||||
logger.info(`Successfully renamed - ${from} to ${to} `);
|
||||
this.mqtt.log('device_renamed', {from, to});
|
||||
} catch (error) {
|
||||
logger.error(`Failed to rename - ${from} to ${to}`);
|
||||
}
|
||||
}
|
||||
|
||||
addGroup(topic, message) {
|
||||
let id = null;
|
||||
let name = null;
|
||||
try {
|
||||
// json payload with id and friendly_name
|
||||
const json = JSON.parse(message);
|
||||
if (json.hasOwnProperty('id')) {
|
||||
id = json.id;
|
||||
name = `group_${id}`;
|
||||
}
|
||||
if (json.hasOwnProperty('friendly_name')) {
|
||||
name = json.friendly_name;
|
||||
}
|
||||
} catch (e) {
|
||||
// just friendly_name
|
||||
name = message;
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
logger.error('Failed to add group, missing friendly_name!');
|
||||
return;
|
||||
}
|
||||
|
||||
const group = settings.addGroup(name, id);
|
||||
this.zigbee.createGroup(group.ID);
|
||||
logger.info(`Added group '${name}'`);
|
||||
}
|
||||
|
||||
removeGroup(topic, message) {
|
||||
const name = message;
|
||||
settings.removeGroup(name);
|
||||
logger.info(`Removed group '${name}'`);
|
||||
}
|
||||
|
||||
async forceRemove(topic, message) {
|
||||
await this.removeForceRemoveOrBan('force_remove', message);
|
||||
}
|
||||
|
||||
async remove(topic, message) {
|
||||
await this.removeForceRemoveOrBan('remove', message);
|
||||
}
|
||||
|
||||
async ban(topic, message) {
|
||||
await this.removeForceRemoveOrBan('ban', message);
|
||||
}
|
||||
|
||||
async removeForceRemoveOrBan(action, message) {
|
||||
const entity = this.zigbee.resolveEntity(message.trim());
|
||||
const lookup = {
|
||||
ban: ['banned', 'Banning', 'ban'],
|
||||
force_remove: ['force_removed', 'Force removing', 'force remove'],
|
||||
remove: ['removed', 'Removing', 'remove'],
|
||||
};
|
||||
|
||||
if (!entity) {
|
||||
logger.error(`Cannot ${lookup[action][2]}, device '${message}' does not exist`);
|
||||
return;
|
||||
}
|
||||
|
||||
const cleanup = () => {
|
||||
// Remove from configuration.yaml
|
||||
settings.removeDevice(entity.settings.ID);
|
||||
|
||||
// Remove from state
|
||||
this.state.remove(entity.settings.ID);
|
||||
|
||||
logger.info(`Successfully ${lookup[action][0]} ${entity.settings.friendlyName}`);
|
||||
this.mqtt.log(`device_${lookup[action][0]}`, message);
|
||||
};
|
||||
|
||||
try {
|
||||
logger.info(`${lookup[action][1]} '${entity.settings.friendlyName}'`);
|
||||
if (action === 'force_remove') {
|
||||
await entity.device.removeFromDatabase();
|
||||
} else {
|
||||
await entity.device.removeFromNetwork();
|
||||
}
|
||||
|
||||
cleanup();
|
||||
} catch (error) {
|
||||
logger.error(`Failed to ${lookup[action][2]} ${entity.settings.friendlyName} (${error})`);
|
||||
// eslint-disable-next-line
|
||||
logger.error(`See https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigremove for more info`);
|
||||
}
|
||||
|
||||
if (action === 'ban') {
|
||||
settings.banDevice(entity.settings.ID);
|
||||
}
|
||||
}
|
||||
|
||||
async onMQTTConnected() {
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/config/+`);
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/config/+/+`);
|
||||
await this.publish();
|
||||
}
|
||||
|
||||
async onMQTTMessage(topic, message) {
|
||||
if (!topic.match(configRegex)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const option = topic.match(configRegex)[1];
|
||||
|
||||
if (!this.supportedOptions.hasOwnProperty(option)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this.supportedOptions[option](topic, message);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async publish() {
|
||||
const info = await utils.getZigbee2mqttVersion();
|
||||
const coordinator = await this.zigbee.getCoordinatorVersion();
|
||||
const topic = `bridge/config`;
|
||||
const payload = {
|
||||
version: info.version,
|
||||
commit: info.commitHash,
|
||||
coordinator,
|
||||
log_level: logger.getLevel(),
|
||||
permit_join: await this.zigbee.getPermitJoin(),
|
||||
};
|
||||
|
||||
await this.mqtt.publish(topic, JSON.stringify(payload), {retain: true, qos: 0});
|
||||
}
|
||||
|
||||
onZigbeeEvent(type, data, mappedDevice, settingsDevice) {
|
||||
if (type === 'deviceJoined') {
|
||||
this.lastJoinedDeviceName = settingsDevice.friendlyName;
|
||||
}
|
||||
}
|
||||
|
||||
async touchlinkFactoryReset() {
|
||||
logger.info('Starting touchlink factory reset...');
|
||||
const result = await this.zigbee.touchlinkFactoryReset();
|
||||
|
||||
if (result) {
|
||||
logger.info('Succesfully factory reset device through Touchlink');
|
||||
} else {
|
||||
logger.warn('Failed to factory reset device through Touchlink');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BridgeConfig;
|
||||
@@ -0,0 +1,206 @@
|
||||
const logger = require('../util/logger');
|
||||
const settings = require('../util/settings');
|
||||
const utils = require('../util/utils');
|
||||
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
|
||||
const BaseExtension = require('./baseExtension');
|
||||
|
||||
// Some EndDevices should be pinged
|
||||
// e.g. E11-G13 https://github.com/Koenkk/zigbee2mqtt/issues/775#issuecomment-453683846
|
||||
const forcedPingable = [
|
||||
zigbeeHerdsmanConverters.devices.find((d) => d.model === 'E11-G13'),
|
||||
];
|
||||
|
||||
const toZigbeeCandidates = ['state', 'brightness', 'color', 'color_temp'];
|
||||
|
||||
const Hours25 = 1000 * 60 * 60 * 25;
|
||||
|
||||
/**
|
||||
* This extensions pings devices to check if they are online.
|
||||
*/
|
||||
class DeviceAvailability extends BaseExtension {
|
||||
constructor(zigbee, mqtt, state, publishEntityState) {
|
||||
super(zigbee, mqtt, state, publishEntityState);
|
||||
|
||||
this.availability_timeout = settings.get().advanced.availability_timeout;
|
||||
this.timers = {};
|
||||
this.state = {};
|
||||
|
||||
// Initialize blacklist
|
||||
this.blacklist = settings.get().advanced.availability_blacklist.map((e) => {
|
||||
return settings.getEntity(e).ID;
|
||||
});
|
||||
|
||||
// Initialize whitelist
|
||||
this.whitelist = settings.get().advanced.availability_whitelist.map((e) => {
|
||||
return settings.getEntity(e).ID;
|
||||
});
|
||||
}
|
||||
|
||||
isAllowed(device) {
|
||||
// Whitelist is not empty and device is in it, enable availability
|
||||
if (this.whitelist.length > 0) {
|
||||
return this.whitelist.includes(device.ieeeAddr);
|
||||
}
|
||||
|
||||
// Device is on blacklist, disable availability
|
||||
if (this.blacklist.includes(device.ieeeAddr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
isPingable(device) {
|
||||
// Device is on forcedPingable-list, enable availability
|
||||
if (forcedPingable.find((d) => d.zigbeeModel.includes(device.modelID))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Device is a mains powered router
|
||||
const result = utils.isRouter(device) && !utils.isBatteryPowered(device);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
onMQTTConnected() {
|
||||
for (const device of this.zigbee.getClients()) {
|
||||
// Mark all devices as online on start
|
||||
this.publishAvailability(device, true);
|
||||
|
||||
if (this.isAllowed(device)) {
|
||||
if (this.isPingable(device)) {
|
||||
this.setTimerPingable(device);
|
||||
} else {
|
||||
this.timers[device.ieeeAddr] = setInterval(() => {
|
||||
this.handleIntervalNotPingable(device);
|
||||
}, utils.secondsToMilliseconds(300));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async handleIntervalPingable(device) {
|
||||
// When a device is already unavailable, log the ping failed on 'debug' instead of 'error'.
|
||||
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
|
||||
if (!entity) {
|
||||
logger.debug(`Stop pinging '${device.ieeeAddr}', device is not known anymore`);
|
||||
return;
|
||||
}
|
||||
|
||||
const ieeeAddr = device.ieeeAddr;
|
||||
const level = this.state.hasOwnProperty(ieeeAddr) && !this.state[ieeeAddr] ? 'debug' : 'error';
|
||||
try {
|
||||
await device.ping();
|
||||
this.publishAvailability(device, true);
|
||||
logger.debug(`Successfully pinged '${entity.name}'`);
|
||||
} catch (error) {
|
||||
this.publishAvailability(device, false);
|
||||
logger[level](`Failed to ping '${entity.name}'`);
|
||||
} finally {
|
||||
this.setTimerPingable(device);
|
||||
}
|
||||
}
|
||||
|
||||
async handleIntervalNotPingable(device) {
|
||||
const ago = Date.now() - device.lastSeen;
|
||||
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
|
||||
if (!entity || !device.lastSeen) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug(`Non-pingable device '${entity.name}' was last seen '${ago / 1000}' seconds ago.`);
|
||||
|
||||
if (ago > Hours25) {
|
||||
this.publishAvailability(device, false);
|
||||
}
|
||||
}
|
||||
|
||||
setTimerPingable(device) {
|
||||
if (this.timers[device.ieeeAddr]) {
|
||||
clearTimeout(this.timers[device.ieeeAddr]);
|
||||
}
|
||||
|
||||
this.timers[device.ieeeAddr] = setTimeout(async () => {
|
||||
await this.handleIntervalPingable(device);
|
||||
}, utils.secondsToMilliseconds(this.availability_timeout));
|
||||
}
|
||||
|
||||
async stop() {
|
||||
for (const timer of Object.values(this.timers)) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
|
||||
this.zigbee.getClients().forEach((device) => this.publishAvailability(device, false));
|
||||
}
|
||||
|
||||
async onReconnect(device) {
|
||||
if (device && device.modelID) {
|
||||
const mappedDevice = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
|
||||
|
||||
if (mappedDevice) {
|
||||
const used = [];
|
||||
try {
|
||||
for (const key of toZigbeeCandidates) {
|
||||
const converter = mappedDevice.toZigbee.find((tz) => tz.key.includes(key));
|
||||
if (converter && !used.includes(converter)) {
|
||||
await converter.convertGet(device.endpoints[0], key, {});
|
||||
used.push(converter);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
|
||||
logger.error(`Failed to read state of '${entity.name}' after reconnect`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishAvailability(device, available) {
|
||||
const ieeeAddr = device.ieeeAddr;
|
||||
if (this.state.hasOwnProperty(ieeeAddr) && !this.state[ieeeAddr] && available) {
|
||||
this.onReconnect(device);
|
||||
}
|
||||
|
||||
const deviceSettings = settings.getDevice(ieeeAddr);
|
||||
const name = deviceSettings ? deviceSettings.friendly_name : ieeeAddr;
|
||||
const topic = `${name}/availability`;
|
||||
const payload = available ? 'online' : 'offline';
|
||||
if (this.state[ieeeAddr] !== available) {
|
||||
this.state[ieeeAddr] = available;
|
||||
this.mqtt.publish(topic, payload, {retain: true, qos: 0});
|
||||
}
|
||||
}
|
||||
|
||||
onZigbeeEvent(type, data, mappedDevice, settingsDevice) {
|
||||
const device = data.device;
|
||||
if (!device) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isAllowed(device)) {
|
||||
this.publishAvailability(data.device, true);
|
||||
|
||||
if (this.isPingable(device)) {
|
||||
// When a zigbee message from a device is received we know the device is still alive.
|
||||
// => reset the timer.
|
||||
this.setTimerPingable(device);
|
||||
|
||||
const online = this.state.hasOwnProperty(device.ieeeAddr) && this.state[device.ieeeAddr];
|
||||
if (online && type === 'deviceAnnounce' && !utils.isIkeaTradfriDevice(device)) {
|
||||
/**
|
||||
* In case the device is powered off AND on within the availability timeout,
|
||||
* zigbee2qmtt does not detect the device as offline (device is still marked online).
|
||||
* When a device is turned on again the state could be out of sync.
|
||||
* https://github.com/Koenkk/zigbee2mqtt/issues/1383#issuecomment-489412168
|
||||
* deviceAnnounce is typically send when a device comes online.
|
||||
*
|
||||
* This isn't needed for TRADFRI devices as they already send the state themself.
|
||||
*/
|
||||
this.onReconnect(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DeviceAvailability;
|
||||
@@ -0,0 +1,72 @@
|
||||
const settings = require('../util/settings');
|
||||
const logger = require('../util/logger');
|
||||
const assert = require('assert');
|
||||
const topicRegex = new RegExp(`^${settings.get().mqtt.base_topic}/bridge/(bind|unbind)/.+$`);
|
||||
const BaseExtension = require('./baseExtension');
|
||||
|
||||
const clusters = ['genScenes', 'genOnOff', 'genLevelCtrl', 'lightingColorCtrl', 'closuresWindowCovering'];
|
||||
|
||||
class DeviceBind extends BaseExtension {
|
||||
onMQTTConnected() {
|
||||
for (let step = 1; step < 20; step++) {
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/bind${'/+'.repeat(step)}`);
|
||||
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/unbind${'/+'.repeat(step)}`);
|
||||
}
|
||||
}
|
||||
|
||||
async onMQTTMessage(topic, message) {
|
||||
if (!topic.match(topicRegex)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Parse topic, retrieve type (bind or unbind) and source
|
||||
topic = topic.replace(`${settings.get().mqtt.base_topic}/bridge/`, '');
|
||||
const type = topic.split('/')[0];
|
||||
const sourceKey = topic.replace(`${type}/`, '');
|
||||
const targetKey = message;
|
||||
|
||||
// Find source; can only be a device and target
|
||||
const source = this.zigbee.resolveEntity(sourceKey);
|
||||
assert(source != null && source.type === 'device', 'Source undefined or not a device');
|
||||
const target = this.zigbee.resolveEntity(targetKey);
|
||||
assert(target != null, 'Target is unknown');
|
||||
|
||||
const sourceName = source.settings.friendlyName;
|
||||
const targetName = target.settings.friendlyName;
|
||||
|
||||
// Find which clusters are supported by both the source and target.
|
||||
// Groups are assumed to support all clusters.
|
||||
for (const cluster of clusters) {
|
||||
const targetValid = target.type === 'group' ||
|
||||
target.device.type === 'Coordinator' || target.endpoint.supportsInputCluster(cluster);
|
||||
|
||||
if (source.endpoint.supportsOutputCluster(cluster) && targetValid) {
|
||||
logger.debug(`${type}ing cluster '${cluster}' from '${sourceName}' to '${targetName}'`);
|
||||
try {
|
||||
const bindTarget = target.type === 'group' ? target.group : target.endpoint;
|
||||
if (type === 'bind') {
|
||||
await source.endpoint.bind(cluster, bindTarget);
|
||||
} else {
|
||||
await source.endpoint.unbind(cluster, bindTarget);
|
||||
}
|
||||
|
||||
logger.info(
|
||||
`Successfully ${type === 'bind' ? 'bound' : 'unbound'} cluster '${cluster}' from ` +
|
||||
`'${sourceName}' to '${targetName}'`,
|
||||
);
|
||||
this.mqtt.log(
|
||||
`device_${type}`,
|
||||
{from: sourceName, to: targetName, cluster},
|
||||
);
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
`Failed to ${type} cluster '${cluster}' from '${sourceName}' to ` +
|
||||
`'${targetName}' (${error})`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DeviceBind;
|
||||
@@ -0,0 +1,109 @@
|
||||
const settings = require('../util/settings');
|
||||
const logger = require('../util/logger');
|
||||
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
|
||||
const BaseExtension = require('./baseExtension');
|
||||
|
||||
class DeviceConfigure extends BaseExtension {
|
||||
constructor(zigbee, mqtt, state, publishEntityState) {
|
||||
super(zigbee, mqtt, state, publishEntityState);
|
||||
|
||||
this.configuring = new Set();
|
||||
this.attempts = {};
|
||||
this.topic = `${settings.get().mqtt.base_topic}/bridge/configure`;
|
||||
}
|
||||
|
||||
shouldConfigure(device, mappedDevice) {
|
||||
if (!device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (device.meta.hasOwnProperty('configured') && device.meta.configured === mappedDevice.meta.configureKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mappedDevice || !mappedDevice.configure) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (device.interviewing === true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
onMQTTConnected() {
|
||||
this.mqtt.subscribe(this.topic);
|
||||
}
|
||||
|
||||
async onMQTTMessage(topic, message) {
|
||||
if (topic !== this.topic) {
|
||||
return;
|
||||
}
|
||||
|
||||
const entity = this.zigbee.resolveEntity(message);
|
||||
if (!entity || !entity.type === 'device') {
|
||||
logger.error(`Device '${message}' does not exist`);
|
||||
return;
|
||||
}
|
||||
|
||||
const mappedDevice = zigbeeHerdsmanConverters.findByZigbeeModel(entity.device.modelID);
|
||||
this.configure(entity.device, mappedDevice, entity.settings, true);
|
||||
}
|
||||
|
||||
async onZigbeeStarted() {
|
||||
this.coordinatorEndpoint = this.zigbee.getDevicesByType('Coordinator')[0].getEndpoint(1);
|
||||
|
||||
for (const device of this.zigbee.getClients()) {
|
||||
const mappedDevice = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
|
||||
const settingsDevice = settings.getDevice(device.ieeeAddr);
|
||||
if (this.shouldConfigure(device, mappedDevice)) {
|
||||
await this.configure(device, mappedDevice, settingsDevice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onZigbeeEvent(type, data, mappedDevice, settingsDevice) {
|
||||
const device = data.device;
|
||||
|
||||
if (type === 'deviceJoined' && device.meta.hasOwnProperty('configured')) {
|
||||
delete device.meta.configured;
|
||||
device.save();
|
||||
}
|
||||
|
||||
if (this.shouldConfigure(device, mappedDevice)) {
|
||||
this.configure(device, mappedDevice, settingsDevice);
|
||||
}
|
||||
}
|
||||
|
||||
async configure(device, mappedDevice, settingsDevice, force=false) {
|
||||
if (this.configuring.has(device.ieeeAddr) || (this.attempts[device.ieeeAddr] >= 3 && !force)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.configuring.add(device.ieeeAddr);
|
||||
|
||||
if (!this.attempts.hasOwnProperty(device.ieeeAddr)) {
|
||||
this.attempts[device.ieeeAddr] = 0;
|
||||
}
|
||||
|
||||
logger.info(`Configuring '${settingsDevice.friendlyName}'`);
|
||||
try {
|
||||
await mappedDevice.configure(device, this.coordinatorEndpoint);
|
||||
logger.info(`Succesfully configured '${settingsDevice.friendlyName}'`);
|
||||
// eslint-disable-next-line
|
||||
device.meta.configured = mappedDevice.meta.configureKey;
|
||||
device.save();
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
`Failed to configure '${settingsDevice.friendlyName}', ` +
|
||||
`attempt ${this.attempts[device.ieeeAddr] + 1} (${error.stack})`,
|
||||
);
|
||||
this.attempts[device.ieeeAddr]++;
|
||||
}
|
||||
|
||||
this.configuring.delete(device.ieeeAddr);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DeviceConfigure;
|
||||
@@ -0,0 +1,34 @@
|
||||
const BaseExtension = require('./baseExtension');
|
||||
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
|
||||
|
||||
class DeviceEvent extends BaseExtension {
|
||||
async onZigbeeStarted() {
|
||||
for (const device of this.zigbee.getClients()) {
|
||||
this.callOnEvent(device, 'start', {});
|
||||
}
|
||||
}
|
||||
|
||||
onZigbeeEvent(type, data, mappedDevice, settingsDevice) {
|
||||
if (data.device) {
|
||||
this.callOnEvent(data.device, type, data, mappedDevice);
|
||||
}
|
||||
}
|
||||
|
||||
async stop() {
|
||||
for (const device of this.zigbee.getClients()) {
|
||||
this.callOnEvent(device, 'stop', {});
|
||||
}
|
||||
}
|
||||
|
||||
callOnEvent(device, type, data, mappedDevice) {
|
||||
if (!mappedDevice) {
|
||||
mappedDevice = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
|
||||
}
|
||||
|
||||
if (mappedDevice && mappedDevice.onEvent) {
|
||||
mappedDevice.onEvent(type, data, device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DeviceEvent;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user