Compare commits

...
896 Commits
Author SHA1 Message Date
Koen Kanters aae7312d8a chore(dev): release 1.34.0 (#19544) 2023-12-01 10:54:40 +01:00
Koen KantersandKoenkk 3bbf89cba0 fix(ignore): update zigbee-herdsman-converters to 15.130.1 (#19945)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-12-01 10:51:26 +01:00
Koen KantersandKoenkk f976d4efb4 fix(ignore): update zigbee-herdsman-converters to 15.130.0 (#19942)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-12-01 09:25:52 +00:00
slugzero a904e7a396 fix: Fix unable to configure again after configure fails (#19908)
* Remove device from "configuring" after error

* use finally for cleanup
2023-11-30 23:02:16 +01:00
Koen KantersandKoenkk 12521add39 fix(ignore): update zigbee-herdsman-converters to 15.129.0 (#19934)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-30 19:37:15 +00:00
Koen KantersandKoenkk 2dabc1e61b fix(ignore): update zigbee-herdsman to 0.25.0 (#19933)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-30 18:51:16 +00:00
Koen KantersandKoenkk e5dc271a78 fix(ignore): update zigbee-herdsman to 0.24.0 (#19926)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-30 10:57:31 +00:00
Koen KantersandKoenkk 4e128e26fe fix(ignore): update zigbee-herdsman-converters to 15.128.0 (#19906)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-28 19:05:56 +00:00
Koen KantersandKoenkk b4c0a59501 Update dependencies (#19895)
* fix(ignore): update dependencies

* fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-27 21:55:35 +01:00
Koen KantersandKoenkk 9032bb3d13 Update dependencies (#19866)
* fix(ignore): update dependencies

* fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-27 21:36:06 +01:00
Koen KantersandKoenkk 8a6d90d70e fix(ignore): update zigbee-herdsman-converters to 15.127.0 (#19894)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-27 19:10:10 +00:00
Koen KantersandKoenkk b17487e6bb fix(ignore): update zigbee-herdsman-converters to 15.126.0 (#19878)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-26 20:36:41 +00:00
Der Mundschenk & Compagnie 838629ca42 feat: Add Home Assistant scene discovery (#19838)
* Add device info for Zigbee Groups

* Move Scene and getScenes to utils.ts

* Add auto-discovery for group scenes

* Update scene auto-discovery on change

* Add support for single endpoint scenes

* Add test for onScenesChanged

* Move Scene to types.d.ts

* Allow optional object_id_postfix key in payload

* Add scene name to object_id for nicer HA entity_id
2023-11-26 19:38:53 +01:00
Koen KantersandKoenkk 51a93418fa fix(ignore): update zigbee-herdsman-converters to 15.125.1 (#19867)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-26 08:42:21 +00:00
Koen KantersandKoenkk ef00a64bf8 fix(ignore): update zigbee-herdsman-converters to 15.125.0 (#19854)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-24 20:50:08 +00:00
Koen KantersandKoenkk ef4d9e1e55 fix(ignore): update zigbee-herdsman-converters to 15.124.0 (#19836)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-23 19:29:23 +00:00
Koen KantersandKoenkk 2d08baf620 fix(ignore): update zigbee-herdsman-converters to 15.123.1 (#19809)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-22 20:48:46 +00:00
koenkk 8cf41a137a fix(ignore): remove console.log in test 2023-11-22 21:42:44 +01:00
Koen Kantersandnurikk 61b08c94bf fix(ignore): update zigbee2mqtt-frontend to 0.6.147 (#19801)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-11-21 10:58:37 +00:00
Koen Kantersandnurikk c87ac9cc2b fix(ignore): update zigbee2mqtt-frontend to 0.6.146 (#19784)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-11-20 11:30:45 +00:00
Koen Kantersandnurikk ed20e2a1bc fix(ignore): update zigbee2mqtt-frontend to 0.6.145 (#19778)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-11-20 00:57:52 +00:00
Koen KantersandKoenkk d4e3aa9d97 fix(ignore): update zigbee-herdsman-converters to 15.121.0 (#19777)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-19 20:05:34 +00:00
Koen Kantersandnurikk 91aed7e98e fix(ignore): update zigbee2mqtt-frontend to 0.6.144 (#19776)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-11-19 19:51:41 +00:00
Koen KantersandKoenkk fd19c86cb1 fix(ignore): update zigbee-herdsman-converters to 15.120.0 (#19761)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-18 20:20:27 +00:00
Koen KantersandKoenkk ad4bed8921 fix(ignore): update zigbee-herdsman-converters to 15.119.0 (#19740)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-16 21:02:58 +00:00
koenkk 01d32cb230 fix(ignore): Fix color_temp_percent test 2023-11-16 21:55:07 +01:00
Koen KantersandKoenkk 746066c920 fix(ignore): update zigbee-herdsman-converters to 15.117.0 (#19727)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-15 19:46:18 +00:00
Koen KantersandKoenkk 4815ac7110 fix(ignore): update zigbee-herdsman-converters to 15.116.0 (#19714)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-14 20:11:34 +00:00
Koen Kanters 035e2a3023 chore: merge master to dev 2023-11-14 20:17:06 +01:00
koenkk 311ea070b1 chore: Add build step to update script https://github.com/Koenkk/zigbee2mqtt/pull/19232 2023-11-14 20:16:40 +01:00
dependabot[bot] 736caac46d chore: Bump actions/github-script from 6 to 7 (#19710) 2023-11-14 19:16:09 +01:00
Koen KantersandKoenkk 157dff14d3 fix(ignore): update zigbee-herdsman-converters to 15.115.0 (#19701)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-13 20:00:33 +00:00
Koen KantersandKoenkk a152bded93 fix(ignore): update zigbee-herdsman to 0.23.0 (#19700)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-13 19:34:48 +00:00
Koen KantersandKoenkk 6587812b72 fix(ignore): update zigbee-herdsman-converters to 15.114.0 (#19692)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-12 20:46:35 +00:00
Koen KantersandKoenkk c8848be981 fix(ignore): update dependencies (#19679)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-12 21:37:34 +01:00
Der Mundschenk & Compagnie baae082258 fix(ignore): Fixes quote type for update JSON attribute discovery (#19668) 2023-11-11 15:24:32 +01:00
Koen KantersandKoenkk c8dcd716ab fix(ignore): update zigbee-herdsman-converters to 15.113.0 (#19663)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-10 21:11:17 +00:00
Nicolas Thumann 45ac44dd06 fix: Make frontend listen on both IPv4 and IPv6 by default (#19660)
* Change: Set frontend host to null by default

* Change: Allow frontend to listen on port without host

* Change: Unit test

* Add: Unit test
2023-11-10 21:57:53 +01:00
Der Mundschenk & Compagnie da04d223b4 fix: Fix invalid JSON error in Home Assistant update entity (#19659) 2023-11-10 21:41:36 +01:00
Koen KantersandKoenkk d26ea1a411 fix(ignore): update zigbee-herdsman-converters to 15.112.0 (#19643)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-09 20:50:15 +00:00
Koen Kantersandnurikk 9d5d61754d fix(ignore): update zigbee2mqtt-frontend to 0.6.143 (#19642)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-11-09 20:42:43 +00:00
Koen Kanters 2bb77a31cf chore: merge master to dev 2023-11-09 20:36:22 +01:00
Ivan Belokobylskiy 86ae0ed90f fix: Set entity category config for Home Assistant temperature_display_mode sensor (#19631) 2023-11-09 20:36:00 +01:00
koenkk 2540fbd771 fix: Fix Home Assistant in_progress Erroneous JSON error https://github.com/Koenkk/zigbee2mqtt/issues/19597 2023-11-08 21:52:02 +01:00
Koen KantersandKoenkk 354ada5c4c fix(ignore): update zigbee-herdsman-converters to 15.111.0 (#19630)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-08 20:40:37 +00:00
Koen Kanters 0fec5958fa chore: merge master to dev 2023-11-08 20:13:23 +01:00
koenkk ccc08a3fc7 chore: Set days-before-stale to 100 2023-11-08 20:13:02 +01:00
Koen KantersandKoenkk 5889cdd9ab fix(ignore): update zigbee-herdsman-converters to 15.110.0 (#19619)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-07 21:04:25 +00:00
koenkk 93af087264 chore: fix changelog generator 2023-11-06 20:58:45 +01:00
Koen KantersandKoenkk 2d5bb2462e fix(ignore): update zigbee-herdsman to 0.22.1 (#19602)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-06 19:30:05 +00:00
Koen KantersandKoenkk b71aa0a3fd fix(ignore): update zigbee-herdsman-converters to 15.109.0 (#19601)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-06 19:12:45 +00:00
Koen KantersandKoenkk 1fd1686ee6 fix(ignore): update zigbee-herdsman-converters to 15.108.0 (#19589)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-05 20:25:57 +00:00
Koen KantersandKoenkk fc073e8743 fix(ignore): update dependencies (#19570)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-05 21:10:02 +01:00
Rotzbua be48d545cc fix(ignore): remove unused variable (#19584) 2023-11-05 21:02:15 +01:00
Rotzbua 13443a42ce fix(typo): correct misspell (#19581)
Credit to `codespell`.
2023-11-05 21:01:55 +01:00
koenkk 071842ef49 fix: Fix entity category for Home Assistant binary_sensor https://github.com/Koenkk/zigbee2mqtt/pull/19474 2023-11-05 20:56:06 +01:00
Koen KantersandKoenkk 366e29d4d9 fix(ignore): update zigbee-herdsman-converters to 15.107.0 (#19548)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-03 19:31:32 +00:00
Koen KantersandKoenkk 02a5a1b14f fix(ignore): update zigbee-herdsman to 0.22.0 (#19547)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-03 20:20:30 +01:00
Arne Rekdal 64b26e47da fix: Map climate idle to idle instead of off in Home Assistant (#19545)
* Missing HA Climate Idle state

Idle is mapped to idle state in HA

* Update homeassistant.test.js
2023-11-03 20:14:25 +01:00
Laxilef 1f2bd841c4 fix: Fix in_progress attribute for Home Assistant update sensor (#19542) 2023-11-03 17:16:57 +01:00
koenkk 1e905598f2 chore: fix release-please 2023-11-01 20:33:51 +01:00
koenkk e76b0ff282 chore: promote to dev 2023-11-01 20:23:03 +01:00
Koen Kanters 9996c931e2 chore(dev): release 1.33.2 (#19158) 2023-11-01 20:15:16 +01:00
Koen KantersandKoenkk 35386903f2 fix(ignore): update zigbee-herdsman-converters to 15.106.0 (#19511)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-11-01 18:53:54 +00:00
Koen KantersandKoenkk d79235e27b fix(ignore): update zigbee-herdsman-converters to 15.105.1 (#19503)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-31 20:25:11 +00:00
Franck Nijhof 69f6891db5 fix: Fix entity category of Home Assistant exposed enum sensors (#19474)
* Fix entity category of Home Assistant exposed enum sensors

* Process review comment
2023-10-31 16:31:14 +01:00
Koen KantersandKoenkk fe25924780 fix(ignore): update zigbee-herdsman-converters to 15.105.0 (#19492)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-30 20:28:33 +00:00
Koen KantersandKoenkk 0b3776916b fix(ignore): update dependencies (#19466)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-30 20:40:35 +01:00
Artem Sorokin 98c7a2ab56 fix: Add device class for soil_moisture sensor in HA (#19486) 2023-10-30 20:40:05 +01:00
Koen KantersandKoenkk e2fccc219b fix(ignore): update zigbee-herdsman-converters to 15.104.0 (#19479)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-29 18:51:46 +00:00
Koen Kantersandnurikk 6c7be58a3f fix(ignore): update zigbee2mqtt-frontend to 0.6.142 (#19447)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-27 21:43:51 +02:00
Koen Kantersandnurikk 2541feac25 fix(ignore): update zigbee2mqtt-frontend to 0.6.141 (#19446)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-27 19:39:04 +00:00
Koen KantersandKoenkk 7e82a491f6 fix(ignore): update zigbee-herdsman-converters to 15.103.0 (#19443)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-27 18:51:54 +00:00
Franck Nijhof e7749e25e9 fix: Fix entity category of Home Assistant exposed sensor entities (#19434)
* Fix entity category of Home Assistant exposed sensor entities

* ok, testing helps :)
2023-10-27 19:59:47 +02:00
Franck Nijhof d0a4f5f628 fix: Adjust default entity category of updates in Home Assistant (#19435) 2023-10-27 19:59:08 +02:00
Koen KantersandKoenkk 1fa10f6f28 fix(ignore): update zigbee-herdsman-converters to 15.102.0 (#19422)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-25 20:40:07 +02:00
Koen KantersandKoenkk f73cca0e39 fix(ignore): update zigbee-herdsman to 0.21.0 (#19421)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-25 18:30:39 +00:00
Koen Kantersandnurikk 0e55b382ba fix(ignore): update zigbee2mqtt-frontend to 0.6.140 (#19413)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-24 19:53:24 +00:00
dependabot[bot] 4d8c6b2856 chore: Bump actions/setup-node from 3 to 4 (#19411) 2023-10-24 19:14:34 +02:00
Koen KantersandKoenkk 52a545d86e fix(ignore): update zigbee-herdsman-converters to 15.101.0 (#19397)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-23 18:06:40 +00:00
Koen Kantersandnurikk 08a5f32ea9 fix(ignore): update zigbee2mqtt-frontend to 0.6.139 (#19378)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-22 11:54:16 +00:00
Koen KantersandKoenkk 71dd0ab772 fix(ignore): update zigbee-herdsman-converters to 15.100.0 (#19376)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-22 06:54:03 +00:00
Koen KantersandKoenkk 6d387b31c1 fix(ignore): update dependencies (#19375)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-22 08:30:22 +02:00
Koen Kantersandnurikk 17ad362fa7 fix(ignore): update zigbee2mqtt-frontend to 0.6.138 (#19365)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-22 08:29:53 +02:00
Koen KantersandKoenkk 0cd99487cc fix(ignore): update zigbee-herdsman-converters to 15.99.0 (#19366)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-21 09:04:47 +00:00
Koen Kanters e36983b4b5 fix: Publish zigbee-herdsman/zigbee-herdsman-converters version to bridge/info (#19364) 2023-10-21 10:56:31 +02:00
Koen Kanters 62f5dc875a chore: merge master to dev 2023-10-21 09:33:38 +02:00
gizmocuzandKoen Kanters 51f15bd306 Updated Domoticz implementation method (#19355)
* Updated Domoticz implementation method

* Update README.md

* Update README.md

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-10-21 09:33:18 +02:00
Koen KantersandKoenkk 8a28154661 fix(ignore): update zigbee-herdsman-converters to 15.98.0 (#19358)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-20 18:31:59 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ff85c63f29 chore: Bump @babel/traverse from 7.23.0 to 7.23.2 (#19349)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.23.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 16:42:45 +02:00
Koen KantersandKoenkk a86f3d8765 fix(ignore): update zigbee-herdsman-converters to 15.97.0 (#19337)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-18 18:49:42 +00:00
Koen KantersandKoenkk 5d1bd256f9 fix(ignore): update zigbee-herdsman-converters to 15.96.0 (#19328)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-17 18:49:00 +00:00
Koen KantersandKoenkk 3461f11869 fix(ignore): update zigbee-herdsman-converters to 15.95.0 (#19314)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-16 18:20:13 +00:00
Koen KantersandKoenkk 43a5c7b2f0 fix(ignore): update zigbee-herdsman to 0.20.0 (#19313)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-16 17:51:16 +00:00
Koen KantersandKoenkk 81a8df9855 fix(ignore): update zigbee-herdsman-converters to 15.94.2 (#19304)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-15 18:31:26 +00:00
Koen KantersandKoenkk 31541bd6ba fix(ignore): update dependencies (#19301)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-15 08:32:24 +02:00
Koen KantersandKoenkk 70b0fed2de fix(ignore): update zigbee-herdsman-converters to 15.94.1 (#19295)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-14 08:05:14 +00:00
FabianMangold cc86e76a7a fix: Enable incremental TSC builds (#19293) 2023-10-14 08:22:35 +02:00
Koen KantersandKoenkk 29247e19ac fix(ignore): update zigbee-herdsman-converters to 15.94.0 (#19290)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-13 18:23:37 +00:00
Koen KantersandKoenkk afb83fcbd0 fix(ignore): update zigbee-herdsman-converters to 15.93.0 (#19278)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-12 18:26:04 +00:00
Koen KantersandKoenkk a0c13c1c1e fix(ignore): update zigbee-herdsman to 0.19.2 (#19277)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-12 18:00:46 +00:00
Koen KantersandKoenkk d027b85200 fix(ignore): update zigbee-herdsman-converters to 15.92.1 (#19234)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-10 20:25:25 +00:00
kds69andKoen Kanters bd57f45929 chore: Fix cosmetic in homeassistant.ts (#19239)
* Update homeassistant.ts

* Update homeassistant.ts - remove double bracket in condition

No idea if this is what is causing code to be ignored in certain circumstances, but anyway this is cleansing code

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-10-10 22:05:19 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 9cff19b322 chore: Bump stefanzweifel/git-auto-commit-action from 4 to 5 (#19231)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 20:07:25 +02:00
Koen Kanters a9e320e029 chore: merge master to dev 2023-10-08 17:12:50 +02:00
kds69 95d22c0822 fix: Enable Home Assistant force entity by default (#19212) 2023-10-08 17:12:28 +02:00
Koen KantersandKoenkk 2aae1bd54a fix(ignore): update zigbee-herdsman-converters to 15.90.0 (#19209)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-08 07:12:37 +00:00
Koen KantersandKoenkk 9615faac2f fix(ignore): update dependencies (#19208)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-08 09:04:37 +02:00
Laxilef cdce6b11d2 fix: Add in_progress attribute for Home Assistant update sensor (#19207) 2023-10-08 08:54:56 +02:00
Koen KantersandKoenkk de7736a370 fix(ignore): update zigbee-herdsman-converters to 15.89.1 (#19195)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-07 07:10:22 +00:00
Koen KantersandKoenkk fcb0af00d3 fix(ignore): update zigbee-herdsman to 0.19.1 (#19194)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-07 07:00:42 +00:00
koenkk daaade45d9 fix: Fix device keeps requesting OTA due to incorrect transaction sequence number. https://github.com/Koenkk/zigbee2mqtt/issues/19129 2023-10-07 08:55:16 +02:00
Koen KantersandKoenkk b085fac50f fix(ignore): update zigbee-herdsman-converters to 15.89.0 (#19190)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-06 15:03:40 +00:00
Koen KantersandKoenkk 0b60cd1100 fix(ignore): update zigbee-herdsman-converters to 15.88.0 (#19185)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-05 18:46:31 +00:00
dupondje 32c1bdfccb fix: Bump semver version (#19179) 2023-10-05 20:11:28 +02:00
Koen Kantersandnurikk b261f2c6c1 fix(ignore): update zigbee2mqtt-frontend to 0.6.137 (#19165)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-10-04 12:47:48 +00:00
koenkk 8cda915637 chore: fix release-please 2023-10-03 20:54:35 +02:00
Koen KantersandKoenkk de0f060378 fix(ignore): update zigbee-herdsman-converters to 15.87.0 (#19156)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-03 18:15:28 +00:00
koenkk 0edc0cda94 chore: promote to dev 2023-10-03 15:41:31 +02:00
Koen Kanters 7e63039144 chore(dev): release 1.33.1 (#19104) 2023-10-03 11:09:57 +02:00
Koen KantersandKoenkk b990ed9a60 fix(ignore): update zigbee-herdsman-converters to 15.86.1 (#19150)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-03 11:01:54 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ccc0f7ce53 chore: Bump alpine from 3.18.3 to 3.18.4 in /docker (#19116)
Bumps alpine from 3.18.3 to 3.18.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:58:37 +02:00
Rotzbua 83e331323c fix: Correct typos (#19143)
Credit to `codespell`.
2023-10-03 10:54:13 +02:00
Koen KantersandKoenkk 45ce494951 fix(ignore): update zigbee-herdsman-converters to 15.86.0 (#19149)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-03 08:45:18 +00:00
Koen KantersandKoenkk 1c7bb8fc24 fix(ignore): update dependencies (#19127)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-10-03 10:38:48 +02:00
Koen KantersandKoenkk 90763fd83f fix(ignore): update zigbee-herdsman-converters to 15.85.0 (#19102)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-28 10:42:33 +00:00
Koen KantersandKoenkk 7ccb4bcafe fix(ignore): update zigbee-herdsman-converters to 15.84.0 (#19096)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-27 18:59:28 +00:00
Koen KantersandKoenkk a7bb3fc9e8 fix(ignore): update zigbee-herdsman-converters to 15.83.0 (#19088)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-26 18:07:53 +00:00
Koen KantersandKoenkk 1190a342e9 fix(ignore): update zigbee-herdsman-converters to 15.82.0 (#19067)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-24 18:19:07 +00:00
Koen Kanters 31e4e8c552 chore: merge master to dev 2023-09-24 19:49:20 +02:00
koenkk 4d53ac4c84 chore: fix dev branch changelog link https://github.com/Koenkk/zigbee2mqtt/issues/19062 2023-09-24 19:48:55 +02:00
Koen KantersandKoenkk d99da63b89 fix(ignore): update dependencies (#19061)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-24 07:42:03 +02:00
Koen KantersandKoenkk 9a7aeaf62b fix(ignore): update zigbee-herdsman-converters to 15.81.1 (#19041)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-21 18:42:24 +00:00
Koen Kantersandnurikk 9b66ab1367 fix(ignore): update zigbee2mqtt-frontend to 0.6.136 (#19040)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-09-21 18:32:32 +00:00
Koen KantersandKoenkk e3d1c63463 Update zigbee-herdsman-converters to 15.81.0 (#19032)
* fix(ignore): update zigbee-herdsman-converters to 15.81.0

* fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-20 18:27:44 +00:00
Koen KantersandKoenkk af209b6f53 fix(ignore): update zigbee-herdsman-converters to 15.80.0 (#19023)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-19 18:14:44 +00:00
Koen KantersandKoenkk 7b558fef5f Update zigbee-herdsman-converters to 15.79.0 (#19003)
* fix(ignore): update zigbee-herdsman-converters to 15.79.0

* fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-18 17:35:36 +00:00
Koen KantersandKoenkk eac9240e06 fix(ignore): update zigbee-herdsman-converters to 15.78.0 (#18999)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-17 07:17:19 +00:00
Koen KantersandKoenkk 84f9950556 fix(ignore): update zigbee-herdsman to 0.19.0 (#18998)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-17 07:00:37 +00:00
Koen KantersandKoenkk 5477163727 fix(ignore): update dependencies (#18995)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-17 08:46:52 +02:00
Koen KantersandKoenkk 0a69bb54c8 fix(ignore): update zigbee-herdsman-converters to 15.77.0 (#18984)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-16 07:21:58 +00:00
Koen KantersandKoenkk 4040840d8e fix(ignore): update zigbee-herdsman-converters to 15.76.0 (#18978)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-14 19:16:23 +00:00
Koen KantersandKoenkk cc95c85969 fix(ignore): update zigbee-herdsman-converters to 15.75.0 (#18972)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-13 17:58:34 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3b64ea9d92 chore: Bump docker/setup-qemu-action from 2 to 3 (#18956)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:44:07 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 08a1468dda chore: Bump docker/setup-buildx-action from 2 to 3 (#18955)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 19:43:43 +02:00
Koen KantersandKoenkk 6de7662ca8 fix(ignore): update zigbee-herdsman-converters to 15.74.0 (#18949)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-11 18:18:48 +00:00
Koen KantersandKoenkk 4daddfc5f7 Update dependencies (#18923)
* fix(ignore): update dependencies

* fix types/node

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-10 09:28:14 +02:00
Koen KantersandKoenkk d6ed0f45da fix(ignore): update zigbee-herdsman-converters to 15.73.0 (#18917)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-09 06:47:11 +00:00
Koen KantersandKoenkk ea8de2ba1e fix(ignore): update zigbee-herdsman-converters to 15.72.0 (#18901)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-07 19:00:33 +00:00
Koen KantersandKoenkk f509410189 fix(ignore): update zigbee-herdsman-converters to 15.71.0 (#18887)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-06 18:39:23 +00:00
Koen KantersandKoenkk 91a9e32a83 fix(ignore): update zigbee-herdsman-converters to 15.70.0 (#18866)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-04 19:00:31 +00:00
Koen KantersandKoenkk 914b4c6757 fix(ignore): update zigbee-herdsman to 0.18.7 (#18865)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-04 18:43:08 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 03f381fdc2 chore: Bump actions/checkout from 3 to 4 (#18863)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 20:09:44 +02:00
Koen KantersandKoenkk 3285850efa fix(ignore): update zigbee-herdsman-converters to 15.69.0 (#18835)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-03 06:54:30 +00:00
Koen KantersandKoenkk 6654c7f1a3 fix(ignore): update zigbee-herdsman to 0.18.6 (#18838)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-02 07:17:04 +00:00
Koen Kanters d280e5ef2b chore: merge master to dev 2023-09-02 09:08:31 +02:00
rbswift f224ef7b7c chore: Improve update script in case of local changes (#18837)
* Stash local changes to prevent update failing

Call git stash to stash any local changes that would prevent the update.sh script from failing

* Update update.sh

changed to git checkout package-lock.json
2023-09-02 09:08:09 +02:00
Koen Kanters 0543ad4b19 fix: Fix configuration.example.yaml missing from container (#18836) 2023-09-02 08:51:50 +02:00
koenkk 9165bbb7b4 chore: bump release-please bootstrap-sha 2023-09-02 08:50:33 +02:00
koenkk f4ef421d27 chore: promote to dev 2023-09-01 16:05:15 +02:00
Koen Kanters 7ee207fc0e chore(dev): release 1.33.0 (#18490) 2023-09-01 15:57:57 +02:00
Koen KantersandKoenkk e78aa3589b fix(ignore): update zigbee-herdsman-converters to 15.67.1 (#18817)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-01 15:50:16 +02:00
Koen KantersandKoenkk 68169f0e50 fix(ignore): update zigbee-herdsman to 0.18.5 (#18816)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-01 13:45:06 +00:00
Koen KantersandKoenkk 97f6a840e4 fix(ignore): update zigbee-herdsman-converters to 15.67.0 (#18815)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-09-01 13:35:18 +00:00
Koen Kantersandnurikk 9a6445a8a0 fix(ignore): update zigbee2mqtt-frontend to 0.6.135 (#18814)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-09-01 15:27:52 +02:00
Koen KantersandKoenkk 0ec68a4b71 fix(ignore): update zigbee-herdsman-converters to 15.66.1 (#18790)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-31 07:35:19 +00:00
Koen KantersandKoenkk 5084b1293e fix(ignore): update zigbee-herdsman-converters to 15.64.0 (#18784)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-29 06:46:11 +00:00
Koen Kantersandnurikk 4949a54d66 fix(ignore): update zigbee2mqtt-frontend to 0.6.134 (#18761)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-08-27 10:59:06 +00:00
Koen KantersandKoenkk b193d89042 fix(ignore): update zigbee-herdsman-converters to 15.63.0 (#18758)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-27 06:42:34 +00:00
Koen KantersandKoenkk bc17e6406b fix(ignore): update dependencies (#18755)
* fix(ignore): update dependencies

* lock version

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-27 08:36:28 +02:00
Yip Rui Fung d1e50ce534 fix: Use QOS1 for rarely sent discovery and availability messages (#18756)
* Use QOS1 for rarely sent messages

Specifically discovery and availability depending on the set up, it's possible for these messages to be silently discarded by the broker.

Sending them as QOS1 means the mqtt library used will resend them until it gets an ACK.
Ensuring delivery is particularly important for messages that are rarely sent like discovery or availability as they are only sent when there are changes, and nondelivery or dropped messages for them impede proper functioning in home assistant.

* Fix tests for discovery and availability using QOS1
2023-08-27 06:26:07 +00:00
koenkk 677db105e2 chore: remove duplicate object_id warning for function expose 2023-08-26 08:43:47 +02:00
Koen KantersandKoenkk 514d9f38b2 fix(ignore): update zigbee-herdsman-converters to 15.62.0 (#18742)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-26 06:02:23 +00:00
Koen Kanters 704ecf366e feat: Add Home Assistant origin to discovery (#18741) 2023-08-26 07:56:31 +02:00
Koen KantersandKoenkk 1439f4c6ac fix(ignore): update zigbee-herdsman to 0.18.4 (#18727)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-25 07:46:49 +00:00
Koen KantersandKoenkk 6a1b6a1403 fix(ignore): update zigbee-herdsman to 0.18.3 (#18714)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-24 08:27:14 +00:00
Koen KantersandKoenkk 239c8fc70c Update zigbee-herdsman-converters to 15.61.0 (#18713)
* fix(ignore): update zigbee-herdsman-converters to 15.61.0

* u

* u

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-24 08:20:28 +00:00
Artem Draft e33e335c0c feat: Use labels in Home Assistant entity naming (#18678)
* feat: Use labels in Home Assistant entity naming

* tweak comment
2023-08-22 08:07:23 +02:00
Koen KantersandKoenkk 71c4211d13 fix(ignore): update zigbee-herdsman-converters to 15.60.0 (#18672)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-20 15:58:16 +00:00
4b3a2c9f5a feat: Support scene renaming (#18667)
Co-authored-by: Frank van Viegen <frank@vanviegen.net>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-08-20 17:50:10 +02:00
Koen KantersandKoenkk 7185d9e501 fix(ignore): update zigbee-herdsman-converters to 15.59.0 (#18661)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-19 07:17:20 +00:00
Koen KantersandKoenkk dcbf4e5b0e fix(ignore): update zigbee-herdsman-converters to 15.58.1 (#18658)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-18 18:08:05 +00:00
Koen KantersandKoenkk db812cd729 fix(ignore): update zigbee-herdsman to 0.18.2 (#18648)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-17 19:59:06 +00:00
Koen KantersandKoenkk c214f83298 Update zigbee-herdsman-converters to 15.58.0 (#18647)
* fix(ignore): update zigbee-herdsman-converters to 15.58.0

* fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-17 19:24:20 +00:00
Koen KantersandKoenkk 3736b5901b fix(ignore): update zigbee-herdsman to 0.18.1 (#18627)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-15 18:38:11 +00:00
Koen Kanters 3af130a2c0 feat: Support coordinator check (#18599)
* feat: Support coordinator check

* add tests
2023-08-14 20:35:15 +02:00
Koen KantersandKoenkk 145bc05dc3 fix(ignore): update zigbee-herdsman-converters to 15.57.0 (#18616)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-14 17:02:24 +00:00
Koen KantersandKoenkk cc0536c5ab fix(ignore): update zigbee-herdsman to 0.18.0 (#18600)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-13 07:13:00 +00:00
Koen KantersandKoenkk 0d00a144f5 fix(ignore): update dependencies (#18598)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-13 08:45:32 +02:00
Koen Kanters aa021d988d feat: Support generating extended_pan_id (#18596)
* feat: Support generating extended_pan_id

* Update configuration.example.yaml
2023-08-12 15:07:30 +02:00
Koen KantersandKoenkk ea147900ab Update zigbee-herdsman-converters to 15.56.0 (#18593)
* fix(ignore): update zigbee-herdsman-converters to 15.56.0

* Update bridge.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-12 12:39:00 +00:00
Koen KantersandKoenkk b1796e3e1a fix(ignore): update zigbee-herdsman-converters to 15.55.3 (#18578)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-10 16:23:27 +00:00
koenkk b55cc0a037 fix(ignore): chore: Update dependencies (#18459) 2023-08-09 20:04:20 +02:00
Koen KantersandKoenkk 8675b1c9ed fix(ignore): update zigbee-herdsman-converters to 15.55.2 (#18566)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-09 18:00:54 +00:00
koenkk b09b8ec3d6 fix(ignore): Revert "chore: Update dependencies (#18459)"
This reverts commit 53cb42103c.
2023-08-09 07:33:27 +02:00
Koen KantersandKoenkk 7f05f31c72 fix(ignore): update zigbee-herdsman-converters to 15.55.1 (#18557)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-08 18:10:21 +00:00
Koen KantersandKoenkk 53cb42103c chore: Update dependencies (#18459)
* fix(ignore): update dependencies

* Make compatible with MQTT 5

* updates

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-08 20:04:22 +02:00
Koen KantersandKoenkk a892a1b898 fix(ignore): update zigbee-herdsman to 0.17.3 (#18556)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-08 17:49:39 +00:00
Koen Kanters 1f52faee39 feat: Drop Node.js 14 support (#18555) 2023-08-08 19:40:22 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> e0038380c7 chore: Bump alpine from 3.18.2 to 3.18.3 in /docker (#18554)
Bumps alpine from 3.18.2 to 3.18.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 19:37:05 +02:00
Koen KantersandKoenkk 6050428566 fix(ignore): update zigbee-herdsman-converters to 15.55.0 (#18547)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-07 17:03:41 +00:00
Koen KantersandKoenkk b5e9ed436c fix(ignore): update zigbee-herdsman-converters to 15.54.1 (#18537)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-06 07:14:43 +00:00
Koen Kanters cf313c503b fix: Generate pan_id for new installations (#18530) 2023-08-05 13:22:31 +02:00
Koen KantersandKoenkk abba8b3ba8 fix(ignore): update zigbee-herdsman-converters to 15.54.0 (#18527)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-05 06:40:44 +00:00
Koen KantersandKoenkk f08cd81ac0 fix(ignore): update zigbee-herdsman-converters to 15.53.0 (#18524)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-04 17:37:59 +00:00
Koen Kanters 68ec507e30 fix: Add secure default config (#18357)
* fix: Add secure default config. https://github.com/Koenkk/zigbee2mqtt/issues/16188

* Enable frontend by default
2023-08-03 20:48:23 +02:00
Koen KantersandKoenkk 0718ca162d fix(ignore): update zigbee-herdsman-converters to 15.52.0 (#18514)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-03 18:39:15 +00:00
Koen KantersandKoenkk 2d917a7d0d fix(ignore): update zigbee-herdsman-converters to 15.51.0 (#18501)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-02 18:09:54 +00:00
koenkk ed22ecedbf fix: Fix Home Assistant TypeError: object of type 'NoneType' has no len() error. https://github.com/Koenkk/zigbee2mqtt/issues/17861 2023-08-02 19:34:39 +02:00
Koen Kanters f6196107a7 fix: Fix Home Assistant `MQTT device name is equal to entity name in your config (#18491)
* fix: Fix Home Assistant `MQTT device name is equal to entity name in your config` error. https://github.com/Koenkk/zigbee2mqtt/issues/18445

* remove onlythis
2023-08-01 20:39:02 +02:00
koenkk 49920ce093 chore: use .md extension for changelog 2023-08-01 20:15:01 +02:00
koenkk 33543c8588 chore: use GH_TOKEN for gist edit 2023-08-01 20:07:05 +02:00
koenkk c1413afa04 chore: publish changelog in gist 2023-08-01 20:04:14 +02:00
Koen Kanters df93e4c8f9 feat: Let Home Assistant generate entity name when device_class is present (#18208) 2023-08-01 19:46:24 +02:00
koenkk 7709af8a5e chore: promote to dev 2023-08-01 19:25:37 +02:00
Koen Kanters 1ec1e57244 chore(dev): release 1.32.2 (#18486) 2023-08-01 19:18:26 +02:00
koenkk 758b8144a1 fix(ignore): fix commit-user-lookup cache 2023-08-01 18:29:22 +02:00
koenkk 590564c158 fix(ignore): Attempt 3 to fix commit-user-lookup 2023-08-01 18:23:24 +02:00
koenkk ea412cfe82 fix(ignore): Attempt 2 to fix cache saving 2023-08-01 18:17:11 +02:00
koenkk fa02bb5b74 fix(ignore): Attempt to fix cache not saving 2023-08-01 18:11:36 +02:00
Koen KantersandKoenkk 683d29f9f7 fix(ignore): update zigbee-herdsman-converters to 15.50.1 (#18487)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-01 18:00:02 +02:00
Koen KantersandKoenkk 3478e40017 fix(ignore): update zigbee-herdsman-converters to 15.50.0 (#18475)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-01 15:30:00 +00:00
koenkk ba0cc61965 fix(ignore): Fix failing test 2023-07-31 18:05:00 +02:00
Koen KantersandKoenkk 8139d7f1f4 fix(ignore): update zigbee-herdsman-converters to 15.49.0 (#18443)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-27 17:59:55 +00:00
Koen KantersandKoenkk d487f37a7a fix(ignore): update zigbee-herdsman-converters to 15.48.0 (#18438)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-26 19:42:36 +00:00
Koen KantersandKoenkk 087b85cb9f fix(ignore): update zigbee-herdsman-converters to 15.47.0 (#18430)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-25 18:10:45 +00:00
Ilya KirovandKoen Kanters 4bd281ce6c fix(ignore): Add ep l till 24 (#18422)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-07-25 17:53:31 +00:00
Koen KantersandKoenkk ced3d43dad fix(ignore): update zigbee-herdsman-converters to 15.46.0 (#18421)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-24 17:50:49 +00:00
Jorge Schrauwen 91f22f1230 fix(ignore): Add th1-th10 endpoints for Ubisys H10 (#18405)
See koenkk/zigbee2mqtt#18121
2023-07-23 18:37:56 +02:00
Koen KantersandKoenkk 57d031d54a fix(ignore): update zigbee-herdsman-converters to 15.45.0 (#18404)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-23 07:49:55 +00:00
Koen KantersandKoenkk 8e946623a9 fix(ignore): update dependencies (#18403)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-23 09:15:07 +02:00
Koen Kantersandnurikk e1d52ae43a fix(ignore): update zigbee2mqtt-frontend to 0.6.133 (#18390)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-07-21 15:53:43 +00:00
Koen Kanters f64cd7e8f3 fix: Fix socket error crashing Zigbee2MQTT (#18388) 2023-07-21 14:51:39 +00:00
Bruno Bierbaumer df8e1687b2 fix: Fix insecure Zigbee network encryption key generation (#18372) 2023-07-20 19:26:29 +02:00
Koen KantersandKoenkk 3408e3c05a fix(ignore): update zigbee-herdsman-converters to 15.44.0 (#18365)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-19 17:46:37 +00:00
Koen KantersandKoenkk 7a22cee639 fix(ignore): update zigbee-herdsman-converters to 15.43.0 (#18356)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-18 18:32:43 +00:00
koenkk dec91919bc fix: Fix 'dict object' has no attribute 'ir_code_to_send' error. https://github.com/Koenkk/zigbee2mqtt/issues/18180 2023-07-18 19:53:48 +02:00
Koen KantersandKoenkk 313865b0a3 fix(ignore): update zigbee-herdsman-converters to 15.42.0 (#18343)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-17 18:07:42 +00:00
Koen KantersandKoenkk ee1a5f0400 fix(ignore): update dependencies (#18260)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-16 09:05:30 +02:00
Koen Kanters 7f2803b020 chore: merge master to dev 2023-07-16 08:44:34 +02:00
koenkk 83205e43da chore: fix d22d45a697 2023-07-16 08:41:41 +02:00
Koen Kanters 45e127e22f chore: merge master to dev 2023-07-16 08:39:51 +02:00
koenkk d22d45a697 chore: don't update @types/ws package 2023-07-16 08:39:23 +02:00
Koen KantersandKoenkk 330a913e76 fix(ignore): update zigbee-herdsman-converters to 15.41.0 (#18328)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-15 07:18:43 +00:00
Koen KantersandKoenkk af0521b54c fix(ignore): update zigbee-herdsman-converters to 15.40.0 (#18314)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-13 18:20:52 +00:00
Koen Kanters 8cf8cc0231 chore: merge master to dev 2023-07-13 19:59:31 +02:00
arteck f5f5b037b8 chore: Add iobroker intergration (#18308)
* Update README.md

* Update README.md
2023-07-13 19:56:26 +02:00
Brandon Rothweiler 1252f10d39 fix: Use HA sensor device class atmospheric_pressure instead of pressure (#18306)
* Update homeassistant.ts

* Update tests
2023-07-13 19:55:19 +02:00
Koen KantersandKoenkk a3c8e1c3c9 fix(ignore): update zigbee-herdsman-converters to 15.39.1 (#18292)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-11 19:46:51 +02:00
Koen KantersandKoenkk 073989c7a4 fix(ignore): update zigbee-herdsman to 0.17.2 (#18291)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-11 19:45:58 +02:00
Koen Kantersandnurikk 05eff957eb fix(ignore): update zigbee2mqtt-frontend to 0.6.132 (#18289)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-07-11 12:56:33 +00:00
Koen KantersandKoenkk 3c855d2042 fix(ignore): update zigbee-herdsman-converters to 15.39.0 (#18282)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-10 20:06:48 +02:00
koenkk 0bdf663ca1 fix: Fix not all cluster unbound/bound when specified. https://github.com/Koenkk/zigbee2mqtt/issues/10740 2023-07-10 20:00:57 +02:00
Koen KantersandKoenkk 813dd49a41 fix(ignore): update zigbee-herdsman-converters to 15.38.0 (#18262)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-09 12:12:40 +00:00
koenkk dab7e6a1ae chore: Merge branch 'master' into dev 2023-07-08 09:36:24 +02:00
koenkk b73c3e3dfb Revert "fix(ignore): update zigbee-herdsman-converters to 15.33.1-hotfix.0 (#18247)"
This reverts commit 1046f0e74a.
2023-07-08 09:34:55 +02:00
koenkk 4ccfdfc6f4 chore: release 1.32.1 2023-07-08 09:32:42 +02:00
koenkk 15601d6339 fix(ignore): Update zigbee-herdsman-converters to 15.33.1-hotfix.0 2023-07-08 09:21:42 +02:00
Koen KantersandKoenkk 1046f0e74a fix(ignore): update zigbee-herdsman-converters to 15.33.1-hotfix.0 (#18247)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-08 07:18:57 +00:00
Koen KantersandKoenkk 032e5238b8 fix(ignore): update zigbee-herdsman-converters to 15.37.0 (#18244)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-07 18:52:01 +00:00
Koen KantersandKoenkk 5b3fdf7b9f fix(ignore): update zigbee-herdsman to 0.17.1 (#18234)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-06 20:00:03 +02:00
Koen KantersandKoenkk 0489e75e1e fix(ignore): update zigbee-herdsman to 0.17.0 (#18232)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-06 14:31:34 +00:00
Koen KantersandKoenkk eb655f17db fix(ignore): update zigbee-herdsman-converters to 15.36.0 (#18227)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-05 17:27:06 +00:00
Koen KantersandKoenkk d8c7c00ca2 fix(ignore): update zigbee-herdsman-converters to 15.35.1 (#18216)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-04 19:07:31 +00:00
Koen KantersandKoenkk 9aa7e1ec86 fix(ignore): update zigbee-herdsman-converters to 15.35.0 (#18215)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-04 17:24:31 +00:00
Koen Kantersandnurikk caa652b0ad fix(ignore): update zigbee2mqtt-frontend to 0.6.131 (#18194)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-07-03 10:08:04 +00:00
Koen Kanters 08e82e4980 chore: Add changelog to release PR (#18183) 2023-07-02 09:49:51 +02:00
Koen KantersandKoenkk 5067721fdf fix(ignore): update zigbee-herdsman-converters to 15.34.0 (#18181)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-02 09:19:51 +02:00
koenkk b014857a13 chore: promote to dev 2023-07-01 13:08:01 +02:00
koenkk eb7945248b chore: disable latest-dev version publishing 2023-07-01 13:07:46 +02:00
Koen Kanters 69638d7956 chore(dev): release 1.32.0 (#18163) 2023-07-01 12:50:40 +02:00
koenkk 953f3a232b chore: Fix release please 2023-07-01 12:25:11 +02:00
Koen KantersandKoenkk d1824f169b fix(ignore): update zigbee-herdsman-converters to 15.33.1 (#18161)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-07-01 06:37:59 +00:00
Koen KantersandKoenkk 81973c3a2a fix(ignore): update zigbee-herdsman-converters to 15.33.0 (#18156)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-30 17:05:35 +00:00
Koen Kanters 213e2b50d6 chore: merge master to dev 2023-06-30 18:52:54 +02:00
gruijter 0a63ae5376 chore: Added Homey Integration to README.md (#18152) 2023-06-30 18:52:33 +02:00
Koen KantersandKoenkk 61dd1dd96d fix(ignore): update zigbee-herdsman-converters to 15.32.0 (#18132)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-27 19:05:48 +00:00
Koen KantersandKoenkk ed85367e53 fix(ignore): update zigbee-herdsman-converters to 15.31.0 (#18125)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-26 17:47:42 +00:00
Koen KantersandKoenkk 38c2ea5bf7 fix(ignore): update zigbee-herdsman to 0.16.0 (#18124)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-26 17:40:00 +00:00
Koen KantersandKoenkk 2d62027e24 fix(ignore): update zigbee-herdsman to 0.15.3 (#18116)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-25 10:00:07 +02:00
Koen KantersandKoenkk a56719d19c fix(ignore): update zigbee-herdsman-converters to 15.30.0 (#18115)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-25 09:59:01 +02:00
Koen Kanters 94744525ba feat: Support settable Home Assistant text (#18114) 2023-06-25 09:23:13 +02:00
koenkk ea193f1938 Revert "fix(ignore): update dependencies (#18112)"
This reverts commit 57566c76ed.
2023-06-25 09:19:27 +02:00
koenkk 88339473ce fix(ignore): Fix DeviceMessage.meta type 2023-06-25 09:16:36 +02:00
github-actions[bot]andKoenkk 57566c76ed fix(ignore): update dependencies (#18112)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-25 08:12:19 +02:00
koenkk a09342836b chore: Improve changelog generator 2023-06-23 18:24:12 +02:00
Koen Kanters b3fbf78bec chore: Fix changelog generator cache (#18100)
* chore: Fix changelog

* u

* u

* u

* u

* u
2023-06-23 18:14:35 +02:00
Koen KantersandKoenkk a744838e9c fix(ignore): update zigbee-herdsman-converters to 15.29.0 (#18099)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-23 16:06:47 +00:00
koenkk 712c7bdbaf chore: Cache commit users in changelog generator 2023-06-22 21:10:10 +02:00
Koen KantersandKoenkk 6d3389b409 fix(ignore): update zigbee-herdsman-converters to 15.28.0 (#18092)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-22 18:46:31 +00:00
Koen KantersandKoenkk 03005b38c8 fix(ignore): update zigbee-herdsman to 0.15.2 (#18091)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-22 18:37:39 +00:00
Koen KantersandKoenkk 17cff2a26f fix(ignore): update zigbee-herdsman to 0.15.1 (#18080)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-21 17:32:24 +00:00
Koen KantersandKoenkk 5777d76e55 fix(ignore): update zigbee-herdsman-converters to 15.27.0 (#18075)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-20 17:18:43 +00:00
Koen KantersandKoenkk 91d67a0ef5 fix(ignore): update zigbee-herdsman-converters to 15.26.0 (#18067)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-19 19:09:38 +00:00
Grégoire SeuxandKoen Kanters e083a6bff7 feat: Support Home Assistant water device_class (#18066)
This should be sufficient for https://www.zigbee2mqtt.io/devices/ZVG1.html to be water_consumed sensor to be usable in Energy dashboard (water section).

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-06-19 19:21:43 +02:00
Koen KantersandKoenkk 57aaa5a85a fix(ignore): update zigbee-herdsman-converters to 15.25.0 (#18056)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-18 10:03:48 +00:00
koenkk 34bad92ec6 chore: fix update_deps 2023-06-18 11:00:53 +02:00
Koen Kanters b6a4acda9b Revert "fix(ignore): update dependencies (#18052)" (#18053)
This reverts commit 1dc0b24e9a.
2023-06-18 10:56:59 +02:00
github-actions[bot]andKoenkk 1dc0b24e9a fix(ignore): update dependencies (#18052)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-18 10:40:32 +02:00
dependabot[bot] 38de19bb2c chore: Bump alpine from 3.18.0 to 3.18.2 in /docker (#18030) 2023-06-15 18:56:06 +02:00
Koen KantersandKoenkk c47f5df021 fix(ignore): update zigbee-herdsman-converters to 15.24.0 (#18025)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-14 18:31:21 +00:00
Koen KantersandKoenkk 4ad838c114 fix(ignore): update zigbee-herdsman-converters to 15.23.0 (#18015)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-13 19:41:02 +00:00
Koen KantersandKoenkk b0b3aee648 fix(ignore): update zigbee-herdsman-converters to 15.22.0 (#18004)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-12 16:26:26 +00:00
koenkk 446dbbf1fc fix(ignore): Fix e10dd893ab 2023-06-12 18:22:15 +02:00
koenkk 11f0be55d8 fix: Fix Home Assistant truncate error when program is null. https://github.com/Koenkk/zigbee2mqtt/issues/16460 2023-06-12 18:10:45 +02:00
github-actions[bot]andKoenkk e10dd893ab fix(ignore): update dependencies (#17991)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-12 17:22:42 +02:00
Koen KantersandKoenkk 0dd899679d Update zigbee-herdsman-converters to 15.21.2 (#17967)
* fix(ignore): update zigbee-herdsman-converters to 15.21.2

* fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-08 21:42:29 +00:00
Koen KantersandKoenkk 05cab61e1f fix(ignore): update zigbee-herdsman to 0.15.0 (#17966)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-08 23:10:44 +02:00
Koen KantersandKoenkk 0c7e7e5089 fix(ignore): update zigbee-herdsman-converters to 15.20.0 (#17954)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-08 07:25:05 +00:00
koenkk 5f71776434 chore: improve changelog generator 2023-06-08 09:20:42 +02:00
Koen Kanters a7e02a7be8 fix(ignore): Better fix for #17891 (#17951)
* fix(ignore): Better fix for #17891

* remove onlythis
2023-06-08 09:04:14 +02:00
koenkk 7df6b2bab5 chore: Merge branch 'master' into dev 2023-06-07 20:24:57 +02:00
koenkk 21f51258a9 chore: release 1.31.2 2023-06-07 20:17:06 +02:00
koenkk c6904686c3 fix: Update zhc to 15.13.1-hotfix.1 2023-06-07 20:16:23 +02:00
koenkk a1bea8c5ab chore: Fix changelog generator 2023-06-07 16:48:26 +02:00
Koen KantersandKoenkk c23d244405 Update zigbee-herdsman-converters to 15.19.1 (#17941)
* fix(ignore): update zigbee-herdsman-converters to 15.19.1

* fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-07 14:30:11 +00:00
koenkk 86898e5ceb chore: Merge branch 'master' into dev 2023-06-07 14:57:48 +02:00
koenkk 3572c60770 chore: release 1.31.1 2023-06-07 14:55:08 +02:00
koenkk ffc7ab83a2 fix: Update zhc to 15.13.1-hotfix.0 2023-06-07 14:54:34 +02:00
Sean Kelly c12bedb3e5 fix: Fix HA entities unavailable after broker restart when broker does not persist retained messages (#17891)
* Fix race condition with bridge status message cancelling reinitialize after a reconnect to mqtt

* Fix tests
2023-06-07 09:16:11 +02:00
Koen KantersandKoenkk fd1622ba80 fix(ignore): update zigbee-herdsman-converters to 15.18.0 (#17917)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-05 08:44:21 +00:00
Koen KantersandKoenkk 7564019ecd fix(ignore): update zigbee-herdsman-converters to 15.17.0 (#17909)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-04 12:18:21 +00:00
koenkk 6d381da075 chore: fix ci.yml 2023-06-04 14:01:49 +02:00
github-actions[bot]andKoenkk b10aa83fc8 fix(ignore): update dependencies (#17903)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-04 13:47:46 +02:00
Koen KantersandKoenkk a7997a3cd4 fix(ignore): update zigbee-herdsman-converters to 15.16.0 (#17900)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-03 16:07:49 +00:00
Koen KantersandKoenkk 73c19bff71 fix(ignore): update zigbee-herdsman-converters to 15.15.1 (#17884)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-02 17:58:16 +00:00
Koen KantersandKoenkk 80aa21123c fix(ignore): update zigbee-herdsman-converters to 15.15.0 (#17872)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-02 07:52:26 +00:00
koenkk afd1760b6f chore: Fix changelog generator 2023-06-02 09:47:58 +02:00
Koen KantersandKoenkk ddcab827ad Update zigbee-herdsman-converters to 15.14.1 (#17859)
* fix(ignore): update zigbee-herdsman-converters to 15.14.1

* fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-01 14:29:42 +00:00
koenkk d0a41548fd chore: Exclude node_modules from TS compiler 2023-06-01 16:10:05 +02:00
koenkk ff8e6b9c66 chore: fix release_please.yml 2023-06-01 15:25:20 +02:00
koenkk 25f30a94f5 Revert "chore: promote to dev"
This reverts commit efe451df79.
2023-06-01 15:15:24 +02:00
Koenkk efe451df79 chore: promote to dev 2023-06-01 13:13:42 +00:00
koenkk b97a09c75b chore: improve release_please.yml 2023-06-01 14:39:25 +02:00
koenkk f3b8c689a9 chore: improve release_please.yml 2023-06-01 14:36:39 +02:00
koenkk 4d1a8ee873 chore: promote to dev 2023-06-01 11:30:16 +02:00
Koen Kanters f440c86019 chore(dev): release 1.31.0 (#17772) 2023-06-01 11:06:39 +02:00
Koen KantersandKoenkk 4b20dfafab fix(ignore): update zigbee-herdsman-converters to 15.13.1 (#17851)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-06-01 08:34:42 +00:00
Koen KantersandKoenkk b228d9daf6 fix(ignore): update zigbee-herdsman-converters to 15.13.0 (#17842)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-31 08:10:14 +00:00
Koen KantersandKoenkk be82b737be fix(ignore): update zigbee-herdsman-converters to 15.12.0 (#17837)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-30 09:50:17 +02:00
Koen Kanters d119f609de fix(ignore): Fix build (#17838) 2023-05-30 09:50:05 +02:00
github-actions[bot]andKoenkk a71857c723 fix(ignore): update dependencies (#17811)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-28 14:27:10 +02:00
Koen Kanters a404f9ff92 chore: merge master to dev 2023-05-27 16:36:37 +02:00
koenkk 0cbbf40040 chore: improve merge_master_to_dev.yml 2023-05-27 16:36:05 +02:00
Koen Kanters 277ac10e44 2023-05-27 16:32:16 +02:00
github-actions[bot]andKoenkk 2e8dfbb96e fix(ignore): update zigbee-herdsman-converters to 15.11.0 (#17808)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-27 16:30:07 +02:00
koenkk 366642cf71 chore: improve ci/cd 2023-05-27 16:29:57 +02:00
github-actions[bot]andKoenkk b7b3b51cfe fix(ignore): update zigbee-herdsman-converters to 15.10.0 (#17797)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-26 10:11:03 +02:00
koenkk e6f9aeda06 fix: Fix Home Assistant Payload is not supported (e.g. open, closed, opening, closing, stopped): STOP error. https://github.com/Koenkk/zigbee2mqtt/issues/17552 2023-05-26 09:32:29 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> bad365b9a7 chore: Bump actions/download-artifact from 2 to 3 (#17793)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 09:10:58 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1f8a68d4c9 chore: Bump actions/upload-artifact from 2 to 3 (#17794)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 09:10:44 +02:00
koenkk 443d5ea43c chore: fix ci.yml 2023-05-25 10:29:18 +02:00
koenkk af0cea0fb9 chore: fix release_please.yml 2023-05-25 10:25:27 +02:00
Koen Kanters 3701cce15e 2023-05-25 10:23:39 +02:00
github-actions[bot]andKoenkk 5b807c36ec fix(ignore): update zigbee-herdsman-converters to 15.9.0 (#17791)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-25 10:23:22 +02:00
koenkk 7cea62995c chore: fix ci.yml 2023-05-25 10:23:12 +02:00
koenkk 2a7d49b709 chore: automate releasing 2023-05-25 10:12:46 +02:00
Koen Kanters 1b7138e0c8 2023-05-25 09:19:40 +02:00
koenkk 0476b3362e Add merge_master_to_dev.yml 2023-05-25 09:19:05 +02:00
koenkk 3ed7ac90c9 chore: fix generateChangelog.js and ci.yml 2023-05-24 16:56:08 +02:00
github-actions[bot]andKoenkk 8b579b6533 fix(ignore): update zigbee-herdsman-converters to 15.8.2 (#17789)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-24 16:41:06 +02:00
koenkk 2d731ba1b6 chore: fix release_please.yml 2023-05-24 13:13:41 +02:00
koenkk 6a80d187fd Merge branch 'master' into dev 2023-05-24 13:11:44 +02:00
koenkk 1e8c3d05e5 chore: update ci config 2023-05-24 13:09:38 +02:00
koenkk ce7f09afc6 Update update_dependency.yml 2023-05-24 09:04:36 +02:00
koenkk c0e8efcde5 Add update_dependency.yml 2023-05-24 09:00:44 +02:00
github-actions[bot]andKoenkk 1344ae0616 feat(ignore): update zigbee-herdsman-converters to 15.7.0 (#17777)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-23 11:43:05 +00:00
github-actions[bot]andKoenkk 24baed3053 feat(ignore): update zigbee-herdsman-converters to 15.6.0 (#17774)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-23 12:45:35 +02:00
koenkk 8e95061fe5 Update release_please config 2023-05-23 12:17:48 +02:00
koenkk 626b2c47c1 Update config.yml 2023-05-23 12:15:15 +02:00
koenkk 95dff212e7 Update config.yml 2023-05-23 12:13:47 +02:00
koenkk c6416c9c61 Fix config.yml 2023-05-23 12:12:13 +02:00
koenkk 1898140f64 Update config.yml 2023-05-23 12:11:44 +02:00
github-actions[bot]andKoenkk 8457c3735b fix(ignore): update zigbee-herdsman to 0.14.117 (#17770)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-23 11:38:29 +02:00
koenkk 47c08b6cbd Merge branch 'master' into dev 2023-05-22 18:46:17 +02:00
koenkk b3de973af6 feat(ignore): update CI/CD 2023-05-22 18:45:47 +02:00
koenkk 0d17d26133 feat(ignore): update CI/CD 2023-05-22 18:38:28 +02:00
koenkk c802e776d6 Merge branch 'master' into dev 2023-05-22 16:56:42 +02:00
github-actions[bot]andKoenkk aa0f78269f chore: update zigbee-herdsman-converters to 15.5.0 (#17754)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-22 14:50:28 +00:00
koenkk 97b14cc2d4 Add release-please 2023-05-22 16:41:31 +02:00
github-actions[bot]andKoenkk d952ee60a9 Update dependencies (#17739)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-22 13:31:28 +02:00
github-actions[bot]andKoenkk 3d3bff88d7 Update zigbee-herdsman-converters to 15.0.117 (#17750)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-22 08:40:10 +00:00
github-actions[bot]andKoenkk c1cb4697f7 Update zigbee-herdsman-converters to 15.0.116 (#17736)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-20 12:55:49 +00:00
github-actions[bot]andKoenkk bfc51e0dc5 Update zigbee-herdsman-converters to 15.0.115 (#17700)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-16 17:55:56 +00:00
github-actions[bot]andKoenkk d339460269 Update zigbee-herdsman-converters to 15.0.114 (#17691)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-15 17:44:34 +00:00
Pierre-Gilles Leymarie fb60deeebc Add Gladys Assistant compatibility in README (#17686)
* Add Gladys Assistant integration in README

* Fix indentation

* Add <br> to align items

* Test with just one br
2023-05-15 17:22:13 +02:00
1b65ff5a65 Update zigbee-herdsman-converters to 15.0.113 (#17676)
* Update zigbee-herdsman-converters to 15.0.113

* Fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-05-14 18:01:04 +02:00
github-actions[bot]andKoenkk e3ebb1c5bc Update dependencies (#17672)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-14 17:09:02 +02:00
github-actions[bot]andKoenkk 099a8d35b0 Update zigbee-herdsman-converters to 15.0.112 (#17660)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-12 18:32:50 +00:00
github-actions[bot]andKoenkk 3085608a35 Update zigbee-herdsman-converters to 15.0.111 (#17646)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-11 18:29:49 +00:00
github-actions[bot]andKoenkk 307e0dcadd Update zigbee-herdsman-converters to 15.0.110 (#17631)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-10 18:08:42 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> aeb737012c Bump alpine from 3.17.3 to 3.18.0 in /docker (#17630)
Bumps alpine from 3.17.3 to 3.18.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-10 19:43:37 +02:00
github-actions[bot]andKoenkk dddd2bca88 Update zigbee-herdsman-converters to 15.0.109 (#17620)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-09 17:51:07 +00:00
Koen Kanters daedc54dd6 Update wrong_device.yaml 2023-05-09 19:30:18 +02:00
Koen Kanters df80a11663 Fix incorrect message being published when entity contains light or cover. https://github.com/Koenkk/zigbee2mqtt/issues/17594 2023-05-09 19:26:46 +02:00
github-actions[bot]andKoenkk a6bebf1e7a Update zigbee-herdsman-converters to 15.0.108 (#17603)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-08 19:11:34 +00:00
github-actions[bot]andKoenkk 52fdbbe057 Update zigbee-herdsman to 0.14.115 (#17602)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-08 20:27:28 +02:00
github-actions[bot]andKoenkk b2422589dc Update dependencies (#17581)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-08 20:21:24 +02:00
github-actions[bot]andKoenkk d602426951 Update zigbee-herdsman-converters to 15.0.106 (#17589)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-07 17:13:43 +00:00
Koen Kanters 64009d0dbb Fix Home Assistant State max length is 255 characters error for program sensor. https://github.com/Koenkk/zigbee2mqtt/issues/16460 2023-05-07 09:18:58 +02:00
github-actions[bot]andnurikk b8e46075df Update zigbee2mqtt-frontend to 0.6.129 (#17579)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-05-06 14:50:12 +00:00
github-actions[bot]andKoenkk 589d656594 Update zigbee-herdsman-converters to 15.0.105 (#17577)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-06 14:19:06 +00:00
github-actions[bot]andKoenkk 0872c670ad Update zigbee-herdsman to 0.14.114 (#17575)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-06 10:37:40 +00:00
github-actions[bot]andKoenkk 9b68684428 Update zigbee-herdsman-converters to 15.0.104 (#17573)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-05 18:29:10 +00:00
github-actions[bot]andKoenkk 626b8d2b08 Update zigbee-herdsman-converters to 15.0.103 (#17564)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-04 18:05:17 +00:00
github-actions[bot]andKoenkk 10d111e36a Update zigbee-herdsman-converters to 15.0.102 (#17555)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-03 18:29:59 +00:00
github-actions[bot]andKoenkk eb93c8aed7 Update zigbee-herdsman to 0.14.113 (#17554)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-03 18:18:56 +00:00
github-actions[bot]andKoenkk fe005e478a Update zigbee-herdsman-converters to 15.0.101 (#17543)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-02 17:56:22 +00:00
github-actions[bot]andKoenkk 8f88c4d26c Update zigbee-herdsman to 0.14.112 (#17523)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-05-01 17:14:11 +00:00
Koen Kanters 946887b841 Promote to dev 2023-05-01 18:41:46 +02:00
Koen Kanters b2dd21e164 1.30.4 2023-05-01 18:40:11 +02:00
Koen Kanters 01f4f1f940 Undev 2023-05-01 18:38:57 +02:00
Koen Kanters 563eb3a890 Merge branch 'dev' 2023-05-01 18:38:16 +02:00
github-actions[bot]andKoenkk ab4101dae8 Update zigbee-herdsman-converters to 15.0.100 (#17511)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-30 17:42:01 +00:00
9ab37735fe Update zigbee-herdsman-converters to 15.0.99 (#17503)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-04-30 16:30:36 +00:00
github-actions[bot]andKoenkk 8f275f414b Update zigbee-herdsman to 0.14.111 (#17504)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-30 07:32:09 +00:00
github-actions[bot]andKoenkk 55b17c95a4 Update dependencies (#17501)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-30 08:24:47 +02:00
github-actions[bot]andKoenkk 13c7348a97 Update zigbee-herdsman to 0.14.110 (#17486)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-28 17:58:44 +00:00
github-actions[bot]andKoenkk 62453a5d2a Update zigbee-herdsman-converters to 15.0.98 (#17476)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-27 17:38:14 +00:00
github-actions[bot]andKoenkk 9840433fc0 Update zigbee-herdsman-converters to 15.0.97 (#17470)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-27 07:27:05 +00:00
Aarni Koskela 8fe36d74ec Typo fixes (#17440)
* Fix "Succesfully"

* Fix herdsman typo

* Fix various other small typos
2023-04-27 09:14:04 +02:00
github-actions[bot]andKoenkk 8e85a1e081 Update zigbee-herdsman to 0.14.109 (#17469)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-27 07:12:42 +00:00
ce9a8ed86f Update zigbee-herdsman-converters to 15.0.96 (#17453)
* Update zigbee-herdsman-converters to 15.0.96

* Fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-04-24 19:34:18 +00:00
github-actions[bot]andKoenkk 49a1f56641 Update zigbee-herdsman-converters to 15.0.95 (#17428)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-23 07:50:40 +00:00
github-actions[bot]andKoenkk 76cf6fa444 Update dependencies (#17427)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-23 08:36:46 +02:00
Koen Kanters e1ecbd97d0 Wrong device issue improvements 2023-04-22 20:47:08 +02:00
Koen Kanters c389ab28cd Add wrong device issue 2023-04-22 20:44:23 +02:00
Koen Kanters 4c0c69b15f Support Node.js 20 (#17422) 2023-04-22 16:53:15 +02:00
github-actions[bot]andKoenkk 704bbb54d3 Update zigbee-herdsman-converters to 15.0.94 (#17407)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-20 19:29:39 +00:00
github-actions[bot]andKoenkk 17947aa809 Update zigbee-herdsman-converters to 15.0.93 (#17386)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-18 17:42:08 +00:00
github-actions[bot]andKoenkk 33811fec9f Update zigbee-herdsman-converters to 15.0.92 (#17378)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-17 16:35:22 +00:00
github-actions[bot]andKoenkk 76cd07a701 Update zigbee-herdsman-converters to 15.0.91 (#17367)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-16 19:25:16 +00:00
github-actions[bot]andKoenkk e2b18d8f02 Update zigbee-herdsman to 0.14.108 (#17357)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-16 07:53:49 +00:00
b3c886638a Update dependencies (#17354)
* Update dependencies

* Fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-04-16 08:56:31 +02:00
Sven Serlier f9121b2f0f Readme improvements (#17350)
* Update URLs

* Add more URLs
2023-04-15 19:06:56 +02:00
github-actions[bot]andKoenkk fb827f9dc0 Update zigbee-herdsman to 0.14.107 (#17351)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-15 17:06:40 +00:00
github-actions[bot]andKoenkk e5be5b0219 Update zigbee-herdsman-converters to 15.0.90 (#17343)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-15 08:04:45 +00:00
github-actions[bot]andKoenkk c360f5a7b1 Update zigbee-herdsman-converters to 15.0.89 (#17341)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-14 18:49:04 +00:00
Viktor Ryzhaiev 15f741b446 Add carbon_monoxide device_class to Home Assistant discovery (#17331) 2023-04-14 20:23:29 +02:00
github-actions[bot]andKoenkk 3b648c9e63 Update zigbee-herdsman to 0.14.106 (#17338)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-14 18:10:17 +00:00
github-actions[bot]andKoenkk 951360beba Update zigbee-herdsman-converters to 15.0.88 (#17324)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-13 17:20:22 +00:00
github-actions[bot]andKoenkk 71df01d613 Update zigbee-herdsman-converters to 15.0.87 (#17302)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-11 16:25:37 +00:00
github-actions[bot]andKoenkk a8f4daff30 Update zigbee-herdsman-converters to 15.0.86 (#17295)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-10 08:06:35 +00:00
github-actions[bot]andKoenkk d7dc083351 Update dependencies (#17286)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-09 09:06:03 +02:00
github-actions[bot]andKoenkk 45d55c9c71 Update zigbee-herdsman-converters to 15.0.85 (#17282)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-08 16:26:02 +00:00
085d5c9f8b Update zigbee-herdsman-converters to 15.0.84 (#17266)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-04-08 09:05:23 +00:00
github-actions[bot]andKoenkk 09a5650345 Update zigbee-herdsman to 0.14.105 (#17265)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-06 18:50:52 +00:00
github-actions[bot]andKoenkk 24050a3a10 Update zigbee-herdsman-converters to 15.0.83 (#17256)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-05 18:26:01 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> c6a2400f56 Bump peter-evans/create-pull-request from 4 to 5 (#17255)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 19:58:23 +02:00
github-actions[bot]andKoenkk 9da7f53e78 Update zigbee-herdsman-converters to 15.0.82 (#17246)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-04 18:16:44 +00:00
github-actions[bot]andKoenkk f5a2c802ca Update zigbee-herdsman to 0.14.104 (#17245)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-04 18:13:41 +00:00
github-actions[bot]andKoenkk 372d991db9 Update zigbee-herdsman-converters to 15.0.81 (#17232)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-03 16:15:00 +00:00
github-actions[bot]andKoenkk bab0a3e902 Update zigbee-herdsman-converters to 15.0.80 (#17217)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-02 08:12:19 +00:00
github-actions[bot]andKoenkk b85aaf8e54 Update dependencies (#17215)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-02 09:24:23 +02:00
github-actions[bot]andKoenkk 64d744ea88 Update zigbee-herdsman-converters to 15.0.79 (#17203)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-01 07:31:16 +00:00
Koen Kanters 7748dd3321 Promote to dev 2023-04-01 09:06:17 +02:00
Koen Kanters 24c6b2e2c9 1.30.3 2023-04-01 09:05:40 +02:00
Koen Kanters 9589d12353 Undev 2023-04-01 09:05:26 +02:00
github-actions[bot]andKoenkk dcc13b7b53 Update zigbee-herdsman-converters to 15.0.78 (#17201)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-04-01 06:51:48 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2d1733d0e7 Bump alpine from 3.17.2 to 3.17.3 in /docker (#17189)
Bumps alpine from 3.17.2 to 3.17.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 18:41:09 +02:00
github-actions[bot]andKoenkk 1368a78767 Update zigbee-herdsman-converters to 15.0.77 (#17174)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-29 07:05:47 +00:00
github-actions[bot]andKoenkk f29073e413 Update zigbee-herdsman to 0.14.103 (#17173)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-29 06:59:49 +00:00
github-actions[bot]andKoenkk 7005497cba Update zigbee-herdsman-converters to 15.0.76 (#17164)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-28 12:03:17 +00:00
github-actions[bot]andKoenkk 298c595deb Update zigbee-herdsman to 0.14.102 (#17163)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-28 11:52:39 +00:00
github-actions[bot]andKoenkk bdbe2b4a70 Update zigbee-herdsman to 0.14.101 (#17159)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-27 14:40:49 +00:00
Thomas KintscherandThomas Kintscher 653334b208 Expose voc_index sensor measurements as such in Home Assistant (#17144)
Co-authored-by: Thomas Kintscher <mail@thomaskintscher.de>
2023-03-26 09:50:22 +02:00
github-actions[bot]andKoenkk 24c6c0bf8e Update dependencies (#17146)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-26 09:03:01 +02:00
github-actions[bot]andKoenkk 3e252e4307 Update zigbee-herdsman-converters to 15.0.75 (#17127)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-23 16:26:30 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ae2de04251 Bump actions/stale from 7 to 8 (#17126)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 16:22:08 +00:00
oddlama 07d238d5b9 Support hosting the frontend on a Unix socket (#17123) 2023-03-23 17:08:23 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 407f0df6ad Bump peter-evans/enable-pull-request-automerge from 2 to 3 (#17125)
Bumps [peter-evans/enable-pull-request-automerge](https://github.com/peter-evans/enable-pull-request-automerge) from 2 to 3.
- [Release notes](https://github.com/peter-evans/enable-pull-request-automerge/releases)
- [Commits](https://github.com/peter-evans/enable-pull-request-automerge/compare/v2...v3)

---
updated-dependencies:
- dependency-name: peter-evans/enable-pull-request-automerge
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 17:06:11 +01:00
github-actions[bot]andKoenkk 2e593e37a6 Update zigbee-herdsman-converters to 15.0.74 (#17102)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-21 20:07:52 +00:00
github-actions[bot]andKoenkk 9f7fd479c4 Update zigbee-herdsman-converters to 15.0.73 (#17090)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-20 17:20:59 +00:00
github-actions[bot]andnurikk 0407a3b67c Update zigbee2mqtt-frontend to 0.6.127 (#17086)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-03-19 23:38:39 +00:00
github-actions[bot]andKoenkk 2c57bf81b0 Update zigbee-herdsman to 0.14.100 (#17078)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-19 08:13:42 +00:00
github-actions[bot]andKoenkk 960456401e Update dependencies (#17075)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-19 09:02:46 +01:00
github-actions[bot]andKoenkk d4774526c3 Update zigbee-herdsman-converters to 15.0.72 (#17073)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-18 16:13:01 +00:00
github-actions[bot]andKoenkk 2a365d39ac Update zigbee-herdsman-converters to 15.0.71 (#17055)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-16 16:46:28 +00:00
github-actions[bot]andKoenkk 347c023968 Update zigbee-herdsman-converters to 15.0.70 (#17052)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-15 16:38:15 +00:00
github-actions[bot]andKoenkk 4272d9a13e Update zigbee-herdsman-converters to 15.0.69 (#17028)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-13 17:16:42 +00:00
github-actions[bot]andKoenkk 54900c3680 Update zigbee-herdsman to 0.14.99 (#17026)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-13 16:44:47 +00:00
github-actions[bot]andKoenkk 461519cf39 Update zigbee-herdsman-converters to 15.0.68 (#17013)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-12 12:41:25 +00:00
github-actions[bot]andKoenkk 8edb176dc0 Update dependencies (#17007)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-12 13:00:09 +01:00
github-actions[bot]andKoenkk 61cdda96ff Update zigbee-herdsman-converters to 15.0.67 (#16994)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-11 10:10:41 +00:00
github-actions[bot]andKoenkk 43394b3376 Update zigbee-herdsman-converters to 15.0.66 (#16977)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-09 17:27:45 +00:00
github-actions[bot]andKoenkk ca7f9ec8ff Update zigbee-herdsman-converters to 15.0.65 (#16964)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-08 16:12:07 +00:00
github-actions[bot]andKoenkk 0857d087bd Update zigbee-herdsman-converters to 15.0.64 (#16954)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-07 19:19:45 +00:00
github-actions[bot]andKoenkk 818a9e3946 Update zigbee-herdsman to 0.14.98 (#16953)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-07 19:08:24 +00:00
github-actions[bot]andKoenkk 51460aacc8 Update zigbee-herdsman-converters to 15.0.63 (#16943)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-06 18:54:33 +00:00
github-actions[bot]andnurikk 354beb486d Update zigbee2mqtt-frontend to 0.6.126 (#16933)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-03-06 09:44:41 +00:00
github-actions[bot]andKoenkk 8261d4efc6 Update zigbee-herdsman-converters to 15.0.62 (#16921)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-05 08:59:13 +00:00
Koen Kanters bbb19371f3 Fix Home Assistant unit of measurement error for voc ppb sensors. https://github.com/Koenkk/zigbee2mqtt/issues/16057 2023-03-05 09:50:23 +01:00
github-actions[bot]andKoenkk 04ae93f00c Update dependencies (#16919)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-05 09:09:16 +01:00
github-actions[bot]andKoenkk 999c01086e Update zigbee-herdsman-converters to 15.0.61 (#16915)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-04 16:09:08 +00:00
baze-andKoen Kanters 0e67f8fa0a Fix old state send when long debounce time is used (#16828)
* Fixed caching problem where old messages were sent out if long debounce values is used for sensor.

* Fixed caching problem where old messages were sent out if long debounce values is used for sensor

* State cache updated during debounce IF cache is enabled in configuration.

* Fixed code styles

* Implemented test case for testing State cache is updated correctly during debouncing

* If-statement was obsolete as cache can be update right away.

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-03-04 16:43:01 +01:00
github-actions[bot]andKoenkk f352d18854 Update zigbee-herdsman to 0.14.97 (#16914)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-04 15:17:35 +00:00
github-actions[bot]andKoenkk f865c976e3 Update zigbee-herdsman-converters to 15.0.60 (#16885)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-02 19:03:57 +00:00
github-actions[bot]andKoenkk aa90765db8 Update zigbee-herdsman-converters to 15.0.59 (#16862)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-01 16:18:51 +00:00
Koen Kanters 017fc03157 Promote to dev 2023-03-01 16:44:55 +01:00
Koen Kanters cdf62ea560 1.30.2 2023-03-01 16:43:20 +01:00
Koen Kanters 5dcd3f67ed Undev 2023-03-01 16:43:06 +01:00
github-actions[bot]andKoenkk b013a7d8ef Update zigbee-herdsman-converters to 15.0.58 (#16860)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-03-01 15:28:46 +00:00
github-actions[bot]andKoenkk 8e6e38b968 Update zigbee-herdsman to 0.14.96 (#16851)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-28 16:00:34 +00:00
github-actions[bot]andKoenkk 8f20640008 Update zigbee-herdsman-converters to 15.0.57 (#16850)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-28 15:51:18 +00:00
github-actions[bot]andnurikk 57707cd9b9 Update zigbee2mqtt-frontend to 0.6.125 (#16844)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-02-27 22:28:55 +00:00
github-actions[bot]andKoenkk 911683ad13 Update zigbee-herdsman-converters to 15.0.56 (#16841)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-27 19:42:13 +00:00
github-actions[bot]andKoenkk 99204682b8 Update dependencies (#16819)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-26 08:57:31 +01:00
github-actions[bot]andKoenkk fec7fca89e Update zigbee-herdsman-converters to 15.0.55 (#16814)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-25 10:17:03 +00:00
github-actions[bot]andKoenkk 6bea88eeb6 Update zigbee-herdsman to 0.14.95 (#16813)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-25 10:09:26 +00:00
github-actions[bot]andKoenkk 6afcb97c0d Update zigbee-herdsman-converters to 15.0.54 (#16798)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-23 17:09:09 +00:00
github-actions[bot]andKoenkk 73d60396bc Update zigbee-herdsman-converters to 15.0.53 (#16788)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-22 20:09:37 +00:00
Koen Kanters 942faf412f Revert "Capitalize entity name in Home Assistant (#16702)"
This reverts commit f5cceb1719.
2023-02-22 20:34:39 +01:00
github-actions[bot]andKoenkk b62f65f045 Update zigbee-herdsman-converters to 15.0.52 (#16771)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-21 16:26:31 +00:00
Artem Draft f5cceb1719 Capitalize entity name in Home Assistant (#16702) 2023-02-21 17:18:15 +01:00
github-actions[bot]andKoenkk 0b6040dd25 Update zigbee-herdsman-converters to 15.0.51 (#16765)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-20 19:32:31 +00:00
github-actions[bot]andKoenkk 45fda8aefd Update zigbee-herdsman to 0.14.94 (#16764)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-20 19:14:42 +00:00
Andreas Fritiofson 85f32c039f Add entity_category to indicator_mode and led_enable for Home Assistant discovery (#16744)
These names are used by some TuYa and IKEA devices.
2023-02-20 19:53:22 +01:00
github-actions[bot]andKoenkk 7fa2b5fcc3 Update zigbee-herdsman-converters to 15.0.50 (#16742)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-19 09:32:01 +00:00
github-actions[bot]andKoenkk 08a0ace11a Update dependencies (#16738)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-19 09:36:47 +01:00
github-actions[bot]andKoenkk 7605e1ec06 Update zigbee-herdsman-converters to 15.0.49 (#16722)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-18 08:53:16 +00:00
Koen Kanters e934b0d94e Support Hue effects for groups. https://github.com/Koenkk/zigbee2mqtt/issues/15997 2023-02-16 18:20:08 +01:00
github-actions[bot]andKoenkk 4aa8e17214 Update zigbee-herdsman-converters to 15.0.48 (#16694)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-15 19:36:12 +00:00
github-actions[bot]andKoenkk a9f5f7c620 Update zigbee-herdsman-converters to 15.0.47 (#16679)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-14 19:11:35 +00:00
github-actions[bot]andKoenkk 6e193ca442 Update zigbee-herdsman-converters to 15.0.46 (#16661)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-13 18:48:16 +00:00
Tami 2eadf30199 Fix error when device is added when device: [] in configuration.yaml (#16629)
* fix for TypeError: The "path" argument must be of type string in writeDevicesOrGroups

* added test case that produces the error when running on old implementation

Summary of all failing tests
 FAIL  test/settings.test.js
  ● Settings › Should add devices even when devices exist empty

    TypeError: The "path" argument must be of type string. Received undefined

      275 |
      276 | jest.mock('../../lib/util/data', () => ({
    > 277 |     joinPath: (file) => require('path').join(mockDir, file),
          |                                         ^
      278 |     getPath: () => mockDir,
      279 | }));
      280 |

      at Object.join [as joinPath] (test/stub/data.js:277:41)
      at joinPath (lib/util/settings.ts:245:38)
      at writeDevicesOrGroups (lib/util/settings.ts:250:5)
      at Object.write [as addDevice] (lib/util/settings.ts:555:5)
      at Object.addDevice (test/settings.test.js:128:18)
2023-02-13 19:41:49 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 600e743941 Bump alpine from 3.17.1 to 3.17.2 in /docker (#16659)
Bumps alpine from 3.17.1 to 3.17.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:23:38 +01:00
github-actions[bot]andKoenkk 932541649e Update zigbee-herdsman to 0.14.93 (#16635)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-12 08:44:39 +00:00
Artem Draft 0217593c77 Improve checks in HA covers (#16614) 2023-02-12 09:28:57 +01:00
github-actions[bot]andKoenkk 10e65b5f26 Update dependencies (#16632)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-12 09:17:14 +01:00
github-actions[bot]andKoenkk e9a38353fa Update zigbee-herdsman to 0.14.92 (#16616)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-10 20:42:59 +00:00
68caf0260d Update zigbee-herdsman-converters to 15.0.45 (#16604)
* Update zigbee-herdsman-converters to 15.0.45

* Fix tests

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-02-09 18:32:04 +01:00
github-actions[bot]andKoenkk 7d887adb7f Update zigbee-herdsman to 0.14.91 (#16603)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-09 18:04:15 +01:00
github-actions[bot]andKoenkk ec57d899e5 Update zigbee-herdsman-converters to 15.0.44 (#16576)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-07 19:41:16 +00:00
github-actions[bot]andKoenkk 61b1732ecb Update zigbee-herdsman-converters to 15.0.43 (#16558)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-06 16:58:21 +00:00
Koen Kanters a35705cd38 Merge branch 'master' into dev 2023-02-06 17:49:55 +01:00
Koen Kanters eb878d3d8e 1.30.1 2023-02-06 17:42:06 +01:00
Robert Kaussow 3420cf508b disable buildx provenance in the ci build command (#16495) 2023-02-06 17:39:51 +01:00
Koen Kanters d5a3bf626f Update zigbee-herdsman-converters to 15.0.38-hotfix.0 2023-02-06 17:39:10 +01:00
github-actions[bot]andKoenkk 0e1220ff24 Update zigbee-herdsman-converters to 15.0.42 (#16542)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-05 14:54:53 +00:00
github-actions[bot]andKoenkk 1496b95067 Update dependencies (#16534)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-05 13:29:02 +01:00
github-actions[bot]andKoenkk bd0694e164 Update zigbee-herdsman to 0.14.90 (#16523)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-04 14:23:17 +00:00
github-actions[bot]andKoenkk d580741dfe Update zigbee-herdsman-converters to 15.0.41 (#16522)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-04 14:11:41 +00:00
Robert Kaussow a24586bec3 disable buildx provenance in the ci build command (#16495) 2023-02-04 14:12:24 +01:00
github-actions[bot]andKoenkk 1e7a76139d Update zigbee-herdsman-converters to 15.0.40 (#16487)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-02 16:57:11 +00:00
github-actions[bot]andKoenkk ea0a9990b9 Update zigbee-herdsman-converters to 15.0.39 (#16459)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-01 17:20:38 +00:00
Koen Kanters 97af5a64e7 Promote to dev 2023-02-01 17:17:11 +01:00
Koen Kanters 8f781db93e 1.30.0 2023-02-01 17:14:40 +01:00
Koen Kanters 1a6ba18ec2 Undev 2023-02-01 17:14:22 +01:00
Koen Kanters d91e363d76 Merge branch 'dev' 2023-02-01 17:13:53 +01:00
github-actions[bot]andKoenkk f7e45b8284 Update zigbee-herdsman-converters to 15.0.38 (#16452)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-02-01 14:58:34 +00:00
github-actions[bot]andKoenkk bbbaaf4d89 Update zigbee-herdsman-converters to 15.0.37 (#16443)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-31 17:17:49 +00:00
github-actions[bot]andKoenkk c9076f8ce6 Update zigbee-herdsman to 0.14.89 (#16442)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-31 18:11:43 +01:00
github-actions[bot]andKoenkk 82fd062668 Update zigbee-herdsman-converters to 15.0.36 (#16429)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-30 17:22:52 +00:00
github-actions[bot]andKoenkk 769a1afd96 Update zigbee-herdsman-converters to 15.0.35 (#16416)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-29 18:28:16 +00:00
Koen Kanters f943619387 Always respond to OTA request. https://github.com/Koenkk/zigbee2mqtt/issues/16371 2023-01-29 19:16:03 +01:00
github-actions[bot]andKoenkk 43e204b7d1 Update zigbee-herdsman-converters to 15.0.34 (#16409)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-29 11:55:41 +00:00
Koen Kanters a3f1399489 Log device OTA request response. https://github.com/Koenkk/zigbee2mqtt/issues/16371 2023-01-29 11:23:21 +01:00
github-actions[bot]andKoenkk 4179d879d2 Update dependencies (#16400)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-29 10:27:14 +01:00
github-actions[bot]andKoenkk 6ce2d2e73f Update zigbee-herdsman-converters to 15.0.33 (#16374)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-26 16:54:37 +00:00
github-actions[bot]andKoenkk 981542827c Update zigbee-herdsman-converters to 15.0.32 (#16355)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-25 18:24:35 +00:00
github-actions[bot]andKoenkk 2f0a2cee6e Update zigbee-herdsman-converters to 15.0.31 (#16335)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-24 16:30:10 +00:00
Koen Kanters 0bc685a8e3 Sanatize manufacturerName. https://github.com/home-assistant/core/issues/85691 2023-01-24 17:19:56 +01:00
Artem Draft 02a99703a8 Fix motor_state and moving in HA covers (#16324) 2023-01-24 17:00:24 +01:00
github-actions[bot]andKoenkk 7639ce44a7 Update zigbee-herdsman-converters to 15.0.30 (#16322)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-23 19:26:59 +00:00
Koen Kanters b89a99fe0c Fix another Failed to call 'Frontend' 'stop' . https://github.com/Koenkk/zigbee2mqtt/issues/16317 2023-01-23 20:21:03 +01:00
mtdcr 06820d2220 Sane defaults for remote syslog (#16300)
The most commonly used transport for remote syslog is port 514/udp.
It also is the only defined method for BSD syslog (RFC 3164). RFCs
5424+5425 specify an additional TLS transport via 6514/tcp, which
does not seem to be supported by zigbee2mqtt, as evidenced by the
lack of TLS-related configuration options in this area. RFC 6587
describes legacy uses of syslog over TCP, recommending against them.

Port 123, the previous default, was probably used by accident and
is reserved for NTP.

| $ grep -w -e 123 -e 514 -e 601 -e 6514 /etc/services
| ntp		123/udp				# Network Time Protocol
| shell		514/tcp		cmd syslog	# no passwords used
| syslog	514/udp
| syslog-tls	6514/tcp			# Syslog over TLS [RFC5425]
2023-01-23 19:31:10 +01:00
Roland Ramthun 140213950d Disable provenance information in Docker images (#16297)
* Disable provenance information in Docker images

The new default of buildx to include provenance information to OCI images causes a series of infrastructure issues with current Docker versions. 

Disable generation of the new provenance information until all necessary infrastructure software components and registries have been fixed to support it properly.

* Correct docker/setup-buildx-action version number
2023-01-23 19:26:43 +01:00
github-actions[bot]andKoenkk f4f2c498b7 Update zigbee-herdsman-converters to 15.0.29 (#16295)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-22 08:45:14 +00:00
github-actions[bot]andKoenkk 31807c6c6b Update zigbee-herdsman to 0.14.88 (#16294)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-22 08:08:45 +00:00
github-actions[bot]andKoenkk 8ccad8ee53 Update dependencies (#16293)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-22 09:03:03 +01:00
github-actions[bot]andKoenkk a930539dc3 Update zigbee-herdsman-converters to 15.0.28 (#16284)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-21 09:37:42 +00:00
github-actions[bot]andnurikk b33db9397d Update zigbee2mqtt-frontend to 0.6.124 (#16277)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-01-20 15:19:13 +00:00
github-actions[bot]andKoenkk de4b7fb022 Update zigbee-herdsman-converters to 15.0.27 (#16264)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-19 16:58:25 +00:00
github-actions[bot]andKoenkk 9e85419f9e Update zigbee-herdsman-converters to 15.0.26 (#16254)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-18 20:28:00 +00:00
github-actions[bot]andKoenkk 80c464c951 Update zigbee-herdsman-converters to 15.0.25 (#16230)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-17 16:29:30 +00:00
github-actions[bot]andKoenkk e56dff4972 Update zigbee-herdsman-converters to 15.0.24 (#16215)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-16 18:46:18 +00:00
Koen Kanters d8501f04eb Fix Failed to call 'Frontend' 'stop' (TypeError: Cannot read properties of null (reading 'clients') error. https://github.com/Koenkk/zigbee2mqtt/issues/16207 2023-01-16 19:19:51 +01:00
github-actions[bot]andKoenkk c927b4b935 Update zigbee-herdsman-converters to 15.0.23 (#16177)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-15 13:26:50 +00:00
github-actions[bot]andKoenkk fb9872a4ff Update dependencies (#16172)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-15 10:05:39 +01:00
39b0964739 Update zigbee-herdsman-converters to 15.0.22 (#16159)
* Update zigbee-herdsman-converters to 15.0.22

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-01-14 13:39:45 +00:00
Koen Kanters 2c509c0368 Promote to dev 2023-01-13 22:33:21 +01:00
Koen Kanters 49e1c68cac Merge branch 'master' into dev 2023-01-13 22:32:50 +01:00
Koen Kanters bb3e8f6d41 1.29.2 2023-01-13 22:28:52 +01:00
Koen Kanters 835a3288a0 Update zh to 0.14.83-hotfix.0 and zhc to 15.0.12-hotfix.1 2023-01-13 22:27:36 +01:00
Koen Kanters cddbb9a5e5 Fix f600066134 2023-01-13 16:59:20 +01:00
github-actions[bot]andnurikk 65366478e3 Update zigbee2mqtt-frontend to 0.6.123 (#16143)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-01-13 11:33:49 +00:00
1d8b19dce9 Update zigbee-herdsman-converters to 15.0.21 (#16123)
* Update zigbee-herdsman-converters to 15.0.21

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-01-12 17:34:49 +00:00
Koen Kanters f600066134 Fix 328b9fbd60. https://github.com/Koenkk/zigbee2mqtt/issues/15958 2023-01-12 17:20:07 +01:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 75533c20b8 Bump alpine from 3.17.0 to 3.17.1 in /docker (#16081)
Bumps alpine from 3.17.0 to 3.17.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-12 09:42:42 +01:00
Koen Kanters 0605a5e0e3 Attempt to improve Log when MQTT client is unavailable stability 2023-01-12 09:41:30 +01:00
cf9640bd59 Update zigbee-herdsman-converters to 15.0.20 (#16106)
* Update zigbee-herdsman-converters to 15.0.20

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2023-01-12 08:37:17 +00:00
Koen Kanters 328b9fbd60 Remove state_class measurement when unit_of_measurement is not set. https://github.com/Koenkk/zigbee2mqtt/issues/15958 2023-01-11 18:23:13 +01:00
github-actions[bot]andnurikk bc6d1070c7 Update zigbee2mqtt-frontend to 0.6.122 (#16092)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2023-01-11 09:29:08 +00:00
github-actions[bot]andKoenkk bf339636b5 Update zigbee-herdsman to 0.14.87 (#16068)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-09 21:50:14 +00:00
github-actions[bot]andKoenkk d90dae5d9d Update zigbee-herdsman to 0.14.86 (#16066)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-09 21:00:50 +01:00
github-actions[bot]andKoenkk b34b0e866f Update zigbee-herdsman-converters to 15.0.19 (#16062)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-09 18:57:47 +00:00
Dan Klaffenbach 2288c0f1c2 Poll Busch-Jaeger devices for updates after binding-initiated changes (#16036)
The Busch-Jaeger devices don't support reporting and therefore their
state should be polled after being changed through a binding partner.
2023-01-09 19:18:13 +01:00
Miguel Cabral 9c4abb64c3 Expose cover moving state to Home Assistant (#16017) 2023-01-08 10:05:29 +01:00
github-actions[bot]andKoenkk 559f235e88 Update zigbee-herdsman-converters to 15.0.18 (#16023)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-08 09:01:56 +00:00
github-actions[bot]andKoenkk 30df0e25f9 Update zigbee-herdsman to 0.14.85 (#16020)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-08 08:44:31 +00:00
Koen Kanters e7735112e8 Fix Home Assistant Entity sensor.xxx (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('illuminance') warning. https://github.com/Koenkk/zigbee2mqtt/issues/15958 2023-01-08 08:50:10 +01:00
github-actions[bot]andKoenkk b943feef29 Update dependencies (#16019)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-08 08:45:04 +01:00
Koen Kanters e92d3f4ede Promote to dev 2023-01-07 10:26:02 +01:00
Koen Kanters 044cd0b3a6 Merge branch 'master' into dev 2023-01-07 10:25:19 +01:00
github-actions[bot]andKoenkk 3351bc2f42 Update zigbee-herdsman to 0.14.84 (#15978)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-06 11:29:07 +01:00
github-actions[bot]andKoenkk 6a8d236b4d Update zigbee-herdsman-converters to 15.0.17 (#15977)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-06 10:26:52 +00:00
Koen Kanters 7d67ffc429 1.29.1 2023-01-06 11:07:47 +01:00
Koen Kanters f984734961 Update zigbee-herdsman-converters to v15.0.12-hotfix.0 2023-01-06 11:07:14 +01:00
Koen Kanters 217fbb284a Fix Home Assistant Template variable warning: 'dict object' has no attribute 'latest_version' when rendering '{{ value_json['update']['latest_version'] }}' error attempt 2. https://github.com/Koenkk/zigbee2mqtt/issues/15747 2023-01-06 10:41:43 +01:00
Koen Kanters 9fe48e2a88 Revert "Expose cover moving state to Home Assistant (#15555)"
This reverts commit 56f7f3e1bd.
2023-01-06 10:41:37 +01:00
Koen Kanters 1c7817ad77 Fix Home Assistant Template variable warning: 'dict object' has no attribute 'latest_version' when rendering '{{ value_json['update']['latest_version'] }}' error. https://github.com/Koenkk/zigbee2mqtt/issues/15747 2023-01-06 10:41:13 +01:00
github-actions[bot]andKoenkk cf801344f8 Update zigbee-herdsman-converters to 15.0.16 (#15947)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-04 19:00:11 +00:00
Koen Kanters 50bca161ce Fix Home Assistant Template variable warning: 'dict object' has no attribute 'latest_version' when rendering '{{ value_json['update']['latest_version'] }}' error attempt 2. https://github.com/Koenkk/zigbee2mqtt/issues/15747 2023-01-04 19:49:27 +01:00
github-actions[bot]andKoenkk 15ccf945c3 Update zigbee-herdsman-converters to 15.0.15 (#15906)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-03 10:27:14 +00:00
Koen Kanters d49f06f34d Revert "Expose cover moving state to Home Assistant (#15555)"
This reverts commit 56f7f3e1bd.
2023-01-03 10:59:20 +01:00
github-actions[bot]andKoenkk 826f03220d Update zigbee-herdsman-converters to 15.0.14 (#15876)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-02 09:12:10 +00:00
Koen Kanters cdb984f830 Fix Home Assistant Template variable warning: 'dict object' has no attribute 'latest_version' when rendering '{{ value_json['update']['latest_version'] }}' error. https://github.com/Koenkk/zigbee2mqtt/issues/15747 2023-01-02 09:18:36 +01:00
github-actions[bot]andKoenkk 4e40c8223f Update zigbee-herdsman-converters to 15.0.13 (#15852)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-01 10:27:09 +00:00
github-actions[bot]andKoenkk 02d86ab233 Update dependencies (#15848)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-01-01 11:13:54 +01:00
Koen Kanters a49079f560 Dev 2023-01-01 10:58:37 +01:00
Koen Kanters dddce571d3 1.29.0 2023-01-01 10:53:46 +01:00
Koen Kanters f1841377db Undev 2023-01-01 10:52:49 +01:00
Koen Kanters f3edfbf75b Update generateNewSupportedDevices.js 2023-01-01 10:52:02 +01:00
github-actions[bot]andnurikk d701d96bb2 Update zigbee2mqtt-frontend to 0.6.121 (#15845)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-12-31 19:11:30 +00:00
github-actions[bot]andKoenkk 3b9d6c5651 Update zigbee-herdsman-converters to 15.0.12 (#15837)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-31 09:36:55 +00:00
MattandKoen Kanters 19bd87de4a Keep cached device state until Zigbee2MQTT is stopped (#15770)
* Fix extension path to make debugginge easier in VScode

* Fix linting error

* Add setting "cache_state_persist_on_leave" (default false)

This setting does not remove a device from State if it leaves the network

* Merge from upstream kk/dev

* Re-define cache_state_persist_on_leave to be a timeout

Allows the config to specify how long the state should be held (and the device to re-join & maintain the state).

Remove all pending deletions if the system is stopped

* Add debug. Fix "time" test

* Disable esline warnings for long debug lines

* Simplify state maintenance for leave/join devices

* Restore default configuration.yaml

* Don't track device presence via events, but examine herdsman on system stop

* Update configuration.yaml

* Update state.ts

* Update state.ts

* Update controller.test.js

* Update eventBus.ts

* Update eventBus.ts

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-12-31 10:15:11 +01:00
github-actions[bot]andKoenkk af27e910d8 Update zigbee-herdsman-converters to 15.0.11 (#15816)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-30 08:22:39 +00:00
github-actions[bot]andKoenkk d8f1f3ef06 Update zigbee-herdsman-converters to 15.0.10 (#15797)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-29 09:50:01 +00:00
Koen Kanters 5b2756fef3 Build linux/386 Docker image. https://github.com/Koenkk/zigbee2mqtt/issues/15796 2022-12-29 10:44:15 +01:00
github-actions[bot]andKoenkk 75db8cf3f1 Update zigbee-herdsman-converters to 15.0.9 (#15775)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-28 08:28:49 +00:00
github-actions[bot]andKoenkk b4660417f8 Update zigbee-herdsman-converters to 15.0.8 (#15764)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-27 08:28:19 +00:00
github-actions[bot]andKoenkk 75e677608b Update zigbee-herdsman-converters to 15.0.7 (#15757)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-26 11:43:44 +00:00
Matt 05cb1406bb Fix extension path to make debugging easier in VS Code (#15741)
* Fix extension path to make debugginge easier in VScode

* Fix linting error
2022-12-25 16:57:48 +01:00
github-actions[bot]andKoenkk 10c6d1e4d9 Update dependencies (#15746)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-25 16:40:03 +01:00
Koen Kanters 6d08a2f0f6 Use Node.js 18 in CI 2022-12-24 09:50:32 +01:00
Koen Kanters 8d8c46ecae Reduce Docker image size 2022-12-24 09:45:15 +01:00
Koen Kanters 1f642d86e8 Add disabled option (#15589)
* Add disabled option

* Updates

* Tests

* Add restart required
2022-12-23 23:56:29 +01:00
github-actions[bot]andKoenkk 5afda96cf4 Update zigbee-herdsman-converters to 15.0.6 (#15722)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-23 19:39:13 +00:00
github-actions[bot]andnurikk 2550ca5978 Update zigbee2mqtt-frontend to 0.6.120 (#15717)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-12-23 16:55:52 +00:00
github-actions[bot]andKoenkk 566fc625cd Update zigbee-herdsman-converters to 15.0.4 (#15703)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-22 17:24:59 +00:00
github-actions[bot]andKoenkk 7f9de55b6c Update zigbee-herdsman-converters to 15.0.3 (#15689)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-21 19:18:48 +00:00
github-actions[bot]andKoenkk ccb5b49c80 Update zigbee-herdsman to 0.14.83 (#15688)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-21 19:13:08 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dea44579c3 Bump actions/stale from 6 to 7 (#15685)
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 17:03:55 +01:00
github-actions[bot]andKoenkk 58445a2327 Update zigbee-herdsman to 0.14.82 (#15673)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-20 22:09:08 +00:00
github-actions[bot]andKoenkk 98cf8dbe5e Update zigbee-herdsman-converters to 15.0.2 (#15671)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-20 21:55:29 +00:00
github-actions[bot]andKoenkk 8fc83caac7 Update zigbee-herdsman-converters to 15.0.1 (#15651)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-19 20:07:35 +00:00
Miguel Cabral 56f7f3e1bd Expose cover moving state to Home Assistant (#15555) 2022-12-19 20:27:15 +01:00
Koen Kanters 01b46cf74e Use fileVersion for Home Assistant update sensor instead of softwareBuildID (#15630)
* Use fileVersion for Home Assistant update sensor instead of softwareBuildID. https://github.com/Koenkk/zigbee2mqtt/issues/15502

* Remove onlythis
2022-12-18 22:05:16 +01:00
github-actions[bot]andKoenkk 825c761c26 Update zigbee-herdsman-converters to 15.0.0 (#15631)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-18 21:04:48 +00:00
github-actions[bot]andKoenkk 443eb23a91 Update zigbee-herdsman-converters to 14.0.694 (#15624)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-18 13:01:34 +00:00
github-actions[bot]andKoenkk 9b78d85a46 Update dependencies (#15618)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-18 13:04:08 +01:00
6731c85981 Update zigbee-herdsman-converters to 14.0.693 (#15603)
* Update zigbee-herdsman-converters to 14.0.693

* fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-12-17 10:04:38 +00:00
github-actions[bot]andKoenkk da44667926 Update zigbee-herdsman-converters to 14.0.692 (#15573)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-15 20:02:58 +00:00
github-actions[bot]andKoenkk 3796084a27 Update zigbee-herdsman-converters to 14.0.691 (#15538)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-13 20:16:17 +00:00
Koen Kanters 4d32326a4f Fix failing configure blocking startup. https://github.com/Koenkk/zigbee2mqtt/issues/15299 2022-12-12 21:35:10 +01:00
github-actions[bot]andKoenkk 54d8002fd3 Update zigbee-herdsman-converters to 14.0.690 (#15517)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-12 20:31:55 +00:00
github-actions[bot]andKoenkk 21a30fc555 Update zigbee-herdsman-converters to 14.0.689 (#15490)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-11 09:44:07 +00:00
github-actions[bot]andKoenkk b90c0c4114 Update zigbee-herdsman to 0.14.81 (#15489)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-11 10:37:37 +01:00
github-actions[bot]andKoenkk e2deb23d77 Update dependencies (#15484)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-11 09:07:13 +01:00
github-actions[bot]andKoenkk b69d31d3ee Update zigbee-herdsman-converters to 14.0.688 (#15480)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-10 15:39:17 +00:00
github-actions[bot]andKoenkk 3481423810 Update zigbee-herdsman-converters to 14.0.687 (#15465)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-09 17:09:17 +00:00
github-actions[bot]andKoenkk d093200fec Update zigbee-herdsman to 0.14.80 (#15463)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-09 16:38:33 +00:00
eaf834a921 Update zigbee-herdsman to 0.14.79 (#15449)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-12-08 19:48:45 +01:00
github-actions[bot]andKoenkk 27377b0658 Update zigbee-herdsman-converters to 14.0.686 (#15448)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-08 18:40:40 +00:00
github-actions[bot]andKoenkk 2c53bc2c61 Update zigbee-herdsman-converters to 14.0.685 (#15430)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-07 19:15:23 +00:00
Gustav WestlingandKoen Kanters 83fae81724 docker: rebuild serialport from source (#15400)
* docker: rebuild serialport from source

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-12-07 17:54:24 +01:00
github-actions[bot]andKoenkk d075f0752e Update zigbee-herdsman-converters to 14.0.684 (#15399)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-06 17:21:51 +00:00
github-actions[bot]andKoenkk a29f90b441 Update zigbee-herdsman to 0.14.78 (#15398)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-06 17:11:48 +00:00
Koen Kanters 891392ff9a Revert "Fix Home Assistant installed_version error (#15369)" (#15396)
This reverts commit ba2d9aefe6.
2022-12-06 17:31:48 +01:00
Koen Kanters ba2d9aefe6 Fix Home Assistant installed_version error (#15369)
* Fix HA installed_version error

* add link
2022-12-05 16:52:11 +01:00
github-actions[bot]andKoenkk 586dda4d46 Update zigbee-herdsman-converters to 14.0.683 (#15356)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-04 20:09:14 +00:00
github-actions[bot]andKoenkk 1aa600ee59 Update zigbee-herdsman to 0.14.77 (#15355)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-04 19:56:20 +00:00
Pheel Tiandphil b0e352bfea Support HTTPS for frontend server (#15329)
* Adding 2 config params under 'frontend' : 'ssl_cert' and 'ssl_key' to contain file patch of certificate files to expose frontend in HTTPS.

* Taking all PR remarks in account.

Co-authored-by: phil <phil@8godsprod.com>
2022-12-04 19:33:04 +01:00
github-actions[bot]andKoenkk 959ca95219 Update dependencies (#15342)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-04 19:13:38 +01:00
github-actions[bot]andKoenkk 54bd9aa024 Update zigbee-herdsman-converters to 14.0.682 (#15320)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-02 16:55:00 +00:00
github-actions[bot]andKoenkk 0e4ea6a335 Update zigbee-herdsman-converters to 14.0.681 (#15287)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-01 19:18:59 +00:00
Koen Kanters ab1261385b Promote to dev 2022-12-01 19:59:17 +01:00
Koen Kanters 52e545f900 1.28.4 2022-12-01 19:58:42 +01:00
Koen Kanters 350abb354b Undev 2022-12-01 19:58:39 +01:00
Koen Kanters 87f253997c Update zhc to 14.0.681-hotfix.0 2022-12-01 19:56:37 +01:00
Koen Kanters 4e9b18fcbf Promote to dev 2022-12-01 17:38:11 +01:00
Koen Kanters e43c371d76 1.28.3 2022-12-01 17:35:02 +01:00
Koen Kanters a7e85a0bd9 Undev 2022-12-01 17:34:47 +01:00
Koen Kanters 7f6f6a69c7 Merge remote-tracking branch 'origin/master' into dev 2022-12-01 17:33:55 +01:00
github-actions[bot]andKoenkk 87667bdac7 Update zigbee-herdsman-converters to 14.0.680 (#15276)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-12-01 15:02:29 +00:00
github-actions[bot]andKoenkk bd8edd70bb Update zigbee-herdsman-converters to 14.0.679 (#15262)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-30 16:06:01 +00:00
github-actions[bot]andKoenkk 4a3e6b9561 Update zigbee-herdsman-converters to 14.0.678 (#15249)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-29 18:45:39 +00:00
Artem Draft f92134fc5f Disable by default update_available sensor in HA (#15237) 2022-11-29 19:18:33 +01:00
9dba2d7f11 Update zigbee-herdsman-converters to 14.0.677 (#15229)
* Update zigbee-herdsman-converters to 14.0.677

* Fix

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-28 18:49:34 +00:00
9289a26f11 Update dependencies (#15204)
* Update dependencies

* Fix diff

* fix

* update

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-27 14:52:47 +01:00
github-actions[bot]andKoenkk 17054627e9 Update zigbee-herdsman-converters to 14.0.676 (#15207)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-27 09:38:39 +00:00
github-actions[bot]andKoenkk 66c4ca072e Update zigbee-herdsman-converters to 14.0.675 (#15190)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-26 09:32:55 +00:00
github-actions[bot]andKoenkk 3b221d4fb0 Update zigbee-herdsman-converters to 14.0.674 (#15168)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-24 16:40:12 +00:00
github-actions[bot]andKoenkk 4464554f90 Update zigbee-herdsman to 0.14.76 (#15167)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-24 16:32:05 +00:00
b15cd433c4 Update zigbee-herdsman-converters to 14.0.673 (#15150)
* Update zigbee-herdsman-converters to 14.0.673

* Update homeassistant.test.js

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-23 17:56:32 +00:00
github-actions[bot]andKoenkk 4b5a03c6c5 Update zigbee-herdsman to 0.14.75 (#15149)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-23 16:10:46 +00:00
github-actions[bot]andKoenkk ca4badca4d Update zigbee-herdsman-converters to 14.0.672 (#15133)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-22 19:03:36 +00:00
DJTerentjevandAlex 1b3dd7540b Add polling when bounded for Trust and Gledopto (#15126)
* GitHub Workflows security hardening (#14799)

* build: harden update_frontend.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden update_zhc.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden ghcr_cleanup.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden update_zh.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* Add bound polling by manufacturerNames

Based on:
#7825

* Add bound polling by manufacturerNames

Based on:
#7825

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Co-authored-by: Alex <aleksandrosansan@gmail.com>
2022-11-22 19:35:15 +01:00
Koen Kanters c7183ca080 Update external converter tester. 2022-11-22 19:16:25 +01:00
Koen Kanters 119531e9e2 Add external converter tester 2022-11-22 19:12:03 +01:00
85be7d28d5 Update zigbee-herdsman-converters to 14.0.671 (#15123)
* Update zigbee-herdsman-converters to 14.0.671

* Update homeassistant.ts

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-21 19:35:37 +00:00
github-actions[bot]andnurikk 6c147dae6c Update zigbee2mqtt-frontend to 0.6.119 (#15109)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-11-20 20:48:42 +00:00
github-actions[bot]andKoenkk 1fe138c34c Update zigbee-herdsman-converters to 14.0.670 (#15107)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-20 18:26:44 +00:00
github-actions[bot]andKoenkk 1258aee464 Update zigbee-herdsman to 0.14.74 (#15105)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-20 16:35:01 +00:00
github-actions[bot]andnurikk fbb0ed0e67 Update zigbee2mqtt-frontend to 0.6.118 (#15083)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-11-19 11:16:56 +00:00
github-actions[bot]andKoenkk 8510e99010 Update zigbee-herdsman-converters to 14.0.669 (#15053)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-17 17:07:37 +00:00
Koen Kanters 342955666a Fix 'dict object' has no attribute 'installed_version'. https://github.com/Koenkk/zigbee2mqtt/discussions/15039 2022-11-17 17:52:59 +01:00
github-actions[bot]andKoenkk 50cb421f64 Update zigbee-herdsman-converters to 14.0.668 (#15007)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-15 19:38:26 +00:00
github-actions[bot]andnurikk 16398b7810 Update zigbee2mqtt-frontend to 0.6.117 (#14995)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-11-15 11:36:57 +00:00
github-actions[bot]andKoenkk f3b5aee173 Update zigbee-herdsman-converters to 14.0.667 (#14983)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-14 20:16:38 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> e8f85b35c1 Bump actions/dependency-review-action from 2 to 3 (#14978)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2 to 3.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 18:13:49 +01:00
github-actions[bot]andKoenkk dd8f13aa8d Update zigbee-herdsman to 0.14.73 (#14979)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-14 17:07:35 +00:00
dreed47 ced2ba7344 small clarification to the description for adding a user-defined device icon (#14960)
* small clarification to the description for adding a user-defined device icon

* small wording change
2022-11-14 17:49:18 +01:00
Jakub Jirutka a2f8534823 Allow to specify full file name in value reference '!' (#14955)
* Extract parsing of value reference '!' in settings into a function

* Allow to specify full file name in value reference '!'

This `network_key: '!secret network_key'` is really confusing because
it looks like a YAML tag named 'secret' and a value "network_key".
When we write `network_key: '!secret.yaml network_key'` instead, it's
a little clearer what's going on. Also, it's more consistent with file
references in 'devices' and 'groups'.
2022-11-13 15:17:59 +01:00
github-actions[bot]andKoenkk d05ef70901 Update zigbee-herdsman to 0.14.72 (#14958)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-13 09:26:45 +00:00
Jakub JirutkaandKoen Kanters 4bc0c3ed6b Use path.resolve instead of path.join in data.joinPath (#14953)
This allows specifying a path outside of the data directory using an
absolute path (e.g. /path/to/devices.yaml) or a path relative to the data
directory (e.g. devices.yaml, foo/devices.yaml, ../../devices.yaml, ...).
This change is backward compatible because file names and nested paths are
just a special case of a relative path.

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-13 09:24:47 +01:00
Koen Kanters 489d1de756 Fix Cannot set properties of undefined (setting 'installed_version'). https://github.com/Koenkk/zigbee2mqtt/issues/14917 2022-11-13 09:21:27 +01:00
github-actions[bot]andKoenkk 499b993410 Update zigbee-herdsman to 0.14.71 (#14946)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-12 15:20:46 +00:00
github-actions[bot]andKoenkk 9f0b16291a Update zigbee-herdsman-converters to 14.0.666 (#14930)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-11 16:16:51 +00:00
github-actions[bot]andKoenkk 98a6a2dfe8 Update zigbee-herdsman-converters to 14.0.665 (#14916)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-10 17:05:54 +00:00
Koen Kanters fb14ba20ca Update Docker image to use node:18-alpine3.16 (#14915) 2022-11-10 17:48:17 +01:00
Koen Kanters b68b984de6 Log Zigbee2MQTT started! on startup. https://github.com/Koenkk/zigbee2mqtt/issues/14283 2022-11-10 17:45:48 +01:00
Koen Kanters 1d36dfd932 Support Home Assistant MQTT update #14748 (#14905) 2022-11-09 21:01:30 +01:00
github-actions[bot]andKoenkk 672da64913 Update zigbee-herdsman-converters to 14.0.664 (#14900)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-09 18:53:08 +00:00
github-actions[bot]andKoenkk cb29e164f8 Update zigbee-herdsman-converters to 14.0.663 (#14889)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-08 18:20:43 +00:00
Vincenzo Mantova 1e6a457190 more Home Assistant icons (#14865)
* add missing icons and classes for BRT-100-TRV (and possibly others)

* use high/low thermometer icons for max/min temperatures
2022-11-08 16:24:19 +01:00
github-actions[bot]andKoenkk cd22dafc89 Update zigbee-herdsman-converters to 14.0.662 (#14860)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-07 17:34:17 +00:00
github-actions[bot]andKoenkk 83d8a0e6a2 Update zigbee-herdsman to 0.14.70 (#14858)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-07 17:06:27 +00:00
Vincenzo Mantova e0b765ba88 Revert "Respect climate system_mode ACCESS_SET bit in Home Assistant (#14715)" (#14842)
This reverts commit 58c800181a.
2022-11-07 17:38:30 +01:00
5e2df18b75 Update zigbee-herdsman-converters to 14.0.661 (#14839)
* Update zigbee-herdsman-converters to 14.0.661

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-06 14:42:08 +00:00
github-actions[bot]andKoenkk 9b48334e0e Update zigbee-herdsman to 0.14.69 (#14838)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-06 12:51:48 +00:00
github-actions[bot]andKoenkk c8ae15e92d Update dependencies (#14834)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-06 13:37:56 +01:00
John DoeandAinur Timerbaev f88ac154a2 Mark node v19 as supported (#14837)
* Mark node19 as supported

* Fix condition

* Fix tests

Co-authored-by: Ainur Timerbaev <ainur.timerbaev@superawesome.com>
2022-11-06 12:28:59 +00:00
Alex e66fe8534e GitHub Workflows security hardening (#14799)
* build: harden update_frontend.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden update_zhc.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden ghcr_cleanup.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden update_zh.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-11-05 14:21:55 +01:00
Jakub Jirutka c2e95bdb6a Remove core-js polyfills (#14788)
According to engines.node in package.json, the minimal supported version
of Node.js is 14.

* `Object.fromEntries()` is supported by Node.js since 12.0.0
* `Array.prototype.flat()` is supported by Node.js since 11.0.0

These polyfills were added in #9085, but the minimum supported Node.js
version has since been raised to 14.
2022-11-05 14:17:53 +01:00
github-actions[bot]andnurikk 7c5ef8a3d6 Update zigbee2mqtt-frontend to 0.6.115 (#14816)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-11-05 09:59:34 +00:00
Koen Kanters 4a2190f969 Add back fsevents 2022-11-04 19:35:14 +01:00
github-actions[bot]andKoenkk a3ed236524 Update dependencies (#14810)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-04 17:08:56 +01:00
Koen Kanters f4d8e6f4c5 Merge branch 'master' into dev 2022-11-04 17:05:54 +01:00
Koen Kanters 360a777a4e 1.28.2 2022-11-04 16:53:33 +01:00
Koen Kanters 5ed8b36cf2 Bump zigbee-herdsman-converters to 14.0.657-hotfix.0 2022-11-04 16:52:53 +01:00
github-actions[bot]andKoenkk 9540b6c182 Update zigbee-herdsman-converters to 14.0.660 (#14792)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-03 18:43:32 +00:00
Koen Kanters 31f002294e Update README.md 2022-11-02 22:00:25 +01:00
ecfc7e8906 Update zigbee-herdsman-converters to 14.0.659 (#14780)
* Update zigbee-herdsman-converters to 14.0.659

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-11-02 20:56:54 +00:00
Koen Kanters 60bf855e74 Fix starting via cli.js. https://github.com/Koenkk/zigbee2mqtt/pull/14396 2022-11-02 20:01:06 +01:00
Koen Kanters c3f6e793fa Promote to dev 2022-11-01 19:59:25 +01:00
Koen Kanters 48117fddfa 1.28.1 2022-11-01 19:58:47 +01:00
Koen Kanters 7e70a5984f Undev 2022-11-01 19:58:44 +01:00
github-actions[bot]andKoenkk 4589c9f691 Update zigbee-herdsman-converters to 14.0.657 (#14753)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-01 18:51:21 +00:00
github-actions[bot]andKoenkk d81c15b5af Update zigbee-herdsman to 0.14.68 (#14754)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-01 16:44:28 +00:00
github-actions[bot]andKoenkk 043ae738d2 Update zigbee-herdsman to 0.14.67 (#14752)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-11-01 16:07:35 +00:00
github-actions[bot]andKoenkk 68184d669e Update zigbee-herdsman-converters to 14.0.655 (#14734)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-31 18:20:01 +00:00
github-actions[bot]andKoenkk fb3ee70c7a Update zigbee-herdsman-converters to 14.0.654 (#14727)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-30 19:07:00 +00:00
github-actions[bot]andKoenkk c5697e6c2b Update dependencies (#14718)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-30 19:23:11 +01:00
Vincenzo Mantova 58c800181a Respect climate system_mode ACCESS_SET bit in Home Assistant (#14715) 2022-10-30 19:16:32 +01:00
github-actions[bot]andKoenkk fd023268c5 Update zigbee-herdsman-converters to 14.0.652 (#14708)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-29 15:50:52 +00:00
github-actions[bot]andKoenkk 9dc93c7d27 Update zigbee-herdsman-converters to 14.0.651 (#14700)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-29 08:21:29 +00:00
Koen Kanters c943992e49 Fix 60de5b7676 2022-10-27 21:49:25 +02:00
github-actions[bot]andKoenkk dd9e92f81f Update zigbee-herdsman-converters to 14.0.650 (#14677)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-27 21:46:16 +02:00
Koen Kanters 60de5b7676 Respond with NO_IMAGE_AVAILABLE when device requests OTA. https://github.com/Koenkk/zigbee2mqtt/issues/13396 2022-10-27 20:39:44 +02:00
github-actions[bot]andKoenkk 6c0430b6e2 Update zigbee-herdsman-converters to 14.0.649 (#14660)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-26 16:57:24 +00:00
github-actions[bot]andKoenkk ddc4345f01 Update zigbee-herdsman-converters to 14.0.648 (#14633)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-24 17:49:52 +00:00
Koen Kanters 41053aa024 Set NODE_ENV to PRODUTION in Docker container. https://github.com/Koenkk/zigbee2mqtt/discussions/14625 2022-10-24 19:30:40 +02:00
github-actions[bot]andKoenkk 08ceae235e Update dependencies (#14602)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-23 09:09:56 +02:00
github-actions[bot]andKoenkk 599380dd63 Update zigbee-herdsman-converters to 14.0.647 (#14592)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-22 15:58:08 +00:00
github-actions[bot]andKoenkk a426ee1041 Update zigbee-herdsman-converters to 14.0.646 (#14576)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-21 14:44:53 +00:00
github-actions[bot]andKoenkk 939fdf0496 Update zigbee-herdsman-converters to 14.0.645 (#14553)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-19 15:59:22 +00:00
github-actions[bot]andKoenkk 3cffc2fdd8 Update zigbee-herdsman to 0.14.66 (#14549)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-19 15:26:35 +00:00
github-actions[bot]andKoenkk 22d2170d41 Update zigbee-herdsman-converters to 14.0.644 (#14540)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-18 18:16:04 +00:00
Vladyslav Pavlov 50a9de4e2b Expose step size of local_temperature_calibration Home Assistant sensor (#14502) 2022-10-18 17:59:32 +02:00
github-actions[bot]andKoenkk 2c12cbaf18 Update zigbee-herdsman to 0.14.65 (#14538)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-18 15:50:13 +00:00
github-actions[bot]andKoenkk ef6826f263 Update dependencies (#14503)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-18 17:38:26 +02:00
github-actions[bot]andKoenkk ceeaabafbc Update zigbee-herdsman-converters to 14.0.643 (#14458)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-12 19:47:13 +00:00
github-actions[bot]andKoenkk c49f5b157d Update zigbee-herdsman-converters to 14.0.642 (#14444)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-11 18:52:33 +00:00
github-actions[bot]andKoenkk 0a71e39253 Update zigbee-herdsman-converters to 14.0.641 (#14426)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-10 15:20:46 +00:00
github-actions[bot]andKoenkk 52a0f68c87 Update zigbee-herdsman-converters to 14.0.640 (#14416)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-09 18:19:11 +00:00
github-actions[bot]andKoenkk 457fc9da7c Update dependencies (#14411)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-09 09:01:32 +02:00
github-actions[bot]andKoenkk 5b39884c13 Update zigbee-herdsman-converters to 14.0.639 (#14403)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-08 12:18:16 +00:00
Matt 4d7b1a6c03 Allow Zigbee2MQTT to be installed as a module (#14396)
* Fix mnodule resolution

Allows the correct module path to be found if installed as a package

* Correct signature to avoid TS error

* Allow module to be included in another module

Only create hash ot auto-start if it is the main module, otherwise export the `start` function
2022-10-08 10:48:15 +02:00
Koen Kanters 50b5c67dde Support effects for Home Assistant light groups. #13438 2022-10-08 10:22:26 +02:00
Ben Windsor 005ada0237 Make temperature sensor selection for thermostats appear as a config item in HA (#14376) 2022-10-07 16:58:06 +02:00
github-actions[bot]andKoenkk e9b1080734 Update zigbee-herdsman-converters to 14.0.638 (#14374)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-06 16:12:23 +00:00
Ben Windsor 56cc1432e9 Mark min_temperature_limit as a config variable for HA (#14358) 2022-10-06 17:31:48 +02:00
github-actions[bot]andKoenkk e3dcc7b0a6 Update zigbee-herdsman-converters to 14.0.637 (#14353)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-05 19:08:45 +00:00
github-actions[bot]andKoenkk 37aea8df8f Update zigbee-herdsman to 0.14.64 (#14348)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-05 14:30:54 +00:00
github-actions[bot]andKoenkk f8d64b67ad Update zigbee-herdsman-converters to 14.0.636 (#14331)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-04 17:30:49 +00:00
github-actions[bot]andKoenkk 77fc3a9308 Update dependencies (#14279)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-04 19:26:54 +02:00
Ben Windsor db3730ea44 Expose value_step to home assistant if it has been set on a numeric type (#14313) 2022-10-04 18:02:35 +02:00
github-actions[bot]andnurikk 98ceaa04bb Update zigbee2mqtt-frontend to 0.6.114 (#14290)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-10-02 16:51:48 +00:00
github-actions[bot]andnurikk e3e4a0a440 Update zigbee2mqtt-frontend to 0.6.113 (#14271)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-10-01 09:41:07 +00:00
github-actions[bot]andKoenkk 52150b7257 Update zigbee-herdsman to 0.14.63 (#14270)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-01 08:53:48 +00:00
Koen Kanters 5727fe3a49 Dev 2022-10-01 09:40:35 +02:00
Koen Kanters 03ba647dc6 1.28.0 2022-10-01 09:39:09 +02:00
Koen Kanters be1e9b4421 Undev 2022-10-01 09:38:55 +02:00
github-actions[bot]andKoenkk 57ce1e98a7 Update zigbee-herdsman-converters to 14.0.635 (#14268)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-10-01 07:33:47 +00:00
github-actions[bot]andKoenkk 3d2d4fd298 Update zigbee-herdsman-converters to 14.0.633 (#14262)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-30 18:58:14 +00:00
github-actions[bot]andKoenkk 2258ed1dfa Update zigbee-herdsman to 0.14.62 (#14259)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-30 18:02:25 +00:00
github-actions[bot]andKoenkk 2d750f8b9a Update zigbee-herdsman-converters to 14.0.632 (#14254)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-29 20:31:02 +00:00
b54e29917e Update zigbee-herdsman to 0.14.61 (#14238)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-09-28 18:28:27 +00:00
Markus WegmannandKoen Kanters 3b60a8e02a Fix cover state publishing of multi-endpoint devices (#14200)
* Fix cover state publishing of multi-endpoint devices

* WIP testing

* WIP test for multiEndpoint cover device

* WIP zigfred plus test

* WIP zigfred plus test

* Remove zigfred plus meta testing flag

* Working zigfred plus integration into bridge test

* Working integration of zigfred plus in tests

* WIP zigfred plus testing

* Add working test for multi-cover devices. Working cover state for multi-cover + multi-light devices.

* Fix republishing of cover state

* Fix cover position and tilt readout with postfix topic

* Fix homeassistant.test.js for zigfred plus cover

* Fix cover value template to support multi-cover devices

* Update homeassistant.ts

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-09-28 20:21:30 +02:00
github-actions[bot]andKoenkk a95d47fef9 Update zigbee-herdsman-converters to 14.0.631 (#14232)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-28 15:14:56 +00:00
github-actions[bot]andKoenkk d385d6c1af Update zigbee-herdsman to 0.14.60 (#14231)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-28 15:12:36 +00:00
github-actions[bot]andnurikk 3453585fd0 Update zigbee2mqtt-frontend to 0.6.112 (#14216)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-09-27 15:55:09 +00:00
github-actions[bot]andKoenkk 7b72b85cf7 Update zigbee-herdsman-converters to 14.0.630 (#14186)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-25 08:15:30 +00:00
github-actions[bot]andKoenkk 47378c46bd Update dependencies (#14180)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-25 09:16:35 +02:00
github-actions[bot]andKoenkk 647d45c4fa Update zigbee-herdsman-converters to 14.0.629 (#14171)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-23 20:03:53 +00:00
github-actions[bot]andKoenkk 6775423b86 Update zigbee-herdsman to 0.14.59 (#14167)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-23 18:13:43 +00:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3413d472ab Bump actions/stale from 5 to 6 (#14160)
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-23 19:49:49 +02:00
github-actions[bot]andKoenkk d654e085ae Update zigbee-herdsman-converters to 14.0.628 (#14143)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-22 18:24:44 +00:00
github-actions[bot]andKoenkk 802803479e Update zigbee-herdsman to 0.14.58 (#14142)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-22 18:00:13 +00:00
github-actions[bot]andKoenkk 639babd9ab Update zigbee-herdsman-converters to 14.0.627 (#14127)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-21 18:05:46 +00:00
Koen Kanters 49f7a5ca1d Improve Home Assistant history view for sensors without unit. #14103 2022-09-21 17:11:03 +02:00
github-actions[bot]andKoenkk 615c70f3bb Update zigbee-herdsman to 0.14.57 (#14102)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-20 14:59:08 +00:00
github-actions[bot]andKoenkk 9b4a03c0e8 Update zigbee-herdsman-converters to 14.0.626 (#14083)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-19 16:17:25 +00:00
github-actions[bot]andKoenkk 0ccfb5aded Update zigbee-herdsman to 0.14.56 (#14082)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-19 18:01:46 +02:00
NoneangelandKoen Kanters 1966456814 Add HVAC swing mode to Home Assistant discovery (#13784)
* hvac swing mode

* test: add GW003-AS-IN-TE-FC to tested devices

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-09-19 17:56:58 +02:00
github-actions[bot]andKoenkk 925714022f Update dependencies (#14052)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-19 17:39:10 +02:00
github-actions[bot]andKoenkk 1e24734a6c Update zigbee-herdsman-converters to 14.0.625 (#14022)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-16 07:50:35 +00:00
github-actions[bot]andKoenkk c4fc5335d5 Update zigbee-herdsman to 0.14.55 (#14017)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-15 08:44:52 +00:00
github-actions[bot]andKoenkk 0133afaef0 Update zigbee-herdsman-converters to 14.0.624 (#14016)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-15 08:15:30 +00:00
github-actions[bot]andKoenkk 4d0fd3275b Update zigbee-herdsman-converters to 14.0.623 (#14004)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-14 07:41:56 +00:00
5f992cae76 Update zigbee-herdsman-converters to 14.0.622 (#13994)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-09-13 08:04:17 +00:00
Koen Kanters 5a24e62b51 Fix #ba1e3a06b62d9b53f456065f18807410333da3fd 2022-09-13 10:00:22 +02:00
Koen Kanters ba1e3a06b6 Fix cover value_template properties for multi endpoint devices. #13944 2022-09-13 09:16:24 +02:00
github-actions[bot]andKoenkk 809f5d3ed1 Update zigbee-herdsman-converters to 14.0.621 (#13977)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-12 09:25:13 +00:00
Koen Kanters 125ca61812 Log MQTT disconnect reason. #13965 2022-09-12 09:34:20 +02:00
Koen Kanters d38b8ff5f1 Fix cover state in Home Assistant for multi channel cover controllers. #13944 2022-09-12 09:30:07 +02:00
github-actions[bot]andKoenkk 3f7e9941e2 Update zigbee-herdsman-converters to 14.0.619 (#13961)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-11 08:13:59 +00:00
github-actions[bot]andKoenkk 8ba0fe9367 Update dependencies (#13955)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-11 09:39:20 +02:00
github-actions[bot]andKoenkk cbf75d6339 Update zigbee-herdsman-converters to 14.0.618 (#13949)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-10 07:51:44 +00:00
github-actions[bot]andKoenkk 0ea528f750 Update zigbee-herdsman-converters to 14.0.617 (#13936)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-09 07:51:25 +00:00
github-actions[bot]andKoenkk d12b6e0ca9 Update zigbee-herdsman to 0.14.54 (#13935)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-09 07:20:30 +00:00
github-actions[bot]andKoenkk 2b1d1ff6ef Update zigbee-herdsman-converters to 14.0.616 (#13915)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-08 08:11:04 +00:00
github-actions[bot]andKoenkk fc7de95d1d Update zigbee-herdsman-converters to 14.0.614 (#13897)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-07 08:16:05 +00:00
Koen Kanters 2bca5deb66 Fix setting devices/groups to file via environment variables not working. #7807 2022-09-07 10:07:16 +02:00
github-actions[bot]andKoenkk 8be8c4df56 Update zigbee-herdsman-converters to 14.0.613 (#13883)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-06 08:56:30 +00:00
Koen KantersandJohn Doe 9519ffdac7 Add install code support (#13780)
* Add install code support

* Update bridge.ts

Co-authored-by: John Doe <nurikk@users.noreply.github.com>
2022-09-06 09:30:03 +02:00
github-actions[bot]andKoenkk 0b645a4e6a Update zigbee-herdsman-converters to 14.0.611 (#13868)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-05 08:02:00 +00:00
github-actions[bot]andKoenkk 67a94621ab Update dependencies (#13842)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-05 09:10:10 +02:00
github-actions[bot]andnurikk 24d83b05f7 Update zigbee2mqtt-frontend to 0.6.111 (#13841)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-09-03 21:26:02 +00:00
Koen Kanters 178f72c304 Promote to dev 2022-09-01 11:27:14 +02:00
Koen Kanters 7dc48fb6d6 1.27.2 2022-09-01 11:24:20 +02:00
Koen Kanters 5017f556fa Undev 2022-09-01 11:24:17 +02:00
github-actions[bot]andKoenkk 437eeb350c Update zigbee-herdsman to 0.14.53 (#13793)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-01 11:23:29 +02:00
github-actions[bot]andKoenkk cfd792dc70 Update zigbee-herdsman to 0.14.52 (#13792)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-09-01 09:11:55 +00:00
Koen Kanters 2a4722bd38 Promote to dev 2022-09-01 08:42:29 +02:00
Koen Kanters d381f2daa4 1.27.1 2022-09-01 08:41:47 +02:00
Koen Kanters b05b4adf57 Undev 2022-09-01 08:40:53 +02:00
Koen Kanters 96d72103f2 Merge branch 'dev' 2022-09-01 08:37:54 +02:00
github-actions[bot]andKoenkk 97ffa9610b Update zigbee-herdsman-converters to 14.0.610 (#13782)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-31 16:46:59 +00:00
github-actions[bot]andKoenkk 09d6c8601c Update zigbee-herdsman to 0.14.51 (#13781)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-31 16:04:14 +00:00
github-actions[bot]andKoenkk fc409a6884 Update zigbee-herdsman-converters to 14.0.609 (#13769)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-30 15:38:45 +00:00
github-actions[bot]andnurikk fa63ede4b6 Update zigbee2mqtt-frontend to 0.6.110 (#13757)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-08-29 19:21:24 +00:00
github-actions[bot]andKoenkk fd24c8186e Update zigbee-herdsman to 0.14.50 (#13753)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-29 18:06:26 +00:00
github-actions[bot]andKoenkk 0816d07b93 Update zigbee-herdsman-converters to 14.0.608 (#13752)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-29 16:39:36 +00:00
github-actions[bot]andnurikk c1b9345613 Update zigbee2mqtt-frontend to 0.6.109 (#13748)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-08-29 10:30:15 +00:00
github-actions[bot]andKoenkk 7f198d18ac Update zigbee-herdsman-converters to 14.0.607 (#13739)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-28 17:49:58 +00:00
github-actions[bot]andKoenkk 802bccd1f3 Update zigbee-herdsman to 0.14.49 (#13736)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-28 15:26:35 +00:00
github-actions[bot]andKoenkk 77bd76d1ca Update zigbee-herdsman-converters to 14.0.606 (#13710)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-27 08:14:22 +00:00
github-actions[bot]andKoenkk 8dd8b2848c Update zigbee-herdsman-converters to 14.0.605 (#13703)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-26 19:23:43 +00:00
github-actions[bot]andKoenkk c5d54a845a Update zigbee-herdsman-converters to 14.0.604 (#13687)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-25 16:04:17 +00:00
github-actions[bot]andKoenkk f1a19151fc Update zigbee-herdsman-converters to 14.0.603 (#13670)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-24 17:08:37 +00:00
963c2d86d3 Update zigbee-herdsman-converters to 14.0.602 (#13654)
* Update zigbee-herdsman-converters to 14.0.602

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-08-23 19:53:49 +00:00
9e6b4083b2 Update zigbee-herdsman-converters to 14.0.601 (#13646)
* Update zigbee-herdsman-converters to 14.0.601

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-08-22 18:06:45 +00:00
github-actions[bot]andKoenkk f29c4a24c2 Update zigbee-herdsman-converters to 14.0.600 (#13634)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-21 18:23:36 +00:00
github-actions[bot]andKoenkk a75e1c2b2b Update dependencies (#13630)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-21 09:30:25 +02:00
github-actions[bot]andKoenkk 62499483ce Update zigbee-herdsman-converters to 14.0.599 (#13618)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-20 07:39:24 +00:00
github-actions[bot]andKoenkk 304bb7b9d1 Update zigbee-herdsman-converters to 14.0.598 (#13611)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-19 19:06:19 +00:00
github-actions[bot]andKoenkk 15a069e3c7 Update zigbee-herdsman to 0.14.48 (#13610)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-19 19:01:11 +00:00
Koen Kanters e0a9323d6e Update dont-stale label 2022-08-19 20:57:44 +02:00
github-actions[bot]andKoenkk a0182c2e39 Update zigbee-herdsman-converters to 14.0.597 (#13596)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-18 17:23:05 +00:00
github-actions[bot]andKoenkk 327f816c0e Update zigbee-herdsman-converters to 14.0.596 (#13586)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-17 18:29:55 +00:00
github-actions[bot]andnurikk 040d2a1b36 Update zigbee2mqtt-frontend to 0.6.108 (#13573)
Co-authored-by: nurikk <nurikk@users.noreply.github.com>
2022-08-16 20:51:02 +00:00
github-actions[bot]andKoenkk 497a48b8b0 Update zigbee-herdsman-converters to 14.0.595 (#13569)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-16 18:59:33 +00:00
github-actions[bot]andKoenkk 36a4754430 Update zigbee-herdsman-converters to 14.0.594 (#13542)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-14 16:29:56 +00:00
Koen Kanters 60b9f6f6b2 Home Assistant discovery: add enums with only SET (e.g. selftest). https://github.com/Koenkk/zigbee2mqtt/issues/13532 2022-08-14 18:22:35 +02:00
github-actions[bot]andKoenkk 2bdc7b7aca Update dependencies (#13535)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-14 09:58:14 +02:00
github-actions[bot]andKoenkk fea5d44a57 Update zigbee-herdsman-converters to 14.0.593 (#13517)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-12 14:59:07 +00:00
Koen Kanters 281e3870d3 Fix tests 2022-08-11 20:32:01 +02:00
Koen Kanters c9b2a7f6d4 Revert "Publish device and bridge availability when Home Assistant comes online. https://github.com/Koenkk/zigbee2mqtt/issues/13382"
This reverts commit 619d5232db.
2022-08-11 20:23:40 +02:00
Koen Kanters 6314b86d9b Better fix for #13382 2022-08-11 20:23:19 +02:00
Koen Kanters 619d5232db Publish device and bridge availability when Home Assistant comes online. https://github.com/Koenkk/zigbee2mqtt/issues/13382 2022-08-11 19:50:46 +02:00
Koen Kanters da4a3b9a77 Fix exception when using group remove_all. https://github.com/Koenkk/zigbee2mqtt/issues/13484 2022-08-10 22:38:04 +02:00
github-actions[bot]andKoenkk 62284dbd1a Update zigbee-herdsman-converters to 14.0.592 (#13489)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-10 17:41:21 +00:00
wysiwyng addb09275a Add category and icon for flip_indicator_light Home Assistant discovery (#13477) 2022-08-10 16:57:31 +02:00
github-actions[bot]andKoenkk 9c45a5fdf0 Update zigbee-herdsman-converters to 14.0.591 (#13469)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-09 15:06:24 +00:00
Koen Kanters 0aa29a0fab Home Assistant discovery: always expose cover state. https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/issues/359 2022-08-09 17:01:22 +02:00
github-actions[bot]andKoenkk 5f778a7570 Update zigbee-herdsman-converters to 14.0.590 (#13458)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-08 15:54:36 +00:00
github-actions[bot]andKoenkk e8f6def246 Update zigbee-herdsman-converters to 14.0.589 (#13447)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-07 16:27:47 +00:00
github-actions[bot]andKoenkk 99485fa324 Update dependencies (#13441)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-07 09:20:22 +02:00
github-actions[bot]andKoenkk 483ff4aa8a Update zigbee-herdsman-converters to 14.0.588 (#13424)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-06 08:02:28 +00:00
github-actions[bot]andKoenkk b6c0afc129 Update zigbee-herdsman-converters to 14.0.587 (#13402)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-04 19:55:35 +00:00
github-actions[bot]andKoenkk 7def5ea9bf Update zigbee-herdsman to 0.14.47 (#13394)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-03 16:06:19 +00:00
github-actions[bot]andKoenkk 4e590ece19 Update zigbee-herdsman-converters to 14.0.586 (#13376)
Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2022-08-02 17:42:22 +00:00
c2faa3815a Update zigbee-herdsman-converters to 14.0.585 (#13362)
* Update zigbee-herdsman-converters to 14.0.585

* Fix tests

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2022-08-01 18:12:28 +00:00
Koen Kanters 52f8753a09 Promote to dev 2022-08-01 17:44:02 +02:00
81 changed files with 8190 additions and 6267 deletions
+3
View File
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "IMPORTANT: Check development branch changelog first!!"
url: https://gist.github.com/Koenkk/bfd4c3d1725a2cccacc11d6ba51008ba
about: "Before submitting an issue, check if the issue hasn't already been solved in the development branch. Click 'Open' to see the release notes of the development branch. In case it is, you can read here how to switch to the development branch: https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html"
- name: Questions/discussion
url: https://github.com/Koenkk/zigbee2mqtt/discussions/new
about: Ask questions, discuss about devices or show things you made
+64
View File
@@ -0,0 +1,64 @@
name: Wrong device picture/vendor/model/description
description: Use if device is detected as supported and is fully functional but has a wrong picture, vendor, model or description
title: "[Wrong device]: "
labels: [wrong device]
body:
- type: markdown
attributes:
value: |
Only use this if the device is detected as **supported** and is **fully functional** but has a wrong picture, vendor, model or description.
- type: input
id: link
attributes:
label: Link
description: Link of this device (product page)
placeholder: https://www.linktomydevice.org
validations:
required: true
- type: input
id: model
attributes:
label: Model
description: Expected model, model that is printed on the device, for TuYa device this is NOT something like TS0601 or _TZE200_cf1sl3tj
placeholder: RTCGQ01LM
validations:
required: true
- type: input
id: description
attributes:
label: Description
description: Expected description
placeholder: Motion sensor
validations:
required: true
- type: input
id: vendor
attributes:
label: Vendor
description: Expected vendor
placeholder: Xiaomi
validations:
required: true
- type: input
id: picture
attributes:
label: Picture (link)
description: Expected picture
placeholder: https://www.linktomydevice.org/RTCGQ01LM.jpg
validations:
required: true
- type: input
id: database
attributes:
label: Database entry
description: Entry of this device in `data/database.db` after pairing it
placeholder: '{"id":53,"type":"Router","ieeeAddr":"0x10458d00024284f69","nwkAddr":10148,"manufId":4151,"manufName":"LUMI","powerSource":"DC Source","modelId":"lumi.relay.c2acn01","epList":[1,2],"endpoints":{"1":{"profId":260,"epId":1,"devId":257,"inClusterList":[0,3,4,5,1,2,10,6,16,2820,12],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"modelId":"lumi.relay.c2acn01","appVersion":1,"manufacturerName":"LUMI","powerSource":4,"zclVersion":0,"stackVersion":2,"hwVersion":18,"dateCode":"8-6-2020"}},"genAnalogInput":{"attributes":{"presentValue":129.04425048828125}},"genOnOff":{"attributes":{"61440":117440715,"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":257,"inClusterList":[6,16,4,5],"outClusterList":[],"clusters":{"genOnOff":{"attributes":{"61440":237478966,"onOff":0}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":2,"hwVersion":18,"dateCode":"8-6-2020","zclVersion":0,"interviewCompleted":true,"meta":{},"lastSeen":1640285631405}'
validations:
required: true
- type: textarea
id: notes
attributes:
label: Notes
placeholder: Some additional notes...
validations:
required: false
+19 -18
View File
@@ -1,20 +1,21 @@
name: CI
name: ci
on: [push, pull_request]
on: [pull_request, push]
permissions:
contents: read
contents: write
pull-requests: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
@@ -28,16 +29,16 @@ jobs:
run: echo ${{ secrets.DOCKER_KEY }} | docker login -u koenkk --password-stdin
- name: Docker login ghcr.io
if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push'
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u koenkk --password-stdin
run: echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u koenkk --password-stdin
- name: Docker setup - QEMU
if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Docker setup - Buildx
if: (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) && github.event_name == 'push'
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Docker build dev
@@ -45,8 +46,9 @@ jobs:
run: |
docker buildx build \
--build-arg COMMIT=$(git rev-parse --short HEAD) \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \
--platform linux/arm64/v8,linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 \
-f docker/Dockerfile \
--provenance=false \
--push \
-t koenkk/zigbee2mqtt:latest-dev -t ghcr.io/koenkk/zigbee2mqtt:latest-dev \
.
@@ -56,8 +58,9 @@ jobs:
TAG="$(git describe --tags)"
docker buildx build \
--build-arg COMMIT=$(git rev-parse --short HEAD) \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \
--platform linux/arm64/v8,linux/386,linux/amd64,linux/arm/v6,linux/arm/v7 \
-f docker/Dockerfile \
--provenance=false \
--push \
-t koenkk/zigbee2mqtt:latest -t "koenkk/zigbee2mqtt:$TAG" -t ghcr.io/koenkk/zigbee2mqtt:latest -t "ghcr.io/koenkk/zigbee2mqtt:$TAG" \
.
@@ -71,7 +74,7 @@ jobs:
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/zigbee2mqtt/hassio-zigbee2mqtt/actions/workflows/ci.yml/dispatches \
-d '{"ref":"master","inputs":{}}'
@@ -80,12 +83,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [14, 16, 18]
node: [16, 18, 20]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
@@ -93,8 +96,6 @@ jobs:
- name: Install dependencies
# --ignore-scripts prevents the serialport build which often fails on Windows
run: npm ci --ignore-scripts
- name: Lint
run: npm run eslint
- name: Build
run: npm run build
- name: Test
+4 -15
View File
@@ -1,34 +1,23 @@
name: "Code Scanning - Action"
name: codeql
on:
pull_request:
push:
branches:
- dev
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
@@ -1,4 +1,4 @@
name: 'Dependency review'
name: deps-review
on: [pull_request]
permissions:
@@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Dependency review'
uses: actions/dependency-review-action@v2
uses: actions/dependency-review-action@v3
+4 -3
View File
@@ -1,17 +1,18 @@
on:
workflow_dispatch:
name: GHCR cleanup
name: ghcr-cleanup
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Delete untagged images
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CR_PAT }}
github-token: ${{ secrets.GH_TOKEN }}
script: |
const response = await github.request("GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
{ per_page: ${{ env.PER_PAGE }}
+19
View File
@@ -0,0 +1,19 @@
name: merge-master-to-dev
on:
push:
branches:
- master
jobs:
merge_master_to_dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: devmasx/merge-branch@master
with:
type: now
head_to_merge: master
target_branch: dev
message: "chore: merge master to dev"
github_token: ${{ secrets.GH_TOKEN }}
+114
View File
@@ -0,0 +1,114 @@
on:
push:
branches:
- dev
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
version: "${{steps.release.outputs.major}}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}}"
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: release-please-action
default-branch: dev
token: ${{secrets.GH_TOKEN}}
include-v-in-tag: false
# Checkout repos
- uses: actions/checkout@v4
with:
repository: koenkk/zigbee2mqtt
path: ./z2m
- uses: actions/checkout@v4
with:
repository: koenkk/zigbee2mqtt
path: ./z2m-master
ref: master
- name: Restore cache commit-user-lookup.json
uses: actions/cache/restore@v3
with:
path: z2m/scripts/commit-user-lookup.json
key: commit-user-lookup-dummy
restore-keys: |
commit-user-lookup-
- name: Generate changelog
run: |
MASTER_Z2M_VERSION=$(cat z2m-master/package.json | jq -r '.version')
MASTER_ZHC_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee-herdsman-converters"')
MASTER_ZH_VERSION=$(cat z2m-master/package.json | jq -r '.dependencies."zigbee-herdsman"')
wget -q -O - https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/release-please--branches--dev--components--release-please-action/CHANGELOG.md > z2m/CHANGELOG.md || true
cd z2m
npm ci
node scripts/generateChangelog.js $MASTER_Z2M_VERSION $MASTER_ZHC_VERSION $MASTER_ZH_VERSION >> ../changelog.md
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
- name: Update changelog in release PR
run: |
gh gist edit bfd4c3d1725a2cccacc11d6ba51008ba -a changelog.md
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
- name: Upload changelog
uses: actions/upload-artifact@v3
with:
name: changelog
path: changelog.md
- name: Save cache commit-user-lookup.json
uses: actions/cache/save@v3
if: always()
with:
path: z2m/scripts/commit-user-lookup.json
key: commit-user-lookup-${{ hashFiles('z2m/scripts/commit-user-lookup.json') }}
create_release:
runs-on: ubuntu-latest
needs: [release-please]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
with:
ref: dev
token: ${{secrets.GH_TOKEN}}
- name: Download changelog
uses: actions/download-artifact@v3
with:
name: changelog
path: ../changelog
- uses: ncipollo/release-action@v1
name: Create release
with:
bodyFile: ../changelog/changelog.md
draft: true
name: ${{ needs.release-please.outputs.version }}
tag: ${{ needs.release-please.outputs.version }}
- name: Merge dev -> master
uses: devmasx/merge-branch@master
with:
type: now
from_branch: dev
target_branch: master
github_token: ${{secrets.GH_TOKEN}}
- name: Promote to dev
run: |
jq '.version = "${{ needs.release-please.outputs.version }}-dev"' package.json > package.json.tmp
jq '.version = "${{ needs.release-please.outputs.version }}-dev"' package-lock.json > package-lock.json.tmp
mv package.json.tmp package.json
mv package-lock.json.tmp package-lock.json
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: promote to dev"
+5 -10
View File
@@ -1,25 +1,20 @@
name: "Close stale issues/pull requests"
name: stale
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
days-before-stale: 30
days-before-stale: 100
days-before-close: 7
exempt-issue-labels: dont-stale
operations-per-run: 500
exempt-issue-labels: 'breaking change'
+38
View File
@@ -0,0 +1,38 @@
on:
repository_dispatch:
types: update_dep
name: update-dep
permissions: {}
jobs:
update_dep:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm install ${{ github.event.client_payload.package }}@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v5
id: cpr
with:
commit-message: "fix(ignore): update ${{ github.event.client_payload.package }} to ${{ github.event.client_payload.version }}"
branch: "deps/${{ github.event.client_payload.package }}"
title: Update ${{ github.event.client_payload.package }} to ${{ github.event.client_payload.version }}
token: ${{ secrets.GH_TOKEN }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.GH_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
+12 -8
View File
@@ -14,17 +14,21 @@ jobs:
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npx npm-check-updates -u -x connect-gzip-static # connect-gzip-static only supports node 16
node-version: 20
cache: npm
# connect-gzip-static only supports node 16
# @types/ws 8.5.5 is broken
- run: npx npm-check-updates -u -x connect-gzip-static -x @types/ws
- run: npm install
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
commit-message: Update dependencies
branch: "update_deps"
commit-message: "fix(ignore): update dependencies"
branch: "deps/all"
title: Update dependencies
token: ${{ secrets.GH_TOKEN }}
-30
View File
@@ -1,30 +0,0 @@
name: Update zigbee-frontend
on:
repository_dispatch:
types: update_frontend
jobs:
update_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install zigbee2mqtt-frontend@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v4
id: cpr
with:
commit-message: Update zigbee2mqtt-frontend to ${{ github.event.client_payload.version }}
branch: "update_frontend"
title: Update zigbee-frontend to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v2
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
-30
View File
@@ -1,30 +0,0 @@
name: Update zigbee-herdsman
on:
repository_dispatch:
types: update_zh
jobs:
update_zh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install zigbee-herdsman@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v4
id: cpr
with:
commit-message: Update zigbee-herdsman to ${{ github.event.client_payload.version }}
branch: "update_zh"
title: Update zigbee-herdsman to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v2
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
-30
View File
@@ -1,30 +0,0 @@
name: Update zigbee-herdsman-converters
on:
repository_dispatch:
types: update_zhc
jobs:
update_zhc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install zigbee-herdsman-converters@${{ github.event.client_payload.version }} --save-exact
- uses: peter-evans/create-pull-request@v4
id: cpr
with:
commit-message: Update zigbee-herdsman-converters to ${{ github.event.client_payload.version }}
branch: "update_zhc"
title: Update zigbee-herdsman-converters to ${{ github.event.client_payload.version }}
- run: sleep 5 # Otherwise pull request may not exist yet causing automerge to fail
- uses: peter-evans/enable-pull-request-automerge@v2
if: steps.cpr.outputs.pull-request-operation == 'created'
with:
token: ${{ secrets.CR_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
+7
View File
@@ -48,6 +48,9 @@ typings/
# Optional eslint cache
.eslintcache
# Build cache
tsconfig.tsbuildinfo
# Optional REPL history
.node_repl_history
@@ -80,3 +83,7 @@ data/extension
# Ignore config
data/*.yaml
!data/configuration.example.yaml
# commit-user-lookup.json
scripts/commit-user-lookup.json
+1
View File
@@ -8,6 +8,7 @@ coverage
.codeclimate.yml
.github
babel.config.js
tsconfig.tsbuildinfo
#linters
.jscsrc
+4
View File
@@ -0,0 +1,4 @@
{
".": "1.34.0",
"bootstrap-sha": "7ee207fc0e05f32c9636c0298b48eea1b91ed9e1"
}
+308
View File
@@ -0,0 +1,308 @@
# Changelog
## [1.34.0](https://github.com/Koenkk/zigbee2mqtt/compare/1.33.2...1.34.0) (2023-12-01)
### Features
* Add Home Assistant scene discovery ([#19838](https://github.com/Koenkk/zigbee2mqtt/issues/19838)) ([838629c](https://github.com/Koenkk/zigbee2mqtt/commit/838629ca42162d3d910b06bbc100b6270f75de33))
### Bug Fixes
* Fix `in_progress` attribute for Home Assistant update sensor ([#19542](https://github.com/Koenkk/zigbee2mqtt/issues/19542)) ([1f2bd84](https://github.com/Koenkk/zigbee2mqtt/commit/1f2bd841c4548777fc0c0f6ad6c54dfe913b3fd0))
* Fix entity category for Home Assistant `binary_sensor` https://github.com/Koenkk/zigbee2mqtt/pull/19474 ([071842e](https://github.com/Koenkk/zigbee2mqtt/commit/071842ef49eccc002efefbad3abf2780e6fdd0a2))
* Fix Home Assistant `in_progress` Erroneous JSON error https://github.com/Koenkk/zigbee2mqtt/issues/19597 ([2540fbd](https://github.com/Koenkk/zigbee2mqtt/commit/2540fbd771d01ee18cbb72c67cb0a24b44131912))
* Fix invalid JSON error in Home Assistant update entity ([#19659](https://github.com/Koenkk/zigbee2mqtt/issues/19659)) ([da04d22](https://github.com/Koenkk/zigbee2mqtt/commit/da04d223b446000df5cc59ccb38115eb3e5eac96))
* Fix unable to configure again after configure fails ([#19908](https://github.com/Koenkk/zigbee2mqtt/issues/19908)) ([a904e7a](https://github.com/Koenkk/zigbee2mqtt/commit/a904e7a396e34bbeef2e624702d55e9d0522b242))
* **ignore:** Fix color_temp_percent test ([01d32cb](https://github.com/Koenkk/zigbee2mqtt/commit/01d32cb2301f6db11f61bca113a2db8d86c7acc1))
* **ignore:** Fixes quote type for update JSON attribute discovery ([#19668](https://github.com/Koenkk/zigbee2mqtt/issues/19668)) ([baae082](https://github.com/Koenkk/zigbee2mqtt/commit/baae0822583fb29e079c57746b047cb602f017a7))
* **ignore:** remove console.log in test ([8cf41a1](https://github.com/Koenkk/zigbee2mqtt/commit/8cf41a137aa8275e61a244b0096796466b10648d))
* **ignore:** remove unused variable ([#19584](https://github.com/Koenkk/zigbee2mqtt/issues/19584)) ([be48d54](https://github.com/Koenkk/zigbee2mqtt/commit/be48d545cc03c95b0a6302b67cc04b4e7d187065))
* **ignore:** update dependencies ([#19570](https://github.com/Koenkk/zigbee2mqtt/issues/19570)) ([fc073e8](https://github.com/Koenkk/zigbee2mqtt/commit/fc073e8743c0ba9c05d0a952f6bf3ae6fa804f68))
* **ignore:** update dependencies ([#19679](https://github.com/Koenkk/zigbee2mqtt/issues/19679)) ([c8848be](https://github.com/Koenkk/zigbee2mqtt/commit/c8848be981c709ebb52bfb9c7347ab3a88cce82e))
* **ignore:** update zigbee-herdsman to 0.22.0 ([#19547](https://github.com/Koenkk/zigbee2mqtt/issues/19547)) ([02a5a1b](https://github.com/Koenkk/zigbee2mqtt/commit/02a5a1b14f4907e7d170ef3e3e4f93b176c4bbc5))
* **ignore:** update zigbee-herdsman to 0.22.1 ([#19602](https://github.com/Koenkk/zigbee2mqtt/issues/19602)) ([2d5bb24](https://github.com/Koenkk/zigbee2mqtt/commit/2d5bb2462eb547bc75df1bace2f01b6b15e6d171))
* **ignore:** update zigbee-herdsman to 0.23.0 ([#19700](https://github.com/Koenkk/zigbee2mqtt/issues/19700)) ([a152bde](https://github.com/Koenkk/zigbee2mqtt/commit/a152bded93877cfab3839b9b22e7d22ce43fb263))
* **ignore:** update zigbee-herdsman to 0.24.0 ([#19926](https://github.com/Koenkk/zigbee2mqtt/issues/19926)) ([e5dc271](https://github.com/Koenkk/zigbee2mqtt/commit/e5dc271a783aeec0c28e106f0f259a083d737d7c))
* **ignore:** update zigbee-herdsman to 0.25.0 ([#19933](https://github.com/Koenkk/zigbee2mqtt/issues/19933)) ([2dabc1e](https://github.com/Koenkk/zigbee2mqtt/commit/2dabc1e61b897fdb041a42bda7adc6acac6bb2b3))
* **ignore:** update zigbee-herdsman-converters to 15.107.0 ([#19548](https://github.com/Koenkk/zigbee2mqtt/issues/19548)) ([366e29d](https://github.com/Koenkk/zigbee2mqtt/commit/366e29d4d9126eaeca2476cc0fa56cf7faf70764))
* **ignore:** update zigbee-herdsman-converters to 15.108.0 ([#19589](https://github.com/Koenkk/zigbee2mqtt/issues/19589)) ([1fd1686](https://github.com/Koenkk/zigbee2mqtt/commit/1fd1686ee63cbd2b41d9d0a13669f9c665eb36da))
* **ignore:** update zigbee-herdsman-converters to 15.109.0 ([#19601](https://github.com/Koenkk/zigbee2mqtt/issues/19601)) ([b71aa0a](https://github.com/Koenkk/zigbee2mqtt/commit/b71aa0a3fd9a8e6a7fcc5e7bdb4a2f2b37cd690a))
* **ignore:** update zigbee-herdsman-converters to 15.110.0 ([#19619](https://github.com/Koenkk/zigbee2mqtt/issues/19619)) ([5889cdd](https://github.com/Koenkk/zigbee2mqtt/commit/5889cdd9abe6b41899a4a7422b696bde8bbb0390))
* **ignore:** update zigbee-herdsman-converters to 15.111.0 ([#19630](https://github.com/Koenkk/zigbee2mqtt/issues/19630)) ([354ada5](https://github.com/Koenkk/zigbee2mqtt/commit/354ada5c4c33d88677ce7f8b072b682dde6f19aa))
* **ignore:** update zigbee-herdsman-converters to 15.112.0 ([#19643](https://github.com/Koenkk/zigbee2mqtt/issues/19643)) ([d26ea1a](https://github.com/Koenkk/zigbee2mqtt/commit/d26ea1a4112f9e142ac72e2add82784012c28c51))
* **ignore:** update zigbee-herdsman-converters to 15.113.0 ([#19663](https://github.com/Koenkk/zigbee2mqtt/issues/19663)) ([c8dcd71](https://github.com/Koenkk/zigbee2mqtt/commit/c8dcd716ab271bdbe9d259943fb77d6d6accbc06))
* **ignore:** update zigbee-herdsman-converters to 15.114.0 ([#19692](https://github.com/Koenkk/zigbee2mqtt/issues/19692)) ([6587812](https://github.com/Koenkk/zigbee2mqtt/commit/6587812b725d28dc200eb42f6b0714ed1ed76e9f))
* **ignore:** update zigbee-herdsman-converters to 15.115.0 ([#19701](https://github.com/Koenkk/zigbee2mqtt/issues/19701)) ([157dff1](https://github.com/Koenkk/zigbee2mqtt/commit/157dff14d3ac32c70f13f5f7be0a85e2763bf2a6))
* **ignore:** update zigbee-herdsman-converters to 15.116.0 ([#19714](https://github.com/Koenkk/zigbee2mqtt/issues/19714)) ([4815ac7](https://github.com/Koenkk/zigbee2mqtt/commit/4815ac711003632ac21977b120dea7444ebeda3e))
* **ignore:** update zigbee-herdsman-converters to 15.117.0 ([#19727](https://github.com/Koenkk/zigbee2mqtt/issues/19727)) ([746066c](https://github.com/Koenkk/zigbee2mqtt/commit/746066c9205a7ab77393d1934aacb7f17209a1e0))
* **ignore:** update zigbee-herdsman-converters to 15.119.0 ([#19740](https://github.com/Koenkk/zigbee2mqtt/issues/19740)) ([ad4bed8](https://github.com/Koenkk/zigbee2mqtt/commit/ad4bed89215e1727f0966708f510b8c933ac1a32))
* **ignore:** update zigbee-herdsman-converters to 15.120.0 ([#19761](https://github.com/Koenkk/zigbee2mqtt/issues/19761)) ([fd19c86](https://github.com/Koenkk/zigbee2mqtt/commit/fd19c86cb19513dadae9a44ee8b50d287cc1860e))
* **ignore:** update zigbee-herdsman-converters to 15.121.0 ([#19777](https://github.com/Koenkk/zigbee2mqtt/issues/19777)) ([d4e3aa9](https://github.com/Koenkk/zigbee2mqtt/commit/d4e3aa9d976b67cb1519ca78c9b8de5e70247ad9))
* **ignore:** update zigbee-herdsman-converters to 15.123.1 ([#19809](https://github.com/Koenkk/zigbee2mqtt/issues/19809)) ([2d08baf](https://github.com/Koenkk/zigbee2mqtt/commit/2d08baf6204bde6f2ec90dba4a6a77963b14310c))
* **ignore:** update zigbee-herdsman-converters to 15.124.0 ([#19836](https://github.com/Koenkk/zigbee2mqtt/issues/19836)) ([ef4d9e1](https://github.com/Koenkk/zigbee2mqtt/commit/ef4d9e1e558561c1625d1a0d41ddc718d40b5c61))
* **ignore:** update zigbee-herdsman-converters to 15.125.0 ([#19854](https://github.com/Koenkk/zigbee2mqtt/issues/19854)) ([ef00a64](https://github.com/Koenkk/zigbee2mqtt/commit/ef00a64bf87adf38346461f5fa15757052400b2a))
* **ignore:** update zigbee-herdsman-converters to 15.125.1 ([#19867](https://github.com/Koenkk/zigbee2mqtt/issues/19867)) ([51a9341](https://github.com/Koenkk/zigbee2mqtt/commit/51a93418fa2de62e6691ef23a65725d28d9c8b42))
* **ignore:** update zigbee-herdsman-converters to 15.126.0 ([#19878](https://github.com/Koenkk/zigbee2mqtt/issues/19878)) ([b17487e](https://github.com/Koenkk/zigbee2mqtt/commit/b17487e6bb8d04bca0aaa5b0ad2338dc9eef46aa))
* **ignore:** update zigbee-herdsman-converters to 15.127.0 ([#19894](https://github.com/Koenkk/zigbee2mqtt/issues/19894)) ([8a6d90d](https://github.com/Koenkk/zigbee2mqtt/commit/8a6d90d70e9ebcb2eeeacf385f4c3d47adeebc88))
* **ignore:** update zigbee-herdsman-converters to 15.128.0 ([#19906](https://github.com/Koenkk/zigbee2mqtt/issues/19906)) ([4e128e2](https://github.com/Koenkk/zigbee2mqtt/commit/4e128e26fee314f2bdcce014132f85d5167ce0bf))
* **ignore:** update zigbee-herdsman-converters to 15.129.0 ([#19934](https://github.com/Koenkk/zigbee2mqtt/issues/19934)) ([12521ad](https://github.com/Koenkk/zigbee2mqtt/commit/12521add3968cc9ed5394cf128bf2917f75597a5))
* **ignore:** update zigbee-herdsman-converters to 15.130.0 ([#19942](https://github.com/Koenkk/zigbee2mqtt/issues/19942)) ([f976d4e](https://github.com/Koenkk/zigbee2mqtt/commit/f976d4efb48440ee7899490d31f14d820d71087d))
* **ignore:** update zigbee-herdsman-converters to 15.130.1 ([#19945](https://github.com/Koenkk/zigbee2mqtt/issues/19945)) ([3bbf89c](https://github.com/Koenkk/zigbee2mqtt/commit/3bbf89cba038c6bdfab08c3e2860e561b2845a43))
* **ignore:** update zigbee2mqtt-frontend to 0.6.143 ([#19642](https://github.com/Koenkk/zigbee2mqtt/issues/19642)) ([9d5d617](https://github.com/Koenkk/zigbee2mqtt/commit/9d5d61754d2808c83eee48dfc6a0e0c4c740002a))
* **ignore:** update zigbee2mqtt-frontend to 0.6.144 ([#19776](https://github.com/Koenkk/zigbee2mqtt/issues/19776)) ([91aed7e](https://github.com/Koenkk/zigbee2mqtt/commit/91aed7e98e65d1c1c1469e3bfaab74233f0002bf))
* **ignore:** update zigbee2mqtt-frontend to 0.6.145 ([#19778](https://github.com/Koenkk/zigbee2mqtt/issues/19778)) ([ed20e2a](https://github.com/Koenkk/zigbee2mqtt/commit/ed20e2a1bc0a474157880c2c54f7c2d656658901))
* **ignore:** update zigbee2mqtt-frontend to 0.6.146 ([#19784](https://github.com/Koenkk/zigbee2mqtt/issues/19784)) ([c87ac9c](https://github.com/Koenkk/zigbee2mqtt/commit/c87ac9cc2b1d360ff0962deed973545a9846fcd6))
* **ignore:** update zigbee2mqtt-frontend to 0.6.147 ([#19801](https://github.com/Koenkk/zigbee2mqtt/issues/19801)) ([61b08c9](https://github.com/Koenkk/zigbee2mqtt/commit/61b08c94bfd3dd58efdb22632476f410fac56d13))
* Make frontend listen on both IPv4 and IPv6 by default ([#19660](https://github.com/Koenkk/zigbee2mqtt/issues/19660)) ([45ac44d](https://github.com/Koenkk/zigbee2mqtt/commit/45ac44dd064a3f8aca87a25e7a0b2daafe53c5d3))
* Map climate `idle` to `idle` instead of `off` in Home Assistant ([#19545](https://github.com/Koenkk/zigbee2mqtt/issues/19545)) ([64b26e4](https://github.com/Koenkk/zigbee2mqtt/commit/64b26e47da3d765bfde8ccac8f9a1e304b28c697))
* Set entity category `config` for Home Assistant `temperature_display_mode` sensor ([#19631](https://github.com/Koenkk/zigbee2mqtt/issues/19631)) ([86ae0ed](https://github.com/Koenkk/zigbee2mqtt/commit/86ae0ed90fb1d94f5cb09545355968affa5654ca))
* **typo:** correct misspell ([#19581](https://github.com/Koenkk/zigbee2mqtt/issues/19581)) ([13443a4](https://github.com/Koenkk/zigbee2mqtt/commit/13443a42ce7239a7308efb829c8ff007e59ca45d))
## [1.33.2](https://github.com/Koenkk/zigbee2mqtt/compare/1.33.1...1.33.2) (2023-11-01)
### Bug Fixes
* Add device class for soil_moisture sensor in HA ([#19486](https://github.com/Koenkk/zigbee2mqtt/issues/19486)) ([98c7a2a](https://github.com/Koenkk/zigbee2mqtt/commit/98c7a2ab56ccf6db227a8ff9f8dd333e7f61eaf9))
* Add in_progress attribute for Home Assistant update sensor ([#19207](https://github.com/Koenkk/zigbee2mqtt/issues/19207)) ([cdce6b1](https://github.com/Koenkk/zigbee2mqtt/commit/cdce6b11d268ab3de9a7aa3a16020268efdfe7cf))
* Adjust default entity category of updates in Home Assistant ([#19435](https://github.com/Koenkk/zigbee2mqtt/issues/19435)) ([d0a4f5f](https://github.com/Koenkk/zigbee2mqtt/commit/d0a4f5f628de7c1ba8f004ee3fd8587b6391fd5c))
* Bump semver version ([#19179](https://github.com/Koenkk/zigbee2mqtt/issues/19179)) ([32c1bdf](https://github.com/Koenkk/zigbee2mqtt/commit/32c1bdfccbcef21e0405dd0529dfc101efca9811))
* Enable Home Assistant force entity by default ([#19212](https://github.com/Koenkk/zigbee2mqtt/issues/19212)) ([95d22c0](https://github.com/Koenkk/zigbee2mqtt/commit/95d22c0822a3b3d4b17c10aa424e26e488f70556))
* Enable incremental TSC builds ([#19293](https://github.com/Koenkk/zigbee2mqtt/issues/19293)) ([cc86e76](https://github.com/Koenkk/zigbee2mqtt/commit/cc86e76a7ad21fc13a9df4b3c859c512edc5d762))
* Fix device keeps requesting OTA due to incorrect transaction sequence number. https://github.com/Koenkk/zigbee2mqtt/issues/19129 ([daaade4](https://github.com/Koenkk/zigbee2mqtt/commit/daaade45d919d982461e49cfa4cefd195e70cd7d))
* Fix entity category of Home Assistant exposed enum sensors ([#19474](https://github.com/Koenkk/zigbee2mqtt/issues/19474)) ([69f6891](https://github.com/Koenkk/zigbee2mqtt/commit/69f6891db58e432c7b397d8f98f401aeccd5b2f7))
* Fix entity category of Home Assistant exposed sensor entities ([#19434](https://github.com/Koenkk/zigbee2mqtt/issues/19434)) ([e7749e2](https://github.com/Koenkk/zigbee2mqtt/commit/e7749e25e9056c8c4fd6144addba3567ee4b9fb9))
* **ignore:** update dependencies ([#19208](https://github.com/Koenkk/zigbee2mqtt/issues/19208)) ([9615faa](https://github.com/Koenkk/zigbee2mqtt/commit/9615faac2f197007562a9a55767644ff61a5a055))
* **ignore:** update dependencies ([#19301](https://github.com/Koenkk/zigbee2mqtt/issues/19301)) ([31541bd](https://github.com/Koenkk/zigbee2mqtt/commit/31541bd6bae09537acb87dfa3f223743d2effce8))
* **ignore:** update dependencies ([#19375](https://github.com/Koenkk/zigbee2mqtt/issues/19375)) ([6d387b3](https://github.com/Koenkk/zigbee2mqtt/commit/6d387b31c1abd0360b947695a3f3adff71c24b7f))
* **ignore:** update dependencies ([#19466](https://github.com/Koenkk/zigbee2mqtt/issues/19466)) ([0b37769](https://github.com/Koenkk/zigbee2mqtt/commit/0b3776916b1ff9241602dbae8072abfcbd66d18b))
* **ignore:** update zigbee-herdsman to 0.19.1 ([#19194](https://github.com/Koenkk/zigbee2mqtt/issues/19194)) ([fcb0af0](https://github.com/Koenkk/zigbee2mqtt/commit/fcb0af00d3044d51901051e5bc29376b400b63eb))
* **ignore:** update zigbee-herdsman to 0.19.2 ([#19277](https://github.com/Koenkk/zigbee2mqtt/issues/19277)) ([a0c13c1](https://github.com/Koenkk/zigbee2mqtt/commit/a0c13c1c1ea2c9dc04e797a3a7031a753b6e8c21))
* **ignore:** update zigbee-herdsman to 0.20.0 ([#19313](https://github.com/Koenkk/zigbee2mqtt/issues/19313)) ([43a5c7b](https://github.com/Koenkk/zigbee2mqtt/commit/43a5c7b2f0940bd95980ea5cfeb39f3165537c5d))
* **ignore:** update zigbee-herdsman to 0.21.0 ([#19421](https://github.com/Koenkk/zigbee2mqtt/issues/19421)) ([f73cca0](https://github.com/Koenkk/zigbee2mqtt/commit/f73cca0e396399640e39bbd8d77ebae5b0a12105))
* **ignore:** update zigbee-herdsman-converters to 15.100.0 ([#19376](https://github.com/Koenkk/zigbee2mqtt/issues/19376)) ([71dd0ab](https://github.com/Koenkk/zigbee2mqtt/commit/71dd0ab772185427eed687845c8ecfacb4e66072))
* **ignore:** update zigbee-herdsman-converters to 15.101.0 ([#19397](https://github.com/Koenkk/zigbee2mqtt/issues/19397)) ([52a545d](https://github.com/Koenkk/zigbee2mqtt/commit/52a545d86e441619fadbb942bab40c9ae9135fe0))
* **ignore:** update zigbee-herdsman-converters to 15.102.0 ([#19422](https://github.com/Koenkk/zigbee2mqtt/issues/19422)) ([1fa10f6](https://github.com/Koenkk/zigbee2mqtt/commit/1fa10f6f289234d6b2e90d35b01425075958ea9e))
* **ignore:** update zigbee-herdsman-converters to 15.103.0 ([#19443](https://github.com/Koenkk/zigbee2mqtt/issues/19443)) ([7e82a49](https://github.com/Koenkk/zigbee2mqtt/commit/7e82a491f6d7294340cd01baaa74f66acd1e88e4))
* **ignore:** update zigbee-herdsman-converters to 15.104.0 ([#19479](https://github.com/Koenkk/zigbee2mqtt/issues/19479)) ([e2fccc2](https://github.com/Koenkk/zigbee2mqtt/commit/e2fccc219b63943b7cd5939e53733c63f6ba181c))
* **ignore:** update zigbee-herdsman-converters to 15.105.0 ([#19492](https://github.com/Koenkk/zigbee2mqtt/issues/19492)) ([fe25924](https://github.com/Koenkk/zigbee2mqtt/commit/fe25924780c454751bada81a783151e5ee5746a8))
* **ignore:** update zigbee-herdsman-converters to 15.105.1 ([#19503](https://github.com/Koenkk/zigbee2mqtt/issues/19503)) ([d79235e](https://github.com/Koenkk/zigbee2mqtt/commit/d79235e27bf85046d269246678a0859985efd9f8))
* **ignore:** update zigbee-herdsman-converters to 15.106.0 ([#19511](https://github.com/Koenkk/zigbee2mqtt/issues/19511)) ([3538690](https://github.com/Koenkk/zigbee2mqtt/commit/35386903f2a429c241fa996c29bbbd571c7b046d))
* **ignore:** update zigbee-herdsman-converters to 15.87.0 ([#19156](https://github.com/Koenkk/zigbee2mqtt/issues/19156)) ([de0f060](https://github.com/Koenkk/zigbee2mqtt/commit/de0f060378738a6a32bd9a7b9780fc3ede56e331))
* **ignore:** update zigbee-herdsman-converters to 15.88.0 ([#19185](https://github.com/Koenkk/zigbee2mqtt/issues/19185)) ([0b60cd1](https://github.com/Koenkk/zigbee2mqtt/commit/0b60cd1100c264fb58cb54fe769aeed2b630f72c))
* **ignore:** update zigbee-herdsman-converters to 15.89.0 ([#19190](https://github.com/Koenkk/zigbee2mqtt/issues/19190)) ([b085fac](https://github.com/Koenkk/zigbee2mqtt/commit/b085fac50f9d3969192cce9c93cc7330359aca70))
* **ignore:** update zigbee-herdsman-converters to 15.89.1 ([#19195](https://github.com/Koenkk/zigbee2mqtt/issues/19195)) ([de7736a](https://github.com/Koenkk/zigbee2mqtt/commit/de7736a370cf6c3d62b0d51dea5ea63824edbe8d))
* **ignore:** update zigbee-herdsman-converters to 15.90.0 ([#19209](https://github.com/Koenkk/zigbee2mqtt/issues/19209)) ([2aae1bd](https://github.com/Koenkk/zigbee2mqtt/commit/2aae1bd54a94e64a52a9f373c3cecc7667198d00))
* **ignore:** update zigbee-herdsman-converters to 15.92.1 ([#19234](https://github.com/Koenkk/zigbee2mqtt/issues/19234)) ([d027b85](https://github.com/Koenkk/zigbee2mqtt/commit/d027b8520068af471e8bf5cc29ef5a2a5eb6552c))
* **ignore:** update zigbee-herdsman-converters to 15.93.0 ([#19278](https://github.com/Koenkk/zigbee2mqtt/issues/19278)) ([afb83fc](https://github.com/Koenkk/zigbee2mqtt/commit/afb83fcbd0ec60ce02d2ce1e677243258bbf2b4d))
* **ignore:** update zigbee-herdsman-converters to 15.94.0 ([#19290](https://github.com/Koenkk/zigbee2mqtt/issues/19290)) ([29247e1](https://github.com/Koenkk/zigbee2mqtt/commit/29247e19ac8a0e67d193b12fde71743c02afc86c))
* **ignore:** update zigbee-herdsman-converters to 15.94.1 ([#19295](https://github.com/Koenkk/zigbee2mqtt/issues/19295)) ([70b0fed](https://github.com/Koenkk/zigbee2mqtt/commit/70b0fed2dedeb76609e9afc0ef0ac2b34a3032b5))
* **ignore:** update zigbee-herdsman-converters to 15.94.2 ([#19304](https://github.com/Koenkk/zigbee2mqtt/issues/19304)) ([81a8df9](https://github.com/Koenkk/zigbee2mqtt/commit/81a8df9855e4069d57ab6ba990c0ef8ac79e66d6))
* **ignore:** update zigbee-herdsman-converters to 15.95.0 ([#19314](https://github.com/Koenkk/zigbee2mqtt/issues/19314)) ([3461f11](https://github.com/Koenkk/zigbee2mqtt/commit/3461f118690646f643cab53f02d50a1392a9ead3))
* **ignore:** update zigbee-herdsman-converters to 15.96.0 ([#19328](https://github.com/Koenkk/zigbee2mqtt/issues/19328)) ([5d1bd25](https://github.com/Koenkk/zigbee2mqtt/commit/5d1bd256f9c58a47d7b8120e3d625b770f5516ef))
* **ignore:** update zigbee-herdsman-converters to 15.97.0 ([#19337](https://github.com/Koenkk/zigbee2mqtt/issues/19337)) ([a86f3d8](https://github.com/Koenkk/zigbee2mqtt/commit/a86f3d8765f31df18451bcd1c34ad031d476dae4))
* **ignore:** update zigbee-herdsman-converters to 15.98.0 ([#19358](https://github.com/Koenkk/zigbee2mqtt/issues/19358)) ([8a28154](https://github.com/Koenkk/zigbee2mqtt/commit/8a2815466193f94bc9d462afe6f9386a29f21200))
* **ignore:** update zigbee-herdsman-converters to 15.99.0 ([#19366](https://github.com/Koenkk/zigbee2mqtt/issues/19366)) ([0cd9948](https://github.com/Koenkk/zigbee2mqtt/commit/0cd99487ccb3f401b02fa580b24a9209021e0216))
* **ignore:** update zigbee2mqtt-frontend to 0.6.137 ([#19165](https://github.com/Koenkk/zigbee2mqtt/issues/19165)) ([b261f2c](https://github.com/Koenkk/zigbee2mqtt/commit/b261f2c6c1f2ec0ea0e0f1b443d30acb62a740d3))
* **ignore:** update zigbee2mqtt-frontend to 0.6.138 ([#19365](https://github.com/Koenkk/zigbee2mqtt/issues/19365)) ([17ad362](https://github.com/Koenkk/zigbee2mqtt/commit/17ad362fa7006574270649faf50c88e949253830))
* **ignore:** update zigbee2mqtt-frontend to 0.6.139 ([#19378](https://github.com/Koenkk/zigbee2mqtt/issues/19378)) ([08a5f32](https://github.com/Koenkk/zigbee2mqtt/commit/08a5f32ea9951fccf3b5a6ee3c56372a200906b2))
* **ignore:** update zigbee2mqtt-frontend to 0.6.140 ([#19413](https://github.com/Koenkk/zigbee2mqtt/issues/19413)) ([0e55b38](https://github.com/Koenkk/zigbee2mqtt/commit/0e55b382ba32f1157375d35bdc2200061122cdb2))
* **ignore:** update zigbee2mqtt-frontend to 0.6.141 ([#19446](https://github.com/Koenkk/zigbee2mqtt/issues/19446)) ([2541fea](https://github.com/Koenkk/zigbee2mqtt/commit/2541feac25f8cde9a6417935b31848ac1b04d78f))
* **ignore:** update zigbee2mqtt-frontend to 0.6.142 ([#19447](https://github.com/Koenkk/zigbee2mqtt/issues/19447)) ([6c7be58](https://github.com/Koenkk/zigbee2mqtt/commit/6c7be58a3f77efb5341309e801a9a2279a7a4e35))
* Publish zigbee-herdsman/zigbee-herdsman-converters version to `bridge/info` ([#19364](https://github.com/Koenkk/zigbee2mqtt/issues/19364)) ([e36983b](https://github.com/Koenkk/zigbee2mqtt/commit/e36983b4b5d50af8586f8f0bb226d1be59b34c9b))
## [1.33.1](https://github.com/Koenkk/zigbee2mqtt/compare/1.33.0...1.33.1) (2023-10-03)
### Bug Fixes
* Correct typos ([#19143](https://github.com/Koenkk/zigbee2mqtt/issues/19143)) ([83e3313](https://github.com/Koenkk/zigbee2mqtt/commit/83e331323c19c70f25617fa6baf75e933cd9baf7))
* Fix `configuration.example.yaml` missing from container ([#18836](https://github.com/Koenkk/zigbee2mqtt/issues/18836)) ([0543ad4](https://github.com/Koenkk/zigbee2mqtt/commit/0543ad4b19f2a8e79a12f2b84b94d005acb60396))
* **ignore:** update dependencies ([#18995](https://github.com/Koenkk/zigbee2mqtt/issues/18995)) ([5477163](https://github.com/Koenkk/zigbee2mqtt/commit/5477163727d0ed3399614fbb5c12201b2c098127))
* **ignore:** update dependencies ([#19061](https://github.com/Koenkk/zigbee2mqtt/issues/19061)) ([d99da63](https://github.com/Koenkk/zigbee2mqtt/commit/d99da63b8968c1cb8ae9788317e493f4343dd1a1))
* **ignore:** update dependencies ([#19127](https://github.com/Koenkk/zigbee2mqtt/issues/19127)) ([1c7bb8f](https://github.com/Koenkk/zigbee2mqtt/commit/1c7bb8fc241d7c3232d2088d6a603318d9cf6c01))
* **ignore:** update zigbee-herdsman to 0.18.6 ([#18838](https://github.com/Koenkk/zigbee2mqtt/issues/18838)) ([6654c7f](https://github.com/Koenkk/zigbee2mqtt/commit/6654c7f1a34694590fc575270f80faca32472cca))
* **ignore:** update zigbee-herdsman to 0.18.7 ([#18865](https://github.com/Koenkk/zigbee2mqtt/issues/18865)) ([914b4c6](https://github.com/Koenkk/zigbee2mqtt/commit/914b4c67575b77534af98e9ae76749e331e81ffa))
* **ignore:** update zigbee-herdsman to 0.19.0 ([#18998](https://github.com/Koenkk/zigbee2mqtt/issues/18998)) ([84f9950](https://github.com/Koenkk/zigbee2mqtt/commit/84f99505561501690f8cf15cd9c98bda580d13df))
* **ignore:** update zigbee-herdsman-converters to 15.69.0 ([#18835](https://github.com/Koenkk/zigbee2mqtt/issues/18835)) ([3285850](https://github.com/Koenkk/zigbee2mqtt/commit/3285850efa2080c9bfc71373387d4cf5296bbc5b))
* **ignore:** update zigbee-herdsman-converters to 15.70.0 ([#18866](https://github.com/Koenkk/zigbee2mqtt/issues/18866)) ([91a9e32](https://github.com/Koenkk/zigbee2mqtt/commit/91a9e32a8369fc5c9b919670e4d7564ace3b9371))
* **ignore:** update zigbee-herdsman-converters to 15.71.0 ([#18887](https://github.com/Koenkk/zigbee2mqtt/issues/18887)) ([f509410](https://github.com/Koenkk/zigbee2mqtt/commit/f5094101898d33fc691311a45ec32f6ac85c18cb))
* **ignore:** update zigbee-herdsman-converters to 15.72.0 ([#18901](https://github.com/Koenkk/zigbee2mqtt/issues/18901)) ([ea8de2b](https://github.com/Koenkk/zigbee2mqtt/commit/ea8de2ba1e60abeda455092ee79219ea2d11adcc))
* **ignore:** update zigbee-herdsman-converters to 15.73.0 ([#18917](https://github.com/Koenkk/zigbee2mqtt/issues/18917)) ([d6ed0f4](https://github.com/Koenkk/zigbee2mqtt/commit/d6ed0f45da8a4e2aa0629b89f1a3361f495245e7))
* **ignore:** update zigbee-herdsman-converters to 15.74.0 ([#18949](https://github.com/Koenkk/zigbee2mqtt/issues/18949)) ([6de7662](https://github.com/Koenkk/zigbee2mqtt/commit/6de7662ca80667cbba669ea3a6ccc7bd3e83362b))
* **ignore:** update zigbee-herdsman-converters to 15.75.0 ([#18972](https://github.com/Koenkk/zigbee2mqtt/issues/18972)) ([cc95c85](https://github.com/Koenkk/zigbee2mqtt/commit/cc95c859692b4316f3313ad49f99ad7f8e2b29d3))
* **ignore:** update zigbee-herdsman-converters to 15.76.0 ([#18978](https://github.com/Koenkk/zigbee2mqtt/issues/18978)) ([4040840](https://github.com/Koenkk/zigbee2mqtt/commit/4040840d8e9dc222324be917a281cf29c3bf0da6))
* **ignore:** update zigbee-herdsman-converters to 15.77.0 ([#18984](https://github.com/Koenkk/zigbee2mqtt/issues/18984)) ([0a69bb5](https://github.com/Koenkk/zigbee2mqtt/commit/0a69bb54c8eb7b4bc459a72d15b408e0c6f3d3de))
* **ignore:** update zigbee-herdsman-converters to 15.78.0 ([#18999](https://github.com/Koenkk/zigbee2mqtt/issues/18999)) ([eac9240](https://github.com/Koenkk/zigbee2mqtt/commit/eac9240e0600e91e9fcd71f45e861cb4d90acdef))
* **ignore:** update zigbee-herdsman-converters to 15.80.0 ([#19023](https://github.com/Koenkk/zigbee2mqtt/issues/19023)) ([af209b6](https://github.com/Koenkk/zigbee2mqtt/commit/af209b6f53ebca7032169c689617da169c7b56d4))
* **ignore:** update zigbee-herdsman-converters to 15.81.1 ([#19041](https://github.com/Koenkk/zigbee2mqtt/issues/19041)) ([9a7aeaf](https://github.com/Koenkk/zigbee2mqtt/commit/9a7aeaf62b1d17fe3935ac731029e93ccd7b32d5))
* **ignore:** update zigbee-herdsman-converters to 15.82.0 ([#19067](https://github.com/Koenkk/zigbee2mqtt/issues/19067)) ([1190a34](https://github.com/Koenkk/zigbee2mqtt/commit/1190a342e90194184e76de80fd4264f87a65de94))
* **ignore:** update zigbee-herdsman-converters to 15.83.0 ([#19088](https://github.com/Koenkk/zigbee2mqtt/issues/19088)) ([a7bb3fc](https://github.com/Koenkk/zigbee2mqtt/commit/a7bb3fc9e882d0ffabaea61357db41818bdbbaa3))
* **ignore:** update zigbee-herdsman-converters to 15.84.0 ([#19096](https://github.com/Koenkk/zigbee2mqtt/issues/19096)) ([7ccb4bc](https://github.com/Koenkk/zigbee2mqtt/commit/7ccb4bcafe9837a59285e8cebac4dfda1095ca62))
* **ignore:** update zigbee-herdsman-converters to 15.85.0 ([#19102](https://github.com/Koenkk/zigbee2mqtt/issues/19102)) ([90763fd](https://github.com/Koenkk/zigbee2mqtt/commit/90763fd83f2904be174ab86f74623de1029babca))
* **ignore:** update zigbee-herdsman-converters to 15.86.0 ([#19149](https://github.com/Koenkk/zigbee2mqtt/issues/19149)) ([45ce494](https://github.com/Koenkk/zigbee2mqtt/commit/45ce4949518c7755fba2ac0ded36c54c254c66e1))
* **ignore:** update zigbee-herdsman-converters to 15.86.1 ([#19150](https://github.com/Koenkk/zigbee2mqtt/issues/19150)) ([b990ed9](https://github.com/Koenkk/zigbee2mqtt/commit/b990ed9a60351c5d2782c34b38234cdcddff0f3a))
* **ignore:** update zigbee2mqtt-frontend to 0.6.136 ([#19040](https://github.com/Koenkk/zigbee2mqtt/issues/19040)) ([9b66ab1](https://github.com/Koenkk/zigbee2mqtt/commit/9b66ab1367638c7291c8b4a997c215354915a642))
## [1.33.0](https://github.com/Koenkk/zigbee2mqtt/compare/1.32.2...1.33.0) (2023-09-01)
### Features
* Add Home Assistant origin to discovery ([#18741](https://github.com/Koenkk/zigbee2mqtt/issues/18741)) ([704ecf3](https://github.com/Koenkk/zigbee2mqtt/commit/704ecf366e51ff777e96379acbb89d9c3c416d6d))
* Drop Node.js 14 support ([#18555](https://github.com/Koenkk/zigbee2mqtt/issues/18555)) ([1f52fae](https://github.com/Koenkk/zigbee2mqtt/commit/1f52faee398e720ad64e61b559e04be81b58b979))
* Let Home Assistant generate entity name when device_class is present ([#18208](https://github.com/Koenkk/zigbee2mqtt/issues/18208)) ([df93e4c](https://github.com/Koenkk/zigbee2mqtt/commit/df93e4c8f9490e503e5896e082fc2578f98c2e0e))
* Support coordinator check ([#18599](https://github.com/Koenkk/zigbee2mqtt/issues/18599)) ([3af130a](https://github.com/Koenkk/zigbee2mqtt/commit/3af130a2c056aab74d793a963aceead348f56058))
* Support generating extended_pan_id ([#18596](https://github.com/Koenkk/zigbee2mqtt/issues/18596)) ([aa021d9](https://github.com/Koenkk/zigbee2mqtt/commit/aa021d988db31ef206a9bfa6b5312d631bb3de79))
* Support scene renaming ([#18667](https://github.com/Koenkk/zigbee2mqtt/issues/18667)) ([4b3a2c9](https://github.com/Koenkk/zigbee2mqtt/commit/4b3a2c9f5a74ec25fd82d219a7fc31cddb7c7def))
* Use labels in Home Assistant entity naming ([#18678](https://github.com/Koenkk/zigbee2mqtt/issues/18678)) ([e33e335](https://github.com/Koenkk/zigbee2mqtt/commit/e33e335c0ca92670eee4be672ec53282cc2b79d3))
### Bug Fixes
* Add secure default config ([#18357](https://github.com/Koenkk/zigbee2mqtt/issues/18357)) ([68ec507](https://github.com/Koenkk/zigbee2mqtt/commit/68ec507e30bead5e9263c0fdc4c47e18c257d82f))
* Fix Home Assistant `MQTT device name is equal to entity name in your config ([#18491](https://github.com/Koenkk/zigbee2mqtt/issues/18491)) ([f619610](https://github.com/Koenkk/zigbee2mqtt/commit/f6196107a75f9257366505a3ad5ef7b29ff5bc1c))
* Fix Home Assistant `TypeError: object of type 'NoneType' has no len()` error. https://github.com/Koenkk/zigbee2mqtt/issues/17861 ([ed22ece](https://github.com/Koenkk/zigbee2mqtt/commit/ed22ecedbfd51fc2f5572930aacd37e5b48e04cf))
* Generate pan_id for new installations ([#18530](https://github.com/Koenkk/zigbee2mqtt/issues/18530)) ([cf313c5](https://github.com/Koenkk/zigbee2mqtt/commit/cf313c503b7b070e24739a1f5139e5833405eebc))
* **ignore:** chore: Update dependencies ([#18459](https://github.com/Koenkk/zigbee2mqtt/issues/18459)) ([b55cc0a](https://github.com/Koenkk/zigbee2mqtt/commit/b55cc0a037ccb2c16ac2147ae7e1fb2e4d596806))
* **ignore:** Revert "chore: Update dependencies ([#18459](https://github.com/Koenkk/zigbee2mqtt/issues/18459))" ([b09b8ec](https://github.com/Koenkk/zigbee2mqtt/commit/b09b8ec3d6b30b0bc34c36819e39298ec5a94c63))
* **ignore:** update dependencies ([#18598](https://github.com/Koenkk/zigbee2mqtt/issues/18598)) ([0d00a14](https://github.com/Koenkk/zigbee2mqtt/commit/0d00a144f5c40bf1fce30f9ee65335a6d0076972))
* **ignore:** update dependencies ([#18755](https://github.com/Koenkk/zigbee2mqtt/issues/18755)) ([bc17e64](https://github.com/Koenkk/zigbee2mqtt/commit/bc17e6406bdd4104ba7f1b4c7663a18f82fee35b))
* **ignore:** update zigbee-herdsman to 0.17.3 ([#18556](https://github.com/Koenkk/zigbee2mqtt/issues/18556)) ([a892a1b](https://github.com/Koenkk/zigbee2mqtt/commit/a892a1b898f8cf4fc02c1ec7d9159d426c5ea547))
* **ignore:** update zigbee-herdsman to 0.18.0 ([#18600](https://github.com/Koenkk/zigbee2mqtt/issues/18600)) ([cc0536c](https://github.com/Koenkk/zigbee2mqtt/commit/cc0536c5ab1d5f04b75bf9cd21c4f9579c60dc31))
* **ignore:** update zigbee-herdsman to 0.18.1 ([#18627](https://github.com/Koenkk/zigbee2mqtt/issues/18627)) ([3736b59](https://github.com/Koenkk/zigbee2mqtt/commit/3736b5901b9f497b74a2efa57adb105802ddc153))
* **ignore:** update zigbee-herdsman to 0.18.2 ([#18648](https://github.com/Koenkk/zigbee2mqtt/issues/18648)) ([db812cd](https://github.com/Koenkk/zigbee2mqtt/commit/db812cd72918eb0438129639c9d7a8af86f8fc37))
* **ignore:** update zigbee-herdsman to 0.18.3 ([#18714](https://github.com/Koenkk/zigbee2mqtt/issues/18714)) ([6a1b6a1](https://github.com/Koenkk/zigbee2mqtt/commit/6a1b6a14038290fc9d13008b09da002fd55f540f))
* **ignore:** update zigbee-herdsman to 0.18.4 ([#18727](https://github.com/Koenkk/zigbee2mqtt/issues/18727)) ([1439f4c](https://github.com/Koenkk/zigbee2mqtt/commit/1439f4c6ace962f8b14ec43a8b418ca12a4db27f))
* **ignore:** update zigbee-herdsman to 0.18.5 ([#18816](https://github.com/Koenkk/zigbee2mqtt/issues/18816)) ([68169f0](https://github.com/Koenkk/zigbee2mqtt/commit/68169f0e50290c8c2fa5fba052b4446c9a46d2f1))
* **ignore:** update zigbee-herdsman-converters to 15.51.0 ([#18501](https://github.com/Koenkk/zigbee2mqtt/issues/18501)) ([2d917a7](https://github.com/Koenkk/zigbee2mqtt/commit/2d917a7d0db1fc4d89ba163d63e2d2932d0655fe))
* **ignore:** update zigbee-herdsman-converters to 15.52.0 ([#18514](https://github.com/Koenkk/zigbee2mqtt/issues/18514)) ([0718ca1](https://github.com/Koenkk/zigbee2mqtt/commit/0718ca162dcf6ab41f192e4dd8ecc83b38e25410))
* **ignore:** update zigbee-herdsman-converters to 15.53.0 ([#18524](https://github.com/Koenkk/zigbee2mqtt/issues/18524)) ([f08cd81](https://github.com/Koenkk/zigbee2mqtt/commit/f08cd81ac0ad4436883acf39947e7254002ef9fe))
* **ignore:** update zigbee-herdsman-converters to 15.54.0 ([#18527](https://github.com/Koenkk/zigbee2mqtt/issues/18527)) ([abba8b3](https://github.com/Koenkk/zigbee2mqtt/commit/abba8b3ba8c31c2b9057f74e455824045082a4ec))
* **ignore:** update zigbee-herdsman-converters to 15.54.1 ([#18537](https://github.com/Koenkk/zigbee2mqtt/issues/18537)) ([b5e9ed4](https://github.com/Koenkk/zigbee2mqtt/commit/b5e9ed436cd3a8e5b8183fe44685d2f41422b2fd))
* **ignore:** update zigbee-herdsman-converters to 15.55.0 ([#18547](https://github.com/Koenkk/zigbee2mqtt/issues/18547)) ([6050428](https://github.com/Koenkk/zigbee2mqtt/commit/60504285663e346c2078819c6445905fb2aaff1c))
* **ignore:** update zigbee-herdsman-converters to 15.55.1 ([#18557](https://github.com/Koenkk/zigbee2mqtt/issues/18557)) ([7f05f31](https://github.com/Koenkk/zigbee2mqtt/commit/7f05f31c72cfd394cbe0d8e20de5c9f5d245db85))
* **ignore:** update zigbee-herdsman-converters to 15.55.2 ([#18566](https://github.com/Koenkk/zigbee2mqtt/issues/18566)) ([8675b1c](https://github.com/Koenkk/zigbee2mqtt/commit/8675b1c9ed405d7abe42f6725c0627968c533f4b))
* **ignore:** update zigbee-herdsman-converters to 15.55.3 ([#18578](https://github.com/Koenkk/zigbee2mqtt/issues/18578)) ([b1796e3](https://github.com/Koenkk/zigbee2mqtt/commit/b1796e3e1a1d58c79dda39a8041ce67ceea133a4))
* **ignore:** update zigbee-herdsman-converters to 15.57.0 ([#18616](https://github.com/Koenkk/zigbee2mqtt/issues/18616)) ([145bc05](https://github.com/Koenkk/zigbee2mqtt/commit/145bc05dc30d952e919035a7b741f91ee98a8997))
* **ignore:** update zigbee-herdsman-converters to 15.58.1 ([#18658](https://github.com/Koenkk/zigbee2mqtt/issues/18658)) ([dcbf4e5](https://github.com/Koenkk/zigbee2mqtt/commit/dcbf4e5b0e75d0e50688434079588fe179406520))
* **ignore:** update zigbee-herdsman-converters to 15.59.0 ([#18661](https://github.com/Koenkk/zigbee2mqtt/issues/18661)) ([7185d9e](https://github.com/Koenkk/zigbee2mqtt/commit/7185d9e5013888f8276e74849c7463560c46f369))
* **ignore:** update zigbee-herdsman-converters to 15.60.0 ([#18672](https://github.com/Koenkk/zigbee2mqtt/issues/18672)) ([71c4211](https://github.com/Koenkk/zigbee2mqtt/commit/71c4211d13df29aefb217a030c5e114c7a666112))
* **ignore:** update zigbee-herdsman-converters to 15.62.0 ([#18742](https://github.com/Koenkk/zigbee2mqtt/issues/18742)) ([514d9f3](https://github.com/Koenkk/zigbee2mqtt/commit/514d9f38b2a7a46fe766dd422f540350bbbe0f5e))
* **ignore:** update zigbee-herdsman-converters to 15.63.0 ([#18758](https://github.com/Koenkk/zigbee2mqtt/issues/18758)) ([b193d89](https://github.com/Koenkk/zigbee2mqtt/commit/b193d8904299a0c5673da3b9185200ef6a3ed368))
* **ignore:** update zigbee-herdsman-converters to 15.64.0 ([#18784](https://github.com/Koenkk/zigbee2mqtt/issues/18784)) ([5084b12](https://github.com/Koenkk/zigbee2mqtt/commit/5084b1293e2ea857b363837eabf7ca0087f2607c))
* **ignore:** update zigbee-herdsman-converters to 15.66.1 ([#18790](https://github.com/Koenkk/zigbee2mqtt/issues/18790)) ([0ec68a4](https://github.com/Koenkk/zigbee2mqtt/commit/0ec68a4b71208fe42ea011e0084c8af0b187a261))
* **ignore:** update zigbee-herdsman-converters to 15.67.0 ([#18815](https://github.com/Koenkk/zigbee2mqtt/issues/18815)) ([97f6a84](https://github.com/Koenkk/zigbee2mqtt/commit/97f6a840e47612e98f20ba355dae7fb3dfd0868c))
* **ignore:** update zigbee-herdsman-converters to 15.67.1 ([#18817](https://github.com/Koenkk/zigbee2mqtt/issues/18817)) ([e78aa35](https://github.com/Koenkk/zigbee2mqtt/commit/e78aa3589b4c468716917f9f734f03801f86c3cd))
* **ignore:** update zigbee2mqtt-frontend to 0.6.134 ([#18761](https://github.com/Koenkk/zigbee2mqtt/issues/18761)) ([4949a54](https://github.com/Koenkk/zigbee2mqtt/commit/4949a54d664083f6152bafa78c5468f9a2c50f2b))
* **ignore:** update zigbee2mqtt-frontend to 0.6.135 ([#18814](https://github.com/Koenkk/zigbee2mqtt/issues/18814)) ([9a6445a](https://github.com/Koenkk/zigbee2mqtt/commit/9a6445a8a024c8b415caa9cd08e48df12a46e83b))
* Use QOS1 for rarely sent discovery and availability messages ([#18756](https://github.com/Koenkk/zigbee2mqtt/issues/18756)) ([d1e50ce](https://github.com/Koenkk/zigbee2mqtt/commit/d1e50ce534b906f426b28f2aaf8b0a51a97de264))
## [1.32.2](https://github.com/Koenkk/zigbee2mqtt/compare/1.32.1...1.32.2) (2023-08-01)
### Bug Fixes
* Fix `'dict object' has no attribute 'ir_code_to_send'` error. https://github.com/Koenkk/zigbee2mqtt/issues/18180 ([dec9191](https://github.com/Koenkk/zigbee2mqtt/commit/dec91919bc50aed1f1d3fd9525abd2db49242e7f))
* Fix insecure Zigbee network encryption key generation ([#18372](https://github.com/Koenkk/zigbee2mqtt/issues/18372)) ([df8e168](https://github.com/Koenkk/zigbee2mqtt/commit/df8e1687b2db3f49ba8c3d97a4c92b7892a54f1e))
* Fix not all cluster unbound/bound when specified. https://github.com/Koenkk/zigbee2mqtt/issues/10740 ([0bdf663](https://github.com/Koenkk/zigbee2mqtt/commit/0bdf663ca126d0569b62871e1b787992472faea4))
* Fix socket error crashing Zigbee2MQTT ([#18388](https://github.com/Koenkk/zigbee2mqtt/issues/18388)) ([f64cd7e](https://github.com/Koenkk/zigbee2mqtt/commit/f64cd7e8f38f0c1fc1bbd85b5b5caf560565c024))
* **ignore:** Add ep `l` till 24 ([#18422](https://github.com/Koenkk/zigbee2mqtt/issues/18422)) ([4bd281c](https://github.com/Koenkk/zigbee2mqtt/commit/4bd281ce6cbd43f38b2a3131cd38b25885a22b3a))
* **ignore:** Add th1-th10 endpoints for Ubisys H10 ([#18405](https://github.com/Koenkk/zigbee2mqtt/issues/18405)) ([91f22f1](https://github.com/Koenkk/zigbee2mqtt/commit/91f22f1230241f5fb3b27b2ee84d944a1c3c5107))
* **ignore:** Attempt 2 to fix cache saving ([ea412cf](https://github.com/Koenkk/zigbee2mqtt/commit/ea412cfe82a0462930ec8dddf00b9a363c484b73))
* **ignore:** Attempt 3 to fix commit-user-lookup ([590564c](https://github.com/Koenkk/zigbee2mqtt/commit/590564c15888f73826f20eca91e2c253c7d000e7))
* **ignore:** Attempt to fix cache not saving ([fa02bb5](https://github.com/Koenkk/zigbee2mqtt/commit/fa02bb5b74216db78b23db144c915d00c7dc48c1))
* **ignore:** fix commit-user-lookup cache ([758b814](https://github.com/Koenkk/zigbee2mqtt/commit/758b8144a19ca04eac5faae5b7e16c090e9fda77))
* **ignore:** Fix failing test ([ba0cc61](https://github.com/Koenkk/zigbee2mqtt/commit/ba0cc6196550b3b6873f3733690daef9002c5863))
* **ignore:** update dependencies ([#18260](https://github.com/Koenkk/zigbee2mqtt/issues/18260)) ([ee1a5f0](https://github.com/Koenkk/zigbee2mqtt/commit/ee1a5f04008beaac54fb68e20c31c1664563a4f2))
* **ignore:** update dependencies ([#18403](https://github.com/Koenkk/zigbee2mqtt/issues/18403)) ([8e94662](https://github.com/Koenkk/zigbee2mqtt/commit/8e946623a9db6282a53b55d5d5f3e4b000d080ee))
* **ignore:** update zigbee-herdsman to 0.17.2 ([#18291](https://github.com/Koenkk/zigbee2mqtt/issues/18291)) ([073989c](https://github.com/Koenkk/zigbee2mqtt/commit/073989c7a434c3fd73abaee95fa4ada9394d695d))
* **ignore:** update zigbee-herdsman-converters to 15.38.0 ([#18262](https://github.com/Koenkk/zigbee2mqtt/issues/18262)) ([813dd49](https://github.com/Koenkk/zigbee2mqtt/commit/813dd49a41e7d3f41b6c79db708bb08d29cd7f0c))
* **ignore:** update zigbee-herdsman-converters to 15.39.0 ([#18282](https://github.com/Koenkk/zigbee2mqtt/issues/18282)) ([3c855d2](https://github.com/Koenkk/zigbee2mqtt/commit/3c855d20424761d43ace9b5ed55460eedce092f0))
* **ignore:** update zigbee-herdsman-converters to 15.39.1 ([#18292](https://github.com/Koenkk/zigbee2mqtt/issues/18292)) ([a3c8e1c](https://github.com/Koenkk/zigbee2mqtt/commit/a3c8e1c3c98bd97ef52c29929dc9bb5f9598d0fd))
* **ignore:** update zigbee-herdsman-converters to 15.40.0 ([#18314](https://github.com/Koenkk/zigbee2mqtt/issues/18314)) ([af0521b](https://github.com/Koenkk/zigbee2mqtt/commit/af0521b54ca9195e62d68ccd9fcb49d0d0c226e4))
* **ignore:** update zigbee-herdsman-converters to 15.41.0 ([#18328](https://github.com/Koenkk/zigbee2mqtt/issues/18328)) ([330a913](https://github.com/Koenkk/zigbee2mqtt/commit/330a913e76b556295f57290743670a40e48139ca))
* **ignore:** update zigbee-herdsman-converters to 15.42.0 ([#18343](https://github.com/Koenkk/zigbee2mqtt/issues/18343)) ([313865b](https://github.com/Koenkk/zigbee2mqtt/commit/313865b0a38754df52ef2f28132053a47379cc43))
* **ignore:** update zigbee-herdsman-converters to 15.43.0 ([#18356](https://github.com/Koenkk/zigbee2mqtt/issues/18356)) ([7a22cee](https://github.com/Koenkk/zigbee2mqtt/commit/7a22cee639bf9115c6782302900b89f4978468d9))
* **ignore:** update zigbee-herdsman-converters to 15.44.0 ([#18365](https://github.com/Koenkk/zigbee2mqtt/issues/18365)) ([3408e3c](https://github.com/Koenkk/zigbee2mqtt/commit/3408e3c05a102d32818260c0368a47c9726aa40d))
* **ignore:** update zigbee-herdsman-converters to 15.45.0 ([#18404](https://github.com/Koenkk/zigbee2mqtt/issues/18404)) ([57d031d](https://github.com/Koenkk/zigbee2mqtt/commit/57d031d54aadaf87513d2c7d32f3302db501be67))
* **ignore:** update zigbee-herdsman-converters to 15.46.0 ([#18421](https://github.com/Koenkk/zigbee2mqtt/issues/18421)) ([ced3d43](https://github.com/Koenkk/zigbee2mqtt/commit/ced3d43dad5f8a578f1875ffaf68ffb1d177c584))
* **ignore:** update zigbee-herdsman-converters to 15.47.0 ([#18430](https://github.com/Koenkk/zigbee2mqtt/issues/18430)) ([087b85c](https://github.com/Koenkk/zigbee2mqtt/commit/087b85cb9f3bc7a317dc22483461de32a9c1a0d8))
* **ignore:** update zigbee-herdsman-converters to 15.48.0 ([#18438](https://github.com/Koenkk/zigbee2mqtt/issues/18438)) ([d487f37](https://github.com/Koenkk/zigbee2mqtt/commit/d487f37a7a755e37caf3a8da4f8190981fdb5625))
* **ignore:** update zigbee-herdsman-converters to 15.49.0 ([#18443](https://github.com/Koenkk/zigbee2mqtt/issues/18443)) ([8139d7f](https://github.com/Koenkk/zigbee2mqtt/commit/8139d7f1f494b4051c1bba7ea453e76e4be77fad))
* **ignore:** update zigbee-herdsman-converters to 15.50.0 ([#18475](https://github.com/Koenkk/zigbee2mqtt/issues/18475)) ([3478e40](https://github.com/Koenkk/zigbee2mqtt/commit/3478e4001760541b65d9bfdbdcd1d082a3da8023))
* **ignore:** update zigbee-herdsman-converters to 15.50.1 ([#18487](https://github.com/Koenkk/zigbee2mqtt/issues/18487)) ([683d29f](https://github.com/Koenkk/zigbee2mqtt/commit/683d29f9f70f3149cbbff6b543d53af0f931e706))
* **ignore:** update zigbee2mqtt-frontend to 0.6.132 ([#18289](https://github.com/Koenkk/zigbee2mqtt/issues/18289)) ([05eff95](https://github.com/Koenkk/zigbee2mqtt/commit/05eff957eb3c5414df7bf2909b5b6d9ff6fdb258))
* **ignore:** update zigbee2mqtt-frontend to 0.6.133 ([#18390](https://github.com/Koenkk/zigbee2mqtt/issues/18390)) ([e1d52ae](https://github.com/Koenkk/zigbee2mqtt/commit/e1d52ae43aa132f296d151eced7d208cfb1b3a62))
* Use HA sensor device class `atmospheric_pressure` instead of `pressure` ([#18306](https://github.com/Koenkk/zigbee2mqtt/issues/18306)) ([1252f10](https://github.com/Koenkk/zigbee2mqtt/commit/1252f10d39beed640370410a45d5c2fdc504b440))
## [1.32.1](https://github.com/Koenkk/zigbee2mqtt/compare/1.32.0...1.32.1) (2023-07-08)
### Bug Fixes
* **ignore:** update zigbee-herdsman-converters to 15.33.1-hotfix.0 ([15601d6](https://github.com/Koenkk/zigbee2mqtt/commit/15601d6339cfc7408872a71071a98abadd9b33ff))
## [1.32.0](https://github.com/Koenkk/zigbee2mqtt/compare/1.31.2...1.32.0) (2023-07-01)
### Features
* Support Home Assistant water device_class ([#18066](https://github.com/Koenkk/zigbee2mqtt/issues/18066)) ([e083a6b](https://github.com/Koenkk/zigbee2mqtt/commit/e083a6bff7fafd17d5ff6ad4b87916b83727d8be))
* Support settable Home Assistant text ([#18114](https://github.com/Koenkk/zigbee2mqtt/issues/18114)) ([9474452](https://github.com/Koenkk/zigbee2mqtt/commit/94744525ba466c6512ab6a6181b3073970a02023))
### Bug Fixes
* Fix Home Assistant truncate error when `program` is `null`. https://github.com/Koenkk/zigbee2mqtt/issues/16460 ([11f0be5](https://github.com/Koenkk/zigbee2mqtt/commit/11f0be55d871363cb4c07adbbeac57fb4ddf479e))
* **ignore:** Better fix for [#17891](https://github.com/Koenkk/zigbee2mqtt/issues/17891) ([#17951](https://github.com/Koenkk/zigbee2mqtt/issues/17951)) ([a7e02a7](https://github.com/Koenkk/zigbee2mqtt/commit/a7e02a7be847418df463095b68951c1a1459ca83))
* **ignore:** Fix DeviceMessage.meta type ([8833947](https://github.com/Koenkk/zigbee2mqtt/commit/88339473ce7eb09add8f1836ab4c33b4a405d7e7))
* **ignore:** Fix e10dd893ab2875e5420952b4452bf75aeec93922 ([446dbbf](https://github.com/Koenkk/zigbee2mqtt/commit/446dbbf1fc0e07c61cd233c8b4ea509ce6423c86))
* **ignore:** update dependencies ([#17991](https://github.com/Koenkk/zigbee2mqtt/issues/17991)) ([e10dd89](https://github.com/Koenkk/zigbee2mqtt/commit/e10dd893ab2875e5420952b4452bf75aeec93922))
* **ignore:** update dependencies ([#18052](https://github.com/Koenkk/zigbee2mqtt/issues/18052)) ([1dc0b24](https://github.com/Koenkk/zigbee2mqtt/commit/1dc0b24e9a8ae9a03809aff5d3ff9758b63d9f22))
* **ignore:** update dependencies ([#18112](https://github.com/Koenkk/zigbee2mqtt/issues/18112)) ([57566c7](https://github.com/Koenkk/zigbee2mqtt/commit/57566c76ed8ccaabcdc32f84a7fddcf5da3b02b3))
* **ignore:** update zigbee-herdsman to 0.15.0 ([#17966](https://github.com/Koenkk/zigbee2mqtt/issues/17966)) ([05cab61](https://github.com/Koenkk/zigbee2mqtt/commit/05cab61e1faa15a9a72d87f8e9ec26e3d1eb4046))
* **ignore:** update zigbee-herdsman to 0.15.1 ([#18080](https://github.com/Koenkk/zigbee2mqtt/issues/18080)) ([17cff2a](https://github.com/Koenkk/zigbee2mqtt/commit/17cff2a26f16207bd30bb2659e11ce792d02dd75))
* **ignore:** update zigbee-herdsman to 0.15.2 ([#18091](https://github.com/Koenkk/zigbee2mqtt/issues/18091)) ([03005b3](https://github.com/Koenkk/zigbee2mqtt/commit/03005b38c86f79384e20bb240a8947ce969411c6))
* **ignore:** update zigbee-herdsman to 0.15.3 ([#18116](https://github.com/Koenkk/zigbee2mqtt/issues/18116)) ([2d62027](https://github.com/Koenkk/zigbee2mqtt/commit/2d62027e24ea2de401155e0bc7fabaee85fa7bab))
* **ignore:** update zigbee-herdsman to 0.16.0 ([#18124](https://github.com/Koenkk/zigbee2mqtt/issues/18124)) ([38c2ea5](https://github.com/Koenkk/zigbee2mqtt/commit/38c2ea5bf72f67f29b89dc84524e91923989fd27))
* **ignore:** update zigbee-herdsman-converters to 15.20.0 ([#17954](https://github.com/Koenkk/zigbee2mqtt/issues/17954)) ([0c7e7e5](https://github.com/Koenkk/zigbee2mqtt/commit/0c7e7e5089d1023150f23123df7eab90ea65fe59))
* **ignore:** update zigbee-herdsman-converters to 15.22.0 ([#18004](https://github.com/Koenkk/zigbee2mqtt/issues/18004)) ([b0b3aee](https://github.com/Koenkk/zigbee2mqtt/commit/b0b3aee6483efe9fbb2f434c44ed76d6b3a4e54a))
* **ignore:** update zigbee-herdsman-converters to 15.23.0 ([#18015](https://github.com/Koenkk/zigbee2mqtt/issues/18015)) ([4ad838c](https://github.com/Koenkk/zigbee2mqtt/commit/4ad838c114edc7dd5d9d104df9b2ce49933a8c20))
* **ignore:** update zigbee-herdsman-converters to 15.24.0 ([#18025](https://github.com/Koenkk/zigbee2mqtt/issues/18025)) ([c47f5df](https://github.com/Koenkk/zigbee2mqtt/commit/c47f5df021478e8997f13f06ea17591b745615e3))
* **ignore:** update zigbee-herdsman-converters to 15.25.0 ([#18056](https://github.com/Koenkk/zigbee2mqtt/issues/18056)) ([57aaa5a](https://github.com/Koenkk/zigbee2mqtt/commit/57aaa5a85aff308d4bd66353fd42969eb38a60d4))
* **ignore:** update zigbee-herdsman-converters to 15.26.0 ([#18067](https://github.com/Koenkk/zigbee2mqtt/issues/18067)) ([91d67a0](https://github.com/Koenkk/zigbee2mqtt/commit/91d67a0ef5135e08ac81171b78931b7903efcc5a))
* **ignore:** update zigbee-herdsman-converters to 15.27.0 ([#18075](https://github.com/Koenkk/zigbee2mqtt/issues/18075)) ([5777d76](https://github.com/Koenkk/zigbee2mqtt/commit/5777d76e5508d7dba4750aa5efc34977ba01de1a))
* **ignore:** update zigbee-herdsman-converters to 15.28.0 ([#18092](https://github.com/Koenkk/zigbee2mqtt/issues/18092)) ([6d3389b](https://github.com/Koenkk/zigbee2mqtt/commit/6d3389b409b003740ac4b2b90aa39a8ccbec26e3))
* **ignore:** update zigbee-herdsman-converters to 15.29.0 ([#18099](https://github.com/Koenkk/zigbee2mqtt/issues/18099)) ([a744838](https://github.com/Koenkk/zigbee2mqtt/commit/a744838e9c982461479f0b5273e25abd32c4074d))
* **ignore:** update zigbee-herdsman-converters to 15.30.0 ([#18115](https://github.com/Koenkk/zigbee2mqtt/issues/18115)) ([a56719d](https://github.com/Koenkk/zigbee2mqtt/commit/a56719d19ca32fabf375e293cdef0172826c8672))
* **ignore:** update zigbee-herdsman-converters to 15.31.0 ([#18125](https://github.com/Koenkk/zigbee2mqtt/issues/18125)) ([ed85367](https://github.com/Koenkk/zigbee2mqtt/commit/ed85367e5383b9a59a69fe2836b02763f6744849))
* **ignore:** update zigbee-herdsman-converters to 15.32.0 ([#18132](https://github.com/Koenkk/zigbee2mqtt/issues/18132)) ([61dd1dd](https://github.com/Koenkk/zigbee2mqtt/commit/61dd1dd96dc9154f2b46a635bf2ccaeac2d69ba5))
* **ignore:** update zigbee-herdsman-converters to 15.33.0 ([#18156](https://github.com/Koenkk/zigbee2mqtt/issues/18156)) ([81973c3](https://github.com/Koenkk/zigbee2mqtt/commit/81973c3a2a356c52859d167d3eedaf78f747b8e5))
* **ignore:** update zigbee-herdsman-converters to 15.33.1 ([#18161](https://github.com/Koenkk/zigbee2mqtt/issues/18161)) ([d1824f1](https://github.com/Koenkk/zigbee2mqtt/commit/d1824f169b71e0590dce14d7f451dbbb67bdf5d9))
## [1.31.0](https://github.com/Koenkk/zigbee2mqtt/compare/1.30.4...v1.31.0) (2023-06-01)
### Features
* **ignore:** update CI/CD ([b3de973](https://github.com/Koenkk/zigbee2mqtt/commit/b3de973af66e7c308987adeaab4d89759d4bfef0))
* **ignore:** update CI/CD ([0d17d26](https://github.com/Koenkk/zigbee2mqtt/commit/0d17d2613357db225f224bdbf191fbd9ad17b4a5))
* **ignore:** update zigbee-herdsman-converters to 15.6.0 ([#17774](https://github.com/Koenkk/zigbee2mqtt/issues/17774)) ([24baed3](https://github.com/Koenkk/zigbee2mqtt/commit/24baed3053d91276369d0cad02e96afee97329f8))
* **ignore:** update zigbee-herdsman-converters to 15.7.0 ([#17777](https://github.com/Koenkk/zigbee2mqtt/issues/17777)) ([1344ae0](https://github.com/Koenkk/zigbee2mqtt/commit/1344ae06163f5b6a3c68e532f39b379158040c6f))
### Bug Fixes
* Fix Home Assistant `Payload is not supported (e.g. open, closed, opening, closing, stopped): STOP` error. https://github.com/Koenkk/zigbee2mqtt/issues/17552 ([e6f9aed](https://github.com/Koenkk/zigbee2mqtt/commit/e6f9aeda06ec96c76c3d455bb016a10073d0bf54))
* **ignore:** Fix build ([#17838](https://github.com/Koenkk/zigbee2mqtt/issues/17838)) ([d119f60](https://github.com/Koenkk/zigbee2mqtt/commit/d119f609de683313335fbb37e2ce358a16fdc597))
* **ignore:** update dependencies ([#17811](https://github.com/Koenkk/zigbee2mqtt/issues/17811)) ([a71857c](https://github.com/Koenkk/zigbee2mqtt/commit/a71857c7236c66da577352160de96eacc683c7c3))
* **ignore:** update zigbee-herdsman to 0.14.117 ([#17770](https://github.com/Koenkk/zigbee2mqtt/issues/17770)) ([8457c37](https://github.com/Koenkk/zigbee2mqtt/commit/8457c3735b2f2c9c5106ce76fc7d2988f9eb1ea1))
* **ignore:** update zigbee-herdsman-converters to 15.10.0 ([#17797](https://github.com/Koenkk/zigbee2mqtt/issues/17797)) ([b7b3b51](https://github.com/Koenkk/zigbee2mqtt/commit/b7b3b51cfeb9b672f2cca128733b273f50966e19))
* **ignore:** update zigbee-herdsman-converters to 15.11.0 ([#17808](https://github.com/Koenkk/zigbee2mqtt/issues/17808)) ([2e8dfbb](https://github.com/Koenkk/zigbee2mqtt/commit/2e8dfbb96ecbebece84cc1aab12899162e27f82e))
* **ignore:** update zigbee-herdsman-converters to 15.12.0 ([#17837](https://github.com/Koenkk/zigbee2mqtt/issues/17837)) ([be82b73](https://github.com/Koenkk/zigbee2mqtt/commit/be82b737be5f7a7e58d653628ce66e0813fad111))
* **ignore:** update zigbee-herdsman-converters to 15.13.0 ([#17842](https://github.com/Koenkk/zigbee2mqtt/issues/17842)) ([b228d9d](https://github.com/Koenkk/zigbee2mqtt/commit/b228d9daf64c8d315803120814dc31272ee1c459))
* **ignore:** update zigbee-herdsman-converters to 15.13.1 ([#17851](https://github.com/Koenkk/zigbee2mqtt/issues/17851)) ([4b20dfa](https://github.com/Koenkk/zigbee2mqtt/commit/4b20dfafab6193f328aa9133d2b063284abf6cbf))
* **ignore:** update zigbee-herdsman-converters to 15.8.2 ([#17789](https://github.com/Koenkk/zigbee2mqtt/issues/17789)) ([8b579b6](https://github.com/Koenkk/zigbee2mqtt/commit/8b579b6533876f3b7440dc74b2b709cbfc7ccaf3))
* **ignore:** update zigbee-herdsman-converters to 15.9.0 ([#17791](https://github.com/Koenkk/zigbee2mqtt/issues/17791)) ([5b807c3](https://github.com/Koenkk/zigbee2mqtt/commit/5b807c36eced55e790a8393667e07680736f37be))
+2 -2
View File
@@ -1,8 +1,8 @@
# Contributing to Zigbee2MQTT
Everybody is invited and welcome to contribute to Zigbee2MQTT. Zigbee2MQTT is writen in JavaScript and is based upon [zigbee-herdsman](https://github.com/koenkk/zigbee-herdsman) and [zigbee-herdsman-converters](https://github.com/koenkk/zigbee-herdsman-converters). Zigbee-herdsman-converters contains all device definition, zigbee-herdsman is responsible for handling all communication with the adapter.
Everybody is invited and welcome to contribute to Zigbee2MQTT. Zigbee2MQTT is written in JavaScript and is based upon [zigbee-herdsman](https://github.com/koenkk/zigbee-herdsman) and [zigbee-herdsman-converters](https://github.com/koenkk/zigbee-herdsman-converters). Zigbee-herdsman-converters contains all device definitions, zigbee-herdsman is responsible for handling all communication with the adapter.
- Pull requests are always created against the [**dev**](https://github.com/Koenkk/zigbee2mqtt/tree/dev) branch.
- Easiest way to start developing Zigbee2MQTT is by setting up a development environment (aka bare-metal installation). You can follow this [guide](https://www.zigbee2mqtt.io/guide/installation/01_linux.html) to do this.
- You can run the tests locally by executing `npm test`. Zigbee2MQTT enforces 100% code coverage, in case you add new code check if your code is covered by running `npm run test-with-coverage`. The coverage report can be found under `coverage/lcov-report/index.html`. Linting is also enforced and can be run with `npm run eslint`.
- When you want to add support for a new devices no changes to Zigbee2MQTT have to be made, only to zigbee-herdsman-converters. You can find a guide for it [here](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).
- When you want to add support for a new device no changes to Zigbee2MQTT have to be made, only to zigbee-herdsman-converters. You can find a guide for it [here](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).
+28 -4
View File
@@ -53,16 +53,40 @@ Zigbee2MQTT integrates well with (almost) every home automation solution because
<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/)
- [Home Assistant](https://www.home-assistant.io/hassio/): Using [the official addon](https://github.com/zigbee2mqtt/hassio-zigbee2mqtt)
- Generic install or Hassbian: Using instructions [here](https://www.zigbee2mqtt.io/guide/usage/integrations/home_assistant.html)
- [Home Assistant OS](https://www.home-assistant.io/installation/): Using [the official addon](https://github.com/zigbee2mqtt/hassio-zigbee2mqtt)
- Other installation: using instructions [here](https://www.zigbee2mqtt.io/guide/usage/integrations/home_assistant.html)
<br>
<img align="left" height="100px" width="100px" src="https://etc.athom.com/logo/white/256.png">
### [Homey](https://homey.app/)
- Integration implemented in the [Homey App](https://homey.app/nl-nl/app/com.gruijter.zigbee2mqtt/)
- Documentation and support in the [Homey Forum](https://community.homey.app/t/83214)
<br>
<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)
- Integration implemented in Domoticz ([documentation](https://www.domoticz.com/wiki/Zigbee2MQTT)).
<br>
<img align="left" height="100px" width="100px" src="./images/gladys-assistant-logo.jpg">
### [Gladys Assistant](https://gladysassistant.com/)
- Integration implemented natively in Gladys Assistant ([documentation](https://gladysassistant.com/docs/integrations/zigbee2mqtt/)).
<br>
<img align="left" height="100px" width="100px" src="https://forum.iobroker.net/assets/uploads/system/site-logo.png">
### [IoBroker](https://www.iobroker.net/)
- Integration implemented in IoBroker ([documentation](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt)).
<br>
## Architecture
![Architecture](images/architecture.png)
@@ -73,7 +97,7 @@ Zigbee2MQTT is made up of three modules, each developed in its own Github projec
Zigbee2MQTT uses TypeScript (partially for now). Therefore after making changes to files in the `lib/` directory you need to recompile Zigbee2MQTT. This can be done by executing `npm run build`. For faster development instead of running `npm run build` you can run `npm run build-watch` in another terminal session, this will recompile as you change files.
## Supported devices
See [Supported devices](https://www.zigbee2mqtt.io/supported-devices) to check whether your device is supported. There is quite an extensive list, including devices from vendors like Xiaomi, Ikea, Philips, OSRAM and more.
See [Supported devices](https://www.zigbee2mqtt.io/supported-devices) to check whether your device is supported. There is quite an extensive list, including devices from vendors like [Xiaomi](https://www.zigbee2mqtt.io/supported-devices/#v=Xiaomi), [Ikea](https://www.zigbee2mqtt.io/supported-devices/#v=IKEA), [Philips](https://www.zigbee2mqtt.io/supported-devices/#v=Philips), [OSRAM](https://www.zigbee2mqtt.io/supported-devices/#v=OSRAM) and more.
If it's not listed in [Supported devices](https://www.zigbee2mqtt.io/supported-devices), support can be added (fairly) easily, see [How to support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).
+29
View File
@@ -0,0 +1,29 @@
# Home Assistant integration (MQTT discovery)
homeassistant: false
# Enable the frontend, runs on port 8080 by default
frontend: 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
# Advanced settings
advanced:
# Let Zigbee2MQTT generate a network key on first start
network_key: GENERATE
# Let Zigbee2MQTT generate a pan_id on first start
pan_id: GENERATE
# Let Zigbee2MQTT generate a ext_pan_id on first start
ext_pan_id: GENERATE
+9 -5
View File
@@ -1,7 +1,7 @@
FROM node:16-alpine3.15 as base
FROM alpine:3.18.4 as base
WORKDIR /app
RUN apk add --no-cache tzdata eudev tini
RUN apk add --no-cache tzdata eudev tini nodejs
# Dependencies and build
FROM base as dependencies_and_build
@@ -9,8 +9,10 @@ FROM base as dependencies_and_build
COPY package*.json tsconfig.json index.js ./
COPY lib ./lib
RUN apk add --no-cache --virtual .buildtools make gcc g++ python3 linux-headers git && \
RUN apk add --no-cache --virtual .buildtools make gcc g++ python3 linux-headers git npm && \
npm ci --production --no-audit --no-optional --no-update-notifier && \
# Serialport needs to be rebuild for Alpine https://serialport.io/docs/9.x.x/guide-installation#alpine-linux
npm rebuild --build-from-source && \
apk del .buildtools
# Release
@@ -18,7 +20,7 @@ FROM base as release
COPY --from=dependencies_and_build /app/node_modules ./node_modules
COPY dist ./dist
COPY package.json LICENSE index.js data/configuration.yaml ./
COPY package.json LICENSE index.js data/configuration.yaml data/configuration.example.yaml ./
COPY docker/docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
@@ -28,5 +30,7 @@ RUN mkdir /app/data
ARG COMMIT
RUN echo "$COMMIT" > dist/.hash
ENV NODE_ENV production
ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ "/sbin/tini", "--", "node", "index.js"]
CMD [ "/sbin/tini", "--", "node", "index.js"]
+1 -1
View File
@@ -11,7 +11,7 @@ echo "Using '$DATA' as data directory"
if [ ! -f "$DATA/configuration.yaml" ]; then
echo "Creating configuration file..."
cp /app/configuration.yaml "$DATA/configuration.yaml"
cp /app/configuration.example.yaml "$DATA/configuration.yaml"
fi
exec "$@"
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+11 -7
View File
@@ -1,12 +1,10 @@
require('core-js/features/object/from-entries');
require('core-js/features/array/flat');
const semver = require('semver');
const engines = require('./package.json').engines;
const fs = require('fs');
const os = require('os');
const path = require('path');
const {exec} = require('child_process');
const rimraf = require('rimraf');
const {rimrafSync} = require('rimraf');
require('source-map-support').install();
let controller;
@@ -43,7 +41,7 @@ async function writeHash() {
async function build(reason) {
return new Promise((resolve, reject) => {
process.stdout.write(`Building Zigbee2MQTT... (${reason})`);
rimraf.sync('dist');
rimrafSync('dist');
const env = {...process.env};
const _600mb = 629145600;
if (_600mb > os.totalmem() && !env.NODE_OPTIONS) {
@@ -120,10 +118,16 @@ async function handleQuit() {
}
}
if (process.argv.length === 3 && process.argv[2] === 'writehash') {
writeHash();
if (require.main === module || require.main.filename.endsWith(path.sep + 'cli.js')) {
if (process.argv.length === 3 && process.argv[2] === 'writehash') {
writeHash();
} else {
process.on('SIGINT', handleQuit);
process.on('SIGTERM', handleQuit);
start();
}
} else {
process.on('SIGINT', handleQuit);
process.on('SIGTERM', handleQuit);
start();
module.exports = {start};
}
+10 -6
View File
@@ -39,7 +39,7 @@ const AllExtensions = [
type ExtensionArgs = [Zigbee, MQTT, State, PublishEntityState, EventBus,
(enable: boolean, name: string) => Promise<void>, () => void, (extension: Extension) => Promise<void>];
class Controller {
export class Controller {
private eventBus: EventBus;
private zigbee: Zigbee;
private state: State;
@@ -49,7 +49,7 @@ class Controller {
private extensions: Extension[];
private extensionArgs: ExtensionArgs;
constructor(restartCallback: () => void, exitCallback: (code: number) => void) {
constructor(restartCallback: () => void, exitCallback: (code: number, restart: boolean) => void) {
logger.init();
this.eventBus = new EventBus( /* istanbul ignore next */ (error) => {
logger.error(`Error: ${error.message}`);
@@ -57,7 +57,7 @@ class Controller {
});
this.zigbee = new Zigbee(this.eventBus);
this.mqtt = new MQTT(this.eventBus);
this.state = new State(this.eventBus);
this.state = new State(this.eventBus, this.zigbee);
this.restartCallback = restartCallback;
this.exitCallback = exitCallback;
@@ -144,8 +144,7 @@ class Controller {
try {
await this.mqtt.connect();
} catch (error) {
logger.error(`MQTT failed to connect: ${error.message}`);
logger.error('Exiting...');
logger.error(`MQTT failed to connect, exiting...`);
await this.zigbee.stop();
await this.exit(1);
}
@@ -164,6 +163,8 @@ class Controller {
this.eventBus.onLastSeenChanged(this,
(data) => utils.publishLastSeen(data, settings.get(), false, this.publishEntityState));
logger.info(`Zigbee2MQTT started!`);
}
@bind async enableDisableExtension(enable: boolean, name: string): Promise<void> {
@@ -242,11 +243,14 @@ class Controller {
message.device = {
friendlyName: entity.name, model: entity.definition ? entity.definition.model : 'unknown',
ieeeAddr: entity.ieeeAddr, networkAddress: entity.zh.networkAddress, type: entity.zh.type,
manufacturerID: entity.zh.manufacturerID, manufacturerName: entity.zh.manufacturerName,
manufacturerID: entity.zh.manufacturerID,
powerSource: entity.zh.powerSource, applicationVersion: entity.zh.applicationVersion,
stackVersion: entity.zh.stackVersion, zclVersion: entity.zh.zclVersion,
hardwareVersion: entity.zh.hardwareVersion, dateCode: entity.zh.dateCode,
softwareBuildID: entity.zh.softwareBuildID,
// Manufacturer name can contain \u0000, remove this.
// https://github.com/home-assistant/core/issues/85691
manufacturerName: entity.zh.manufacturerName?.split('\u0000')[0],
};
}
+5 -5
View File
@@ -47,7 +47,7 @@ export default class Availability extends Extension {
private resetTimer(device: Device): void {
clearTimeout(this.timers[device.ieeeAddr]);
// If the timer triggers, the device is not avaiable anymore otherwise resetTimer already have been called
// If the timer triggers, the device is not available anymore otherwise resetTimer already have been called
if (this.isActiveDevice(device)) {
// If device did not check in, ping it, if that fails it will be marked as offline
this.timers[device.ieeeAddr] = setTimeout(
@@ -82,7 +82,7 @@ export default class Availability extends Extension {
const disableRecovery = !(i == 1 && available);
await device.zh.ping(disableRecovery);
pingedSuccessfully = true;
logger.debug(`Succesfully pinged '${device.name}' (attempt ${i + 1}/${attempts})`);
logger.debug(`Successfully pinged '${device.name}' (attempt ${i + 1}/${attempts})`);
break;
} catch (error) {
logger.warn(`Failed to ping '${device.name}' (attempt ${i + 1}/${attempts}, ${error.message})`);
@@ -105,7 +105,7 @@ export default class Availability extends Extension {
override async start(): Promise<void> {
this.eventBus.onEntityRenamed(this, (data) => {
if (utils.isAvailabilityEnabledForEntity(data.entity, settings.get())) {
this.mqtt.publish(`${data.from}/availability`, null, {retain: true, qos: 0});
this.mqtt.publish(`${data.from}/availability`, null, {retain: true, qos: 1});
this.publishAvailability(data.entity, false, true);
}
});
@@ -122,7 +122,7 @@ export default class Availability extends Extension {
@bind private publishAvailabilityForAllEntities(): void {
for (const entity of [...this.zigbee.devices(false), ...this.zigbee.groups()]) {
if (utils.isAvailabilityEnabledForEntity(entity, settings.get())) {
// Publish initial availablility
// Publish initial availability
this.publishAvailability(entity, true, false, true);
if (entity.isDevice()) {
@@ -164,7 +164,7 @@ export default class Availability extends Extension {
const topic = `${entity.name}/availability`;
const payload = utils.availabilityPayload(available ? 'online' : 'offline', settings.get());
this.availabilityCache[entity.ID] = available;
this.mqtt.publish(topic, payload, {retain: true, qos: 0});
this.mqtt.publish(topic, payload, {retain: true, qos: 1});
if (!skipGroups && entity.isDevice()) {
this.zigbee.groups().filter((g) => g.hasMember(entity))
+39 -22
View File
@@ -4,7 +4,7 @@ import utils from '../util/utils';
import Extension from './extension';
import stringify from 'json-stable-stringify-without-jsonify';
import debounce from 'debounce';
import * as zigbeeHersdman from 'zigbee-herdsman/dist';
import * as zigbeeHerdsman from 'zigbee-herdsman/dist';
import bind from 'bind-decorator';
import Device from '../model/device';
import Group from '../model/group';
@@ -12,7 +12,7 @@ import Group from '../model/group';
const legacyApi = settings.get().advanced.legacy_api;
const legacyTopicRegex = new RegExp(`^${settings.get().mqtt.base_topic}/bridge/(bind|unbind)/.+$`);
const topicRegex = new RegExp(`^${settings.get().mqtt.base_topic}/bridge/request/device/(bind|unbind)`);
const clusterCandidates = ['genScenes', 'genOnOff', 'genLevelCtrl', 'lightingColorCtrl', 'closuresWindowCovering',
const allClusterCandidates = ['genScenes', 'genOnOff', 'genLevelCtrl', 'lightingColorCtrl', 'closuresWindowCovering',
'hvacThermostat', 'msIlluminanceMeasurement', 'msTemperatureMeasurement', 'msRelativeHumidity',
'msSoilMoisture', 'msCO2'];
@@ -68,7 +68,8 @@ const reportClusters: {[s: string]:
type PollOnMessage = {
cluster: {[s: string]: {type: string, data: KeyValue}[]}
read: {cluster: string, attributes: string[], attributesForEndpoint?: (endpoint: zh.Endpoint) => Promise<string[]>}
manufacturerIDs: number[]
manufacturerIDs: number[],
manufacturerNames: string [],
}[];
const pollOnMessage: PollOnMessage = [
@@ -96,11 +97,16 @@ const pollOnMessage: PollOnMessage = [
read: {cluster: 'genLevelCtrl', attributes: ['currentLevel']},
// When the bound devices/members of group have the following manufacturerIDs
manufacturerIDs: [
zigbeeHersdman.Zcl.ManufacturerCode.Philips,
zigbeeHersdman.Zcl.ManufacturerCode.ATMEL,
zigbeeHersdman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHersdman.Zcl.ManufacturerCode.TELINK,
zigbeeHerdsman.Zcl.ManufacturerCode.Philips,
zigbeeHerdsman.Zcl.ManufacturerCode.ATMEL,
zigbeeHerdsman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHerdsman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHerdsman.Zcl.ManufacturerCode.TELINK,
zigbeeHerdsman.Zcl.ManufacturerCode.BUSCH_JAEGER,
],
manufacturerNames: [
'GLEDOPTO',
'Trust International B.V.\u0000',
],
},
{
@@ -127,11 +133,16 @@ const pollOnMessage: PollOnMessage = [
},
read: {cluster: 'genOnOff', attributes: ['onOff']},
manufacturerIDs: [
zigbeeHersdman.Zcl.ManufacturerCode.Philips,
zigbeeHersdman.Zcl.ManufacturerCode.ATMEL,
zigbeeHersdman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHersdman.Zcl.ManufacturerCode.TELINK,
zigbeeHerdsman.Zcl.ManufacturerCode.Philips,
zigbeeHerdsman.Zcl.ManufacturerCode.ATMEL,
zigbeeHerdsman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHerdsman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHerdsman.Zcl.ManufacturerCode.TELINK,
zigbeeHerdsman.Zcl.ManufacturerCode.BUSCH_JAEGER,
],
manufacturerNames: [
'GLEDOPTO',
'Trust International B.V.\u0000',
],
},
{
@@ -154,11 +165,16 @@ const pollOnMessage: PollOnMessage = [
},
},
manufacturerIDs: [
zigbeeHersdman.Zcl.ManufacturerCode.Philips,
zigbeeHersdman.Zcl.ManufacturerCode.ATMEL,
zigbeeHersdman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHersdman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHersdman.Zcl.ManufacturerCode.TELINK,
zigbeeHerdsman.Zcl.ManufacturerCode.Philips,
zigbeeHerdsman.Zcl.ManufacturerCode.ATMEL,
zigbeeHerdsman.Zcl.ManufacturerCode.GLEDOPTO_CO_LTD,
zigbeeHerdsman.Zcl.ManufacturerCode.MUELLER_LICHT_INT,
zigbeeHerdsman.Zcl.ManufacturerCode.TELINK,
// Note: ManufacturerCode.BUSCH_JAEGER is left out intentionally here as their devices don't support colors
],
manufacturerNames: [
'GLEDOPTO',
'Trust International B.V.\u0000',
],
},
];
@@ -230,8 +246,8 @@ export default class Bind extends Extension {
// Find which clusters are supported by both the source and target.
// Groups are assumed to support all clusters.
const clusterCandidates = clusters ?? allClusterCandidates;
for (const cluster of clusterCandidates) {
if (clusters && !clusters.includes(cluster)) continue;
let matchingClusters = false;
const anyClusterValid = utils.isZHGroup(bindTarget) || typeof bindTarget === 'number' ||
@@ -373,7 +389,7 @@ export default class Bind extends Extension {
}
await endpoint.configureReporting(bind.cluster.name, items);
logger.info(`Succesfully setup reporting for '${entity}' cluster '${bind.cluster.name}'`);
logger.info(`Successfully setup reporting for '${entity}' cluster '${bind.cluster.name}'`);
} catch (error) {
logger.warn(`Failed to setup reporting for '${entity}' cluster '${bind.cluster.name}'`);
}
@@ -415,7 +431,7 @@ export default class Bind extends Extension {
}
await endpoint.configureReporting(cluster, items);
logger.info(`Succesfully disabled reporting for '${entity}' cluster '${cluster}'`);
logger.info(`Successfully disabled reporting for '${entity}' cluster '${cluster}'`);
} catch (error) {
logger.warn(`Failed to disable reporting for '${entity}' cluster '${cluster}'`);
}
@@ -456,7 +472,8 @@ export default class Bind extends Extension {
for (const endpoint of toPoll) {
for (const poll of polls) {
if (!poll.manufacturerIDs.includes(endpoint.getDevice().manufacturerID) ||
if ((!poll.manufacturerIDs.includes(endpoint.getDevice().manufacturerID) &&
!poll.manufacturerNames.includes(endpoint.getDevice().manufacturerName)) ||
!endpoint.supportsInputCluster(poll.read.cluster)) {
continue;
}
+43 -56
View File
@@ -6,7 +6,6 @@ import Transport from 'winston-transport';
import bind from 'bind-decorator';
import stringify from 'json-stable-stringify-without-jsonify';
import objectAssignDeep from 'object-assign-deep';
import {detailedDiff} from 'deep-object-diff';
import Extension from './extension';
import Device from '../model/device';
import Group from '../model/group';
@@ -16,7 +15,6 @@ import fs from 'fs';
const requestRegex = new RegExp(`${settings.get().mqtt.base_topic}/bridge/request/(.*)`);
type Scene = {id: number, name: string};
type DefinitionPayload = {
model: string, vendor: string, description: string, exposes: zhc.DefinitionExpose[], supports_ota:
boolean, icon: string, options: zhc.DefinitionExpose[],
@@ -24,6 +22,8 @@ type DefinitionPayload = {
export default class Bridge extends Extension {
private zigbee2mqttVersion: {commitHash: string, version: string};
private zigbeeHerdsmanVersion: {version: string};
private zigbeeHerdsmanConvertersVersion: {version: string};
private coordinatorVersion: zh.CoordinatorVersion;
private restartRequired = false;
private lastJoinedDeviceIeeeAddr: string;
@@ -44,8 +44,10 @@ export default class Bridge extends Extension {
'backup': this.backup,
'touchlink/factory_reset': this.touchlinkFactoryReset,
'touchlink/identify': this.touchlinkIdentify,
'install_code/add': this.installCodeAdd,
'touchlink/scan': this.touchlinkScan,
'health_check': this.healthCheck,
'coordinator_check': this.coordinatorCheck,
'options': this.bridgeOptions,
// Below are deprecated
'config/last_seen': this.configLastSeen,
@@ -66,6 +68,8 @@ export default class Bridge extends Extension {
logger.addTransport(new EventTransport());
this.zigbee2mqttVersion = await utils.getZigbee2MQTTVersion();
this.zigbeeHerdsmanVersion = await utils.getDependencyVersion('zigbee-herdsman');
this.zigbeeHerdsmanConvertersVersion = await utils.getDependencyVersion('zigbee-herdsman-converters');
this.coordinatorVersion = await this.zigbee.getCoordinatorVersion();
this.eventBus.onEntityRenamed(this, () => this.publishInfo());
@@ -147,35 +151,7 @@ export default class Bridge extends Extension {
throw new Error(`Invalid payload`);
}
const diff: KeyValue = detailedDiff(settings.get(), message.options);
// Remove any settings that are in the deleted.diff but not in the passed options
const cleanupDeleted = (options: KeyValue, deleted: KeyValue): void => {
for (const key of Object.keys(deleted)) {
if (!(key in options)) {
delete deleted[key];
} else if (!Array.isArray(options[key])) {
cleanupDeleted(options[key], deleted[key]);
}
}
};
cleanupDeleted(message.options, diff.deleted);
const newSettings = objectAssignDeep({}, diff.added, diff.updated, diff.deleted);
// deep-object-diff converts arrays to objects, set original array back here
const convertBackArray = (before: KeyValue, after: KeyValue): void => {
for (const [key, afterValue] of Object.entries(after)) {
const beforeValue = before[key];
if (Array.isArray(beforeValue)) {
after[key] = beforeValue;
} else if (afterValue && typeof beforeValue === 'object') {
convertBackArray(beforeValue, afterValue);
}
}
};
convertBackArray(message.options, newSettings);
const newSettings = utils.computeSettingsToChange(settings.get(), message.options);
const restartRequired = settings.apply(newSettings);
if (restartRequired) this.restartRequired = true;
@@ -192,7 +168,7 @@ export default class Bridge extends Extension {
logger.setLevel(newSettings.advanced.log_level);
}
logger.info('Succesfully changed options');
logger.info('Successfully changed options');
this.publishInfo();
return utils.getResponse(message, {restart_required: this.restartRequired}, null);
}
@@ -209,6 +185,14 @@ export default class Bridge extends Extension {
return utils.getResponse(message, {healthy: true}, null);
}
@bind async coordinatorCheck(message: string | KeyValue): Promise<MQTTResponse> {
const result = await this.zigbee.coordinatorCheck();
const missingRouters = result.missingRouters.map((d) => {
return {ieee_address: d.ieeeAddr, friendly_name: d.name};
});
return utils.getResponse(message, {missing_routers: missingRouters}, null);
}
@bind async groupAdd(message: string | KeyValue): Promise<MQTTResponse> {
if (typeof message === 'object' && !message.hasOwnProperty('friendly_name')) {
throw new Error(`Invalid payload`);
@@ -248,6 +232,17 @@ export default class Bridge extends Extension {
return utils.getResponse(message, {zip: base64Zip}, null);
}
@bind async installCodeAdd(message: KeyValue | string): Promise<MQTTResponse> {
if (typeof message === 'object' && !message.hasOwnProperty('value')) {
throw new Error('Invalid payload');
}
const value = typeof message === 'object' ? message.value : message;
await this.zigbee.addInstallCode(value);
logger.info('Successfully added new install code');
return utils.getResponse(message, {value}, null);
}
@bind async permitJoin(message: KeyValue | string): Promise<MQTTResponse> {
if (typeof message === 'object' && !message.hasOwnProperty('value')) {
throw new Error('Invalid payload');
@@ -407,15 +402,23 @@ export default class Bridge extends Extension {
const ID = message.id;
const entity = this.getEntity(entityType, ID);
const currentOptions = entityType === 'device' ? settings.get().devices[entity.ID] :
settings.get().groups[entity.ID];
const options = utils.computeSettingsToChange(currentOptions, message.options);
const oldOptions = objectAssignDeep({}, cleanup(entity.options));
settings.changeEntityOptions(ID, message.options);
const restartRequired = settings.changeEntityOptions(ID, options);
if (restartRequired) this.restartRequired = true;
const newOptions = cleanup(entity.options);
await this.publishInfo();
logger.info(`Changed config for ${entityType} ${ID}`);
this.eventBus.emitEntityOptionsChanged({from: oldOptions, to: newOptions, entity});
return utils.getResponse(message, {from: oldOptions, to: newOptions, id: ID}, null);
return utils.getResponse(
message,
{from: oldOptions, to: newOptions, id: ID, restart_required: this.restartRequired},
null,
);
}
@bind async deviceConfigureReporting(message: string | KeyValue): Promise<MQTTResponse> {
@@ -479,7 +482,7 @@ export default class Bridge extends Extension {
this.publishInfo();
}
// Repulish entity state
// Republish entity state
this.publishEntityState(entity, {});
return utils.getResponse(
@@ -582,6 +585,8 @@ export default class Bridge extends Extension {
const payload = {
version: this.zigbee2mqttVersion.version,
commit: this.zigbee2mqttVersion.commitHash,
zigbee_herdsman_converters: this.zigbeeHerdsmanConvertersVersion,
zigbee_herdsman: this.zigbeeHerdsmanVersion,
coordinator: {
ieee_address: this.zigbee.firstCoordinatorEndpoint().getDevice().ieeeAddr,
...this.coordinatorVersion,
@@ -599,25 +604,6 @@ export default class Bridge extends Extension {
'bridge/info', stringify(payload), {retain: true, qos: 0}, settings.get().mqtt.base_topic, true);
}
private getScenes(entity: zh.Endpoint | zh.Group): Scene[] {
const scenes: {[id: number]: Scene} = {};
const endpoints = utils.isEndpoint(entity) ? [entity] : entity.members;
const groupID = utils.isEndpoint(entity) ? 0 : entity.groupID;
for (const endpoint of endpoints) {
for (const [key, data] of Object.entries(endpoint.meta?.scenes || {})) {
const split = key.split('_');
const sceneID = parseInt(split[0], 10);
const sceneGroupID = parseInt(split[1], 10);
if (sceneGroupID === groupID) {
scenes[sceneID] = {id: sceneID, name: (data as KeyValue).name || `Scene ${sceneID}`};
}
}
}
return Object.values(scenes);
}
async publishDevices(): Promise<void> {
interface Data {
bindings: {cluster: string, target: {type: string, endpoint?: number, ieee_address?: string, id?: number}}[]
@@ -630,7 +616,7 @@ export default class Bridge extends Extension {
const endpoints: {[s: number]: Data} = {};
for (const endpoint of device.zh.endpoints) {
const data: Data = {
scenes: this.getScenes(endpoint),
scenes: utils.getScenes(endpoint),
bindings: [],
configured_reportings: [],
clusters: {
@@ -665,6 +651,7 @@ export default class Bridge extends Extension {
network_address: device.zh.networkAddress,
supported: !!device.definition,
friendly_name: device.name,
disabled: !!device.options.disabled,
description: device.options.description,
definition: this.getDefinitionPayload(device),
power_source: device.zh.powerSource,
@@ -688,7 +675,7 @@ export default class Bridge extends Extension {
id: g.ID,
friendly_name: g.ID === 901 ? 'default_bind_group' : g.name,
description: g.options.description,
scenes: this.getScenes(g.zh),
scenes: utils.getScenes(g.zh),
members: g.zh.members.map((e) => {
return {ieee_address: e.getDevice().ieeeAddr, endpoint: e.ID};
}),
+10 -8
View File
@@ -64,9 +64,11 @@ export default class Configure extends Extension {
}
override async start(): Promise<void> {
for (const device of this.zigbee.devices(false)) {
await this.configure(device, 'started');
}
setImmediate(async () => {
for (const device of this.zigbee.devices(false)) {
await this.configure(device, 'started');
}
});
this.eventBus.onDeviceJoined(this, (data) => {
if (data.device.zh.meta.hasOwnProperty('configured')) {
@@ -83,9 +85,9 @@ export default class Configure extends Extension {
}
private async configure(device: Device, event: 'started' | 'zigbee_event' | 'reporting_disabled' | 'mqtt_message',
force=false, thowError=false): Promise<void> {
force=false, throwError=false): Promise<void> {
if (!force) {
if (!device.definition?.configure || !device.zh.interviewCompleted) {
if (device.options.disabled || !device.definition?.configure || !device.zh.interviewCompleted) {
return;
}
@@ -124,11 +126,11 @@ export default class Configure extends Extension {
const msg = `Failed to configure '${device.name}', attempt ${attempt} (${error.stack})`;
logger.error(msg);
if (thowError) {
if (throwError) {
throw error;
}
} finally {
this.configuring.delete(device.ieeeAddr);
}
this.configuring.delete(device.ieeeAddr);
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ abstract class Extension {
protected addExtension: (extension: Extension) => Promise<void>;
/**
* Besides intializing variables, the constructor should do nothing!
* Besides initializing variables, the constructor should do nothing!
*
* @param {Zigbee} zigbee Zigbee controller
* @param {MQTT} mqtt MQTT controller
+6 -6
View File
@@ -28,8 +28,8 @@ export default class ExternalExtension extends Extension {
const basePath = this.getExtensionsBasePath();
if (fs.existsSync(basePath)) {
return fs.readdirSync(basePath).filter((f) => f.endsWith('.js')).map((fileName) => {
const extensonFilePath = path.join(basePath, fileName);
return {'name': fileName, 'code': fs.readFileSync(extensonFilePath, 'utf-8')};
const extensionFilePath = path.join(basePath, fileName);
return {'name': fileName, 'code': fs.readFileSync(extensionFilePath, 'utf-8')};
});
} else {
return [];
@@ -56,15 +56,15 @@ export default class ExternalExtension extends Extension {
@bind private async saveExtension(message: KeyValue): Promise<MQTTResponse> {
const {name, code} = message;
const ModuleConstructor = utils.loadModuleFromText(code) as typeof Extension;
const ModuleConstructor = utils.loadModuleFromText(code, name) as typeof Extension;
await this.loadExtension(ModuleConstructor);
const basePath = this.getExtensionsBasePath();
/* istanbul ignore else */
if (!fs.existsSync(basePath)) {
fs.mkdirSync(basePath);
}
const extensonFilePath = path.join(basePath, path.basename(name));
fs.writeFileSync(extensonFilePath, code);
const extensionFilePath = path.join(basePath, path.basename(name));
fs.writeFileSync(extensionFilePath, code);
this.publishExtensions();
logger.info(`Extension ${name} loaded`);
return utils.getResponse(message, {}, null);
@@ -95,7 +95,7 @@ export default class ExternalExtension extends Extension {
private loadUserDefinedExtensions(): void {
const extensions = this.getListOfUserDefinedExtensions();
extensions
.map(({code}) => utils.loadModuleFromText(code))
.map(({code, name}) => utils.loadModuleFromText(code, name))
.map(this.loadExtension);
}
+45 -9
View File
@@ -1,4 +1,5 @@
import http from 'http';
import https from 'https';
import gzipStatic, {RequestHandler} from 'connect-gzip-static';
import finalhandler from 'finalhandler';
import logger from '../util/logger';
@@ -6,6 +7,7 @@ import frontend from 'zigbee2mqtt-frontend';
import WebSocket from 'ws';
import net from 'net';
import url from 'url';
import fs from 'fs';
import * as settings from '../util/settings';
import utils from '../util/utils';
import stringify from 'json-stable-stringify-without-jsonify';
@@ -19,6 +21,8 @@ export default class Frontend extends Extension {
private mqttBaseTopic = settings.get().mqtt.base_topic;
private host = settings.get().frontend.host;
private port = settings.get().frontend.port;
private sslCert = settings.get().frontend.ssl_cert;
private sslKey = settings.get().frontend.ssl_key;
private authToken = settings.get().frontend.auth_token;
private retainedMessages = new Map();
private server: http.Server;
@@ -33,8 +37,28 @@ export default class Frontend extends Extension {
this.eventBus.onMQTTMessagePublished(this, this.onMQTTPublishMessage);
}
private isHttpsConfigured():boolean {
if (this.sslCert && this.sslKey) {
if (!fs.existsSync(this.sslCert) || !fs.existsSync(this.sslKey)) {
logger.error(`defined ssl_cert '${this.sslCert}' or ssl_key '${this.sslKey}' file path does not exists, server won't be secured.`); /* eslint-disable-line max-len */
return false;
}
return true;
}
return false;
}
override async start(): Promise<void> {
this.server = http.createServer(this.onRequest);
if (this.isHttpsConfigured()) {
const serverOptions = {
key: fs.readFileSync(this.sslKey),
cert: fs.readFileSync(this.sslCert)};
this.server = https.createServer(serverOptions, this.onRequest);
} else {
this.server = http.createServer(this.onRequest);
}
this.server.on('upgrade', this.onUpgrade);
/* istanbul ignore next */
@@ -50,18 +74,29 @@ export default class Frontend extends Extension {
this.wss = new WebSocket.Server({noServer: true});
this.wss.on('connection', this.onWebSocketConnection);
this.server.listen(this.port, this.host);
logger.info(`Started frontend on port ${this.host}:${this.port}`);
if (!this.host) {
this.server.listen(this.port);
logger.info(`Started frontend on port ${this.port}`);
} else if (this.host.startsWith('/')) {
this.server.listen(this.host);
logger.info(`Started frontend on socket ${this.host}`);
} else {
this.server.listen(this.port, this.host);
logger.info(`Started frontend on port ${this.host}:${this.port}`);
}
}
override async stop(): Promise<void> {
super.stop();
for (const client of this.wss.clients) {
this.wss?.clients.forEach((client) => {
client.send(stringify({topic: 'bridge/state', payload: 'offline'}));
client.terminate();
});
this.wss?.close();
/* istanbul ignore else */
if (this.server) {
return new Promise((cb: () => void) => this.server.close(cb));
}
this.wss.close();
return new Promise((cb: () => void) => this.server.close(cb));
}
@bind private onRequest(request: http.IncomingMessage, response: http.ServerResponse): void {
@@ -76,8 +111,8 @@ export default class Frontend extends Extension {
@bind private onUpgrade(request: http.IncomingMessage, socket: net.Socket, head: Buffer): void {
this.wss.handleUpgrade(request, socket, head, (ws) => {
this.authenticate(request, (isAuthentificated) => {
if (isAuthentificated) {
this.authenticate(request, (isAuthenticated) => {
if (isAuthenticated) {
this.wss.emit('connection', ws, request);
} else {
ws.close(4401, 'Unauthorized');
@@ -87,11 +122,12 @@ export default class Frontend extends Extension {
}
@bind private onWebSocketConnection(ws: WebSocket): void {
ws.on('error', (msg) => logger.error(`WebSocket error: ${msg.message}`));
ws.on('message', (data: Buffer, isBinary: boolean) => {
if (!isBinary && data) {
const message = data.toString();
const {topic, payload} = JSON.parse(message);
this.mqtt.onMessage(`${this.mqttBaseTopic}/${topic}`, stringify(payload));
this.mqtt.onMessage(`${this.mqttBaseTopic}/${topic}`, Buffer.from(stringify(payload)));
}
});
+9 -2
View File
@@ -142,6 +142,7 @@ export default class Groups extends Extension {
const groupsToPublish: Set<Group> = new Set();
for (const member of entity.zh.members) {
const device = this.zigbee.resolveEntity(member.getDevice()) as Device;
if (device.options.disabled) continue;
const exposes = device.exposes();
const memberPayload: KeyValue = {};
Object.keys(payload).forEach((key) => {
@@ -292,6 +293,7 @@ export default class Groups extends Extension {
groupKey, deviceKey, skipDisableReporting, resolvedEntityEndpoint,
} = parsed;
const message = utils.parseJSON(data.message, data.message);
let changedGroups: Group[] = [];
const responseData: KeyValue = {device: deviceKey};
if (groupKey) {
@@ -320,6 +322,7 @@ export default class Groups extends Extension {
logger.info(`Adding '${resolvedEntityDevice.name}' to '${resolvedEntityGroup.name}'`);
await resolvedEntityEndpoint.addToGroup(resolvedEntityGroup.zh);
settings.addDeviceToGroup(resolvedEntityGroup.ID.toString(), keys);
changedGroups.push(resolvedEntityGroup);
/* istanbul ignore else */
if (settings.get().advanced.legacy_api) {
@@ -333,6 +336,7 @@ export default class Groups extends Extension {
logger.info(`Removing '${resolvedEntityDevice.name}' from '${resolvedEntityGroup.name}'`);
await resolvedEntityEndpoint.removeFromGroup(resolvedEntityGroup.zh);
settings.removeDeviceFromGroup(resolvedEntityGroup.ID.toString(), keys);
changedGroups.push(resolvedEntityGroup);
/* istanbul ignore else */
if (settings.get().advanced.legacy_api) {
@@ -344,6 +348,7 @@ export default class Groups extends Extension {
}
} else { // remove_all
logger.info(`Removing '${resolvedEntityDevice.name}' from all groups`);
changedGroups = this.zigbee.groups().filter((g) => g.zh.members.includes(resolvedEntityEndpoint));
await resolvedEntityEndpoint.removeFromAllGroups();
for (const settingsGroup of settings.getGroups()) {
settings.removeDeviceFromGroup(settingsGroup.ID.toString(), keys);
@@ -372,8 +377,10 @@ export default class Groups extends Extension {
if (error) {
logger.error(error);
} else {
this.eventBus.emitGroupMembersChanged({
group: resolvedEntityGroup, action: type, endpoint: resolvedEntityEndpoint, skipDisableReporting});
for (const group of changedGroups) {
this.eventBus.emitGroupMembersChanged({
group, action: type, endpoint: resolvedEntityEndpoint, skipDisableReporting});
}
}
}
}
+334 -120
View File
@@ -16,6 +16,7 @@ const sensorClick: DiscoveryEntry = {
object_id: 'click',
mockProperties: [{property: 'click', value: null}],
discovery_payload: {
name: 'Click',
icon: 'mdi:toggle-switch',
value_template: '{{ value_json.click }}',
},
@@ -42,6 +43,7 @@ const legacyMapping = [
mockProperties: [{property: 'brightness', value: null}],
object_id: 'brightness',
discovery_payload: {
name: 'Brightness',
unit_of_measurement: 'brightness',
icon: 'mdi:brightness-5',
value_template: '{{ value_json.brightness }}',
@@ -69,6 +71,7 @@ export default class HomeAssistant extends Extension {
private statusTopic = settings.get().homeassistant.status_topic;
private entityAttributes = settings.get().homeassistant.legacy_entity_attributes;
private zigbee2MQTTVersion: string;
private discoveryOrigin: {name: string, sw: string, url: string};
constructor(zigbee: Zigbee, mqtt: MQTT, state: State, publishEntityState: PublishEntityState,
eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>,
@@ -85,6 +88,7 @@ export default class HomeAssistant extends Extension {
}
this.zigbee2MQTTVersion = (await utils.getZigbee2MQTTVersion(false)).version;
this.discoveryOrigin = {name: 'Zigbee2MQTT', sw: this.zigbee2MQTTVersion, url: 'https://www.zigbee2mqtt.io'};
this.eventBus.onDeviceRemoved(this, this.onDeviceRemoved);
this.eventBus.onMQTTMessage(this, this.onMQTTMessage);
@@ -95,6 +99,7 @@ export default class HomeAssistant extends Extension {
this.eventBus.onDeviceJoined(this, this.onZigbeeEvent);
this.eventBus.onDeviceInterview(this, this.onZigbeeEvent);
this.eventBus.onDeviceMessage(this, this.onZigbeeEvent);
this.eventBus.onScenesChanged(this, this.onScenesChanged);
this.eventBus.onEntityOptionsChanged(this, (data) => this.discover(data.entity, true));
this.mqtt.subscribe(this.statusTopic);
@@ -111,7 +116,7 @@ export default class HomeAssistant extends Extension {
}
private exposeToConfig(exposes: zhc.DefinitionExpose[], entityType: 'device' | 'group',
definition?: zhc.Definition, definitionExposes?: zhc.DefinitionExpose[]): DiscoveryEntry[] {
allExposes: zhc.DefinitionExpose[], definition?: zhc.Definition): DiscoveryEntry[] {
// For groups an array of exposes (of the same type) is passed, this is to determine e.g. what features
// to use for a bulb (e.g. color_xy/color_temp)
assert(entityType === 'group' || exposes.length === 1, 'Multiple exposes for device not allowed');
@@ -142,6 +147,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `light_${endpoint}` : 'light',
mockProperties: [{property: state.property, value: null}],
discovery_payload: {
name: endpoint ? utils.capitalize(endpoint) : null,
brightness: !!hasBrightness,
schema: 'json',
command_topic: true,
@@ -171,10 +177,11 @@ export default class HomeAssistant extends Extension {
discoveryEntry.discovery_payload.min_mireds = min;
}
const effect = definitionExposes?.find((e) => e.type === 'enum' && e.name === 'effect');
if (effect) {
const effects = utils.arrayUnique(utils.flatten(
allExposes.filter((e) => e.type === 'enum' && e.name === 'effect').map((e) => e.values)));
if (effects.length) {
discoveryEntry.discovery_payload.effect = true;
discoveryEntry.discovery_payload.effect_list = effect.values;
discoveryEntry.discovery_payload.effect_list = effects;
}
discoveryEntries.push(discoveryEntry);
@@ -186,6 +193,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `switch_${endpoint}` : 'switch',
mockProperties: [{property: property, value: null}],
discovery_payload: {
name: endpoint ? utils.capitalize(endpoint) : null,
payload_off: state.value_off,
payload_on: state.value_on,
value_template: `{{ value_json.${property} }}`,
@@ -196,6 +204,7 @@ export default class HomeAssistant extends Extension {
const different = ['valve_detection', 'window_detection', 'auto_lock', 'away_mode'];
if (different.includes(property)) {
discoveryEntry.discovery_payload.name = firstExpose.label;
discoveryEntry.discovery_payload.command_topic_postfix = property;
discoveryEntry.discovery_payload.state_off = state.value_off;
discoveryEntry.discovery_payload.state_on = state.value_on;
@@ -219,6 +228,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `climate_${endpoint}` : 'climate',
mockProperties: [],
discovery_payload: {
name: endpoint ? utils.capitalize(endpoint) : null,
// Static
state_topic: false,
temperature_unit: 'C',
@@ -236,7 +246,7 @@ export default class HomeAssistant extends Extension {
const mode = firstExpose.features.find((f) => f.name === 'system_mode');
if (mode) {
if (mode.values.includes('sleep')) {
// 'sleep' is not supported by homeassistent, but is valid according to ZCL
// 'sleep' is not supported by Home Assistant, but is valid according to ZCL
// TRV that support sleep (e.g. Viessmann) will have it removed from here,
// this allows other expose consumers to still use it, e.g. the frontend.
mode.values.splice(mode.values.indexOf('sleep'), 1);
@@ -252,7 +262,7 @@ export default class HomeAssistant extends Extension {
discoveryEntry.mockProperties.push({property: state.property, value: null});
discoveryEntry.discovery_payload.action_topic = true;
discoveryEntry.discovery_payload.action_template = `{% set values = ` +
`{None:None,'idle':'off','heat':'heating','cool':'cooling','fan_only':'fan'}` +
`{None:None,'idle':'idle','heat':'heating','cool':'cooling','fan_only':'fan'}` +
` %}{{ values[value_json.${state.property}] }}`;
}
@@ -282,6 +292,15 @@ export default class HomeAssistant extends Extension {
discoveryEntry.discovery_payload.fan_mode_state_topic = true;
}
const swingMode = firstExpose.features.find((f) => f.name === 'swing_mode');
if (swingMode) {
discoveryEntry.discovery_payload.swing_modes = swingMode.values;
discoveryEntry.discovery_payload.swing_mode_command_topic = true;
discoveryEntry.discovery_payload.swing_mode_state_template =
`{{ value_json.${swingMode.property} }}`;
discoveryEntry.discovery_payload.swing_mode_state_topic = true;
}
const preset = firstExpose.features.find((f) => f.name === 'preset');
if (preset) {
discoveryEntry.discovery_payload.preset_modes = preset.values;
@@ -298,6 +317,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `${tempCalibration.name}_${endpoint}` : `${tempCalibration.name}`,
mockProperties: [{property: tempCalibration.property, value: null}],
discovery_payload: {
name: endpoint ? `${tempCalibration.label} ${endpoint}` : tempCalibration.label,
value_template: `{{ value_json.${tempCalibration.property} }}`,
command_topic: true,
command_topic_prefix: endpoint,
@@ -311,6 +331,9 @@ export default class HomeAssistant extends Extension {
if (tempCalibration.value_min != null) discoveryEntry.discovery_payload.min = tempCalibration.value_min;
if (tempCalibration.value_max != null) discoveryEntry.discovery_payload.max = tempCalibration.value_max;
if (tempCalibration.value_step != null) {
discoveryEntry.discovery_payload.step = tempCalibration.value_step;
}
discoveryEntries.push(discoveryEntry);
}
@@ -321,6 +344,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `${piHeatingDemand.name}_${endpoint}` : `${piHeatingDemand.name}`,
mockProperties: [{property: piHeatingDemand.property, value: null}],
discovery_payload: {
name: endpoint ? `${piHeatingDemand.label} ${endpoint}` : piHeatingDemand.label,
value_template: `{{ value_json.${piHeatingDemand.property} }}`,
...(piHeatingDemand.unit && {unit_of_measurement: piHeatingDemand.unit}),
entity_category: 'diagnostic',
@@ -341,6 +365,7 @@ export default class HomeAssistant extends Extension {
object_id: 'lock',
mockProperties: [{property: state.property, value: null}],
discovery_payload: {
name: null,
command_topic: true,
value_template: `{{ value_json.${state.property} }}`,
},
@@ -348,12 +373,14 @@ export default class HomeAssistant extends Extension {
if (state.property === 'keypad_lockout') {
// deprecated: keypad_lockout is messy, but changing is breaking
discoveryEntry.discovery_payload.name = firstExpose.label;
discoveryEntry.discovery_payload.payload_lock = state.value_on;
discoveryEntry.discovery_payload.payload_unlock = state.value_off;
discoveryEntry.discovery_payload.state_topic = true;
discoveryEntry.object_id = 'keypad_lock';
} else if (state.property === 'child_lock') {
// deprecated: child_lock is messy, but changing is breaking
discoveryEntry.discovery_payload.name = firstExpose.label;
discoveryEntry.discovery_payload.payload_lock = state.value_on;
discoveryEntry.discovery_payload.payload_unlock = state.value_off;
discoveryEntry.discovery_payload.state_locked = 'LOCK';
@@ -371,81 +398,85 @@ export default class HomeAssistant extends Extension {
discoveryEntries.push(discoveryEntry);
} else if (firstExpose.type === 'cover') {
const position = exposes.find((expose) => expose.features.find((e) => e.name === 'position'));
const tilt = exposes.find((expose) => expose.features.find((e) => e.name === 'tilt'));
const motorState = definitionExposes?.find((e) => e.type === 'enum' && e.name === 'motor_state' &&
e.access === ACCESS_STATE);
const state = exposes.find((expose) => expose.features.find((e) => e.name === 'state'))
?.features.find((f) => f.name === 'state');
const position = exposes.find((expose) => expose.features.find((e) => e.name === 'position'))
?.features.find((f) => f.name === 'position');
const tilt = exposes.find((expose) => expose.features.find((e) => e.name === 'tilt'))
?.features.find((f) => f.name === 'tilt');
const motorState = allExposes?.find((e) => e.type === 'enum' &&
['motor_state', 'moving'].includes(e.name) && e.access === ACCESS_STATE);
const running = allExposes?.find((e) => e.type === 'binary' && e.name === 'running');
const discoveryEntry: DiscoveryEntry = {
type: 'cover',
mockProperties: [],
mockProperties: [{property: state.property, value: null}],
object_id: endpoint ? `cover_${endpoint}` : 'cover',
discovery_payload: {
name: endpoint ? utils.capitalize(endpoint) : null,
command_topic_prefix: endpoint,
command_topic: true,
state_topic: true,
state_topic_postfix: endpoint,
},
};
// For covers only supporting tilt don't discover the command/state_topic, otherwise
// HA does not correctly reflect the state
// - https://github.com/home-assistant/core/issues/51793
// - https://github.com/Koenkk/zigbee-herdsman-converters/pull/2663
if (!tilt || (tilt && position)) {
discoveryEntry.discovery_payload.command_topic = true;
discoveryEntry.discovery_payload.state_topic = !position;
discoveryEntry.discovery_payload.command_topic_prefix = endpoint;
// If curtains have `running` property, use this in discovery.
// The movement direction is calculated (assumed) in this case.
if (running) {
discoveryEntry.discovery_payload.value_template = `{% if "${running.property}" in value_json ` +
`and value_json.${running.property} %} {% if value_json.${position.property} > 0 %} closing ` +
`{% else %} opening {% endif %} {% else %} stopped {% endif %}`;
}
// For curtains that have `motor_state` lookup a possible state names and make this
// available for discovery. If the curtains only support the `running` value,
// then we use it anyway. The movement direction is calculated (assumed) in this case.
if (motorState) {
const openingLookup = ['opening', 'open', 'forward', 'up', 'rising'];
const closingLookup = ['closing', 'close', 'backward', 'back', 'reverse', 'down', 'declining'];
const stoppedLookup = ['stopped', 'stop', 'pause', 'paused'];
// If curtains have `motor_state` or `moving` property, lookup for possible
// state names to detect movement direction and use this in discovery.
if (motorState) {
const openingLookup = ['opening', 'open', 'forward', 'up', 'rising'];
const closingLookup = ['closing', 'close', 'backward', 'back', 'reverse', 'down', 'declining'];
const stoppedLookup = ['stopped', 'stop', 'pause', 'paused'];
const openingState = motorState.values.find((s) => openingLookup.includes(s.toLowerCase()));
const closingState = motorState.values.find((s) => closingLookup.includes(s.toLowerCase()));
const stoppedState = motorState.values.find((s) => stoppedLookup.includes(s.toLowerCase()));
const openingState = motorState.values.find((s) => openingLookup.includes(s.toLowerCase()));
const closingState = motorState.values.find((s) => closingLookup.includes(s.toLowerCase()));
const stoppedState = motorState.values.find((s) => stoppedLookup.includes(s.toLowerCase()));
if (openingState && closingState && stoppedState) {
discoveryEntry.discovery_payload.state_topic = true;
discoveryEntry.discovery_payload.state_opening = openingState;
discoveryEntry.discovery_payload.state_closing = closingState;
discoveryEntry.discovery_payload.state_stopped = stoppedState;
discoveryEntry.discovery_payload.value_template = `{% if not value_json.motor_state %} ` +
`${stoppedState} {% else %} {{ value_json.motor_state }} {% endif %}`;
}
} else {
const running = definitionExposes?.find((e) => e.type === 'binary' && e.name === 'running');
if (running) {
discoveryEntry.discovery_payload.state_topic = true;
discoveryEntry.discovery_payload.value_template = `{% if not value_json.running %} ` +
`stopped {% else %} {% if value_json.position > 0 %} closing {% else %} ` +
`opening {% endif %} {% endif %}`;
}
if (openingState && closingState && stoppedState) {
discoveryEntry.discovery_payload.state_opening = openingState;
discoveryEntry.discovery_payload.state_closing = closingState;
discoveryEntry.discovery_payload.state_stopped = stoppedState;
discoveryEntry.discovery_payload.value_template = `{% if "${motorState.property}" in value_json ` +
`and value_json.${motorState.property} %} {{ value_json.${motorState.property} }} {% else %} ` +
`${stoppedState} {% endif %}`;
}
}
// If curtains do not have `running`, `motor_state` or `moving` properties.
if (!discoveryEntry.discovery_payload.value_template) {
discoveryEntry.discovery_payload.value_template =
`{{ value_json.${featurePropertyWithoutEndpoint(state)} }}`,
discoveryEntry.discovery_payload.state_open = 'OPEN';
discoveryEntry.discovery_payload.state_closed = 'CLOSE';
discoveryEntry.discovery_payload.state_stopped = 'STOP';
}
if (!position && !tilt) {
discoveryEntry.discovery_payload.optimistic = true;
}
if (position) {
const p = position.features.find((f) => f.name === 'position');
discoveryEntry.discovery_payload = {...discoveryEntry.discovery_payload,
position_template: `{{ value_json.${getProperty(p)} }}`,
set_position_template: `{ "${getProperty(p)}": {{ position }} }`,
position_template: `{{ value_json.${featurePropertyWithoutEndpoint(position)} }}`,
set_position_template: `{ "${getProperty(position)}": {{ position }} }`,
set_position_topic: true,
position_topic: true,
};
}
if (tilt) {
const t = tilt.features.find((f) => f.name === 'tilt');
discoveryEntry.discovery_payload = {...discoveryEntry.discovery_payload,
tilt_command_topic: true,
tilt_status_topic: true,
tilt_status_template: `{{ value_json.${getProperty(t)} }}`,
tilt_status_template: `{{ value_json.${featurePropertyWithoutEndpoint(tilt)} }}`,
};
}
@@ -457,6 +488,7 @@ export default class HomeAssistant extends Extension {
object_id: 'fan',
mockProperties: [{property: 'fan_state', value: null}],
discovery_payload: {
name: null,
state_topic: true,
state_value_template: '{{ value_json.fan_state }}',
command_topic: true,
@@ -520,7 +552,7 @@ export default class HomeAssistant extends Extension {
battery_low: {entity_category: 'diagnostic', device_class: 'battery'},
button_lock: {entity_category: 'config', icon: 'mdi:lock'},
calibration: {entity_category: 'config', icon: 'mdi:progress-wrench'},
carbon_monoxide: {device_class: 'safety'},
carbon_monoxide: {device_class: 'carbon_monoxide'},
card: {entity_category: 'config', icon: 'mdi:clipboard-check'},
child_lock: {entity_category: 'config', icon: 'mdi:account-lock'},
color_sync: {entity_category: 'config', icon: 'mdi:sync-circle'},
@@ -529,10 +561,13 @@ export default class HomeAssistant extends Extension {
garage_door_contact: {device_class: 'garage_door', payload_on: false, payload_off: true},
eco_mode: {entity_category: 'config', icon: 'mdi:leaf'},
expose_pin: {entity_category: 'config', icon: 'mdi:pin'},
flip_indicator_light: {entity_category: 'config', icon: 'mdi:arrow-left-right'},
gas: {device_class: 'gas'},
indicator_mode: {entity_category: 'config', icon: 'mdi:led-on'},
invert_cover: {entity_category: 'config', icon: 'mdi:arrow-left-right'},
led_disabled_night: {entity_category: 'config', icon: 'mdi:led-off'},
led_indication: {entity_category: 'config', icon: 'mdi:led-on'},
led_enable: {entity_category: 'config', icon: 'mdi:led-on'},
legacy: {entity_category: 'config', icon: 'mdi:cog'},
motor_reversal: {entity_category: 'config', icon: 'mdi:arrow-left-right'},
moving: {device_class: 'moving'},
@@ -545,8 +580,10 @@ export default class HomeAssistant extends Extension {
tamper: {device_class: 'tamper'},
temperature_scale: {entity_category: 'config', icon: 'mdi:temperature-celsius'},
test: {entity_category: 'diagnostic', icon: 'mdi:test-tube'},
valve_state: {device_class: 'opening'},
vibration: {device_class: 'vibration'},
water_leak: {device_class: 'moisture'},
window: {device_class: 'window'},
};
/**
@@ -563,6 +600,7 @@ export default class HomeAssistant extends Extension {
`switch_${firstExpose.name}_${endpoint}` :
`switch_${firstExpose.name}`,
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: typeof firstExpose.value_on === 'boolean' ?
`{% if value_json.${firstExpose.property} %} true {% else %} false {% endif %}` :
`{{ value_json.${firstExpose.property} }}`,
@@ -574,6 +612,10 @@ export default class HomeAssistant extends Extension {
...(lookup[firstExpose.name] || {}),
},
};
// Let Home Assistant generate entity name when device_class is present
if (discoveryEntry.discovery_payload.device_class) delete discoveryEntry.discovery_payload.name;
discoveryEntries.push(discoveryEntry);
} else {
const discoveryEntry: DiscoveryEntry = {
@@ -581,22 +623,29 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `${firstExpose.name}_${endpoint}` : `${firstExpose.name}`,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: `{{ value_json.${firstExpose.property} }}`,
payload_on: firstExpose.value_on,
payload_off: firstExpose.value_off,
...(lookup[firstExpose.name] || {}),
},
};
// Let Home Assistant generate entity name when device_class is present
if (discoveryEntry.discovery_payload.device_class) delete discoveryEntry.discovery_payload.name;
discoveryEntries.push(discoveryEntry);
}
} else if (firstExpose.type === 'numeric') {
const lookup: {[s: string]: KeyValue} = {
ac_frequency: {device_class: 'frequency', enabled_by_default: false, entity_category: 'diagnostic',
state_class: 'measurement'},
alarm_humidity_max: {device_class: 'humidity', icon: 'mdi:water-plus'},
alarm_humidity_min: {device_class: 'humidity', icon: 'mdi:water-minus'},
alarm_temperature_max: {device_class: 'temperature', icon: 'mdi:thermometer-high'},
alarm_temperature_min: {device_class: 'temperature', icon: 'mdi:thermometer-low'},
alarm_humidity_max: {device_class: 'humidity', entity_category: 'config', icon: 'mdi:water-plus'},
alarm_humidity_min: {device_class: 'humidity', entity_category: 'config', icon: 'mdi:water-minus'},
alarm_temperature_max: {device_class: 'temperature', entity_category: 'config',
icon: 'mdi:thermometer-high'},
alarm_temperature_min: {device_class: 'temperature', entity_category: 'config',
icon: 'mdi:thermometer-low'},
angle: {icon: 'angle-acute'},
angle_axis: {icon: 'angle-acute'},
aqi: {device_class: 'aqi', state_class: 'measurement'},
@@ -605,7 +654,10 @@ export default class HomeAssistant extends Extension {
away_preset_temperature: {entity_category: 'config', icon: 'mdi:thermometer'},
battery: {device_class: 'battery', entity_category: 'diagnostic', state_class: 'measurement'},
battery2: {device_class: 'battery', entity_category: 'diagnostic', state_class: 'measurement'},
battery_voltage: {device_class: 'voltage', entity_category: 'diagnostic', state_class: 'measurement'},
battery_voltage: {device_class: 'voltage', entity_category: 'diagnostic', state_class: 'measurement',
enabled_by_default: true},
boost_heating_countdown: {device_class: 'duration'},
boost_heating_countdown_time_set: {entity_category: 'config', icon: 'mdi:timer'},
boost_time: {entity_category: 'config', icon: 'mdi:timer'},
calibration: {entity_category: 'config', icon: 'mdi:wrench-clock'},
calibration_time: {entity_category: 'config', icon: 'mdi:wrench-clock'},
@@ -658,9 +710,10 @@ export default class HomeAssistant extends Extension {
state_class: 'measurement',
},
local_temperature: {device_class: 'temperature', state_class: 'measurement'},
max_temperature: {entity_category: 'config', icon: 'mdi:thermometer'},
max_temperature_limit: {entity_category: 'config', icon: 'mdi:thermometer'},
min_temperature: {entity_category: 'config', icon: 'mdi:thermometer'},
max_temperature: {entity_category: 'config', icon: 'mdi:thermometer-high'},
max_temperature_limit: {entity_category: 'config', icon: 'mdi:thermometer-high'},
min_temperature_limit: {entity_category: 'config', icon: 'mdi:thermometer-low'},
min_temperature: {entity_category: 'config', icon: 'mdi:thermometer-low'},
measurement_poll_interval: {entity_category: 'config', icon: 'mdi:clock-out'},
occupancy_timeout: {entity_category: 'config', icon: 'mdi:timer'},
pm10: {device_class: 'pm10', state_class: 'measurement'},
@@ -671,7 +724,7 @@ export default class HomeAssistant extends Extension {
power_factor: {device_class: 'power_factor', enabled_by_default: false,
entity_category: 'diagnostic', state_class: 'measurement'},
precision: {entity_category: 'config', icon: 'mdi:decimal-comma-increase'},
pressure: {device_class: 'pressure', state_class: 'measurement'},
pressure: {device_class: 'atmospheric_pressure', state_class: 'measurement'},
presence_timeout: {entity_category: 'config', icon: 'mdi:timer'},
reporting_time: {entity_category: 'config', icon: 'mdi:clock-time-one-outline'},
requested_brightness_level: {
@@ -681,13 +734,14 @@ export default class HomeAssistant extends Extension {
enabled_by_default: false, entity_category: 'diagnostic', icon: 'mdi:brightness-5',
},
smoke_density: {icon: 'mdi:google-circles-communities', state_class: 'measurement'},
soil_moisture: {icon: 'mdi:water-percent', state_class: 'measurement'},
soil_moisture: {device_class: 'moisture', state_class: 'measurement'},
temperature: {device_class: 'temperature', state_class: 'measurement'},
temperature_calibration: {entity_category: 'config', icon: 'mdi:wrench-clock'},
temperature_max: {entity_category: 'config', icon: 'mdi:thermometer-plus'},
temperature_min: {entity_category: 'config', icon: 'mdi:thermometer-minus'},
transition: {entity_category: 'config', icon: 'mdi:transition'},
voc: {device_class: 'volatile_organic_compounds', state_class: 'measurement'},
voc_index: {state_class: 'measurement'},
vibration_timeout: {entity_category: 'config', icon: 'mdi:timer'},
voltage: {
device_class: 'voltage',
@@ -707,6 +761,10 @@ export default class HomeAssistant extends Extension {
entity_category: 'diagnostic',
state_class: 'measurement',
},
water_consumed: {
device_class: 'water',
state_class: 'total_increasing',
},
x_axis: {icon: 'mdi:axis-x-arrow'},
y_axis: {icon: 'mdi:axis-y-arrow'},
z_axis: {icon: 'mdi:axis-z-arrow'},
@@ -726,6 +784,7 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `${firstExpose.name}_${endpoint}` : `${firstExpose.name}`,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: `{{ value_json.${firstExpose.property} }}`,
enabled_by_default: !allowsSet,
...(firstExpose.unit && {unit_of_measurement: firstExpose.unit}),
@@ -733,6 +792,23 @@ export default class HomeAssistant extends Extension {
...extraAttrs,
},
};
// When a device_class is set, unit_of_measurement must be set, otherwise warnings are generated.
// https://github.com/Koenkk/zigbee2mqtt/issues/15958#issuecomment-1377483202
if (discoveryEntry.discovery_payload.device_class &&
!discoveryEntry.discovery_payload.unit_of_measurement) {
delete discoveryEntry.discovery_payload.device_class;
}
// Home Assistant only supports µg/m³, not other units like ppb.
// https://github.com/Koenkk/zigbee2mqtt/issues/16057
if (firstExpose.name === 'voc' && discoveryEntry.discovery_payload.unit_of_measurement !== 'µg/m³') {
delete discoveryEntry.discovery_payload.device_class;
}
// Let Home Assistant generate entity name when device_class is present
if (discoveryEntry.discovery_payload.device_class) delete discoveryEntry.discovery_payload.name;
discoveryEntries.push(discoveryEntry);
/**
@@ -746,11 +822,13 @@ export default class HomeAssistant extends Extension {
object_id: endpoint ? `${firstExpose.name}_${endpoint}` : `${firstExpose.name}`,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: `{{ value_json.${firstExpose.property} }}`,
command_topic: true,
command_topic_prefix: endpoint,
command_topic_postfix: firstExpose.property,
...(firstExpose.unit && {unit_of_measurement: firstExpose.unit}),
...(firstExpose.value_step && {step: firstExpose.value_step}),
...lookup[firstExpose.name],
},
};
@@ -761,6 +839,9 @@ export default class HomeAssistant extends Extension {
delete discoveryEntry.discovery_payload.device_class;
}
// Let Home Assistant generate entity name when device_class is present
if (discoveryEntry.discovery_payload.device_class) delete discoveryEntry.discovery_payload.name;
if (firstExpose.value_min != null) discoveryEntry.discovery_payload.min = firstExpose.value_min;
if (firstExpose.value_max != null) discoveryEntry.discovery_payload.max = firstExpose.value_max;
@@ -769,20 +850,20 @@ export default class HomeAssistant extends Extension {
} else if (firstExpose.type === 'enum') {
const lookup: {[s: string]: KeyValue} = {
action: {icon: 'mdi:gesture-double-tap'},
alarm_humidity: {icon: 'mdi:water-percent-alert'},
alarm_temperature: {icon: 'mdi:thermometer-alert'},
alarm_humidity: {entity_category: 'config', icon: 'mdi:water-percent-alert'},
alarm_temperature: {entity_category: 'config', icon: 'mdi:thermometer-alert'},
backlight_auto_dim: {entity_category: 'config', icon: 'mdi:brightness-auto'},
backlight_mode: {entity_category: 'config', icon: 'mdi:lightbulb'},
color_power_on_behavior: {entity_category: 'config', icon: 'mdi:palette'},
control_mode: {entity_category: 'config', icon: 'mdi:tune'},
device_mode: {entity_category: 'config', icon: 'mdi:tune'},
effect: {enabled_by_default: false, icon: 'mdi:palette'},
force: {enabled_by_default: false, icon: 'mdi:valve'},
force: {entity_category: 'config', icon: 'mdi:valve'},
keep_time: {entity_category: 'config', icon: 'mdi:av-timer'},
keypad_lockout: {entity_category: 'config', icon: 'mdi:lock'},
load_detection_mode: {entity_category: 'config', icon: 'mdi:tune'},
load_dimmable: {entity_category: 'diagnostic', icon: 'mdi:chart-bell-curve'},
load_type: {entity_category: 'diagnostic', icon: 'mdi:led-on'},
load_dimmable: {entity_category: 'config', icon: 'mdi:chart-bell-curve'},
load_type: {entity_category: 'config', icon: 'mdi:led-on'},
melody: {entity_category: 'config', icon: 'mdi:music-note'},
mode_phase_control: {entity_category: 'config', icon: 'mdi:tune'},
mode: {entity_category: 'config', icon: 'mdi:tune'},
@@ -790,80 +871,118 @@ export default class HomeAssistant extends Extension {
operation_mode: {entity_category: 'config', icon: 'mdi:tune'},
power_on_behavior: {entity_category: 'config', icon: 'mdi:power-settings'},
power_outage_memory: {entity_category: 'config', icon: 'mdi:power-settings'},
power_supply_mode: {entity_category: 'diagnostic', icon: 'mdi:power-settings'},
power_type: {entity_category: 'diagnostic', icon: 'mdi:lightning-bolt-circle'},
power_supply_mode: {entity_category: 'config', icon: 'mdi:power-settings'},
power_type: {entity_category: 'config', icon: 'mdi:lightning-bolt-circle'},
sensitivity: {entity_category: 'config', icon: 'mdi:tune'},
sensors_type: {entity_category: 'config', icon: 'mdi:tune'},
sound_volume: {entity_category: 'config', icon: 'mdi:volume-high'},
status: {icon: 'mdi:state-machine'},
switch_type: {entity_category: 'config', icon: 'mdi:tune'},
temperature_display_mode: {entity_category: 'config', icon: 'mdi:thermometer'},
temperature_sensor_select: {entity_category: 'config', icon: 'mdi:home-thermometer'},
thermostat_unit: {entity_category: 'config', icon: 'mdi:thermometer'},
volume: {entity_category: 'config', icon: 'mdi: volume-high'},
week: {entity_category: 'config', icon: 'mdi:calendar-clock'},
};
const valueTemplate = firstExpose.access & ACCESS_STATE ?
`{{ value_json.${firstExpose.property} }}` : undefined;
if (firstExpose.access & ACCESS_STATE) {
discoveryEntries.push({
type: 'sensor',
object_id: firstExpose.property,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
value_template: `{{ value_json.${firstExpose.property} }}`,
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: valueTemplate,
enabled_by_default: !(firstExpose.access & ACCESS_SET),
...lookup[firstExpose.name],
},
});
/**
* If enum attribute has SET access then expose as SELECT entity too.
* Note: currently both sensor and select are discovered, this is to avoid
* breaking changes for sensors already existing in HA (legacy).
*/
if ((firstExpose.access & ACCESS_SET)) {
discoveryEntries.push({
type: 'select',
object_id: firstExpose.property,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
value_template: `{{ value_json.${firstExpose.property} }}`,
state_topic: true,
command_topic_prefix: endpoint,
command_topic: true,
command_topic_postfix: firstExpose.property,
options: firstExpose.values.map((v) => v.toString()),
...lookup[firstExpose.name],
},
});
}
}
} else if (firstExpose.type === 'text' || firstExpose.type === 'composite') {
if (firstExpose.access & ACCESS_STATE) {
const lookup: {[s: string]: KeyValue} = {
action: {icon: 'mdi:gesture-double-tap'},
};
/**
* If enum attribute has SET access then expose as SELECT entity too.
* Note: currently both sensor and select are discovered, this is to avoid
* breaking changes for sensors already existing in HA (legacy).
*/
if (firstExpose.access & ACCESS_SET) {
discoveryEntries.push({
type: 'select',
object_id: firstExpose.property,
mockProperties: [], // Already mocked above in case access STATE is supported
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: valueTemplate,
state_topic: !!(firstExpose.access & ACCESS_STATE),
command_topic_prefix: endpoint,
command_topic: true,
command_topic_postfix: firstExpose.property,
options: firstExpose.values.map((v) => v.toString()),
...lookup[firstExpose.name],
},
});
}
} else if (firstExpose.type === 'text' || firstExpose.type === 'composite' || firstExpose.type === 'list') {
// Deprecated: remove text sensor
const settableText = firstExpose.type === 'text' && firstExpose.access & ACCESS_SET;
const lookup: {[s: string]: KeyValue} = {
action: {icon: 'mdi:gesture-double-tap'},
programming_mode: {icon: 'mdi:calendar-clock'},
program: {value_template: `{{ value_json.${firstExpose.property}|default('',true) ` +
`| truncate(254, True, '', 0) }}`},
};
if (firstExpose.access & ACCESS_STATE) {
const discoveryEntry: DiscoveryEntry = {
type: 'sensor',
object_id: firstExpose.property,
mockProperties: [{property: firstExpose.property, value: null}],
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
value_template: `{{ value_json.${firstExpose.property} }}`,
enabled_by_default: !settableText,
...lookup[firstExpose.name],
},
};
discoveryEntries.push(discoveryEntry);
}
if (settableText) {
discoveryEntries.push({
type: 'text',
object_id: firstExpose.property,
mockProperties: [], // Already mocked above in case access STATE is supported
discovery_payload: {
name: endpoint ? `${firstExpose.label} ${endpoint}` : firstExpose.label,
state_topic: firstExpose.access & ACCESS_STATE,
value_template: `{{ value_json.${firstExpose.property} }}`,
command_topic_prefix: endpoint,
command_topic: true,
command_topic_postfix: firstExpose.property,
...lookup[firstExpose.name],
},
});
}
} else {
throw new Error(`Unsupported exposes type: '${firstExpose.type}'`);
}
discoveryEntries.forEach((d) => {
// If a sensor has entity category `config`, then change
// it to `diagnostic`. Sensors have no input, so can't be configured.
// https://github.com/Koenkk/zigbee2mqtt/pull/19474
if (['binary_sensor', 'sensor'].includes(d.type) && d.discovery_payload.entity_category === 'config') {
d.discovery_payload.entity_category = 'diagnostic';
}
});
return discoveryEntries;
}
@bind onDeviceRemoved(data: eventdata.DeviceRemoved): void {
logger.debug(`Clearing Home Assistant discovery topic for '${data.name}'`);
this.discovered[data.ieeeAddr]?.topics.forEach((topic) => {
this.mqtt.publish(topic, null, {retain: true, qos: 0}, this.discoveryTopic, false, false);
this.mqtt.publish(topic, null, {retain: true, qos: 1}, this.discoveryTopic, false, false);
});
delete this.discovered[data.ieeeAddr];
@@ -885,7 +1004,11 @@ export default class HomeAssistant extends Extension {
const entity = this.zigbee.resolveEntity(data.entity.name);
if (entity.isDevice() && this.discovered[entity.ieeeAddr]) {
for (const objectID of this.discovered[entity.ieeeAddr].objectIDs) {
const match = /light_(.*)/.exec(objectID);
const lightMatch = /^light_(.*)/.exec(objectID);
const coverMatch = /^cover_(.*)/.exec(objectID);
const match = lightMatch || coverMatch;
if (match) {
const endpoint = match[1];
const endpointRegExp = new RegExp(`(.*)_${endpoint}`);
@@ -920,7 +1043,7 @@ export default class HomeAssistant extends Extension {
* Implements the MQTT device trigger (https://www.home-assistant.io/integrations/device_trigger.mqtt/)
* The MQTT device trigger does not support JSON parsing, so it cannot listen to zigbee2mqtt/my_device
* Whenever a device publish an {action: *} we discover an MQTT device trigger sensor
* and republish it to zigbee2mqtt/my_devic/action
* and republish it to zigbee2mqtt/my_device/action
*/
if (entity.isDevice() && entity.definition) {
const keys = ['action', 'click'].filter((k) => data.message[k]);
@@ -940,7 +1063,7 @@ export default class HomeAssistant extends Extension {
if (data.homeAssisantRename) {
for (const config of this.getConfigs(data.entity)) {
const topic = this.getDiscoveryTopic(config, data.entity);
this.mqtt.publish(topic, null, {retain: true, qos: 0}, this.discoveryTopic, false, false);
this.mqtt.publish(topic, null, {retain: true, qos: 1}, this.discoveryTopic, false, false);
}
// Make sure Home Assistant deletes the old entity first otherwise another one (_2) is created
@@ -968,7 +1091,7 @@ export default class HomeAssistant extends Extension {
if (isDevice) {
const exposes = entity.exposes(); // avoid calling it hundred of times/s
for (const expose of exposes) {
configs.push(...this.exposeToConfig([expose], 'device', entity.definition, exposes));
configs.push(...this.exposeToConfig([expose], 'device', exposes, entity.definition));
}
for (const mapping of legacyMapping) {
@@ -985,13 +1108,16 @@ export default class HomeAssistant extends Extension {
}
} else { // group
const exposesByType: {[s: string]: zhc.DefinitionExpose[]} = {};
const allExposes: zhc.DefinitionExpose[] = [];
entity.zh.members.map((e) => this.zigbee.resolveEntity(e.getDevice()) as Device)
.filter((d) => d.definition).forEach((device) => {
for (const expose of device.exposes().filter((e) => groupSupportedTypes.includes(e.type))) {
const exposes = device.exposes();
allExposes.push(...exposes);
for (const expose of exposes.filter((e) => groupSupportedTypes.includes(e.type))) {
let key = expose.type;
if (['switch', 'lock', 'cover'].includes(expose.type) && expose.endpoint) {
// A device can have multiple of these types which have to discovered seperately.
// A device can have multiple of these types which have to discovered separately.
// e.g. switch with property state and valve_detection.
const state = expose.features.find((f) => f.name === 'state');
key += featurePropertyWithoutEndpoint(state);
@@ -1003,7 +1129,7 @@ export default class HomeAssistant extends Extension {
});
configs = [].concat(...Object.values(exposesByType)
.map((exposes) => this.exposeToConfig(exposes, 'group')));
.map((exposes) => this.exposeToConfig(exposes, 'group', allExposes)));
}
if (isDevice && settings.get().advanced.last_seen !== 'disable') {
@@ -1012,6 +1138,7 @@ export default class HomeAssistant extends Extension {
object_id: 'last_seen',
mockProperties: [{property: 'last_seen', value: null}],
discovery_payload: {
name: 'Last seen',
value_template: '{{ value_json.last_seen }}',
icon: 'mdi:clock',
enabled_by_default: false,
@@ -1031,8 +1158,9 @@ export default class HomeAssistant extends Extension {
const updateStateSensor: DiscoveryEntry = {
type: 'sensor',
object_id: 'update_state',
mockProperties: [{property: 'update', value: {state: null}}],
mockProperties: [], // update is mocked below with updateSensor
discovery_payload: {
name: 'Update state',
icon: 'mdi:update',
value_template: `{{ value_json['update']['state'] }}`,
enabled_by_default: false,
@@ -1046,17 +1174,60 @@ export default class HomeAssistant extends Extension {
object_id: 'update_available',
mockProperties: [{property: 'update_available', value: null}],
discovery_payload: {
name: null,
payload_on: true,
payload_off: false,
value_template: `{{ value_json['update']['state'] == "available" }}`,
enabled_by_default: true,
enabled_by_default: false,
device_class: 'update',
entity_category: 'diagnostic',
},
};
configs.push(updateAvailableSensor);
const updateSensor: DiscoveryEntry = {
type: 'update',
object_id: 'update',
mockProperties: [{property: 'update', value: {state: null}}],
discovery_payload: {
name: null,
entity_picture: 'https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png',
latest_version_topic: true,
state_topic: true,
device_class: 'firmware',
entity_category: 'config',
command_topic: `${settings.get().mqtt.base_topic}/bridge/request/device/ota_update/update`,
payload_install: `{"id": "${entity.ieeeAddr}"}`,
value_template: `{{ value_json['update']['installed_version'] }}`,
latest_version_template: `{{ value_json['update']['latest_version'] }}`,
json_attributes_topic: `${settings.get().mqtt.base_topic}/${entity.name}`, // state topic
json_attributes_template:
`{"in_progress": {{ iif(value_json['update']['state'] == 'updating', 'true', 'false') }} }`,
},
};
configs.push(updateSensor);
}
// Discover scenes.
const endpointsOrGroups = isDevice ? entity.zh.endpoints : [entity.zh];
endpointsOrGroups.forEach((endpointOrGroup) => {
utils.getScenes(endpointOrGroup).forEach((scene) => {
const sceneEntry: DiscoveryEntry = {
type: 'scene',
object_id: `scene_${scene.id}`,
mockProperties: [],
discovery_payload: {
name: `${scene.name}`,
state_topic: false,
command_topic: true,
payload_on: `{ "scene_recall": ${scene.id} }`,
object_id_postfix: `_${scene.name.replace(/\s+/g, '_').toLowerCase()}`,
},
};
configs.push(sceneEntry);
});
});
if (isDevice && entity.options.hasOwnProperty('legacy') && !entity.options.legacy) {
configs = configs.filter((c) => c !== sensorClick);
}
@@ -1132,20 +1303,25 @@ export default class HomeAssistant extends Extension {
const devicePayload = this.getDevicePayload(entity);
// Set (unique) name, separate by space if device name contains space.
const nameSeparator = devicePayload.name.includes('_') ? '_' : ' ';
payload.name = devicePayload.name;
// Suggest object_id (entity_id) for entity
payload.object_id = devicePayload.name.replace(/\s+/g, '_').toLowerCase();
if (config.object_id.startsWith(config.type) && config.object_id.includes('_')) {
payload.name += `${nameSeparator}${config.object_id.split(/_(.+)/)[1]}`;
payload.object_id += `_${config.object_id.split(/_(.+)/)[1]}`;
} else if (!config.object_id.startsWith(config.type)) {
payload.name += `${nameSeparator}${config.object_id.replace(/_/g, nameSeparator)}`;
payload.object_id += `_${config.object_id}`;
}
// Allow customization of the `payload.object_id` without touching the other uses of `config.object_id`
// (e.g. for setting the `payload.unique_id` and as an internal key).
payload.object_id = `${payload.object_id}${payload.object_id_postfix ?? ''}`;
delete payload.object_id_postfix;
// Set unique_id
payload.unique_id = `${entity.options.ID}_${config.object_id}_${settings.get().mqtt.base_topic}`;
// Attributes for device registry
// Attributes for device registry and origin
payload.device = devicePayload;
payload.origin = this.discoveryOrigin;
// Availability payload
payload.availability = [{topic: `${settings.get().mqtt.base_topic}/bridge/state`}];
@@ -1156,7 +1332,10 @@ export default class HomeAssistant extends Extension {
payload.availability.push({topic: `${baseTopic}/availability`});
}
if (!settings.get().advanced.legacy_availability_payload) {
if (entity.isDevice() && entity.options.disabled) {
// Mark disabled device always as unavailable
payload.availability.forEach((a: KeyValue) => a.value_template = '{{ "offline" }}');
} else if (!settings.get().advanced.legacy_availability_payload) {
payload.availability.forEach((a: KeyValue) => a.value_template = '{{ value_json.state }}');
}
@@ -1166,7 +1345,7 @@ export default class HomeAssistant extends Extension {
delete payload.command_topic_postfix;
const commandTopic = `${baseTopic}/${commandTopicPrefix}set${commandTopicPostfix}`;
if (payload.command_topic) {
if (payload.command_topic && typeof payload.command_topic !== 'string') {
payload.command_topic = commandTopic;
}
@@ -1221,10 +1400,22 @@ export default class HomeAssistant extends Extension {
payload.fan_mode_state_topic = stateTopic;
}
if (payload.latest_version_topic) {
payload.latest_version_topic = stateTopic;
}
if (payload.fan_mode_command_topic) {
payload.fan_mode_command_topic = `${baseTopic}/${commandTopicPrefix}set/fan_mode`;
}
if (payload.swing_mode_state_topic) {
payload.swing_mode_state_topic = stateTopic;
}
if (payload.swing_mode_command_topic) {
payload.swing_mode_command_topic = `${baseTopic}/${commandTopicPrefix}set/swing_mode`;
}
if (payload.percentage_state_topic) {
payload.percentage_state_topic = stateTopic;
}
@@ -1275,7 +1466,7 @@ export default class HomeAssistant extends Extension {
}
const topic = this.getDiscoveryTopic(config, entity);
this.mqtt.publish(topic, stringify(payload), {retain: true, qos: 0}, this.discoveryTopic, false, false);
this.mqtt.publish(topic, stringify(payload), {retain: true, qos: 1}, this.discoveryTopic, false, false);
this.discovered[discoverKey].topics.add(topic);
this.discovered[discoverKey].objectIDs.add(config.object_id);
config.mockProperties?.forEach((mockProperty) =>
@@ -1335,7 +1526,7 @@ export default class HomeAssistant extends Extension {
if (clear) {
logger.debug(`Clearing Home Assistant config '${data.topic}'`);
const topic = data.topic.substring(this.discoveryTopic.length + 1);
this.mqtt.publish(topic, null, {retain: true, qos: 0}, this.discoveryTopic, false, false);
this.mqtt.publish(topic, null, {retain: true, qos: 1}, this.discoveryTopic, false, false);
}
} else if ((data.topic === this.statusTopic || data.topic === defaultStatusTopic) &&
data.message.toLowerCase() === 'online') {
@@ -1356,11 +1547,26 @@ export default class HomeAssistant extends Extension {
this.discover(data.device);
}
@bind onScenesChanged(): void {
// Re-trigger MQTT discovery of all devices and groups, similar to bridge.ts
for (const entity of [...this.zigbee.devices(), ...this.zigbee.groups()]) {
// First, clear existing scene discovery topics
logger.debug(`Clearing Home Assistant scene discovery topics for '${entity.name}'`);
this.discovered[this.getDiscoverKey(entity)]?.topics.forEach((topic) => {
if (topic.startsWith('scene')) {
this.mqtt.publish(topic, null, {retain: true, qos: 1}, this.discoveryTopic, false, false);
}
});
this.discover(entity, true);
}
}
private getDevicePayload(entity: Device | Group): KeyValue {
const identifierPostfix = entity.isGroup() ?
`zigbee2mqtt_${this.getEncodedBaseTopic()}` : 'zigbee2mqtt';
// Allow device name to be overriden by homeassistant config
// Allow device name to be overridden by homeassistant config
let deviceName = entity.name;
if (typeof entity.options.homeassistant?.name === 'string') {
deviceName = entity.options.homeassistant.name;
@@ -1376,6 +1582,9 @@ export default class HomeAssistant extends Extension {
payload.model = `${entity.definition.description} (${entity.definition.model})`;
payload.manufacturer = entity.definition.vendor;
payload.sw_version = entity.zh.softwareBuildID;
} else {
payload.model = 'Group';
payload.manufacturer = 'Zigbee2MQTT';
}
if (settings.get().frontend?.url) {
@@ -1395,7 +1604,7 @@ export default class HomeAssistant extends Extension {
}
});
// Copy hue -> h, saturation -> s to make homeassitant happy
// Copy hue -> h, saturation -> s to make homeassistant happy
if (message.hasOwnProperty('color')) {
if (message.color.hasOwnProperty('hue')) {
message.color.h = message.color.hue;
@@ -1404,6 +1613,10 @@ export default class HomeAssistant extends Extension {
message.color.s = message.color.saturation;
}
}
if (entity.isDevice() && entity.definition?.ota && message.update?.latest_version == null) {
message.update = {...message.update, installed_version: -1, latest_version: -1};
}
}
private getEncodedBaseTopic(): string {
@@ -1449,9 +1662,10 @@ export default class HomeAssistant extends Extension {
payload: value,
topic: `${settings.get().mqtt.base_topic}/${device.name}/${key}`,
device: this.getDevicePayload(device),
origin: this.discoveryOrigin,
};
await this.mqtt.publish(topic, stringify(payload), {retain: true, qos: 0}, this.discoveryTopic, false, false);
await this.mqtt.publish(topic, stringify(payload), {retain: true, qos: 1}, this.discoveryTopic, false, false);
this.discoveredTriggers[device.ieeeAddr].add(discoveredKey);
}
+1 -1
View File
@@ -90,7 +90,7 @@ export default class BridgeLegacy extends Extension {
@bind async reset(): Promise<void> {
try {
await this.zigbee.reset('soft');
logger.info('Soft resetted ZNP');
logger.info('Soft reset ZNP');
} catch (error) {
logger.error('Soft reset failed');
}
+2 -2
View File
@@ -9,7 +9,7 @@ import Extension from '../extension';
* This extensions soft resets the ZNP after a certain timeout.
*/
export default class SoftReset extends Extension {
private timer: NodeJS.Timer = null;
private timer: NodeJS.Timeout = null;
private timeout = utils.seconds(settings.get().advanced.soft_reset_timeout);
override async start(): Promise<void> {
@@ -43,7 +43,7 @@ export default class SoftReset extends Extension {
try {
await this.zigbee.reset('soft');
logger.warn('Soft resetted ZNP due to timeout');
logger.warn('Soft reset ZNP due to timeout');
} catch (error) {
logger.warn('Soft reset failed, trying stop/start');
+1 -1
View File
@@ -214,7 +214,7 @@ export default class NetworkMap extends Extension {
async networkScan(includeRoutes: boolean): Promise<Topology> {
logger.info(`Starting network scan (includeRoutes '${includeRoutes}')`);
const devices = this.zigbee.devices().filter((d) => d.zh.type !== 'GreenPower');
const devices = this.zigbee.devices().filter((d) => d.zh.type !== 'GreenPower' && !d.options.disabled);
const lqis: Map<Device, zh.LQI> = new Map();
const routingTables: Map<Device, zh.RoutingTable> = new Map();
const failed: Map<Device, string[]> = new Map();
+39 -27
View File
@@ -2,8 +2,8 @@ import * as settings from '../util/settings';
import logger from '../util/logger';
import stringify from 'json-stable-stringify-without-jsonify';
import utils from '../util/utils';
import tradfriOTA from 'zigbee-herdsman-converters/lib/ota/tradfri';
import zigbeeOTA from 'zigbee-herdsman-converters/lib/ota/zigbeeOTA';
import * as tradfriOTA from 'zigbee-herdsman-converters/lib/ota/tradfri';
import * as zigbeeOTA from 'zigbee-herdsman-converters/lib/ota/zigbeeOTA';
import Extension from './extension';
import bind from 'bind-decorator';
import Device from '../model/device';
@@ -24,8 +24,13 @@ function isValidUrl(url: string): boolean {
type UpdateState = 'updating' | 'idle' | 'available';
interface UpdatePayload {
update_available?: boolean
// eslint-disable-next-line camelcase
update: {progress?: number, remaining?: number, state: UpdateState}, update_available?: boolean}
update: {
progress?: number, remaining?: number, state: UpdateState,
installed_version: number | null, latest_version: number | null
}
}
const legacyTopicRegex = new RegExp(`^${settings.get().mqtt.base_topic}/bridge/ota_update/.+$`);
const topicRegex =
@@ -86,18 +91,18 @@ export default class OTAUpdate extends Extension {
if (!check) return;
this.lastChecked[data.device.ieeeAddr] = Date.now();
let available = false;
let availableResult: zhc.OtaUpdateAvailableResult = null;
try {
available = await data.device.definition.ota.isUpdateAvailable(data.device.zh, logger, data.data);
availableResult = await data.device.definition.ota.isUpdateAvailable(data.device.zh, logger, data.data);
} catch (e) {
supportsOTA = false;
logger.debug(`Failed to check if update available for '${data.device.name}' (${e.message})`);
}
const payload = this.getEntityPublishPayload(available ? 'available' : 'idle');
const payload = this.getEntityPublishPayload(data.device, availableResult ?? 'idle');
this.publishEntityState(data.device, payload);
if (available) {
if (availableResult?.available) {
const message = `Update available for '${data.device.name}'`;
logger.info(message);
@@ -112,14 +117,11 @@ export default class OTAUpdate extends Extension {
}
}
// Respond to the OTA request:
// - In case we don't support OTA: respond with NO_IMAGE_AVAILABLE (0x98) (so the client stops requesting OTAs)
// - In case we do support OTA: respond with ABORT (0x95) as we don't want to update now.
const endpoint = data.device.zh.endpoints.find((e) => e.supportsOutputCluster('genOta'));
if (endpoint) {
// Some devices send OTA requests without defining OTA cluster as input cluster.
await endpoint.commandResponse('genOta', 'queryNextImageResponse', {status: supportsOTA ? 0x95 : 0x98});
}
// Respond to the OTA request: respond with NO_IMAGE_AVAILABLE (0x98) (so the client stops requesting OTAs)
const endpoint = data.device.zh.endpoints.find((e) => e.supportsOutputCluster('genOta')) || data.endpoint;
await endpoint.commandResponse('genOta', 'queryNextImageResponse',
{status: 0x98}, undefined, data.meta.zclTransactionSequenceNumber);
logger.debug(`Responded to OTA request of '${data.device.name}' with 'NO_IMAGE_AVAILABLE'`);
}
private async readSoftwareBuildIDAndDateCode(device: Device, sendWhen: 'active' | 'immediate'):
@@ -133,14 +135,22 @@ export default class OTAUpdate extends Extension {
}
}
private getEntityPublishPayload(state: UpdateState, progress: number=null, remaining: number=null): UpdatePayload {
const payload: UpdatePayload = {update: {state}};
private getEntityPublishPayload(device: Device, state: zhc.OtaUpdateAvailableResult | UpdateState,
progress: number=null, remaining: number=null): UpdatePayload {
const deviceUpdateState = this.state.get(device).update;
const payload: UpdatePayload = {update: {
state: typeof state === 'string' ? state : (state.available ? 'available' : 'idle'),
installed_version: typeof state === 'string' ?
deviceUpdateState?.installed_version : state.currentFileVersion,
latest_version: typeof state === 'string' ?
deviceUpdateState?.latest_version : state.otaFileVersion,
}};
if (progress !== null) payload.update.progress = progress;
if (remaining !== null) payload.update.remaining = Math.round(remaining);
/* istanbul ignore else */
if (this.legacyApi) {
payload.update_available = state === 'available';
payload.update_available = typeof state === 'string' ? state === 'available' : state.available;
}
return payload;
@@ -191,23 +201,24 @@ export default class OTAUpdate extends Extension {
}
try {
const available = await device.definition.ota.isUpdateAvailable(device.zh, logger);
const msg = `${available ? 'Update' : 'No update'} available for '${device.name}'`;
const availableResult = await device.definition.ota.isUpdateAvailable(device.zh, logger);
const msg = `${availableResult.available ? 'Update' : 'No update'} available for '${device.name}'`;
logger.info(msg);
/* istanbul ignore else */
if (settings.get().advanced.legacy_api) {
const meta = {status: available ? 'available' : 'not_available', device: device.name};
const meta = {
status: availableResult.available ? 'available' : 'not_available', device: device.name};
this.mqtt.publish(
'bridge/log',
stringify({type: `ota_update`, message: msg, meta}),
);
}
const payload = this.getEntityPublishPayload(available ? 'available' : 'idle');
const payload = this.getEntityPublishPayload(device, availableResult);
this.publishEntityState(device, payload);
this.lastChecked[device.ieeeAddr] = Date.now();
responseData.updateAvailable = available;
responseData.updateAvailable = availableResult.available;
} catch (e) {
error = `Failed to check if update available for '${device.name}' (${e.message})`;
errorStack = e.stack;
@@ -243,7 +254,7 @@ export default class OTAUpdate extends Extension {
logger.info(msg);
const payload = this.getEntityPublishPayload('updating', progress, remaining);
const payload = this.getEntityPublishPayload(device, 'updating', progress, remaining);
this.publishEntityState(device, payload);
/* istanbul ignore else */
@@ -254,11 +265,12 @@ export default class OTAUpdate extends Extension {
};
const from_ = await this.readSoftwareBuildIDAndDateCode(device, 'immediate');
await device.definition.ota.updateToLatest(device.zh, logger, onProgress);
const fileVersion = await device.definition.ota.updateToLatest(device.zh, logger, onProgress);
logger.info(`Finished update of '${device.name}'`);
this.eventBus.emitReconfigure({device});
this.removeProgressAndRemainingFromState(device);
const payload = this.getEntityPublishPayload('idle');
const payload = this.getEntityPublishPayload(device,
{available: false, currentFileVersion: fileVersion, otaFileVersion: fileVersion});
this.publishEntityState(device, payload);
const to = await this.readSoftwareBuildIDAndDateCode(device, 'active');
const [fromS, toS] = [stringify(from_), stringify(to)];
@@ -278,7 +290,7 @@ export default class OTAUpdate extends Extension {
errorStack = e.stack;
this.removeProgressAndRemainingFromState(device);
const payload = this.getEntityPublishPayload('available');
const payload = this.getEntityPublishPayload(device, 'available');
this.publishEntityState(device, payload);
/* istanbul ignore else */
+8 -6
View File
@@ -1,6 +1,7 @@
import * as settings from '../util/settings';
import zigbeeHerdsmanConverters from 'zigbee-herdsman-converters';
import * as philips from 'zigbee-herdsman-converters/lib/philips';
import logger from '../util/logger';
import utils from '../util/utils';
import Extension from './extension';
@@ -12,13 +13,13 @@ import bind from 'bind-decorator';
const topicRegex = new RegExp(`^(.+?)(?:/(${utils.endpointNames.join('|')}|\\d+))?/(get|set)(?:/(.+))?`);
const propertyEndpointRegex = new RegExp(`^(.*?)_(${utils.endpointNames.join('|')})$`);
const stateValues = ['on', 'off', 'toggle', 'open', 'close', 'stop', 'lock', 'unlock'];
const sceneConverterKeys = ['scene_store', 'scene_add', 'scene_remove', 'scene_remove_all'];
const sceneConverterKeys = ['scene_store', 'scene_add', 'scene_remove', 'scene_remove_all', 'scene_rename'];
// Legacy: don't provide default converters anymore, this is required by older z2m installs not saving group members
const defaultGroupConverters = [
zigbeeHerdsmanConverters.toZigbeeConverters.light_onoff_brightness,
zigbeeHerdsmanConverters.toZigbeeConverters.light_color_colortemp,
zigbeeHerdsmanConverters.toZigbeeConverters.effect,
philips.tz.effect, // Support Hue effects for groups
zigbeeHerdsmanConverters.toZigbeeConverters.ignore_transition,
zigbeeHerdsmanConverters.toZigbeeConverters.cover_position_tilt,
zigbeeHerdsmanConverters.toZigbeeConverters.thermostat_occupied_heating_setpoint,
@@ -89,7 +90,7 @@ export default class Publish extends Extension {
// When reporting is requested for a device (report: true in device-specific settings) we won't
// ever issue a read here, as we assume the device will properly report changes.
// Only do this when the retrieve_state option is enabled for this device.
// retrieve_state == decprecated
// retrieve_state == deprecated
if (re instanceof Device && result && result.hasOwnProperty('readAfterWriteTime') &&
re.options.retrieve_state
) {
@@ -101,7 +102,7 @@ export default class Publish extends Extension {
/**
* Home Assistant always publishes 'state', even when e.g. only setting
* the color temperature. This would lead to 2 zigbee publishes, where the first one
* (state) is probably unecessary.
* (state) is probably unnecessary.
*/
if (settings.get().homeassistant) {
const hasColorTemp = message.hasOwnProperty('color_temp');
@@ -143,6 +144,7 @@ export default class Publish extends Extension {
{
if (Array.isArray(definition)) {
const c = new Set(definition.map((d) => d.toZigbee).flat());
// @ts-expect-error
if (c.size == 0) converters = defaultGroupConverters;
else converters = Array.from(c);
} else if (definition) {
@@ -165,7 +167,7 @@ export default class Publish extends Extension {
* Order state & brightness based on current bulb state
*
* Not all bulbs support setting the color/color_temp while it is off
* this results in inconsistant behavior between different vendors.
* this results in inconsistent behavior between different vendors.
*
* bulb on => move state & brightness to the back
* bulb off => move state & brightness to the front
@@ -219,7 +221,7 @@ export default class Publish extends Extension {
continue;
}
// If the endpoint_name name is a nubmer, try to map it to a friendlyName
// If the endpoint_name name is a number, try to map it to a friendlyName
if (!isNaN(Number(endpointName)) && re.isDevice() && utils.isEndpoint(localTarget) &&
re.endpointName(localTarget)) {
endpointName = re.endpointName(localTarget);
+7
View File
@@ -49,6 +49,13 @@ export default class Receive extends Extension {
// extend debounced payload with current
this.debouncers[device.ieeeAddr].payload = {...this.debouncers[device.ieeeAddr].payload, ...payload};
// Update state cache right away. This makes sure that during debouncing cached state is always up to date.
// ( Update right away as "lastSeenChanged" event might occur while debouncer is still active.
// And if that happens it would cause old message to be published from cache.
// By updating cache we make sure that state cache is always up-to-date.
this.state.set(device, this.debouncers[device.ieeeAddr].payload);
this.debouncers[device.ieeeAddr].publish();
}
+15 -12
View File
@@ -1,9 +1,10 @@
import mqtt from 'mqtt';
import * as mqtt from 'mqtt';
import logger from './util/logger';
import * as settings from './util/settings';
import utils from './util/utils';
import fs from 'fs';
import bind from 'bind-decorator';
import type {QoS} from 'mqtt-packet';
export default class MQTT {
private publishedTopics: Set<string> = new Set();
@@ -11,7 +12,7 @@ export default class MQTT {
private client: mqtt.MqttClient;
private eventBus: EventBus;
private initialConnect = true;
private republishRetainedTimer: NodeJS.Timer;
private republishRetainedTimer: NodeJS.Timeout;
private retainedMessages: {[s: string]: {payload: string, options: MQTTOptions,
skipLog: boolean, skipReceive: boolean, topic: string, base: string}} = {};
@@ -26,7 +27,7 @@ export default class MQTT {
const options: mqtt.IClientOptions = {
will: {
topic: `${settings.get().mqtt.base_topic}/bridge/state`,
payload: utils.availabilityPayload('offline', settings.get()),
payload: Buffer.from(utils.availabilityPayload('offline', settings.get())),
retain: settings.get().mqtt.force_disable_retain ? false : true,
qos: 1,
},
@@ -83,7 +84,10 @@ export default class MQTT {
resolve();
});
this.client.on('error', (err) => reject(err));
this.client.on('error', (err) => {
logger.error(`MQTT error: ${err.message}`);
reject(err);
});
this.client.on('message', this.onMessage);
});
}
@@ -98,10 +102,9 @@ export default class MQTT {
}, utils.seconds(10));
logger.info('Connected to MQTT server');
await this.publishStateOnline();
if (this.initialConnect) {
await this.publishStateOnline();
} else {
if (!this.initialConnect) {
this.republishRetainedTimer = setTimeout(() => {
// Republish retained messages in case MQTT broker does not persist them.
// https://github.com/Koenkk/zigbee2mqtt/issues/9629
@@ -131,14 +134,14 @@ export default class MQTT {
this.client.subscribe(topic);
}
@bind public onMessage(topic: string, message: string): void {
@bind public onMessage(topic: string, message: Buffer): void {
// Since we subscribe to zigbee2mqtt/# we also receive the message we send ourselves, skip these.
if (!this.publishedTopics.has(topic)) {
logger.debug(`Received MQTT message on '${topic}' with data '${message}'`);
this.eventBus.emitMQTTMessage({topic, message: message + ''});
logger.debug(`Received MQTT message on '${topic}' with data '${message.toString()}'`);
this.eventBus.emitMQTTMessage({topic, message: message.toString()});
}
if (this.republishRetainedTimer && topic == `${settings.get().mqtt.base_topic}/bridge/state`) {
if (this.republishRetainedTimer && topic === `${settings.get().mqtt.base_topic}/bridge/info`) {
clearTimeout(this.republishRetainedTimer);
this.republishRetainedTimer = null;
}
@@ -151,7 +154,7 @@ export default class MQTT {
async publish(topic: string, payload: string, options: MQTTOptions={},
base=settings.get().mqtt.base_topic, skipLog=false, skipReceive=true,
): Promise<void> {
const defaultOptions: {qos: mqtt.QoS, retain: boolean} = {qos: 0, retain: false};
const defaultOptions: {qos: QoS, retain: boolean} = {qos: 0, retain: false};
topic = `${base}/${topic}`;
if (skipReceive) {
+8 -5
View File
@@ -16,11 +16,11 @@ const dontCacheProperties = [
class State {
private state: {[s: string | number]: KeyValue} = {};
private file = data.joinPath('state.json');
private timer: NodeJS.Timer = null;
private eventBus: EventBus;
private timer: NodeJS.Timeout = null;
constructor(eventBus: EventBus) {
constructor(private readonly eventBus: EventBus, private readonly zigbee: Zigbee) {
this.eventBus = eventBus;
this.zigbee = zigbee;
}
start(): void {
@@ -28,11 +28,14 @@ class State {
// Save the state on every interval
this.timer = setInterval(() => this.save(), saveInterval);
this.eventBus.onDeviceLeave(this, (data) => delete this.state[data.ieeeAddr]);
}
stop(): void {
this.eventBus.removeListeners(this);
// Remove any invalid states (ie when the device has left the network) when the system is stopped
Object.keys(this.state)
.filter((k) => typeof k === 'string' && !this.zigbee.resolveEntity(k)) // string key = ieeeAddr
.forEach((k) => delete this.state[k]);
clearTimeout(this.timer);
this.save();
}
+21 -11
View File
@@ -17,6 +17,10 @@ import type {
Cluster as ZHCluster,
} from 'zigbee-herdsman/dist/zcl/tstype';
import type {
FrameControl as ZHFrameControl,
} from 'zigbee-herdsman/dist/zcl';
import type * as ZHEvents from 'zigbee-herdsman/dist/controller/events';
import type TypeEventBus from 'lib/eventBus';
@@ -27,7 +31,7 @@ import type TypeDevice from 'lib/model/device';
import type TypeGroup from 'lib/model/group';
import type TypeExtension from 'lib/extension/extension';
import type mqtt from 'mqtt';
import type {QoS} from 'mqtt-packet';
declare global {
// Define some class types as global
@@ -41,7 +45,8 @@ declare global {
// Types
interface MQTTResponse {data: KeyValue, status: 'error' | 'ok', error?: string, transaction?: string}
interface MQTTOptions {qos?: mqtt.QoS, retain?: boolean, properties?: {messageExpiryInterval: number}}
interface MQTTOptions {qos?: QoS, retain?: boolean, properties?: {messageExpiryInterval: number}}
type Scene = {id: number, name: string};
type StateChangeReason = 'publishDebounce' | 'groupOptimistic' | 'lastSeenChanged' | 'publishCached';
type PublishEntityState = (entity: Device | Group, payload: KeyValue,
stateChangeReason?: StateChangeReason) => Promise<void>;
@@ -94,16 +99,18 @@ declare global {
meta: {state: KeyValue, logger: Logger, device: zh.Device}) => Promise<KeyValue>,
}
interface DefinitionExposeFeature {name: string, endpoint?: string,
interface DefinitionExposeFeature {name: string, label: string, endpoint?: string,
property: string, value_max?: number, value_min?: number, unit?: string,
value_off?: string, value_on?: string, value_step?: number, values: string[], access: number}
interface DefinitionExpose {
type: string, name?: string, features?: DefinitionExposeFeature[],
endpoint?: string, values?: string[], value_off?: string, value_on?: string,
type: string, name?: string, label?: string, features?: DefinitionExposeFeature[],
endpoint?: string, values?: string[], value_off?: string, value_on?: string, value_step?: number,
access: number, property: string, unit?: string,
value_min?: number, value_max?: number}
interface OtaUpdateAvailableResult {available: boolean, currentFileVersion: number, otaFileVersion: number}
interface Definition {
model: string,
zigbeeModel: string[],
@@ -120,9 +127,10 @@ declare global {
onEvent?: (type: string, data: KeyValue, device: zh.Device,
settings: KeyValue, state: KeyValue) => Promise<void>;
ota?: {
isUpdateAvailable: (device: zh.Device, logger: Logger, data?: KeyValue) => Promise<boolean>;
isUpdateAvailable: (device: zh.Device, logger: Logger, data?: KeyValue)
=> Promise<OtaUpdateAvailableResult>;
updateToLatest: (device: zh.Device, logger: Logger,
onProgress: (progress: number, remaining: number) => void) => Promise<void>;
onProgress: (progress: number, remaining: number) => void) => Promise<number>;
}
}
@@ -159,7 +167,7 @@ declare global {
groupID: number;
cluster: string | number;
data: KeyValue | Array<string | number>;
meta: {zclTransactionSequenceNumber?: number;};
meta: {zclTransactionSequenceNumber?: number; manufacturerCode?: number; frameControl?: ZHFrameControl;};
};
}
@@ -182,7 +190,7 @@ declare global {
base_topic: string,
include_device_information: boolean,
force_disable_retain: boolean
version?: number,
version?: 3 | 4 | 5,
user?: string,
password?: string,
server: string,
@@ -233,6 +241,8 @@ declare global {
host?: string,
port?: number,
url?: string,
ssl_cert?: string,
ssl_key?: string,
},
devices?: {[s: string]: DeviceOptions},
groups?: {[s: string]: GroupOptions},
@@ -248,7 +258,7 @@ declare global {
log_level: 'debug' | 'info' | 'error' | 'warn',
log_syslog: KeyValue,
pan_id: number | 'GENERATE',
ext_pan_id: number[],
ext_pan_id: number[] | 'GENERATE',
channel: number,
adapter_concurrent: number | null,
adapter_delay: number | null,
@@ -274,6 +284,7 @@ declare global {
interface DeviceOptions {
ID?: string,
disabled?: boolean,
retention?: number,
availability?: boolean | {timeout: number},
optimistic?: boolean,
@@ -306,4 +317,3 @@ declare global {
qos?: 0 | 1 | 2,
}
}
-9
View File
@@ -7,12 +7,3 @@ declare module 'zigbee-herdsman-converters' {
export function onEvent(type: string, data: KeyValue, device: zh.Device, settings: KeyValue,
state: KeyValue): Promise<void>;
}
declare module 'zigbee-herdsman-converters/lib/ota/tradfri' {
export function useTestURL(): void;
}
declare module 'zigbee-herdsman-converters/lib/ota/zigbeeOTA' {
export function useIndexOverride(indexFileName: string): void;
export function setDataDir(dataDir: string): void;
}
+1 -1
View File
@@ -14,7 +14,7 @@ function load(): void {
load();
function joinPath(file: string): string {
return path.join(dataPath, file);
return path.resolve(dataPath, file);
}
function getPath(): string {
+4 -4
View File
@@ -4,7 +4,7 @@ import * as settings from './settings';
import path from 'path';
import fs from 'fs';
import fx from 'mkdir-recursive';
import rimraf from 'rimraf';
import {rimrafSync} from 'rimraf';
import assert from 'assert';
const colorizer = winston.format.colorize();
@@ -38,7 +38,7 @@ function init(): void {
directory = settings.get().advanced.log_directory.replace('%TIMESTAMP%', timestamp);
logFilename = settings.get().advanced.log_file.replace('%TIMESTAMP%', timestamp);
// Make sure that log directoy exsists when not logging to stdout only
// Make sure that log directory exists when not logging to stdout only
if (output.includes('file')) {
fx.mkdirSync(directory);
@@ -144,7 +144,7 @@ function cleanup(): void {
directories = directories.slice(10, directories.length);
directories.forEach((dir) => {
logger.debug(`Removing old log directory '${dir.path}'`);
rimraf.sync(dir.path);
rimrafSync(dir.path);
});
}
}
@@ -177,7 +177,7 @@ function setLevel(level: Z2MLogLevel): void {
}
function warn(message: string): void {
// winston.config.syslog.levels doesnt have warn, but is required for syslog.
// winston.config.syslog.levels doesn't have warn, but is required for syslog.
logger.warning(message);
}
+39 -13
View File
@@ -366,15 +366,15 @@
"port": {
"type": "number",
"title": "Port",
"description": "Frontend binding port",
"description": "Frontend binding port. Ignored when using a unix domain socket",
"default": 8080,
"requiresRestart": true
},
"host": {
"type": "string",
"type": ["string", "null"],
"title": "Bind host",
"description": "Frontend binding host",
"default": "0.0.0.0",
"description": "Frontend binding host. Binds to a unix socket when an absolute path is given instead.",
"examples": ["127.0.0.1", "::1", "/run/zigbee2mqtt/zigbee2mqtt.sock"],
"requiresRestart": true
},
"auth_token": {
@@ -388,6 +388,18 @@
"title": "URL",
"description": "URL on which the frontend can be reached, currently only used for the Home Assistant device configuration page",
"requiresRestart": true
},
"ssl_cert" : {
"type": ["string", "null"],
"title": "Certificate file path",
"description": "SSL Certificate file path for exposing HTTPS. The sibling property 'ssl_key' must be set for HTTPS to be activated.",
"requiresRestart": true
},
"ssl_key" : {
"type": ["string", "null"],
"title": "key file path",
"description": "SSL key file path for exposing HTTPS. The sibling property 'ssl_cert' must be set for HTTPS to be activated.",
"requiresRestart": true
}
}
}
@@ -436,7 +448,7 @@
"type": "boolean",
"title": "Legacy availability payload",
"requiresRestart": true,
"description": "Payload to be used for device availabilty and bridge/state topics. true = text, false = JSON",
"description": "Payload to be used for device availability and bridge/state topics. true = text, false = JSON",
"default": true
},
"log_rotation": {
@@ -499,13 +511,13 @@
"type": "number",
"title": "Port",
"description": "The port on the host that syslog is running on, defaults to syslogd's default port.",
"default": 123
"default": 514
},
"protocol": {
"type": "string",
"title": "Protocol",
"description": "The network protocol to log over (e.g. tcp4, udp4, tls4, unix, unix-connect, etc).",
"default": "tcp4",
"default": "udp4",
"examples": [
"udp4",
"tls4",
@@ -569,10 +581,18 @@
"description": "ZigBee pan ID, changing requires repairing all devices!"
},
"ext_pan_id": {
"type": "array",
"items": {
"type": "number"
},
"oneOf": [{
"type": "string",
"title": "Extended pan ID (string)"
},
{
"type": "array",
"items": {
"type": "number"
},
"title": "Extended pan ID (array)"
}
],
"title": "Ext Pan ID",
"requiresRestart": true,
"description": "Zigbee extended pan ID, changing requires repairing all devices!"
@@ -782,6 +802,12 @@
"title": "Retain",
"description": "Retain MQTT messages of this device"
},
"disabled": {
"type": "boolean",
"title": "Disabled",
"description": "Disables the device (excludes device from network scans, availability and group state updates)",
"requiresRestart": true
},
"retention": {
"type": "number",
"title": "Retention",
@@ -842,7 +868,7 @@
"icon": {
"type": "string",
"title": "Icon",
"description": "The user-defined device icon for the frontend. It can be a link to an image (not a path to a file) or base64 encoded data URL like: image/svg+xml;base64,PHN2ZyB3aW....R0aD"
"description": "The user-defined device icon for the frontend. It can be a full URL link to an image (e.g. https://SOME.SITE/MODEL123.jpg) (you cannot use a path to a local file) or base64 encoded data URL (e.g. image/svg+xml;base64,PHN2ZyB3aW....R0aD)"
},
"homeassistant": {
"type": ["object", "null"],
@@ -885,7 +911,7 @@
"title": "Group off state",
"default": "auto",
"requiresRestart": true,
"description": "Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group memebers are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF"
"description": "Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group members are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF"
},
"filtered_attributes": {
"type": "array",
+49 -24
View File
@@ -3,7 +3,7 @@ import utils from './utils';
import objectAssignDeep from 'object-assign-deep';
import path from 'path';
import yaml from './yaml';
import Ajv from 'ajv';
import Ajv, {ValidateFunction} from 'ajv';
import schemaJson from './settings.schema.json';
export let schema = schemaJson;
// @ts-ignore
@@ -31,7 +31,10 @@ const file = process.env.ZIGBEE2MQTT_CONFIG ?? data.joinPath('configuration.yaml
const ajvSetting = new Ajv({allErrors: true}).addKeyword('requiresRestart').compile(schemaJson);
const ajvRestartRequired = new Ajv({allErrors: true})
.addKeyword({keyword: 'requiresRestart', validate: (s: unknown) => !s}).compile(schemaJson);
const ajvRestartRequiredDeviceOptions = new Ajv({allErrors: true})
.addKeyword({keyword: 'requiresRestart', validate: (s: unknown) => !s}).compile(schemaJson.definitions.device);
const ajvRestartRequiredGroupOptions = new Ajv({allErrors: true})
.addKeyword({keyword: 'requiresRestart', validate: (s: unknown) => !s}).compile(schemaJson.definitions.group);
const defaults: RecursivePartial<Settings> = {
permit_join: false,
external_converters: [],
@@ -147,7 +150,7 @@ function loadSettingsWithDefaults(): void {
}
if (_settingsWithDefaults.frontend) {
const defaults = {port: 8080, auth_token: false, host: '0.0.0.0'};
const defaults = {port: 8080, auth_token: false};
const s = typeof _settingsWithDefaults.frontend === 'object' ? _settingsWithDefaults.frontend : {};
// @ts-ignore
_settingsWithDefaults.frontend = {};
@@ -187,6 +190,20 @@ function loadSettingsWithDefaults(): void {
_settingsWithDefaults.whitelist && _settingsWithDefaults.passlist.push(..._settingsWithDefaults.whitelist);
}
function parseValueRef(text: string): {filename: string, key: string} | null {
const match = /!(.*) (.*)/g.exec(text);
if (match) {
let filename = match[1];
// This is mainly for backward compatibility.
if (!filename.endsWith('.yaml') && !filename.endsWith('.yml')) {
filename += '.yaml';
}
return {filename, key: match[2]};
} else {
return null;
}
}
function write(): void {
const settings = getInternalSettings();
const toWrite: KeyValue = objectAssignDeep({}, settings);
@@ -194,7 +211,7 @@ function write(): void {
// Read settings to check if we have to split devices/groups into separate file.
const actual = yaml.read(file);
// In case the setting is defined in a separte file (e.g. !secret network_key) update it there.
// In case the setting is defined in a separate file (e.g. !secret network_key) update it there.
for (const path of [
['mqtt', 'server'],
['mqtt', 'user'],
@@ -203,9 +220,9 @@ function write(): void {
['frontend', 'auth_token'],
]) {
if (actual[path[0]] && actual[path[0]][path[1]]) {
const match = /!(.*) (.*)/g.exec(actual[path[0]][path[1]]);
if (match) {
yaml.updateIfChanged(data.joinPath(`${match[1]}.yaml`), match[2], toWrite[path[0]][path[1]]);
const ref = parseValueRef(actual[path[0]][path[1]]);
if (ref) {
yaml.updateIfChanged(data.joinPath(ref.filename), ref.key, toWrite[path[0]][path[1]]);
toWrite[path[0]][path[1]] = actual[path[0]][path[1]];
}
}
@@ -213,7 +230,7 @@ function write(): void {
// Write devices/groups to separate file if required.
const writeDevicesOrGroups = (type: 'devices' | 'groups'): void => {
if (typeof actual[type] === 'string' || Array.isArray(actual[type])) {
if (typeof actual[type] === 'string' || (Array.isArray(actual[type]) && actual[type].length > 0)) {
const fileToWrite = Array.isArray(actual[type]) ? actual[type][0] : actual[type];
const content = objectAssignDeep({}, settings[type]);
@@ -268,6 +285,11 @@ export function validate(): string[] {
errors.push(`advanced.pan_id: should be number or 'GENERATE' (is '${_settings.advanced.pan_id}')`);
}
if (_settings.advanced && _settings.advanced.ext_pan_id && typeof _settings.advanced.ext_pan_id === 'string' &&
_settings.advanced.ext_pan_id !== 'GENERATE') {
errors.push(`advanced.ext_pan_id: should be array or 'GENERATE' (is '${_settings.advanced.ext_pan_id}')`);
}
// Verify that all friendly names are unique
const names: string[] = [];
const check = (e: DeviceOptions | GroupOptions): void => {
@@ -309,44 +331,42 @@ export function validate(): string[] {
function read(): Settings {
const s = yaml.read(file) as Settings;
applyEnvironmentVariables(s);
// Read !secret MQTT username and password if set
// eslint-disable-next-line
const interpetValue = (value: any): any => {
const re = /!(.*) (.*)/g;
const match = re.exec(value);
if (match) {
const file = data.joinPath(`${match[1]}.yaml`);
const key = match[2];
return yaml.read(file)[key];
const interpretValue = (value: any): any => {
const ref = parseValueRef(value);
if (ref) {
return yaml.read(data.joinPath(ref.filename))[ref.key];
} else {
return value;
}
};
if (s.mqtt?.user) {
s.mqtt.user = interpetValue(s.mqtt.user);
s.mqtt.user = interpretValue(s.mqtt.user);
}
if (s.mqtt?.password) {
s.mqtt.password = interpetValue(s.mqtt.password);
s.mqtt.password = interpretValue(s.mqtt.password);
}
if (s.mqtt?.server) {
s.mqtt.server = interpetValue(s.mqtt.server);
s.mqtt.server = interpretValue(s.mqtt.server);
}
if (s.advanced?.network_key) {
s.advanced.network_key = interpetValue(s.advanced.network_key);
s.advanced.network_key = interpretValue(s.advanced.network_key);
}
if (s.frontend?.auth_token) {
s.frontend.auth_token = interpetValue(s.frontend.auth_token);
s.frontend.auth_token = interpretValue(s.frontend.auth_token);
}
// Read devices/groups configuration from separate file if specified.
const readDevicesOrGroups = (type: 'devices' | 'groups'): void => {
if (typeof s[type] === 'string' || Array.isArray(s[type])) {
if (typeof s[type] === 'string' || (Array.isArray(s[type]) && Array(s[type]).length > 0)) {
/* eslint-disable-line */ // @ts-ignore
const files: string[] = Array.isArray(s[type]) ? s[type] : [s[type]];
s[type] = {};
@@ -416,7 +436,6 @@ function applyEnvironmentVariables(settings: Partial<Settings>): void {
function getInternalSettings(): Partial<Settings> {
if (!_settings) {
_settings = read();
applyEnvironmentVariables(_settings);
}
return _settings;
@@ -458,7 +477,7 @@ export function apply(newSettings: Record<string, unknown>): boolean {
throw new Error(`${error.instancePath.substring(1)} ${error.message}`);
}
getInternalSettings(); // Ensure _settings is intialized.
getInternalSettings(); // Ensure _settings is initialized.
/* eslint-disable-line */ // @ts-ignore
_settings = objectAssignDeep.noMutate(_settings, newSettings);
write();
@@ -656,21 +675,27 @@ export function removeGroup(IDorName: string | number): void {
write();
}
export function changeEntityOptions(IDorName: string, newOptions: KeyValue): void {
export function changeEntityOptions(IDorName: string, newOptions: KeyValue): boolean {
const settings = getInternalSettings();
delete newOptions.friendly_name;
delete newOptions.devices;
let validator: ValidateFunction;
if (getDevice(IDorName)) {
objectAssignDeep(settings.devices[getDevice(IDorName).ID], newOptions);
utils.removeNullPropertiesFromObject(settings.devices[getDevice(IDorName).ID]);
validator = ajvRestartRequiredDeviceOptions;
} else if (getGroup(IDorName)) {
objectAssignDeep(settings.groups[getGroup(IDorName).ID], newOptions);
utils.removeNullPropertiesFromObject(settings.groups[getGroup(IDorName).ID]);
validator = ajvRestartRequiredGroupOptions;
} else {
throw new Error(`Device or group '${IDorName}' does not exist`);
}
write();
validator(newOptions);
const restartRequired = validator.errors && !!validator.errors.find((e) => e.keyword === 'requiresRestart');
return restartRequired;
}
export function changeFriendlyName(IDorName: string, newName: string): void {
+76 -4
View File
@@ -4,6 +4,8 @@ import data from './data';
import vm from 'vm';
import fs from 'fs';
import path from 'path';
import {detailedDiff} from 'deep-object-diff';
import objectAssignDeep from 'object-assign-deep';
// construct a local ISO8601 string (instead of UTC-based)
// Example:
@@ -33,6 +35,8 @@ const endpointNames = [
'ep1', 'ep2', 'row_1', 'row_2', 'row_3', 'row_4', 'relay', 'usb',
'l1', 'l2', 'l3', 'l4', 'l5', 'l6', 'l7', 'l8',
'l9', 'l10', 'l11', 'l12', 'l13', 'l14', 'l15', 'l16',
'l17', 'l18', 'l19', 'l20', 'l21', 'l22', 'l23', 'l24',
'th1', 'th2', 'th3', 'th4', 'th5', 'th6', 'th7', 'th8', 'th9', 'th10',
'button_1', 'button_2', 'button_3', 'button_4', 'button_5',
'button_6', 'button_7', 'button_8', 'button_9', 'button_10',
'button_11', 'button_12', 'button_13', 'button_14', 'button_15',
@@ -77,7 +81,9 @@ async function getZigbee2MQTTVersion(includeCommitHash=true): Promise<{commitHas
}
async function getDependencyVersion(depend: string): Promise<{version: string}> {
const packageJSON = await import(path.join(__dirname, '..', '..', 'node_modules', depend, 'package.json'));
const modulePath = path.dirname(require.resolve(depend));
const packageJSONPath = path.join(modulePath.slice(0, modulePath.indexOf(depend) + depend.length), 'package.json');
const packageJSON = await import(packageJSONPath);
const version = packageJSON.version;
return {version};
}
@@ -132,8 +138,8 @@ function parseJSON(value: string, fallback: string): KeyValue | string {
}
}
function loadModuleFromText(moduleCode: string): unknown {
const moduleFakePath = path.join(__dirname, 'externally-loaded.js');
function loadModuleFromText(moduleCode: string, name?: string): unknown {
const moduleFakePath = path.join(__dirname, '..', '..', 'data', 'extension', name || 'externally-loaded.js');
const sandbox = {
require: require,
module: {},
@@ -295,6 +301,8 @@ function isAvailabilityEnabledForEntity(entity: Device | Group, settings: Settin
const enabledGlobal = settings.advanced.availability_timeout || settings.availability;
if (!enabledGlobal) return false;
if (entity.isDevice() && entity.options.disabled) return false;
const passlist = settings.advanced.availability_passlist.concat(settings.advanced.availability_whitelist);
if (passlist.length > 0) {
return passlist.includes(entity.name) || passlist.includes(entity.ieeeAddr);
@@ -314,6 +322,14 @@ function isEndpoint(obj: unknown): obj is zh.Endpoint {
return obj.constructor.name.toLowerCase() === 'endpoint';
}
function flatten<Type>(arr: Type[][]): Type[] {
return [].concat(...arr);
}
function arrayUnique<Type>(arr: Type[]): Type[] {
return [...new Set(arr)];
}
function isZHGroup(obj: unknown): obj is zh.Group {
return obj.constructor.name.toLowerCase() === 'group';
}
@@ -351,11 +367,67 @@ function filterProperties(filter: string[], data: KeyValue): void {
}
}
function clone(obj: KeyValue): KeyValue {
return JSON.parse(JSON.stringify(obj));
}
function computeSettingsToChange(current: KeyValue, new_: KeyValue): KeyValue {
const diff: KeyValue = detailedDiff(current, new_);
// Remove any settings that are in the deleted.diff but not in the passed options
const cleanupDeleted = (options: KeyValue, deleted: KeyValue): void => {
for (const key of Object.keys(deleted)) {
if (!(key in options)) {
delete deleted[key];
} else if (!Array.isArray(options[key])) {
cleanupDeleted(options[key], deleted[key]);
}
}
};
cleanupDeleted(new_, diff.deleted);
// objectAssignDeep requires object prototype which is missing from detailedDiff, therefore clone
const newSettings = objectAssignDeep({}, clone(diff.added), clone(diff.updated), clone(diff.deleted));
// deep-object-diff converts arrays to objects, set original array back here
const convertBackArray = (before: KeyValue, after: KeyValue): void => {
for (const [key, afterValue] of Object.entries(after)) {
const beforeValue = before[key];
if (Array.isArray(beforeValue)) {
after[key] = beforeValue;
} else if (afterValue && typeof beforeValue === 'object') {
convertBackArray(beforeValue, afterValue);
}
}
};
convertBackArray(new_, newSettings);
return newSettings;
}
function getScenes(entity: zh.Endpoint | zh.Group): Scene[] {
const scenes: {[id: number]: Scene} = {};
const endpoints = isEndpoint(entity) ? [entity] : entity.members;
const groupID = isEndpoint(entity) ? 0 : entity.groupID;
for (const endpoint of endpoints) {
for (const [key, data] of Object.entries(endpoint.meta?.scenes || {})) {
const split = key.split('_');
const sceneID = parseInt(split[0], 10);
const sceneGroupID = parseInt(split[1], 10);
if (sceneGroupID === groupID) {
scenes[sceneID] = {id: sceneID, name: (data as KeyValue).name || `Scene ${sceneID}`};
}
}
}
return Object.values(scenes);
}
export default {
endpointNames, capitalize, getZigbee2MQTTVersion, getDependencyVersion, formatDate, objectHasProperties,
equalsPartial, getObjectProperty, getResponse, parseJSON, loadModuleFromText, loadModuleFromFile,
getExternalConvertersDefinitions, removeNullPropertiesFromObject, toNetworkAddressHex, toSnakeCase,
parseEntityID, isEndpoint, isZHGroup, hours, minutes, seconds, validateFriendlyName, sleep,
sanitizeImageParameter, isAvailabilityEnabledForEntity, publishLastSeen, availabilityPayload,
getAllFiles, filterProperties,
getAllFiles, filterProperties, flatten, arrayUnique, clone, computeSettingsToChange, getScenes,
};
+20 -3
View File
@@ -9,6 +9,7 @@ import Device from './model/device';
import Group from './model/group';
import * as ZHEvents from 'zigbee-herdsman/dist/controller/events';
import bind from 'bind-decorator';
import {randomInt} from 'crypto';
export default class Zigbee {
private herdsman: Controller;
@@ -27,7 +28,8 @@ export default class Zigbee {
network: {
panID: settings.get().advanced.pan_id === 'GENERATE' ?
this.generatePanID() : settings.get().advanced.pan_id as number,
extendedPanID: settings.get().advanced.ext_pan_id,
extendedPanID: settings.get().advanced.ext_pan_id === 'GENERATE' ?
this.generateExtPanID() : settings.get().advanced.ext_pan_id as number[],
channelList: [settings.get().advanced.channel],
networkKey: settings.get().advanced.network_key === 'GENERATE' ?
this.generateNetworkKey() : settings.get().advanced.network_key as number[],
@@ -164,13 +166,19 @@ export default class Zigbee {
}
private generateNetworkKey(): number[] {
const key = Array.from({length: 16}, () => Math.floor(Math.random() * 255));
const key = Array.from({length: 16}, () => randomInt(256));
settings.set(['advanced', 'network_key'], key);
return key;
}
private generateExtPanID(): number[] {
const key = Array.from({length: 8}, () => randomInt(256));
settings.set(['advanced', 'ext_pan_id'], key);
return key;
}
private generatePanID(): number {
const panID = Math.floor(Math.random() * (0xFFFF - 2)) + 1;
const panID = randomInt(1, 0xFFFF - 1);
settings.set(['advanced', 'pan_id'], panID);
return panID;
}
@@ -187,6 +195,11 @@ export default class Zigbee {
return this.herdsman.backup();
}
async coordinatorCheck(): Promise<{missingRouters: Device[]}> {
const check = await this.herdsman.coordinatorCheck();
return {missingRouters: check.missingRouters.map((d) => this.resolveDevice(d.ieeeAddr))};
}
async getNetworkParameters(): Promise<zh.NetworkParameters> {
return this.herdsman.getNetworkParameters();
}
@@ -310,6 +323,10 @@ export default class Zigbee {
return this.herdsman.touchlinkFactoryReset(ieeeAddr, channel);
}
async addInstallCode(installCode: string): Promise<void> {
await this.herdsman.addInstallCode(installCode);
}
async touchlinkIdentify(ieeeAddr: string, channel: number): Promise<void> {
await this.herdsman.touchlinkIdentify(ieeeAddr, channel);
}
+5548 -5470
View File
File diff suppressed because it is too large Load Diff
+41 -37
View File
@@ -1,6 +1,6 @@
{
"name": "zigbee2mqtt",
"version": "1.27.0",
"version": "1.34.0",
"description": "Zigbee to MQTT bridge using Zigbee-herdsman",
"main": "index.js",
"repository": {
@@ -8,7 +8,7 @@
"url": "git+https://github.com/Koenkk/zigbee2mqtt.git"
},
"engines": {
"node": "^14 || ^16 || ^18"
"node": "^16 || ^18 || ^19 || ^20"
},
"keywords": [
"xiaomi",
@@ -26,7 +26,9 @@
"start": "node index.js",
"test-with-coverage": "jest test --coverage",
"test": "jest test",
"test-watch": "jest test --watch"
"test-watch": "jest test --watch",
"clean": "rimraf coverage dist tsconfig.tsbuildinfo",
"prepack": "npm run clean && npm run build"
},
"author": "Koen Kanters",
"license": "GPL-3.0",
@@ -35,57 +37,59 @@
},
"homepage": "https://koenkk.github.io/zigbee2mqtt",
"dependencies": {
"ajv": "^8.11.0",
"ajv": "^8.12.0",
"bind-decorator": "^1.0.11",
"connect-gzip-static": "2.1.1",
"core-js": "^3.24.1",
"debounce": "^1.2.1",
"deep-object-diff": "^1.1.7",
"debounce": "^2.0.0",
"deep-object-diff": "^1.1.9",
"fast-deep-equal": "^3.1.3",
"finalhandler": "^1.2.0",
"git-last-commit": "^1.0.1",
"humanize-duration": "^3.27.2",
"humanize-duration": "^3.31.0",
"js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"jszip": "^3.10.0",
"jszip": "^3.10.1",
"mkdir-recursive": "^0.4.0",
"moment": "^2.29.4",
"mqtt": "4.3.7",
"mqtt": "^5.2.2",
"object-assign-deep": "^0.4.0",
"rimraf": "^3.0.2",
"semver": "^7.3.7",
"rimraf": "^5.0.5",
"semver": "^7.5.4",
"source-map-support": "^0.5.21",
"uri-js": "^4.4.1",
"winston": "^3.8.1",
"winston-syslog": "^2.6.0",
"winston-transport": "^4.5.0",
"ws": "^8.8.1",
"zigbee-herdsman": "0.14.46",
"zigbee-herdsman-converters": "14.0.583",
"zigbee2mqtt-frontend": "0.6.107"
"winston": "^3.11.0",
"winston-syslog": "^2.7.0",
"winston-transport": "^4.6.0",
"ws": "^8.14.2",
"zigbee-herdsman": "0.25.0",
"zigbee-herdsman-converters": "15.130.1",
"zigbee2mqtt-frontend": "0.6.147"
},
"devDependencies": {
"@babel/core": "^7.18.9",
"@babel/plugin-proposal-decorators": "^7.18.9",
"@babel/preset-env": "^7.18.9",
"@babel/preset-typescript": "^7.18.6",
"@types/debounce": "^1.2.1",
"@types/finalhandler": "^1.1.1",
"@types/humanize-duration": "^3.27.1",
"@types/jest": "^28.1.6",
"@types/js-yaml": "^4.0.5",
"@types/object-assign-deep": "^0.4.0",
"@babel/core": "^7.23.3",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@types/debounce": "^1.2.4",
"@types/finalhandler": "^1.2.3",
"@types/humanize-duration": "^3.27.3",
"@types/jest": "^29.5.10",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.10.0",
"@types/object-assign-deep": "^0.4.3",
"@types/readable-stream": "4.0.9",
"@types/rimraf": "^3.0.2",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"babel-jest": "^28.1.3",
"eslint": "^8.20.0",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "^6.13.0",
"@typescript-eslint/parser": "^6.13.0",
"babel-jest": "^29.7.0",
"eslint": "^8.54.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-jest": "^26.7.0",
"jest": "^28.1.3",
"eslint-plugin-jest": "^27.6.0",
"jest": "^29.7.0",
"tmp": "^0.2.1",
"typescript": "^4.7.4"
"typescript": "^5.3.2"
},
"jest": {
"coverageThreshold": {
+15
View File
@@ -0,0 +1,15 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "node",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"include-v-in-tag": false,
"prerelease": true,
"skip-github-release": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
+116
View File
@@ -0,0 +1,116 @@
/* eslint max-len: 0 */
const path = require('path');
const fs = require('fs');
const process = require('process');
const {execSync} = require('child_process');
const zhc = require('zigbee-herdsman-converters');
const z2mTillVersion = process.argv[2];
const zhcTillVersion = process.argv[3];
const zhTillVersion = process.argv[4];
const changelogs = [
{tillVersion: z2mTillVersion, project: 'koenkk/zigbee2mqtt',
contents: fs.readFileSync(path.join(__dirname, '..', 'CHANGELOG.md'), 'utf-8').split('\n')},
{tillVersion: zhcTillVersion, project: 'koenkk/zigbee-herdsman-converters',
contents: fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'zigbee-herdsman-converters', 'CHANGELOG.md'), 'utf-8').split('\n')},
{tillVersion: zhTillVersion, project: 'koenkk/zigbee-herdsman',
contents: fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'zigbee-herdsman', 'CHANGELOG.md'), 'utf-8').split('\n')},
];
const releaseRe = /## \[(.+)\]/;
const changes = {features: [], fixes: [], detect: [], add: [], error: []};
let context = null;
const changeRe = [
/^\* (\*\*(.+):\*\*)?(.+)\((\[#\d+\]\(.+\))\) \(\[.+\]\(https:.+\/(.+)\)\)$/,
/^\* (\*\*(.+):\*\*)?(.+)(https:\/\/github\.com.+) \(\[.+\]\(https:.+\/(.+)\)\)$/,
/^\* (\*\*(.+):\*\*)?(.+)() \(\[.+\]\(https:.+\/(.+)\)\)$/,
];
let commitUserLookup = {};
const commitUserFile = path.join(__dirname, 'commit-user-lookup.json');
if (fs.existsSync(commitUserFile)) {
commitUserLookup = JSON.parse(fs.readFileSync(commitUserFile, 'utf8'));
}
for (const changelog of changelogs) {
for (const line of changelog.contents) {
const releaseMatch = line.match(releaseRe);
const changeMatch = changeRe.map((re) => line.match(re)).find((e) => e);
if (releaseMatch) {
if (releaseMatch[1] === changelog.tillVersion) {
break;
}
} else if (line === '### Features') {
context = 'features';
} else if (line === '### Bug Fixes') {
context = 'fixes';
} else if (line.startsWith('* **ignore:**')) {
continue;
} else if (changeMatch) {
let localContext = changeMatch[2] ? changeMatch[2] : context;
if (!changes[localContext]) localContext = 'error';
const commitUserKey = `${changelog.project}-${changeMatch[5]} `;
let user = commitUserKey in commitUserLookup ? commitUserLookup[commitUserKey] :
execSync(`curl -s https://api.github.com/repos/${changelog.project}/commits/${changeMatch[5]} | jq -r '.author.login'`).toString().trim();
if (user !== 'null') commitUserLookup[commitUserKey] = user;
const messages = [];
let message = changeMatch[3].trim();
if (message.endsWith('.')) message = message.substring(0, message.length - 1);
const otherUser = message.match(/\[@(.+)\]\(https:\/\/github.com\/.+\)/) || message.match(/@(.+)/);
if (otherUser) {
user = otherUser[1];
message = message.replace(otherUser[0], '');
}
if (localContext === 'add') {
for (const model of message.split(',')) {
const definition = zhc.definitions.find((d) => d.model === model.trim());
if (definition) {
messages.push(`\`${definition.model}\` ${definition.vendor} ${definition.description}`);
} else {
changes['error'].push(`${line} (model '${model}' does not exist)`);
}
}
} else {
messages.push(message);
}
let issue = changeMatch[4].trim();
if (issue && !issue.startsWith('[#')) issue = `[#${issue.split('/').pop()}](${issue})`;
if (!issue) {
issue = '_NO_ISSUE_';
localContext = 'error';
}
messages.forEach((m) => changes[localContext].push(`- ${issue} ${m} (@${user})`));
} else if (line === '# Changelog' || !line) {
continue;
} else {
throw new Error(`Unmatched line: ${line}`);
}
}
}
let result = '';
const names = [
['features', 'Improvements'],
['fixes', 'Fixes'],
['add', 'New supported devices'],
['detect', 'Fixed device detections'],
['error', 'Changelog generator error'],
];
for (const name of names) {
result += `# ${name[1]}\n`;
if (name[0] === 'add') {
result += `This release adds support for ${changes['add'].length} devices: \n`;
}
changes[name[0]].forEach((e) => result += `${e}\n`);
result += '\n';
}
fs.writeFileSync(commitUserFile, JSON.stringify(commitUserLookup), 'utf-8');
console.log(result.trim());
+3 -2
View File
@@ -5,7 +5,8 @@ const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
for (const line of text.split('\n')) {
const model = zigbeeHerdsmanConverters.devices.find((d) => d.model === line);
const [modelNumber, user] = line.split(',').map((t) => t.trim());
const model = zigbeeHerdsmanConverters.devices.find((d) => d.model === modelNumber);
if (!model) throw new Error(`${line} does not exist`);
console.log(`- \`${line}\` ${model.vendor} ${model.description}`);
console.log(`- \`${modelNumber}\` ${model.vendor} ${model.description} (${user})`);
}
+1 -1
View File
@@ -24,7 +24,7 @@ echo "Cloning Zigbee2MQTT git repository"
git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
chown -R pi:pi /opt/zigbee2mqtt
echo "Running install. This might take a while and can produce som expected errors"
echo "Running install. This might take a while and can produce some expected errors"
cd /opt/zigbee2mqtt || exit
su pi -c "npm ci"
+22
View File
@@ -0,0 +1,22 @@
const assert = require('assert');
const vm = require('vm');
const fs = require('fs');
const path = require('path');
const filename = process.argv[2];
const moduleCode = fs.readFileSync(filename);
const moduleFakePath = path.join(__dirname, 'externally-loaded.js');
const sandbox = {
require: require,
module: {},
console,
setTimeout,
clearTimeout,
setInterval,
clearInterval,
setImmediate,
clearImmediate,
};
vm.runInNewContext(moduleCode, sandbox, moduleFakePath);
const converter = sandbox.module.exports;
assert(!converter.toZigbee.includes(undefined));
assert(!converter.fromZigbee.includes(undefined));
+31
View File
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUU70Q1tbGP071yeQ8EcHd/0rxtnwwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjEyMDMwMDA1MTBaFw0yMzAx
MDIwMDA1MTBaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQDR6bYQPgkfWlGQq19U2nMsAo0RZR7wSUuFS0MFpbQS
2Rr5x/4FwwKhTMOlfr6H2Xo/5pQvGOlhFE69j1HxQRooWDAswnscMv/9pb+BUqoE
7J29SEndIpmCaI0c3ejZsu4Nq8DxGod/RsQhJdbDU+hkw8qARJ0JjnTb+aN1KH8g
J3KeSMTOL3guBVZQujO0Unbjv47yBIFwi0IihR18aoRaxinb94Aqf92HcjZN++WU
gq7/2Qlm3tF5uJwuNtG/DmzReSblRcUgzPri7qIhb9z51gFNdNX6cTH3yNoF/KtT
XwEArvvsAyMCYuC6w8KI7WNmPI6yxSksgHdcNPlUVZYquLD+z2kYAdIByiyHmIpm
OH3jVN7lRJ6xITOGmyNktfRuSUi2GzECAOWIGpDD/5/gK1pacbOXpJWqVrTjUIAN
BrQf496CbabVgwaQEvq1QJJbuMbpma21/IlS6NpZS7vm/q1ojNsbEB6PYkSsBTzP
iZiiaomjhV2w5yIp5Zn8xyMFVKLb+SEDQBtZZ6CErmbgqp4B3U2b4k5LippLmZZK
pSk7BOuMpsZK8FIGS4KlANFfGVs79y6N+Jxue2IO9pRcpcpbqOXty4662BsPKInw
dKxKTr6TcTe0gEq1fpf1npYwcZ9t36LMJ7L51TbaaJ5sEsXe5QNOOOUgSwPqWmrE
lwIDAQABo1MwUTAdBgNVHQ4EFgQUYD/x9cCuGJgLUPkYLIVa8uvseBkwHwYDVR0j
BBgwFoAUYD/x9cCuGJgLUPkYLIVa8uvseBkwDwYDVR0TAQH/BAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAgEAI+gp+8qqO4anj8NHgjJvXhrETLPJIeLuBp/cjF9HA2IL
oAd5rXWPnQ6qgh3q/HazILgIHwI0wSrhVtRlprgGIxNa59cD3RcZCtqFSWIqhAqZ
JnAye3bnGU/KahazQX3oP+y564b/QZvwpJDKC1EoMv1wdpXND2NVn4HwaBc7Tu/d
SX/Tr6k+e32K8mwE+00/yf2rLrmWmNjWtP0f7zRmH3j1+ovktk7UoVhjKXfhqMUE
pWdhPZIXQJ65JNMGKdeFI2ULQY9IbXHeWQUgBCyhTciMvm2XZzopk7rxrh9NZopS
pAlCrWBkOZrs6hfZrus9FOzwSkeIEY7NnhNk05kslERJxjkoFytp7mDd4mTKCVW0
dKc7G1hZWYfO3oe0Zjxi0ragyReNKtyL1BqMbDKJmxHl91iPbdueWix1xxhNFakH
l3eOzfa/DEixvzxy3hzCcvagNb5RsXFVMQXQTgnIW/5GcG5VVB2/o7KidPL3XtqR
Hc/0ebQvloGXgqJbyTXG9EInkwB35wXDQuHgwt1PhwzP1yfp2BCvDsQWrR3IxnBT
DO1o2RpsurgCgUpd0vcW17DePLNfprrhhU2uTPn2bNcWdT/rZmEImkNaA29Rku+3
SZQJZWIx4s2FMdVdAv6ZauROStTY/WayudfcFfP+hYvJ5/ccQ9Gkb7vrGUssFRw=
-----END CERTIFICATE-----
+54
View File
@@ -0,0 +1,54 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIrNH7wPLdpbUCAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECN97bYsRcF6xBIIJSLVWpqTzdlNO
5J7kOrNcdbbg+SSEYbtT+G9gtwtkI8KO+xzYQZ/fdqmXgNqf9AQmikwDWQkoS4gC
qq6S+iKYn7Y8ZNZ/xu7gWW6L6uNZ3LTe/vkpenU6kmZrDysFTW5b7iH2VmMc/2h/
J3o3unxeMLMVSaoDG3MG08qj53yTmetTkZZZc4fgf6vK9/4fTJhdXu6n+1COBLBI
KbqbTRKnai3CNiYzz3UHyp9CGx1nX06beTJW8bYJUld9cJz+ozLNSV78oCkcUfwG
yR7p/6+86cWor5SwYG1wEm6w2bXrIJILTUdT92gXC8fhc/B6Id8hcuLIHcvFQ/CP
31y4Qwea3vY6b1TeRbqS4/fYOYajsiZi9ps0Meg55qMJj/UuNW2iLlR7PVsDXmPO
33X6cpEVyIlNCJzRREotzSoGmcXjQ5Dgd1LkxZPb163NGkRoJT4GcKCtQxYIyIzy
qyU0YF7I5LPKtNt1IPURHHerW42jM2jFlISxUixgl5Pj3WrmXeEmXq7htItn6X/q
tVEVUf6srs3aos2Ohx7Ji9PVDNuMGGGKxleCM6fU9ax/gYuk5r6PMYGPsD26xuZ0
A9WbFFFI6N1V+M3YsJJdxevZRV1NB3RymYGwFoZFDOKLb5DYJmPP3VVN/DsMNPkw
qaue7rinxBdLi8J6Itusiscg5pCyYQaujXtkK/bi6c1HCld4RvWCDgeU52SWRdJ9
2Np2629AeBvBfHP1/DsaUsyQPJAgDJk0HXoJyqstoALkRZ6ICoi1833LW/JGIWOv
xnl3JZ2q12aqb2OWxiBUKspnt2y5C2KpQJdmuEL68lAKLg+fzLi/jhJG1bwzWo79
I5G+QeV9+kI3vAIYHu331a+Yevs2p84sIumDGFSCSHAaWMmsrizJ4eKl5NnwZHS+
xUvcW+ISRKNRm4DWAL/nlwBJWMhCz+nsTKYvE1JO/IH2P5xxtD6bTjJ3YkVAHkBZ
wfApCBxdiQurEiabj06C4OCcNRkqJ/GwLrdxiwTCAt2hd7Dn+ttLo3Fi6iPRae8c
ZtWsCWaFObZ1QBeu7lKm+ev/Ab2SHtp6QMfrArNsrdIxSH1+Sm4DgfHmTmte2Tse
KFHy5Rwokst+Y18zjp3auJ3+NTTr9D1x2JCdQ6wkh66Pyd2FBLqRrMI1fHq9t9P+
r4DQm9I6FbgALm9yJ2QxV4ytwFGsowAye3vF+hfO5OjAScrG5DrxASRXlnp59zpd
+vMLk6rzcfiHzaJzYc/SOU9ubKN93aJmlL0Zgf1gg54oGnmPbEJeqQzeKVBtisro
FrNUPEFx5QOaqjVipPOpZfpTb0oaUpBdp4RpeI7W3Gb/dsmsRj7ItxvM6QxFdd5e
XfDZEYaUJRwSG3lHg9URWwSmfRWV81BhEuwvji4rNIEQ32VMsi2WWWPLOYYKGIw/
yE56xWBw7K78XwVx/b5yoNHBNjVNyjpNZ7jXkx6zdOjbqEpXJP+WfgVkYwlhlvAq
cCDbrF7jVWFqTV9tZNxlbaFlS8f17vld8DmmJ29Lo+WecsOo3M9n2Z6i79u7Xg2O
ip0V2Textq8rrKOwC1TLCRoQLypENO/cwdaF5amVkoXYDlY0rQtxf65Xe9bnJLrM
1G+tG8NZQu/bvW0mgrm0XHt2i6yfjn6sXEOY5VEC2+gRUriQ+GCETgzMe6ukb26/
VT38Va10SIu+xXwf/GXTwLskOO0AyWLBopTpL5q6faM4o/USX+Xl98sQVNQurHMS
xSQtpL6YPhQrmW7q5Q57OVWy70kEU8RpOJx6I7uyoUDz2g3bjmpIPpQX55vhofXK
3Xn76Ce9TyiVol71mPtBT1tYzi3ytZh/EYm2Wq3lEhbMT7zjw3T1Ypb4+q12VdCy
0Y9swKsQdhRCT6FwcCFSpCc2TzCCJCR6mChTe+z6rNm5BS2M6BaYcrX8PP82rZ8k
L0l3ymSLqSJ3J6Q+fdKhRq8EbCq6ngi31Q/l7fPHkW5VAJyowPRayD7UM09n6ou+
sg/kfQB8nh46uVxRRDpyUsrfhtIEQec2xrU17NmCr2VlAeOjWBn8lE/J1Gfn8WyV
05mY1aDGcRk/x02+74UujyuozYMfIVDXHpxp8YteTnBfiKVrRq+Aa9zVX9bkyagp
SJUTpF7lqMmiuvyZnG2xfLDfILR/zTRIRrm+ZIJLHeVQJtibOJ1llxE6kRvKx6zp
La47YCHKH+rLDTlNgrE5K/JtQgOKc+7bGQ6SCszf8OZWi5B2+Z+Ht36c3xQk9IOW
cjNpvjZxpiw6L1MhlQPE/wxz2JkOlKjJN0MmLscIyu15X+W/BvHwB8d11CRKUUiE
pV7OUoW2Ol1IgFHrEY33IhxwtyKtAKfQCiORarnwk/GvcD3TqmnzUeQdscdww4BI
wsO3c3aGr+wvU3P/8oFAoffD1KRihtoZ6CB347JcnaeEPlOS13a28JsJCOtjMxy9
wBH6UgzTwo04lDAStST+aIT4TaU4dlWmsAEQTpE8sa4DjpFtzK/ll+Wg2sA/SYaA
uAugsAOnTb1pkgk43GoYfc2fZCu1g9b/L3mZrE62W8HDfm67PWT65XMJziy/hcCy
DbXMAWfohLdePKDG7J0QQI8xcTN9TT5q3ZCglI9Xf7PE/qrHROdRgF8c8zyvB9dG
AVx96Z7akBoveqlFS44MnxIOGI0AzV8MrVbN51W6RHNyg/6UTL50/8zHmRWZj+iO
tfqiW+CtSHacYPy+Tcuft30PWZZkQDGphbRxaBRB00Fb+Bo57epDw4JS+4wRru33
2RHaVzQmnXwR6kP85x4uAR53UdgMgfK4cyylnFqGDlLFrHZfauFHg3kMIwqgVIVA
uMRrWC9XXU11j6NnP9J6Y64uSrjsh6eZOrtJIwA16U2r3PMMbn1hIdADrKu1MsPt
bkNsnPQUKJyX8DbRX45kje5ssUerbkxhvewvHQJlTyDxtgk/pGHOyKXoT+5vQEj9
pwHOrXi+QWidzi2vfRoNQJ0wXJr39dDTn0hVdsgFo2PsTh98W9cocVQfJnCL4Djs
Zlsp/BJOwlb2e3Q28E6pNyT+N63ZYEO9zLV/WmCB/eV2uMVoKibX3KszYkn0jAs0
RBytgnB8YW3n9RyorShchCKJzdjzR7nw79/lSLgDFE6W6Xh3VaGM07hz0vYWfaui
yvytkM9LPan2/GJM4zLFeA==
-----END ENCRYPTED PRIVATE KEY-----
+30 -21
View File
@@ -58,13 +58,13 @@ describe('Availability', () => {
jest.useRealTimers();
})
it('Should publish availabilty on startup for device where it is enabled for', async () => {
it('Should publish availability on startup for device where it is enabled for', async () => {
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
expect(MQTT.publish).not.toHaveBeenCalledWith('zigbee2mqtt/bulb_color_2/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
});
it('Should publish offline for active device when not seen for 10 minutes', async () => {
@@ -77,7 +77,7 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(1);
expect(devices.bulb_color.ping).toHaveBeenNthCalledWith(1, true);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Shouldnt do anything for a device when availability: false is set for device', async () => {
@@ -93,7 +93,7 @@ describe('Availability', () => {
await advancedTime(utils.hours(26));
expect(devices.remote.ping).toHaveBeenCalledTimes(0);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Should reset ping timer when device last seen changes for active device', async () => {
@@ -111,7 +111,7 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(1);
expect(devices.bulb_color.ping).toHaveBeenNthCalledWith(1, true);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Should ping again when first ping fails', async () => {
@@ -132,7 +132,7 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenNthCalledWith(1, true);
expect(devices.bulb_color.ping).toHaveBeenNthCalledWith(2, false);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Should reset ping timer when device last seen changes for passive device', async () => {
@@ -150,7 +150,7 @@ describe('Availability', () => {
await advancedTime(utils.hours(3));
expect(devices.remote.ping).toHaveBeenCalledTimes(0);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Should immediately mark device as online when it lastSeen changes', async () => {
@@ -158,13 +158,13 @@ describe('Availability', () => {
await advancedTime(utils.minutes(15));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
devices.bulb_color.lastSeen = Date.now();
await zigbeeHerdsman.events.lastSeenChanged({device: devices.bulb_color});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
});
it('Should allow to change availability timeout via device options', async () => {
@@ -179,6 +179,15 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(1);
});
it('Should not ping disabled devices', async () => {
settings.set(['devices', devices.bulb_color.ieeeAddr, 'disabled'], true);
await resetExtension();
MQTT.publish.mockClear();
await advancedTime(utils.minutes(15));
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(0);
});
it('Should allow to change availability timeout via avaiability options', async () => {
settings.set(['availability'], {active: {timeout: 30}});
await resetExtension();
@@ -227,7 +236,7 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(0);
});
it('Should to enable availabilty for just one device', async () => {
it('Should to enable availability for just one device', async () => {
settings.set(['availability'], false);
settings.set(['devices', devices.bulb_color.ieeeAddr, 'availability'], true);
@@ -274,22 +283,22 @@ describe('Availability', () => {
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
null, {retain: true, qos: 0}, expect.any(Function));
null, {retain: true, qos: 1}, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_new_name/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
await advancedTime(utils.hours(12));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_new_name/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
});
it('Should publish availabiltiy payload in JSON format', async () => {
it('Should publish availability payload in JSON format', async () => {
settings.set(['advanced', 'legacy_availability_payload'], false);
await resetExtension();
MQTT.publish.mockClear();
await advancedTime(utils.hours(26));
expect(devices.remote.ping).toHaveBeenCalledTimes(0);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote/availability',
stringify({state: 'offline'}), {retain: true, qos: 0}, expect.any(Function));
stringify({state: 'offline'}), {retain: true, qos: 1}, expect.any(Function));
});
it('Deprecated - should allow to block via advanced.availability_blocklist', async () => {
@@ -319,20 +328,20 @@ describe('Availability', () => {
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(1);
});
it('Should publish availabilty for groups', async () => {
it('Should publish availability for groups', async () => {
settings.set(['devices', devices.bulb_color_2.ieeeAddr, 'availability'], true);
await resetExtension();
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/group_tradfri_remote/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
MQTT.publish.mockClear();
await advancedTime(utils.minutes(12));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/group_tradfri_remote/availability',
'offline', {retain: true, qos: 0}, expect.any(Function));
'offline', {retain: true, qos: 1}, expect.any(Function));
MQTT.publish.mockClear();
devices.bulb_color_2.lastSeen = Date.now();
await zigbeeHerdsman.events.lastSeenChanged({device: devices.bulb_color_2});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/group_tradfri_remote/availability',
'online', {retain: true, qos: 0}, expect.any(Function));
'online', {retain: true, qos: 1}, expect.any(Function));
});
});
+94 -10
View File
File diff suppressed because one or more lines are too long
+14 -1
View File
@@ -65,6 +65,7 @@ describe('Configure', () => {
jest.useFakeTimers();
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
await jest.runOnlyPendingTimers();
await flushPromises();
});
@@ -72,8 +73,9 @@ describe('Configure', () => {
data.writeDefaultConfiguration();
settings.reRead();
mocksClear.forEach((m) => m.mockClear());
coordinatorEndpoint = zigbeeHerdsman.devices.coordinator.getEndpoint(1);
coordinatorEndpoint = zigbeeHerdsman.devices.coordinator.getEndpoint(1);
await resetExtension();
await jest.runOnlyPendingTimers();
});
afterAll(async () => {
@@ -100,6 +102,17 @@ describe('Configure', () => {
expectBulbConfigured();
});
it('Should not re-configure disabled devices', async () => {
expectBulbConfigured();
const device = zigbeeHerdsman.devices.bulb;
await flushPromises();
mockClear(device);
settings.set(['devices', device.ieeeAddr, 'disabled'], true);
zigbeeHerdsman.events.deviceJoined({device});
await flushPromises();
expectBulbNotConfigured();
});
it('Should reconfigure reporting on reconfigure event', async () => {
expectBulbConfigured();
const device = controller.zigbee.resolveEntity(zigbeeHerdsman.devices.bulb);
+22 -9
View File
@@ -52,7 +52,7 @@ describe('Controller', () => {
expect(logger.info).toHaveBeenCalledWith('remote (0x0017880104e45517): 324131092621 - Philips Hue dimmer switch (EndDevice)');
expect(logger.info).toHaveBeenCalledWith('0x0017880104e45518 (0x0017880104e45518): Not supported (EndDevice)');
expect(MQTT.connect).toHaveBeenCalledTimes(1);
expect(MQTT.connect).toHaveBeenCalledWith("mqtt://localhost", {"will": {"payload": "offline", "retain": true, "topic": "zigbee2mqtt/bridge/state", "qos": 1}});
expect(MQTT.connect).toHaveBeenCalledWith("mqtt://localhost", {"will": {"payload": Buffer.from("offline"), "retain": true, "topic": "zigbee2mqtt/bridge/state", "qos": 1}});
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb', stringify({"state":"ON","brightness":50,"color_temp":370,"linkquality":99}),{ retain: true, qos: 0 }, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote', stringify({"brightness":255}), { retain: true, qos: 0 }, expect.any(Function));
});
@@ -88,7 +88,7 @@ describe('Controller', () => {
await flushPromises();
expect(MQTT.connect).toHaveBeenCalledTimes(1);
const expected = {
"will": {"payload": "offline", "retain": true, "topic": "zigbee2mqtt/bridge/state", "qos": 1},
"will": {"payload": Buffer.from("offline"), "retain": true, "topic": "zigbee2mqtt/bridge/state", "qos": 1},
keepalive: 30,
ca: Buffer.from([99, 97]),
key: Buffer.from([107, 101, 121]),
@@ -103,14 +103,17 @@ describe('Controller', () => {
expect(MQTT.connect).toHaveBeenCalledWith("mqtt://localhost", expected);
});
it('Should generate network_key and pan_id when set to GENERATE', async () => {
it('Should generate network_key, pan_id and ext_pan_id when set to GENERATE', async () => {
settings.set(['advanced', 'network_key'], 'GENERATE');
settings.set(['advanced', 'pan_id'], 'GENERATE');
settings.set(['advanced', 'ext_pan_id'], 'GENERATE');
await controller.start();
await flushPromises();
expect(zigbeeHerdsman.constructor.mock.calls[0][0].network.networkKey.length).toStrictEqual(16);
expect(zigbeeHerdsman.constructor.mock.calls[0][0].network.extendedPanID.length).toStrictEqual(8);
expect(zigbeeHerdsman.constructor.mock.calls[0][0].network.panID).toStrictEqual(expect.any(Number));
expect(data.read().advanced.network_key.length).toStrictEqual(16);
expect(data.read().advanced.ext_pan_id.length).toStrictEqual(8);
expect(data.read().advanced.pan_id).toStrictEqual(expect.any(Number));
});
@@ -147,7 +150,6 @@ describe('Controller', () => {
logger.error.mockClear();
controller.mqtt.client.reconnecting = true;
jest.advanceTimersByTime(11 * 1000);
await flushPromises();
expect(logger.error).toHaveBeenCalledWith("Not connected to MQTT server!");
controller.mqtt.client.reconnecting = false;
});
@@ -202,7 +204,8 @@ describe('Controller', () => {
});
await controller.start();
await flushPromises();
expect(logger.error).toHaveBeenCalledWith('MQTT failed to connect: addr not found');
expect(logger.error).toHaveBeenCalledWith('MQTT error: addr not found');
expect(logger.error).toHaveBeenCalledWith('MQTT failed to connect, exiting...');
expect(mockExit).toHaveBeenCalledTimes(1);
expect(mockExit).toHaveBeenCalledWith(1, false);
});
@@ -640,7 +643,7 @@ describe('Controller', () => {
await flushPromises();
expect(MQTT.connect).toHaveBeenCalledTimes(1);
const expected = {
"will": { "payload": "offline", "retain": false, "topic": "zigbee2mqtt/bridge/state", "qos": 1 },
"will": { "payload": Buffer.from("offline"), "retain": false, "topic": "zigbee2mqtt/bridge/state", "qos": 1 },
}
expect(MQTT.connect).toHaveBeenCalledWith("mqtt://localhost", expected);
});
@@ -651,7 +654,7 @@ describe('Controller', () => {
MQTT.events['connect']();
await flushPromises();
jest.runOnlyPendingTimers();
expect(MQTT.publish).toHaveBeenCalledTimes(12);
expect(MQTT.publish).toHaveBeenCalledTimes(13);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/info', expect.any(String), { retain: true, qos: 0 }, expect.any(Function));
});
@@ -660,9 +663,10 @@ describe('Controller', () => {
MQTT.publish.mockClear();
MQTT.events['connect']();
await flushPromises();
await MQTT.events.message('zigbee2mqtt/bridge/state', 'online');
await MQTT.events.message('zigbee2mqtt/bridge/info', 'dummy');
jest.runOnlyPendingTimers();
expect(MQTT.publish).toHaveBeenCalledTimes(0);
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/state', expect.any(String), { retain: true, qos: 0 }, expect.any(Function));
});
it('Should prevent any message being published with retain flag when force_disable_retain is set', async () => {
@@ -717,4 +721,13 @@ describe('Controller', () => {
await flushPromises();
expect(logger.debug).toHaveBeenCalledWith(`Received Zigbee message from 'Coordinator', type 'attributeReport', cluster 'genBasic', data '{"modelId":null}' from endpoint 1, ignoring since it is from coordinator`);
});
it('Should remove state of removed device when stopped', async () => {
await controller.start();
const device = controller.zigbee.resolveEntity('bulb');
expect(controller.state.state[device.ieeeAddr]).toStrictEqual({"brightness":50,"color_temp":370,"linkquality":99,"state":"ON"});
device.zh.isDeleted = true;
await controller.stop();
expect(controller.state.state[device.ieeeAddr]).toStrictEqual(undefined);
});
});
+1
View File
@@ -19,6 +19,7 @@ describe('Data', () => {
const actual = data.getPath();
expect(actual).toBe(expected);
expect(data.joinPath('test')).toStrictEqual(path.join(expected, 'test'));
expect(data.joinPath('/test')).toStrictEqual(path.resolve(expected, '/test'));
delete process.env.ZIGBEE2MQTT_DATA;
data.testingOnlyReload();
});
-2
View File
@@ -72,7 +72,6 @@ describe('Loads external converters', () => {
it('Loads external converters', async () => {
fs.copyFileSync(path.join(__dirname, 'assets', 'mock-external-converter.js'), path.join(data.mockDir, 'mock-external-converter.js'));
const devicesCount = zigbeeHerdsman.devices.lenght;
settings.set(['external_converters'], ['mock-external-converter.js']);
await resetExtension();
expect(zigbeeHerdsmanConverters.addDeviceDefinition).toHaveBeenCalledTimes(1);
@@ -90,7 +89,6 @@ describe('Loads external converters', () => {
it('Loads multiple external converters', async () => {
fs.copyFileSync(path.join(__dirname, 'assets', 'mock-external-converter-multiple.js'), path.join(data.mockDir, 'mock-external-converter-multiple.js'));
const devicesCount = zigbeeHerdsman.devices.lenght;
settings.set(['external_converters'], ['mock-external-converter-multiple.js']);
await resetExtension();
expect(zigbeeHerdsmanConverters.addDeviceDefinition).toHaveBeenCalledTimes(2);
+8 -3
View File
@@ -3,7 +3,7 @@ const logger = require('./stub/logger');
const zigbeeHerdsman = require('./stub/zigbeeHerdsman');
const MQTT = require('./stub/mqtt');
const path = require('path');
const rimraf = require('rimraf');
const {rimrafSync} = require('rimraf');
const settings = require('../lib/util/settings');
const Controller = require('../lib/controller');
const stringify = require('json-stable-stringify-without-jsonify');
@@ -45,7 +45,7 @@ describe('User extensions', () => {
});
afterEach(() => {
const extensionPath = path.join(data.mockDir, 'extension');
rimraf.sync(extensionPath);
rimrafSync(extensionPath);
})
it('Load user extension', async () => {
@@ -84,7 +84,12 @@ describe('User extensions', () => {
MQTT.events.message('zigbee2mqtt/bridge/request/extension/save', stringify({"name": "foo.js", "code": extensionCode}));
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/response/extension/save', stringify({"data":{},"error":"Unexpected identifier","status":"error"}), { retain: false, qos: 0 }, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bridge/response/extension/save', expect.any(String), { retain: false, qos: 0 }, expect.any(Function));
const payload = JSON.parse(MQTT.publish.mock.calls[0][1]);
expect(payload).toEqual(
expect.objectContaining({"data":{},"status":"error"})
);
expect(payload.error).toMatch("Unexpected identifier");
});
it('Removes user extension', async () => {
+116 -4
View File
@@ -1,5 +1,5 @@
const data = require('./stub/data');
require('./stub/logger');
const logger = require('./stub/logger');
require('./stub/zigbeeHerdsman');
const MQTT = require('./stub/mqtt');
const settings = require('../lib/util/settings');
@@ -7,6 +7,7 @@ const Controller = require('../lib/controller');
const stringify = require('json-stable-stringify-without-jsonify');
const flushPromises = require('./lib/flushPromises');
const zigbeeHerdsman = require('./stub/zigbeeHerdsman');
const path = require("path");
jest.spyOn(process, 'exit').mockImplementation(() => {});
const mockHTTP = {
@@ -19,6 +20,16 @@ const mockHTTP = {
events: {},
};
const mockHTTPS = {
implementation: {
listen: jest.fn(),
on: (event, handler) => {mockHTTPS.events[event] = handler},
close: jest.fn().mockImplementation((cb) => cb()),
},
variables: {},
events: {},
};
const mockWSocket = {
close: jest.fn(),
};
@@ -48,6 +59,14 @@ jest.mock('http', () => ({
mockHTTP.variables.onRequest = onRequest;
return mockHTTP.implementation;
}),
Agent: jest.fn(),
}));
jest.mock('https', () => ({
createServer: jest.fn().mockImplementation((onRequest) => {
mockHTTPS.variables.onRequest = onRequest;
return mockHTTPS.implementation;
}),
}));
jest.mock("connect-gzip-static", () =>
@@ -98,7 +117,6 @@ describe('Frontend', () => {
await controller.start();
expect(mockNodeStatic.variables.path).toBe("my/dummy/path");
expect(mockHTTP.implementation.listen).toHaveBeenCalledWith(8081, "127.0.0.1");
const mockWSClient = {
implementation: {
terminate: jest.fn(),
@@ -111,6 +129,96 @@ describe('Frontend', () => {
expect(mockWSClient.implementation.terminate).toHaveBeenCalledTimes(1);
expect(mockHTTP.implementation.close).toHaveBeenCalledTimes(1);
expect(mockWS.implementation.close).toHaveBeenCalledTimes(1);
mockWS.implementation.close.mockClear();
mockHTTP.implementation.close.mockClear();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Start/stop without host', async () => {
settings.set(['frontend'], {port: 8081});
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
expect(mockNodeStatic.variables.path).toBe("my/dummy/path");
expect(mockHTTP.implementation.listen).toHaveBeenCalledWith(8081);
const mockWSClient = {
implementation: {
terminate: jest.fn(),
send: jest.fn(),
},
events: {},
};
mockWS.implementation.clients.push(mockWSClient.implementation);
await controller.stop();
expect(mockWSClient.implementation.terminate).toHaveBeenCalledTimes(1);
expect(mockHTTP.implementation.close).toHaveBeenCalledTimes(1);
expect(mockWS.implementation.close).toHaveBeenCalledTimes(1);
mockWS.implementation.close.mockClear();
mockHTTP.implementation.close.mockClear();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Start/stop unix socket', async () => {
settings.set(['frontend'], {host: "/tmp/zigbee2mqtt.sock"});
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
expect(mockNodeStatic.variables.path).toBe("my/dummy/path");
expect(mockHTTP.implementation.listen).toHaveBeenCalledWith("/tmp/zigbee2mqtt.sock");
const mockWSClient = {
implementation: {
terminate: jest.fn(),
send: jest.fn(),
},
events: {},
};
mockWS.implementation.clients.push(mockWSClient.implementation);
await controller.stop();
expect(mockWSClient.implementation.terminate).toHaveBeenCalledTimes(1);
expect(mockHTTP.implementation.close).toHaveBeenCalledTimes(1);
expect(mockWS.implementation.close).toHaveBeenCalledTimes(1);
mockWS.implementation.close.mockClear();
mockHTTP.implementation.close.mockClear();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Start/stop HTTPS valid', async () => {
settings.set(['frontend','ssl_cert'], path.join(__dirname,'assets','certs','dummy.crt'));
settings.set(['frontend','ssl_key'], path.join(__dirname,'assets','certs','dummy.key'));
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
expect(mockHTTP.implementation.listen).not.toHaveBeenCalledWith(8081, "127.0.0.1");
expect(mockHTTPS.implementation.listen).toHaveBeenCalledWith(8081, "127.0.0.1");
await controller.stop();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Start/stop HTTPS invalid : missing config', async () => {
settings.set(['frontend','ssl_cert'], path.join(__dirname,'assets','certs','dummy.crt'));
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
expect(mockHTTP.implementation.listen).toHaveBeenCalledWith(8081, "127.0.0.1");
expect(mockHTTPS.implementation.listen).not.toHaveBeenCalledWith(8081, "127.0.0.1");
await controller.stop();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Start/stop HTTPS invalid : missing file', async () => {
settings.set(['frontend','ssl_cert'], 'filesNotExists.crt');
settings.set(['frontend','ssl_key'], path.join(__dirname,'assets','certs','dummy.key'));
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
expect(mockHTTP.implementation.listen).toHaveBeenCalledWith(8081, "127.0.0.1");
expect(mockHTTPS.implementation.listen).not.toHaveBeenCalledWith(8081, "127.0.0.1");
await controller.stop();
mockHTTP.implementation.listen.mockClear();
mockHTTPS.implementation.listen.mockClear();
});
it('Websocket interaction', async () => {
@@ -140,7 +248,7 @@ describe('Frontend', () => {
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bulb_color',
stringify({state: 'ON', linkquality: null, update_available: null, update: {state: null}}),
stringify({state: 'ON', power_on_behavior:null, linkquality: null, update_available: null, update: {state: null, installed_version: -1, latest_version: -1}}),
{ retain: false, qos: 0 },
expect.any(Function)
);
@@ -149,9 +257,13 @@ describe('Frontend', () => {
mockWSClient.events.message(null, false);
await flushPromises();
// Error
mockWSClient.events.error(new Error('This is an error'));
expect(logger.error).toHaveBeenCalledWith('WebSocket error: This is an error');
// Received message on socket
expect(mockWSClient.implementation.send).toHaveBeenCalledTimes(1);
expect(mockWSClient.implementation.send).toHaveBeenCalledWith(stringify({topic: 'bulb_color', payload: {state: 'ON', linkquality: null, update_available: null, update: {state: null}}}));
expect(mockWSClient.implementation.send).toHaveBeenCalledWith(stringify({topic: 'bulb_color', payload: {state: 'ON', power_on_behavior:null, linkquality: null, update_available: null, update: {state: null, installed_version: -1, latest_version: -1}}}));
// Shouldnt set when not ready
mockWSClient.implementation.send.mockClear();
+16
View File
@@ -334,6 +334,22 @@ describe('Groups', () => {
expect(MQTT.publish).toHaveBeenCalledWith("zigbee2mqtt/group_1", stringify({"state":"ON"}), {"retain": false, qos: 0}, expect.any(Function));
});
it('Should not publish state change when group changes state and device is disabled', async () => {
const device = zigbeeHerdsman.devices.bulb_color;
const endpoint = device.getEndpoint(1);
const group = zigbeeHerdsman.groups.group_1;
group.members.push(endpoint);
settings.set(['devices', device.ieeeAddr, 'disabled'], true);
settings.set(['groups'], {'1': {friendly_name: 'group_1', retain: false, devices: [device.ieeeAddr]}});
await resetExtension();
MQTT.publish.mockClear();
await MQTT.events.message('zigbee2mqtt/group_1/set', stringify({state: 'ON'}));
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith("zigbee2mqtt/group_1", stringify({"state":"ON"}), {"retain": false, qos: 0}, expect.any(Function));
});
it('Should publish state change for group when members state change', async () => {
// Created for https://github.com/Koenkk/zigbee2mqtt/issues/5725
const device = zigbeeHerdsman.devices.bulb_color;
+363 -113
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -5,7 +5,7 @@ const fs = require('fs');
const path = require('path');
const data = require('./stub/data');
let stdOutWriteOriginal;
const rimraf = require('rimraf');
const {rimrafSync} = require('rimraf');
const Transport = require('winston-transport');
describe('Logger', () => {
@@ -37,7 +37,7 @@ describe('Logger', () => {
logger.logOutput();
for (const d of fs.readdirSync(dir.name)) {
rimraf.sync(path.join(dir.name, d));
rimrafSync(path.join(dir.name, d));
}
for (let i = 0; i < 21; i++) {
+18 -3
View File
@@ -102,7 +102,7 @@ describe('Networkmap', () => {
let call = MQTT.publish.mock.calls[0];
expect(call[0]).toStrictEqual('zigbee2mqtt/bridge/networkmap/raw');
const expected = {"links":[{"depth":1,"linkquality":120,"lqi":120,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[{"destinationAddress":6540,"nextHop":40369,"status":"ACTIVE"}],"source":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"sourceIeeeAddr":"0x000b57fffec6a5b2","sourceNwkAddr":40369,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x0017880104e45511","networkAddress":1114},"sourceIeeeAddr":"0x0017880104e45511","sourceNwkAddr":1114,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":2,"linkquality":110,"lqi":110,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":100,"lqi":100,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"sourceIeeeAddr":"0x0017880104e45559","sourceNwkAddr":6540,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":130,"lqi":130,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45521","networkAddress":6538},"sourceIeeeAddr":"0x0017880104e45521","sourceNwkAddr":6538,"target":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"targetIeeeAddr":"0x0017880104e45559"}],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b00120144ae","lastSeen":1000,"modelID":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white","model":"LED1545G12","supports":"light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, linkquality","vendor":"IKEA"},"failed":[],"friendlyName":"bulb","ieeeAddr":"0x000b57fffec6a5b2","lastSeen":1000,"modelID":"TRADFRI bulb E27 WS opal 980lm","networkAddress":40369,"type":"Router"},{"definition":{"description":"Hue Go","model":"7146060PH","supports":"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), effect, linkquality","vendor":"Philips"},"failed":[],"friendlyName":"bulb_color","ieeeAddr":"0x000b57fffec6a5b3","lastSeen":1000,"modelID":"LLC020","networkAddress":40399,"type":"Router"},{"definition":{"description":"Aqara double key wireless wall switch (2016 model)","model":"WXKG02LM_rev1","supports":"battery, action, voltage, power_outage_count, linkquality","vendor":"Xiaomi"},"friendlyName":"button_double_key","ieeeAddr":"0x0017880104e45521","lastSeen":1000,"modelID":"lumi.sensor_86sw2.es1","networkAddress":6538,"type":"EndDevice"},{"definition":null,"failed":["lqi","routingTable"],"friendlyName":"0x0017880104e45525","ieeeAddr":"0x0017880104e45525","lastSeen":1000,"manufacturerName":"Boef","modelID":"notSupportedModelID","networkAddress":6536,"type":"Router"},{"definition":{"description":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)","model":"CC2530.ROUTER","supports":"led, linkquality","vendor":"Custom devices (DiY)"},"failed":[],"friendlyName":"cc2530_router","ieeeAddr":"0x0017880104e45559","lastSeen":1000,"modelID":"lumi.router","networkAddress":6540,"type":"Router"},{"definition":{"description": "external","model":"external_converter_device","supports":"linkquality","vendor":"external"},"friendlyName":"0x0017880104e45511","ieeeAddr":"0x0017880104e45511","lastSeen":1000,"modelID":"external_converter_device","networkAddress":1114,"type":"EndDevice"}]};
const expected = {"links":[{"depth":1,"linkquality":120,"lqi":120,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[{"destinationAddress":6540,"nextHop":40369,"status":"ACTIVE"}],"source":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"sourceIeeeAddr":"0x000b57fffec6a5b2","sourceNwkAddr":40369,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x0017880104e45511","networkAddress":1114},"sourceIeeeAddr":"0x0017880104e45511","sourceNwkAddr":1114,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":2,"linkquality":110,"lqi":110,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":100,"lqi":100,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"sourceIeeeAddr":"0x0017880104e45559","sourceNwkAddr":6540,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":130,"lqi":130,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45521","networkAddress":6538},"sourceIeeeAddr":"0x0017880104e45521","sourceNwkAddr":6538,"target":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"targetIeeeAddr":"0x0017880104e45559"}],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b00120144ae","lastSeen":1000,"modelID":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white","model":"LED1545G12","supports":"light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, color_options, linkquality","vendor":"IKEA"},"failed":[],"friendlyName":"bulb","ieeeAddr":"0x000b57fffec6a5b2","lastSeen":1000,"modelID":"TRADFRI bulb E27 WS opal 980lm","networkAddress":40369,"type":"Router"},{"definition":{"description":"Hue Go","model":"7146060PH","supports":"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality","vendor":"Philips"},"failed":[],"friendlyName":"bulb_color","ieeeAddr":"0x000b57fffec6a5b3","lastSeen":1000,"modelID":"LLC020","networkAddress":40399,"type":"Router"},{"definition":{"description":"Aqara double key wireless wall switch (2016 model)","model":"WXKG02LM_rev1","supports":"battery, action, voltage, power_outage_count, linkquality","vendor":"Xiaomi"},"friendlyName":"button_double_key","ieeeAddr":"0x0017880104e45521","lastSeen":1000,"modelID":"lumi.sensor_86sw2.es1","networkAddress":6538,"type":"EndDevice"},{"definition":null,"failed":["lqi","routingTable"],"friendlyName":"0x0017880104e45525","ieeeAddr":"0x0017880104e45525","lastSeen":1000,"manufacturerName":"Boef","modelID":"notSupportedModelID","networkAddress":6536,"type":"Router"},{"definition":{"description":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)","model":"CC2530.ROUTER","supports":"led, linkquality","vendor":"Custom devices (DiY)"},"failed":[],"friendlyName":"cc2530_router","ieeeAddr":"0x0017880104e45559","lastSeen":1000,"modelID":"lumi.router","networkAddress":6540,"type":"Router"},{"definition":{"description": "external","model":"external_converter_device","supports":"linkquality","vendor":"external"},"friendlyName":"0x0017880104e45511","ieeeAddr":"0x0017880104e45511","lastSeen":1000,"modelID":"external_converter_device","networkAddress":1114,"type":"EndDevice"}]};
expect(JSON.parse(call[1])).toStrictEqual(expected);
/**
@@ -276,12 +276,12 @@ describe('Networkmap', () => {
let call = MQTT.publish.mock.calls[0];
expect(call[0]).toStrictEqual('zigbee2mqtt/bridge/response/networkmap');
const expected = {"data":{"routes":true,"type":"raw","value":{"links":[{"depth":1,"linkquality":120,"lqi":120,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[{"destinationAddress":6540,"nextHop":40369,"status":"ACTIVE"}],"source":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"sourceIeeeAddr":"0x000b57fffec6a5b2","sourceNwkAddr":40369,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x0017880104e45511","networkAddress":1114},"sourceIeeeAddr":"0x0017880104e45511","sourceNwkAddr":1114,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":2,"linkquality":110,"lqi":110,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":100,"lqi":100,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"sourceIeeeAddr":"0x0017880104e45559","sourceNwkAddr":6540,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":130,"lqi":130,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45521","networkAddress":6538},"sourceIeeeAddr":"0x0017880104e45521","sourceNwkAddr":6538,"target":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"targetIeeeAddr":"0x0017880104e45559"}],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b00120144ae","lastSeen":1000,"modelID":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white","model":"LED1545G12","supports":"light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, linkquality","vendor":"IKEA"},"failed":[],"friendlyName":"bulb","ieeeAddr":"0x000b57fffec6a5b2","lastSeen":1000,"modelID":"TRADFRI bulb E27 WS opal 980lm","networkAddress":40369,"type":"Router"},{"definition":{"description":"Hue Go","model":"7146060PH","supports":"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), effect, linkquality","vendor":"Philips"},"failed":[],"friendlyName":"bulb_color","ieeeAddr":"0x000b57fffec6a5b3","lastSeen":1000,"modelID":"LLC020","networkAddress":40399,"type":"Router"},{"definition":{"description":"Aqara double key wireless wall switch (2016 model)","model":"WXKG02LM_rev1","supports":"battery, action, voltage, power_outage_count, linkquality","vendor":"Xiaomi"},"friendlyName":"button_double_key","ieeeAddr":"0x0017880104e45521","lastSeen":1000,"modelID":"lumi.sensor_86sw2.es1","networkAddress":6538,"type":"EndDevice"},{"definition":null,"failed":["lqi","routingTable"],"friendlyName":"0x0017880104e45525","ieeeAddr":"0x0017880104e45525","lastSeen":1000,"manufacturerName":"Boef","modelID":"notSupportedModelID","networkAddress":6536,"type":"Router"},{"definition":{"description":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)","model":"CC2530.ROUTER","supports":"led, linkquality","vendor":"Custom devices (DiY)"},"failed":[],"friendlyName":"cc2530_router","ieeeAddr":"0x0017880104e45559","lastSeen":1000,"modelID":"lumi.router","networkAddress":6540,"type":"Router"},{"definition":{"description":"external","model":"external_converter_device","supports":"linkquality","vendor":"external"},"friendlyName":"0x0017880104e45511","ieeeAddr":"0x0017880104e45511","lastSeen":1000,"modelID":"external_converter_device","networkAddress":1114,"type":"EndDevice"}]}},"status":"ok"};
const expected = {"data":{"routes":true,"type":"raw","value":{"links":[{"depth":1,"linkquality":120,"lqi":120,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[{"destinationAddress":6540,"nextHop":40369,"status":"ACTIVE"}],"source":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"sourceIeeeAddr":"0x000b57fffec6a5b2","sourceNwkAddr":40369,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x0017880104e45511","networkAddress":1114},"sourceIeeeAddr":"0x0017880104e45511","sourceNwkAddr":1114,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":2,"linkquality":110,"lqi":110,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":100,"lqi":100,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"sourceIeeeAddr":"0x0017880104e45559","sourceNwkAddr":6540,"target":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"targetIeeeAddr":"0x000b57fffec6a5b2"},{"depth":2,"linkquality":130,"lqi":130,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45521","networkAddress":6538},"sourceIeeeAddr":"0x0017880104e45521","sourceNwkAddr":6538,"target":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"targetIeeeAddr":"0x0017880104e45559"}],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b00120144ae","lastSeen":1000,"modelID":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white","model":"LED1545G12","supports":"light (state, brightness, color_temp, color_temp_startup), effect, power_on_behavior, color_options, linkquality","vendor":"IKEA"},"failed":[],"friendlyName":"bulb","ieeeAddr":"0x000b57fffec6a5b2","lastSeen":1000,"modelID":"TRADFRI bulb E27 WS opal 980lm","networkAddress":40369,"type":"Router"},{"definition":{"description":"Hue Go","model":"7146060PH","supports":"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality","vendor":"Philips"},"failed":[],"friendlyName":"bulb_color","ieeeAddr":"0x000b57fffec6a5b3","lastSeen":1000,"modelID":"LLC020","networkAddress":40399,"type":"Router"},{"definition":{"description":"Aqara double key wireless wall switch (2016 model)","model":"WXKG02LM_rev1","supports":"battery, action, voltage, power_outage_count, linkquality","vendor":"Xiaomi"},"friendlyName":"button_double_key","ieeeAddr":"0x0017880104e45521","lastSeen":1000,"modelID":"lumi.sensor_86sw2.es1","networkAddress":6538,"type":"EndDevice"},{"definition":null,"failed":["lqi","routingTable"],"friendlyName":"0x0017880104e45525","ieeeAddr":"0x0017880104e45525","lastSeen":1000,"manufacturerName":"Boef","modelID":"notSupportedModelID","networkAddress":6536,"type":"Router"},{"definition":{"description":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)","model":"CC2530.ROUTER","supports":"led, linkquality","vendor":"Custom devices (DiY)"},"failed":[],"friendlyName":"cc2530_router","ieeeAddr":"0x0017880104e45559","lastSeen":1000,"modelID":"lumi.router","networkAddress":6540,"type":"Router"},{"definition":{"description":"external","model":"external_converter_device","supports":"linkquality","vendor":"external"},"friendlyName":"0x0017880104e45511","ieeeAddr":"0x0017880104e45511","lastSeen":1000,"modelID":"external_converter_device","networkAddress":1114,"type":"EndDevice"}]}},"status":"ok"};
const actual = JSON.parse(call[1]);
expect(actual).toStrictEqual(expected);
});
it('Should throw error when rquesting invalid type', async () => {
it('Should throw error when requesting invalid type', async () => {
mock();
MQTT.publish.mockClear();
MQTT.events.message('zigbee2mqtt/bridge/request/networkmap', 'not_existing');
@@ -292,4 +292,19 @@ describe('Networkmap', () => {
{retain: false, qos: 0}, expect.any(Function)
);
});
it('Should exclude disabled devices from networkmap', async () => {
settings.set(['devices', '0x000b57fffec6a5b2', 'disabled'], true);
mock();
MQTT.publish.mockClear();
MQTT.events.message('zigbee2mqtt/bridge/request/networkmap', stringify({type: 'raw', routes: true}));
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
let call = MQTT.publish.mock.calls[0];
expect(call[0]).toStrictEqual('zigbee2mqtt/bridge/response/networkmap');
const expected = {"data":{"routes":true,"type":"raw","value":{"links":[{"depth":1,"linkquality":120,"lqi":120,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x000b57fffec6a5b3","networkAddress":40399},"sourceIeeeAddr":"0x000b57fffec6a5b3","sourceNwkAddr":40399,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[{"destinationAddress":6540,"nextHop":40369,"status":"ACTIVE"}],"source":{"ieeeAddr":"0x000b57fffec6a5b2","networkAddress":40369},"sourceIeeeAddr":"0x000b57fffec6a5b2","sourceNwkAddr":40369,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":1,"linkquality":92,"lqi":92,"relationship":2,"routes":[],"source":{"ieeeAddr":"0x0017880104e45511","networkAddress":1114},"sourceIeeeAddr":"0x0017880104e45511","sourceNwkAddr":1114,"target":{"ieeeAddr":"0x00124b00120144ae","networkAddress":0},"targetIeeeAddr":"0x00124b00120144ae"},{"depth":2,"linkquality":130,"lqi":130,"relationship":1,"routes":[],"source":{"ieeeAddr":"0x0017880104e45521","networkAddress":6538},"sourceIeeeAddr":"0x0017880104e45521","sourceNwkAddr":6538,"target":{"ieeeAddr":"0x0017880104e45559","networkAddress":6540},"targetIeeeAddr":"0x0017880104e45559"}],"nodes":[{"definition":null,"failed":[],"friendlyName":"Coordinator","ieeeAddr":"0x00124b00120144ae","lastSeen":1000,"modelID":null,"networkAddress":0,"type":"Coordinator"},{"definition":{"description":"Hue Go","model":"7146060PH","supports":"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality","vendor":"Philips"},"failed":[],"friendlyName":"bulb_color","ieeeAddr":"0x000b57fffec6a5b3","lastSeen":1000,"modelID":"LLC020","networkAddress":40399,"type":"Router"},{"definition":{"description":"Aqara double key wireless wall switch (2016 model)","model":"WXKG02LM_rev1","supports":"battery, action, voltage, power_outage_count, linkquality","vendor":"Xiaomi"},"friendlyName":"button_double_key","ieeeAddr":"0x0017880104e45521","lastSeen":1000,"modelID":"lumi.sensor_86sw2.es1","networkAddress":6538,"type":"EndDevice"},{"definition":null,"failed":["lqi","routingTable"],"friendlyName":"0x0017880104e45525","ieeeAddr":"0x0017880104e45525","lastSeen":1000,"manufacturerName":"Boef","modelID":"notSupportedModelID","networkAddress":6536,"type":"Router"},{"definition":{"description":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)","model":"CC2530.ROUTER","supports":"led, linkquality","vendor":"Custom devices (DiY)"},"failed":[],"friendlyName":"cc2530_router","ieeeAddr":"0x0017880104e45559","lastSeen":1000,"modelID":"lumi.router","networkAddress":6540,"type":"Router"},{"definition":{"description":"external","model":"external_converter_device","supports":"linkquality","vendor":"external"},"friendlyName":"0x0017880104e45511","ieeeAddr":"0x0017880104e45511","lastSeen":1000,"modelID":"external_converter_device","networkAddress":1114,"type":"EndDevice"}]}},"status":"ok"};
const actual = JSON.parse(call[1]);
expect(actual).toStrictEqual(expected);
});
});
+32 -29
View File
@@ -36,6 +36,7 @@ describe('OTA update', () => {
jest.useFakeTimers();
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
await jest.runOnlyPendingTimers();
await flushPromises();
});
@@ -71,6 +72,7 @@ describe('OTA update', () => {
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
onUpdate(0, null);
onUpdate(10, 3600.2123);
return 90;
});
MQTT.events.message('zigbee2mqtt/bridge/request/device/ota_update/update', 'bulb');
@@ -98,7 +100,7 @@ describe('OTA update', () => {
);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bulb',
stringify({"update_available":false,"update":{"state":"idle"}}),
stringify({"update_available":false,"update":{"state":"idle","installed_version":90,"latest_version":90}}),
{retain: true, qos: 0}, expect.any(Function)
);
expect(MQTT.publish).toHaveBeenCalledWith(
@@ -144,7 +146,7 @@ describe('OTA update', () => {
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockReturnValueOnce(false);
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: false, currentFileVersion: 10, otaFileVersion: 10});
MQTT.events.message('zigbee2mqtt/bridge/request/device/ota_update/check', "bulb");
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
@@ -156,7 +158,7 @@ describe('OTA update', () => {
);
MQTT.publish.mockClear();
mapped.ota.isUpdateAvailable.mockReturnValueOnce(true);
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: true, currentFileVersion: 10, otaFileVersion: 12});
MQTT.events.message('zigbee2mqtt/bridge/request/device/ota_update/check', "bulb");
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(2);
@@ -172,7 +174,7 @@ describe('OTA update', () => {
const device = zigbeeHerdsman.devices.bulb;
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockImplementationOnce(() => {throw new Error('RF singals disturbed because of dogs barking')});
mapped.ota.isUpdateAvailable.mockImplementationOnce(() => {throw new Error('RF signals disturbed because of dogs barking')});
MQTT.events.message('zigbee2mqtt/bridge/request/device/ota_update/check', "bulb");
await flushPromises();
@@ -180,7 +182,7 @@ describe('OTA update', () => {
expect(mapped.ota.updateToLatest).toHaveBeenCalledTimes(0);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bridge/response/device/ota_update/check',
stringify({"data":{"id": "bulb"},"status":"error","error": `Failed to check if update available for 'bulb' (RF singals disturbed because of dogs barking)`}),
stringify({"data":{"id": "bulb"},"status":"error","error": `Failed to check if update available for 'bulb' (RF signals disturbed because of dogs barking)`}),
{retain: false, qos: 0}, expect.any(Function)
);
});
@@ -249,8 +251,8 @@ describe('OTA update', () => {
const data = {imageType: 12382};
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockReturnValueOnce(true);
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: true, currentFileVersion: 10, otaFileVersion: 12});
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
logger.info.mockClear();
await zigbeeHerdsman.events.message(payload);
await flushPromises();
@@ -258,7 +260,7 @@ describe('OTA update', () => {
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(logger.info).toHaveBeenCalledWith(`Update available for 'bulb'`);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x95});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
// Should not request again when device asks again after a short time
await zigbeeHerdsman.events.message(payload);
@@ -266,13 +268,13 @@ describe('OTA update', () => {
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
logger.info.mockClear();
mapped.ota.isUpdateAvailable.mockReturnValueOnce(false);
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: false, currentFileVersion: 10, otaFileVersion: 10});
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(logger.info).not.toHaveBeenCalledWith(`Update available for 'bulb'`);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bulb',
stringify({"update_available":true,"update":{"state":"available"}}),
stringify({"update_available":true,"update":{"state":"available","installed_version":10,"latest_version":12}}),
{retain: true, qos: 0}, expect.any(Function)
);
});
@@ -284,14 +286,14 @@ describe('OTA update', () => {
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockImplementationOnce(() => {throw new Error('Nothing to find here')})
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
logger.info.mockClear();
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bulb',
stringify({"update_available":false,"update":{"state":"idle"}}),
@@ -305,18 +307,18 @@ describe('OTA update', () => {
const data = {imageType: 12382};
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockReturnValueOnce(false);
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: false, currentFileVersion: 13, otaFileVersion: 13});
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
logger.info.mockClear();
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x95});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bulb',
stringify({"update_available":false,"update":{"state":"idle"}}),
stringify({"update_available":false,"update":{"state":"idle","installed_version": 13, "latest_version": 13}}),
{retain: true, qos: 0}, expect.any(Function)
);
});
@@ -327,8 +329,8 @@ describe('OTA update', () => {
const data = {imageType: 12382};
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
mapped.ota.isUpdateAvailable.mockReturnValueOnce(true);
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: true, currentFileVersion: 10, otaFileVersion: 13});
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
logger.info.mockClear();
await zigbeeHerdsman.events.message(payload);
await flushPromises();
@@ -338,22 +340,22 @@ describe('OTA update', () => {
it('Should respond with NO_IMAGE_AVAILABLE when not supporting OTA', async () => {
const device = zigbeeHerdsman.devices.HGZB04D;
const data = {imageType: 12382};
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 152});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 152}, undefined, 10);
});
it('Shouldnt respond with NO_IMAGE_AVAILABLE when not supporting OTA and device has no OTA endpoint', async () => {
it('Should respond with NO_IMAGE_AVAILABLE when not supporting OTA and device has no OTA endpoint to standard endpoint', async () => {
const device = zigbeeHerdsman.devices.SV01;
const data = {imageType: 12382};
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10};
const payload = {data, cluster: 'genOta', device, endpoint: device.getEndpoint(1), type: 'commandQueryNextImageRequest', linkquality: 10, meta: {zclTransactionSequenceNumber: 10}};
logger.error.mockClear();
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(0);
expect(logger.error).toHaveBeenCalledTimes(0);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 152}, undefined, 10);
});
it('Legacy api: Should OTA update a device', async () => {
@@ -372,6 +374,7 @@ describe('OTA update', () => {
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
onUpdate(0, null);
onUpdate(10, 3600);
return 91;
});
MQTT.events.message('zigbee2mqtt/bridge/ota_update/update', 'bulb');
@@ -383,7 +386,7 @@ describe('OTA update', () => {
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 0.00%`);
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 10.00%, ≈ 60 minutes remaining`);
expect(logger.info).toHaveBeenCalledWith(`Finished update of 'bulb'`);
expect(logger.info).toHaveBeenCalledWith(`Device 'bulb' was updated from '{"dateCode":"20190101","softwareBuildID":1}' to '{"dateCode":"20190103","softwareBuildID":3}'`);
expect(logger.info).toHaveBeenCalledWith(`Device 'bulb' was updated from '{"dateCode":"20190101","softwareBuildID":1}' to '{"dateCode":"20190103","softwareBuildID":3}'`);
expect(logger.error).toHaveBeenCalledTimes(0);
expect(device.save).toHaveBeenCalledTimes(2);
expect(endpoint.read).toHaveBeenCalledWith('genBasic', ['dateCode', 'swBuildId'], {'sendWhen': 'immediate'});
@@ -414,7 +417,7 @@ describe('OTA update', () => {
mockClear(mapped);
logger.info.mockClear();
mapped.ota.isUpdateAvailable.mockReturnValueOnce(false);
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: false, currentFileVersion: 13, otaFileVersion: 13});
MQTT.events.message('zigbee2mqtt/bridge/ota_update/check', 'bulb');
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
@@ -422,7 +425,7 @@ describe('OTA update', () => {
expect(logger.info).toHaveBeenCalledWith(`No update available for 'bulb'`);
logger.info.mockClear();
mapped.ota.isUpdateAvailable.mockReturnValueOnce(true);
mapped.ota.isUpdateAvailable.mockReturnValueOnce({available: true, currentFileVersion: 13, otaFileVersion: 15});
MQTT.events.message('zigbee2mqtt/bridge/ota_update/check', 'bulb');
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(2);
@@ -435,13 +438,13 @@ describe('OTA update', () => {
const mapped = zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
logger.error.mockClear();
mapped.ota.isUpdateAvailable.mockImplementationOnce(() => {throw new Error('RF singals disturbed because of dogs barking')});
mapped.ota.isUpdateAvailable.mockImplementationOnce(() => {throw new Error('RF signals disturbed because of dogs barking')});
MQTT.events.message('zigbee2mqtt/bridge/ota_update/check', 'bulb');
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.updateToLatest).toHaveBeenCalledTimes(0);
expect(logger.error).toHaveBeenCalledWith(`Failed to check if update available for 'bulb' (RF singals disturbed because of dogs barking)`);
expect(logger.error).toHaveBeenCalledWith(`Failed to check if update available for 'bulb' (RF signals disturbed because of dogs barking)`);
});
it('Legacy api: Should not check for OTA when device does not support it', async () => {
+16 -9
View File
@@ -71,12 +71,7 @@ describe('Publish', () => {
});
it('Should corretly handle mallformed messages', async () => {
await MQTT.events.message('zigbee2mqtt/foo', undefined);
await MQTT.events.message('zigbee2mqtt/foo', null);
await MQTT.events.message('zigbee2mqtt/foo', "");
await MQTT.events.message('zigbee2mqtt/bulb_color/set', undefined);
await MQTT.events.message('zigbee2mqtt/bulb_color/set', null);
await MQTT.events.message('zigbee2mqtt/bulb_color/set', "");
await flushPromises();
expectNothingPublished();
@@ -150,7 +145,7 @@ describe('Publish', () => {
it('Should publish messages to zigbee devices with color_temp in %', async () => {
const device = zigbeeHerdsman.devices.bulb_color;
const endpoint = device.getEndpoint(1);
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color_temp_percent: '100'}));
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({color_temp_percent: 100}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("lightingColorCtrl", "moveToColorTemp", {colortemp: 500, transtime: 0}, {});
@@ -507,6 +502,18 @@ describe('Publish', () => {
expect(endpoint3.read).toHaveBeenCalledWith('genOnOff', ['onOff']);
});
it('Should handle get with multiple cover endpoints', async () => {
const device = zigbeeHerdsman.devices.zigfred_plus;
const endpoint11 = device.getEndpoint(11);
const endpoint12 = device.getEndpoint(12);
await MQTT.events.message('zigbee2mqtt/zigfred_plus/get', stringify({state_l6: '', state_l7: ''}));
await flushPromises();
expect(endpoint11.read).toHaveBeenCalledTimes(1);
expect(endpoint11.read).toHaveBeenCalledWith('closuresWindowCovering', ['currentPositionLiftPercentage']);
expect(endpoint12.read).toHaveBeenCalledTimes(1);
expect(endpoint12.read).toHaveBeenCalledWith('closuresWindowCovering', ['currentPositionLiftPercentage']);
});
it('Should log error when device has no such endpoint (via topic)', async () => {
const device = zigbeeHerdsman.devices.QBKG03LM;
const endpoint2 = device.getEndpoint(2);
@@ -952,7 +959,7 @@ describe('Publish', () => {
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command.mock.calls[0]).toEqual(["lightingColorCtrl", "enhancedMoveToHueAndSaturation", {"direction": 0, "enhancehue": 44877, "saturation": 200, "transtime": 0,}, {}]);
expect(endpoint.command.mock.calls[0]).toEqual(["lightingColorCtrl", "enhancedMoveToHueAndSaturation", {"direction": 0, "enhancehue": 45510, "saturation": 127, "transtime": 0,}, {}]);
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/bulb_color');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({"color":{"hue":250,"saturation":50}, "color_mode": "hs"});
@@ -1269,7 +1276,7 @@ describe('Publish', () => {
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 53, "warningduration": 10, "strobedutycycle": 0, "strobelevel": 1}, {disableDefaultResponse: true});
});
it('Shouldnt do anythign when device is not supported', async () => {
it('Shouldnt do anything when device is not supported', async () => {
const payload = {state: 'ON'};
await MQTT.events.message('zigbee2mqtt/unsupported2/set', stringify(payload));
await flushPromises();
@@ -1400,7 +1407,7 @@ describe('Publish', () => {
expect(MQTT.publish.mock.calls[3]).toEqual([ 'zigbee2mqtt/bulb_color', stringify({"state":"ON","brightness":150}), { qos: 0, retain: false }, expect.any(Function)]);
});
it('Scenes', async () => {
it('onlythis Scenes', async () => {
const bulb_color_2 = zigbeeHerdsman.devices.bulb_color_2.getEndpoint(1);
const bulb_2 = zigbeeHerdsman.devices.bulb_2.getEndpoint(1);
const group = zigbeeHerdsman.groups.group_tradfri_remote;
+52 -9
View File
@@ -16,6 +16,8 @@ describe('Receive', () => {
jest.useFakeTimers();
controller = new Controller(jest.fn(), jest.fn());
await controller.start();
await jest.runOnlyPendingTimers();
await flushPromises();
});
beforeEach(async () => {
@@ -84,7 +86,7 @@ describe('Receive', () => {
await zigbeeHerdsman.events.message({data: {currentPositionLiftPercentage: 90, currentPositionTiltPercentage: 80}, cluster: 'closuresWindowCovering', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/J1_cover', stringify({position: 10, tilt: 20}), {retain: false, qos: 0}, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/J1_cover', stringify({position: 10, tilt: 20, state: 'OPEN'}), {retain: false, qos: 0}, expect.any(Function));
// Inverted
MQTT.publish.mockClear();
@@ -92,7 +94,7 @@ describe('Receive', () => {
await zigbeeHerdsman.events.message({data: {currentPositionLiftPercentage: 90, currentPositionTiltPercentage: 80}, cluster: 'closuresWindowCovering', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/J1_cover', stringify({position: 90, tilt: 80}), {retain: false, qos: 0}, expect.any(Function));
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/J1_cover', stringify({position: 90, tilt: 80, state: 'OPEN'}), {retain: false, qos: 0}, expect.any(Function));
});
it('Should allow to disable the legacy integration', async () => {
@@ -176,6 +178,47 @@ describe('Receive', () => {
expect(JSON.parse(MQTT.publish.mock.calls[1][1])).toStrictEqual({temperature: 0.07, pressure: 2, humidity: 0.03});
});
it('Should NOT publish old messages from State cache during debouncing', async () => {
// Summary:
// First send multiple measurements to device that is debouncing. Make sure only one message is sent out to MQTT. This also ensures first message is cached to "State".
// Then send another measurement to that same device and trigger asynchronous event to push data from Cache. Newest value should be sent out.
const device = zigbeeHerdsman.devices.WSDCGQ11LM;
settings.set(['devices', device.ieeeAddr, 'debounce'], 0.1);
await zigbeeHerdsman.events.message({data: {measuredValue: 8}, cluster: 'msTemperatureMeasurement', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10});
await zigbeeHerdsman.events.message( {data: {measuredValue: 1}, cluster: 'msRelativeHumidity', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10} );
await zigbeeHerdsman.events.message( {data: {measuredValue: 2}, cluster: 'msPressureMeasurement', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10} );
await flushPromises();
jest.advanceTimersByTime(50);
// Test that measurements are combined(=debounced)
expect(MQTT.publish).toHaveBeenCalledTimes(0);
jest.runOnlyPendingTimers();
await flushPromises();
// Test that only one MQTT is sent out and test its values.
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/weather_sensor');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({temperature: 0.08, humidity: 0.01, pressure: 2});
// Send another Zigbee message...
await zigbeeHerdsman.events.message({data: {measuredValue: 9}, cluster: 'msTemperatureMeasurement', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10});
const realDevice = controller.zigbee.resolveEntity(device);
// Trigger asynchronous event while device is "debouncing" to trigger Message to be sent out from State cache.
await controller.publishEntityState( realDevice, {} );
jest.runOnlyPendingTimers();
await flushPromises();
// Total of 3 messages should have triggered.
expect(MQTT.publish).toHaveBeenCalledTimes(3);
// Test that message pushed by asynchronous message contains NEW measurement and not old.
expect(JSON.parse(MQTT.publish.mock.calls[1][1])).toStrictEqual({temperature: 0.09, humidity: 0.01, pressure: 2});
// Test that messages after debouncing contains NEW measurement and not old.
expect(JSON.parse(MQTT.publish.mock.calls[2][1])).toStrictEqual({temperature: 0.09, humidity: 0.01, pressure: 2});
});
it('Shouldnt republish old state', async () => {
// https://github.com/Koenkk/zigbee2mqtt/issues/3572
const device = zigbeeHerdsman.devices.bulb;
@@ -242,27 +285,27 @@ describe('Receive', () => {
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 1, "retain": false});
});
it('Should handle a zigbee message with voltage 3010', async () => {
it('Should handle a zigbee message with voltage 2990', async () => {
const device = zigbeeHerdsman.devices.WXKG02LM_rev1;
const data = {'65281': {'1': 3010}}
const data = {'65281': {'1': 2990}}
const payload = {data, cluster: 'genBasic', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10};
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/button_double_key');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({battery: 46, voltage: 3010});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({battery: 93, voltage: 2990});
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
});
it('Should publish 1 message when converted twice', async () => {
const device = zigbeeHerdsman.devices.RTCGQ11LM;
const data = {'65281': {'1': 3045, '3': 19, '4': 17320, '5': 35, '6': [0, 3], '10': 51107, '11': 381, '100': 0}}
const data = {'65281': {'1': 3045, '3': 19, '5': 35, '6': [0, 3], '11': 381, '100': 0}}
const payload = {data, cluster: 'genBasic', device, endpoint: device.getEndpoint(1), type: 'attributeReport', linkquality: 10};
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/occupancy_sensor');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({'battery': 56, 'illuminance': 381, "illuminance_lux": 381, 'voltage': 3045, 'device_temperature': 19, 'power_outage_count': 34});
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({'battery': 100, 'illuminance': 381, "illuminance_lux": 381, 'voltage': 3045, 'device_temperature': 19, 'power_outage_count': 34});
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
});
@@ -419,7 +462,7 @@ describe('Receive', () => {
const data = {instantaneousDemand:496,currentSummDelivered:[0,6648]}
const SP600_NEW = zigbeeHerdsman.devices.SP600_NEW;
await zigbeeHerdsman.events.message({data, cluster: 'seMetering', device: SP600_NEW, endpoint: SP600_NEW.getEndpoint(1), type: 'attributeReport', linkquality: 10});
await zigbeeHerdsman.events.message({data, cluster: 'seMetering', device: SP600_NEW, endpoint: SP600_NEW.getEndpoint(1), type: 'attributeReport', linkquality: 10, meta: {zclTransactionSequenceNumber: 1}});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/SP600_NEW');
@@ -427,7 +470,7 @@ describe('Receive', () => {
MQTT.publish.mockClear();
const SP600_OLD = zigbeeHerdsman.devices.SP600_OLD;
await zigbeeHerdsman.events.message({data, cluster: 'seMetering', device: SP600_OLD, endpoint: SP600_OLD.getEndpoint(1), type: 'attributeReport', linkquality: 10});
await zigbeeHerdsman.events.message({data, cluster: 'seMetering', device: SP600_OLD, endpoint: SP600_OLD.getEndpoint(1), type: 'attributeReport', linkquality: 10, meta: {zclTransactionSequenceNumber: 2}});
await flushPromises();
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/SP600_OLD');
+61 -14
View File
@@ -67,21 +67,41 @@ describe('Settings', () => {
it('Should apply environment variables', () => {
process.env['ZIGBEE2MQTT_CONFIG_SERIAL_DISABLE_LED'] = 'true';
process.env['ZIGBEE2MQTT_CONFIG_ADVANCED_SOFT_RESET_TIMEOUT'] = 1;
process.env['ZIGBEE2MQTT_CONFIG_ADVANCED_OUTPUT'] = 'csvtest';
process.env['ZIGBEE2MQTT_CONFIG_ADVANCED_OUTPUT'] = 'attribute_and_json';
process.env['ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_OUTPUT'] = '["console"]';
process.env['ZIGBEE2MQTT_CONFIG_MAP_OPTIONS_GRAPHVIZ_COLORS_FILL'] = '{"enddevice": "#ff0000", "coordinator": "#00ff00", "router": "#0000ff"}';
process.env['ZIGBEE2MQTT_CONFIG_MQTT_BASE_TOPIC'] = 'testtopic';
process.env['ZIGBEE2MQTT_CONFIG_MQTT_SERVER'] = 'testserver';
process.env['ZIGBEE2MQTT_CONFIG_ADVANCED_NETWORK_KEY'] = 'GENERATE';
process.env['ZIGBEE2MQTT_CONFIG_DEVICES'] = 'devices.yaml';
const contentDevices = {
'0x00158d00018255df': {
friendly_name: '0x00158d00018255df',
retain: false,
},
};
write(configurationFile, {});
write(devicesFile, contentDevices);
expect(settings.validate()).toStrictEqual([]);
const s = settings.get();
const expected = objectAssignDeep.noMutate({}, settings.testing.defaults);
expected.devices = {};
expected.devices = {
'0x00158d00018255df': {
friendly_name: '0x00158d00018255df',
retain: false,
},
};
expected.groups = {};
expected.serial.disable_led = true;
expected.advanced.soft_reset_timeout = 1;
expected.advanced.output = 'csvtest';
expected.advanced.log_output = ["console"];
expected.advanced.output = 'attribute_and_json';
expected.map_options.graphviz.colors.fill = {enddevice: '#ff0000', coordinator: '#00ff00', router: '#0000ff'};
expected.mqtt.base_topic = 'testtopic';
expected.mqtt.server = 'testserver';
expected.advanced.network_key = 'GENERATE';
expect(s).toStrictEqual(expected);
@@ -103,6 +123,22 @@ describe('Settings', () => {
expect(actual).toStrictEqual(expected);
});
it('Should add devices even when devices exist empty', () => {
write(configurationFile, {devices: []});
settings.addDevice('0x12345678');
const actual = read(configurationFile);
const expected = {
devices: {
'0x12345678': {
friendly_name: '0x12345678',
},
},
};
expect(actual).toStrictEqual(expected);
});
it('Should read devices', () => {
const content = {
devices: {
@@ -179,7 +215,7 @@ describe('Settings', () => {
mqtt: {
server: '!secret server',
user: '!secret username',
password: '!secret password',
password: '!secret.yaml password',
},
advanced: {
network_key: '!secret network_key',
@@ -646,6 +682,18 @@ describe('Settings', () => {
}).toThrow(new Error("Device '0x123' already exists"));
});
it('Should not allow any string values for ext_pan_id', () => {
write(configurationFile, {
...minimalConfig,
advanced: {ext_pan_id: 'NOT_GENERATE'},
});
settings.reRead();
const error = `advanced.ext_pan_id: should be array or 'GENERATE' (is 'NOT_GENERATE')`;
expect(settings.validate()).toEqual(expect.arrayContaining([error]));
});
it('Should not allow any string values for network_key', () => {
write(configurationFile, {
...minimalConfig,
@@ -740,8 +788,7 @@ describe('Settings', () => {
it('Should throw error when yaml file does not exist', () => {
settings.testing.clear();
const error = `ENOENT: no such file or directory, open '${configurationFile}'`;
expect(settings.validate()).toEqual(expect.arrayContaining([error]));
expect(settings.validate()[0].startsWith(`ENOENT: no such file or directory, open `)).toBeTruthy();
});
it('Configuration shouldnt be valid when invalid QOS value is used', async () => {
@@ -884,16 +931,16 @@ describe('Settings', () => {
it('Frontend config', () => {
write(configurationFile, {...minimalConfig,
frontend: true,
frontend: true,
});
settings.reRead();
expect(settings.get().frontend).toStrictEqual({port: 8080, auth_token: false, host: '0.0.0.0'})
expect(settings.get().frontend).toStrictEqual({port: 8080, auth_token: false})
});
it('Baudrate config', () => {
write(configurationFile, {...minimalConfig,
advanced: {baudrate: 20},
advanced: {baudrate: 20},
});
settings.reRead();
@@ -902,7 +949,7 @@ describe('Settings', () => {
it('ikea_ota_use_test_url config', () => {
write(configurationFile, {...minimalConfig,
advanced: {ikea_ota_use_test_url: true},
advanced: {ikea_ota_use_test_url: true},
});
settings.reRead();
@@ -911,7 +958,7 @@ describe('Settings', () => {
it('transmit_power config', () => {
write(configurationFile, {...minimalConfig,
experimental: {transmit_power: 1337},
experimental: {transmit_power: 1337},
});
settings.reRead();
@@ -920,7 +967,7 @@ describe('Settings', () => {
it('output config', () => {
write(configurationFile, {...minimalConfig,
experimental: {output: 'json'},
experimental: {output: 'json'},
});
settings.reRead();
@@ -929,7 +976,7 @@ describe('Settings', () => {
it('Baudrartsctste config', () => {
write(configurationFile, {...minimalConfig,
advanced: {rtscts: true},
advanced: {rtscts: true},
});
settings.reRead();
@@ -938,7 +985,7 @@ describe('Settings', () => {
it('Deprecated: Home Assistant config', () => {
write(configurationFile, {...minimalConfig,
homeassistant: {discovery_topic: 'new'},
homeassistant: {discovery_topic: 'new'},
advanced: {homeassistant_discovery_topic: 'old', homeassistant_status_topic: 'olds'},
});
+17
View File
@@ -153,6 +153,23 @@ function writeDefaultConfiguration() {
'0x0017880104e43559': {
friendly_name: 'U202DST600ZB'
},
'0xf4ce368a38be56a1': {
retain: false,
friendly_name: 'zigfred_plus',
front_surface_enabled: 'true',
dimmer_1_enabled: 'true',
dimmer_1_dimming_enabled: 'true',
dimmer_2_enabled: 'true',
dimmer_2_dimming_enabled: 'true',
dimmer_3_enabled: 'true',
dimmer_3_dimming_enabled: 'true',
dimmer_4_enabled: 'true',
dimmer_4_dimming_enabled: 'true',
cover_1_enabled: 'true',
cover_1_tilt_enabled: 'true',
cover_2_enabled: 'true',
cover_2_tilt_enabled: 'true',
},
'0x0017880104e44559': {
friendly_name: '3157100_thermostat',
},
+5 -1
View File
@@ -137,6 +137,7 @@ const TS0601_thermostat = new Device('EndDevice', '0x0017882104a44559', 6544,41
const ZNCZ02LM = new Device('Router', '0x0017880104e45524', 6540,4151, [new Endpoint(1, [0], [], '0x0017880104e45524')], true, "Mains (single phase)", "lumi.plug");
const GLEDOPTO_2ID = new Device('Router', '0x0017880104e45724', 6540,4151, [new Endpoint(11, [0,3,4,5,6,8,768], [], '0x0017880104e45724', [], {}, [], 49246, 528), new Endpoint(12, [0, 3, 4, 5, 6, 8, 768], [], '0x0017880104e45724', [], {}, [], 260, 258), new Endpoint(13, [4096], [4096], '0x0017880104e45724', [], {}, [], 49246, 57694), new Endpoint(15, [0, 3, 4, 5, 6, 8, 768], [], '0x0017880104e45724', [], {}, [], 49246, 256)], true, "Mains (single phase)", 'GL-C-007', false, 'GLEDOPTO');
const QBKG03LM = new Device('Router', '0x0017880104e45542', 6540,4151, [new Endpoint(1, [0], [], '0x0017880104e45542'), new Endpoint(2, [0, 6], [], '0x0017880104e45542'), new Endpoint(3, [0, 6], [], '0x0017880104e45542')], true, "Mains (single phase)", 'lumi.ctrl_neutral2');
const zigfred_plus = new Device('Router', '0xf4ce368a38be56a1', 6589, 0x129C, [new Endpoint(5, [0, 3, 4, 5, 6, 8, 0x0300, 0xFC42], [0xFC42], '0xf4ce368a38be56a1'), new Endpoint(7, [0, 3, 4, 5, 6, 8], [], '0xf4ce368a38be56a1'), new Endpoint(8, [0, 3, 4, 5, 6, 8], [], '0xf4ce368a38be56a1'), new Endpoint(9, [0, 3, 4, 5, 6, 8], [], '0xf4ce368a38be56a1'), new Endpoint(10, [0, 3, 4, 5, 6, 8], [], '0xf4ce368a38be56a1'), new Endpoint(11, [0, 3, 4, 5, 0x0102], [], '0xf4ce368a38be56a1'), new Endpoint(12, [0, 3, 4, 5, 0x0102], [], '0xf4ce368a38be56a1')], true, "Mains (single phase)", 'zigfred plus', false, 'Siglis');
const groups = {
'group_1': new Group(1, []),
@@ -192,6 +193,7 @@ const devices = {
'MKS-CM-W5': new Device('Router', '0x90fd9ffffe4b64ac', 33901, 4476, [new Endpoint(1, [0,4,3,5,10,258,13,19,6,1,1030,8,768,1027,1029,1026], [0,3,4,6,8,5], '0x90fd9ffffe4b64aa', [], {})], true, "Mains (single phase)", "qnazj70", false),
'GL-S-007ZS': new Device('Router', '0x0017880104e45526', 6540,4151, [new Endpoint(1, [0], [], '0x0017880104e45526')], true, "Mains (single phase)", 'GL-S-007ZS'),
'U202DST600ZB': new Device('Router', '0x0017880104e43559', 6540,4151, [new Endpoint(10, [0, 6], [], '0x0017880104e43559'), new Endpoint(11, [0, 6], [], '0x0017880104e43559')], true, "Mains (single phase)", 'U202DST600ZB'),
'zigfred_plus': zigfred_plus,
'3157100': new Device('Router', '0x0017880104e44559', 6542,4151, [new Endpoint(1, [], [], '0x0017880104e44559')], true, "Mains (single phase)", '3157100', false, 'Centralite'),
'J1': new Device('Router', '0x0017880104a44559', 6543,4151, [new Endpoint(1, [], [], '0x0017880104a44559')], true, "Mains (single phase)", 'J1 (5502)'),
'TS0601_thermostat': TS0601_thermostat,
@@ -201,7 +203,7 @@ const devices = {
'temperature_sensor': new Device('EndDevice', '0x0017880104e45561', 6544,4151, [new Endpoint(1, [0,3,4,1026], [])], true, "Battery", "temperature.sensor"),
'heating_actuator': new Device('Router', '0x0017880104e45562', 6545,4151, [new Endpoint(1, [0,3,4,513], [1026])], true, "Mains (single phase)", "heating.actuator"),
'bj_scene_switch': new Device('EndDevice', '0xd85def11a1002caa', 50117, 4398, [new Endpoint(10, [0,4096], [3,4,5,6,8,25,768,4096], '0xd85def11a1002caa', [{target: bulb_color_2.endpoints[0], cluster: {ID: 8, name: 'genLevelCtrl'}}, {target: bulb_color_2.endpoints[0], cluster: {ID: 6, name: 'genOnOff'}}, {target: bulb_color_2.endpoints[0], cluster: {ID: 768, name: 'lightingColorCtrl'}},]), new Endpoint(11, [0,4096], [3,4,5,6,8,25,768,4096], '0xd85def11a1002caa')], true, 'Battery', 'RB01', false, 'Busch-Jaeger', '20161222', '1.2.0'),
'GW003-AS-IN-TE-FC': new Device('Router', '0x0017548104a44669', 6545,4699, [new Endpoint(1, [3], [0,3,513,514], '0x0017548104a44669')], true, "Mains (single phase)", 'Adapter Zigbee FUJITSU'),
}
const mock = {
@@ -212,8 +214,10 @@ const mock = {
touchlinkIdentify: jest.fn(),
start: jest.fn(),
backup: jest.fn(),
coordinatorCheck: jest.fn(),
isStopping: jest.fn(),
permitJoin: jest.fn(),
addInstallCode: jest.fn(),
getCoordinatorVersion: jest.fn().mockReturnValue({type: 'z-Stack', meta: {version: 1, revision: 20190425}}),
getNetworkParameters: jest.fn().mockReturnValue({panID: 0x162a, extendedPanID: [0, 11, 22], channel: 15}),
on: (type, handler) => {
+3 -2
View File
@@ -1,6 +1,7 @@
const utils = require('../lib/util/utils').default;
const version = require('../package.json').version;
const versionHerdsman = require('../node_modules/zigbee-herdsman/package.json').version;
const versionHerdsmanConverters = require('../node_modules/zigbee-herdsman-converters/package.json').version;
describe('Utils', () => {
it('Object has properties', () => {
@@ -22,8 +23,8 @@ describe('Utils', () => {
})
it('Check dependency version', async () => {
var dependency = 'zigbee-herdsman';
expect(await utils.getDependencyVersion(dependency)).toStrictEqual({"version": versionHerdsman});
expect(await utils.getDependencyVersion('zigbee-herdsman')).toStrictEqual({"version": versionHerdsman});
expect(await utils.getDependencyVersion('zigbee-herdsman-converters')).toStrictEqual({"version": versionHerdsmanConverters});
})
it('To local iso string', async () => {
+5 -1
View File
@@ -15,10 +15,14 @@
"rootDir": "lib",
"inlineSourceMap": true,
"resolveJsonModule": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"incremental": true
},
"include": [
"lib/**/*",
"lib/util/settings.schema.json"
],
"exclude": [
"node_modules"
],
}
+6
View File
@@ -17,12 +17,18 @@ fi
echo "Creating backup of configuration..."
cp -R data data-backup
echo "Checking out changes to package-lock.json..."
git checkout package-lock.json
echo "Updating..."
git pull
echo "Installing dependencies..."
npm ci
echo "Building..."
npm run build
echo "Restore configuration..."
cp -R data-backup/* data
rm -rf data-backup