Compare commits

..
207 Commits
Author SHA1 Message Date
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
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
45 changed files with 3625 additions and 2372 deletions
+3
View File
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "IMPORTANT: Check development branch changelog first!!"
url: https://github.com/Koenkk/zigbee2mqtt/releases/tag/latest-dev
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
+15 -10
View File
@@ -1,9 +1,16 @@
name: CI
name: ci
on: [push, pull_request]
on:
pull_request:
push:
branches-ignore:
- deps/*
tags:
- '**'
permissions:
contents: read
contents: write
pull-requests: write
jobs:
ci:
@@ -12,9 +19,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/
cache: 'npm'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
@@ -28,7 +35,7 @@ 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
@@ -73,7 +80,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":{}}'
@@ -82,7 +89,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [14, 16, 18, 19]
node: [16, 18, 20]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
@@ -95,8 +102,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
+3 -14
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.
- 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:
+2 -2
View File
@@ -1,7 +1,7 @@
on:
workflow_dispatch:
name: GHCR cleanup
name: ghcr-cleanup
permissions: {}
jobs:
@@ -12,7 +12,7 @@ jobs:
- name: Delete untagged images
uses: actions/github-script@v6
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@v3
- 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 }}
+112
View File
@@ -0,0 +1,112 @@
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@v3
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}}
# Checkout repos
- uses: actions/checkout@v3
with:
repository: koenkk/zigbee2mqtt
path: ./z2m
- uses: actions/checkout@v3
with:
repository: koenkk/zigbee2mqtt
path: ./z2m-master
ref: master
- uses: actions/checkout@v3
with:
repository: koenkk/zigbee2mqtt
path: ./z2m-changelog
ref: release-please--branches--dev--components--release-please-action
- name: Update latest-dev tag
run: |
cd z2m
git push --delete origin latest-dev
git tag latest-dev
git push origin latest-dev
- name: Update latest-dev release changelog
run: |
PR=$(echo '${{ steps.release.outputs.pr }}' | jq -r '.number')
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"')
cp z2m-changelog/CHANGELOG.md z2m
cd z2m
npm ci
node scripts/generateChangelog.js $MASTER_Z2M_VERSION $MASTER_ZHC_VERSION $MASTER_ZH_VERSION >> ../changelog.txt
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
- uses: ncipollo/release-action@v1
with:
bodyFile: changelog.txt
prerelease: true
name: latest-dev
allowUpdates: true
tag: latest-dev
- name: Upload changelog
uses: actions/upload-artifact@v3
with:
name: changelog
path: changelog.txt
create_release:
runs-on: ubuntu-latest
needs: [release-please]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v3
with:
ref: dev
token: ${{secrets.GH_TOKEN}}
- name: Download changelog
uses: actions/download-artifact@v3
with:
name: changelog
path: ../changelog.txt
- uses: ncipollo/release-action@v1
name: Create release
with:
bodyFile: ../changelog.txt
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
jq '.version = "${{ needs.release-please.outputs.version }}-dev"' package-lock.json > package-lock.json
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Promote to dev
+4 -9
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@v7
- 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-close: 7
operations-per-run: 500
exempt-issue-labels: dont-stale
operations-per-run: 500
+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@v3
with:
ref: dev
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
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
+6 -5
View File
@@ -17,14 +17,15 @@ jobs:
- uses: actions/checkout@v3
with:
ref: dev
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: npm
- run: npx npm-check-updates -u -x connect-gzip-static # connect-gzip-static only supports node 16
- 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
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-frontend
on:
repository_dispatch:
types: update_frontend
permissions: {}
jobs:
update_frontend:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
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: 18
- 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
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-herdsman
on:
repository_dispatch:
types: update_zh
permissions: {}
jobs:
update_zh:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
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: 18
- 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
-35
View File
@@ -1,35 +0,0 @@
name: Update zigbee-herdsman-converters
on:
repository_dispatch:
types: update_zhc
permissions: {}
jobs:
update_zhc:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)
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: 18
- 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
+4
View File
@@ -0,0 +1,4 @@
{
".": "1.31.0",
"bootstrap-sha": "b2dd21e164b457d5cd0c9d455cdb879d881c44bd"
}
+26
View File
@@ -0,0 +1,26 @@
# Changelog
## [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))
+12 -3
View File
@@ -53,8 +53,10 @@ 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: 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://user-images.githubusercontent.com/2734836/47615848-b8dd8700-dabd-11e8-9d77-175002dd8987.png">
@@ -63,6 +65,13 @@ Zigbee2MQTT integrates well with (almost) every home automation solution because
<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. Read documentation [here](https://gladysassistant.com/docs/integrations/zigbee2mqtt/)
<br>
## Architecture
![Architecture](images/architecture.png)
@@ -73,7 +82,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).
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:3.17.1 as base
FROM alpine:3.18.0 as base
WORKDIR /app
RUN apk add --no-cache tzdata eudev tini nodejs
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+2 -2
View File
@@ -4,7 +4,7 @@ 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;
@@ -41,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) {
+2 -2
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})`);
+20 -20
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';
@@ -97,12 +97,12 @@ 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,
zigbeeHersdman.Zcl.ManufacturerCode.BUSCH_JAEGER,
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',
@@ -133,12 +133,12 @@ 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,
zigbeeHersdman.Zcl.ManufacturerCode.BUSCH_JAEGER,
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',
@@ -165,11 +165,11 @@ 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: [
@@ -389,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}'`);
}
@@ -431,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}'`);
}
+2 -2
View File
@@ -164,7 +164,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);
}
@@ -470,7 +470,7 @@ export default class Bridge extends Extension {
this.publishInfo();
}
// Repulish entity state
// Republish entity state
this.publishEntityState(entity, {});
return utils.getResponse(
+2 -2
View File
@@ -85,7 +85,7 @@ 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.options.disabled || !device.definition?.configure || !device.zh.interviewCompleted) {
return;
@@ -126,7 +126,7 @@ 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;
}
}
+4 -4
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 [];
@@ -63,8 +63,8 @@ export default class ExternalExtension extends Extension {
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);
+9 -4
View File
@@ -74,8 +74,13 @@ 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.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> {
@@ -103,8 +108,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');
+35 -17
View File
@@ -237,7 +237,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);
@@ -406,9 +406,16 @@ export default class HomeAssistant extends Extension {
},
};
// For curtains that have `motor_state` or `moving` 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 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 %}`;
}
// 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'];
@@ -422,18 +429,19 @@ export default class HomeAssistant extends Extension {
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.${motorState.property} %}` +
` ${stoppedState} {% else %} {{ value_json.${motorState.property} }} {% endif %}`;
discoveryEntry.discovery_payload.value_template = `{% if "${motorState.property}" in value_json ` +
`and value_json.${motorState.property} %} {{ value_json.${motorState.property} }} {% else %} ` +
`${stoppedState} {% endif %}`;
}
} else if (running) {
discoveryEntry.discovery_payload.value_template = `{% if not value_json.${running.property} %} ` +
`stopped {% else %} {% if value_json.${position.property} > 0 %} closing {% else %} ` +
`opening {% endif %} {% endif %}`;
} else {
}
// 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) {
@@ -528,7 +536,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'},
@@ -539,9 +547,11 @@ export default class HomeAssistant extends Extension {
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'},
@@ -702,6 +712,7 @@ export default class HomeAssistant extends Extension {
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',
@@ -755,6 +766,12 @@ export default class HomeAssistant extends Extension {
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;
}
discoveryEntries.push(discoveryEntry);
/**
@@ -868,6 +885,7 @@ export default class HomeAssistant extends Extension {
const lookup: {[s: string]: KeyValue} = {
action: {icon: 'mdi:gesture-double-tap'},
programming_mode: {icon: 'mdi:calendar-clock'},
program: {value_template: `{{ value_json.${firstExpose.property} | truncate(254, True, '', 0) }}`},
};
const discoveryEntry: DiscoveryEntry = {
@@ -913,8 +931,8 @@ 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 lightMatch = /light_(.*)/.exec(objectID);
const coverMatch = /cover_(.*)/.exec(objectID);
const lightMatch = /^light_(.*)/.exec(objectID);
const coverMatch = /^cover_(.*)/.exec(objectID);
const match = lightMatch || coverMatch;
@@ -952,7 +970,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]);
@@ -1426,7 +1444,7 @@ export default class HomeAssistant extends Extension {
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;
@@ -1461,7 +1479,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;
+6 -5
View File
@@ -1,6 +1,7 @@
import * as settings from '../util/settings';
import zigbeeHerdsmanConverters from 'zigbee-herdsman-converters';
import philips from 'zigbee-herdsman-converters/lib/philips';
import logger from '../util/logger';
import utils from '../util/utils';
import Extension from './extension';
@@ -18,7 +19,7 @@ const sceneConverterKeys = ['scene_store', 'scene_add', 'scene_remove', 'scene_r
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');
@@ -165,7 +166,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 +220,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();
}
+4
View File
@@ -16,3 +16,7 @@ declare module 'zigbee-herdsman-converters/lib/ota/zigbeeOTA' {
export function useIndexOverride(indexFileName: string): void;
export function setDataDir(dataDir: string): void;
}
declare module 'zigbee-herdsman-converters/lib/philips' {
export const tz: {[s: string]: zhc.ToZigbeeConverter};
}
+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);
}
+3 -2
View File
@@ -366,14 +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",
"title": "Bind host",
"description": "Frontend binding host",
"description": "Frontend binding host. Binds to a unix socket when an absolute path is given instead.",
"examples": ["127.0.0.1", "/run/zigbee2mqtt/zigbee2mqtt.sock"],
"default": "0.0.0.0",
"requiresRestart": true
},
+10 -10
View File
@@ -211,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'],
@@ -230,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]);
@@ -330,7 +330,7 @@ function read(): Settings {
// Read !secret MQTT username and password if set
// eslint-disable-next-line
const interpetValue = (value: any): any => {
const interpretValue = (value: any): any => {
const ref = parseValueRef(value);
if (ref) {
return yaml.read(data.joinPath(ref.filename))[ref.key];
@@ -340,28 +340,28 @@ function read(): Settings {
};
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] = {};
@@ -472,7 +472,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();
+2949 -2109
View File
File diff suppressed because it is too large Load Diff
+21 -20
View File
@@ -1,6 +1,6 @@
{
"name": "zigbee2mqtt",
"version": "1.30.1",
"version": "1.31.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 || ^19"
"node": "^14 || ^16 || ^18 || ^19 || ^20"
},
"keywords": [
"xiaomi",
@@ -51,40 +51,41 @@
"moment": "^2.29.4",
"mqtt": "4.3.7",
"object-assign-deep": "^0.4.0",
"rimraf": "^4.1.2",
"semver": "^7.3.8",
"rimraf": "^5.0.1",
"semver": "^7.5.1",
"source-map-support": "^0.5.21",
"uri-js": "^4.4.1",
"winston": "^3.8.2",
"winston": "^3.9.0",
"winston-syslog": "^2.7.0",
"winston-transport": "^4.5.0",
"ws": "^8.12.0",
"zigbee-herdsman": "0.14.89",
"zigbee-herdsman-converters": "15.0.38-hotfix.0",
"zigbee2mqtt-frontend": "0.6.124"
"ws": "^8.13.0",
"zigbee-herdsman": "0.14.117",
"zigbee-herdsman-converters": "15.13.1",
"zigbee2mqtt-frontend": "0.6.129"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-proposal-decorators": "^7.20.13",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@babel/core": "^7.22.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.22.3",
"@babel/preset-env": "^7.22.2",
"@babel/preset-typescript": "^7.21.5",
"@types/debounce": "^1.2.1",
"@types/finalhandler": "^1.2.0",
"@types/humanize-duration": "^3.27.1",
"@types/jest": "^29.4.0",
"@types/jest": "^29.5.1",
"@types/js-yaml": "^4.0.5",
"@types/object-assign-deep": "^0.4.0",
"@types/rimraf": "^3.0.2",
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"babel-jest": "^29.4.1",
"eslint": "^8.33.0",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"babel-jest": "^29.5.0",
"eslint": "^8.41.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-jest": "^27.2.1",
"jest": "^29.4.1",
"jest": "^29.5.0",
"tmp": "^0.2.1",
"typescript": "^4.9.4"
"typescript": "^5.0.4"
},
"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": false,
"skip-github-release": true
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
+99
View File
@@ -0,0 +1,99 @@
/* 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: []};
let context = null;
const changeRe = [
/^\* (\*\*(.+):\*\*)?(.+)\((\[#\d+\]\(.+\))\) \(\[(.+)\]\(https:.+\)$/,
/^\* (\*\*(.+):\*\*)?(.+)(https:\/\/github\.com.+) \(\[(.+)\]\(https:.+\)$/,
/^\* (\*\*(.+):\*\*)?(.+)() \(\[(.+)\]\(https:.+\)$/,
];
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) {
const localContext = changeMatch[2] ? changeMatch[2] : context;
if (!changes[localContext]) throw new Error(`Unknown context: ${localContext}`);
let user = execSync(`curl -s https://api.github.com/repos/${changelog.project}/commits/${changeMatch[5]} | jq -r '.author.login'`).toString().trim();
const messages = [];
let message = changeMatch[3].trim();
if (message.endsWith('.')) message = message.substring(0, message.length - 1);
const otherUser = message.match(/\[@(.+)\]\(https:\/\/github.com\/.+\)/);
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) throw new Error(`Model '${message}' does not exist`);
messages.push(`\`${definition.model}\` ${definition.vendor} ${definition.description}`);
}
} else {
messages.push(message);
}
let issue = changeMatch[4].trim();
if (issue && !issue.startsWith('[#')) issue = `[#${issue.split('/').pop()}](${issue})`;
if (!issue) issue = '_NO_ISSUE_';
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'],
];
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';
}
console.log(result.trim());
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
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 () => {
+27
View File
@@ -59,6 +59,7 @@ jest.mock('http', () => ({
mockHTTP.variables.onRequest = onRequest;
return mockHTTP.implementation;
}),
Agent: jest.fn(),
}));
jest.mock('https', () => ({
@@ -128,6 +129,32 @@ 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 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();
});
+22 -4
View File
@@ -104,8 +104,12 @@ describe('HomeAssistant extension', () => {
"breathe",
"okay",
"channel_change",
"candle",
"fireplace",
"colorloop",
"finish_effect",
"stop_effect"
"stop_effect",
"stop_hue_effect",
],
"unique_id":"9_light_zigbee2mqtt"
};
@@ -825,6 +829,7 @@ describe('HomeAssistant extension', () => {
value_template: `{{ value_json.state }}`,
state_open: 'OPEN',
state_closed: 'CLOSE',
state_stopped: 'STOP',
json_attributes_topic: 'zigbee2mqtt/smart vent',
name: 'smart vent',
unique_id: '0x0017880104e45551_cover_zigbee2mqtt',
@@ -862,6 +867,7 @@ describe('HomeAssistant extension', () => {
"position_topic": "zigbee2mqtt/zigfred_plus/l6",
"set_position_template": "{ \"position_l6\": {{ position }} }",
"set_position_topic": "zigbee2mqtt/zigfred_plus/l6/set",
"state_stopped": 'STOP',
"state_closed": "CLOSE",
"state_open": "OPEN",
"state_topic": "zigbee2mqtt/zigfred_plus/l6",
@@ -1322,8 +1328,12 @@ describe('HomeAssistant extension', () => {
"breathe",
"okay",
"channel_change",
"candle",
"fireplace",
"colorloop",
"finish_effect",
"stop_effect"
"stop_effect",
"stop_hue_effect",
],
"unique_id":"9_light_zigbee2mqtt"
};
@@ -1847,8 +1857,12 @@ describe('HomeAssistant extension', () => {
"breathe",
"okay",
"channel_change",
"candle",
"fireplace",
"colorloop",
"finish_effect",
"stop_effect"
"stop_effect",
"stop_hue_effect",
],
"unique_id":"9_light_zigbee2mqtt"
};
@@ -1892,8 +1906,12 @@ describe('HomeAssistant extension', () => {
"breathe",
"okay",
"channel_change",
"candle",
"fireplace",
"colorloop",
"finish_effect",
"stop_effect"
"stop_effect",
"stop_hue_effect",
],
"unique_id":"9_light_zigbee2mqtt"
};
+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++) {
+3 -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, power_on_behavior, 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, 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,7 +276,7 @@ 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, power_on_behavior, 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, 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);
});
@@ -303,7 +303,7 @@ 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":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), effect, power_on_behavior, 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":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);
});
+41
View File
@@ -178,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 asyncronous 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 messages...
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 asyncronous 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 asyncronous 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;
+23 -7
View File
@@ -123,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: {
@@ -904,7 +920,7 @@ describe('Settings', () => {
it('Frontend config', () => {
write(configurationFile, {...minimalConfig,
frontend: true,
frontend: true,
});
settings.reRead();
@@ -913,7 +929,7 @@ describe('Settings', () => {
it('Baudrate config', () => {
write(configurationFile, {...minimalConfig,
advanced: {baudrate: 20},
advanced: {baudrate: 20},
});
settings.reRead();
@@ -922,7 +938,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();
@@ -931,7 +947,7 @@ describe('Settings', () => {
it('transmit_power config', () => {
write(configurationFile, {...minimalConfig,
experimental: {transmit_power: 1337},
experimental: {transmit_power: 1337},
});
settings.reRead();
@@ -940,7 +956,7 @@ describe('Settings', () => {
it('output config', () => {
write(configurationFile, {...minimalConfig,
experimental: {output: 'json'},
experimental: {output: 'json'},
});
settings.reRead();
@@ -949,7 +965,7 @@ describe('Settings', () => {
it('Baudrartsctste config', () => {
write(configurationFile, {...minimalConfig,
advanced: {rtscts: true},
advanced: {rtscts: true},
});
settings.reRead();
@@ -958,7 +974,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'},
});