53 Commits

Author SHA1 Message Date
Koen Kanters 5286570bd6 fix: Update to refactored zhc api and fix onEvent(stop) not being called when device is force removed (#27984) 2025-08-11 20:32:59 +02:00
Koen Kanters c87d4524d5 fix(ignore): Migrate to Biome 2 (#27785) 2025-06-28 10:20:41 +02:00
Koen Kanters e4b253e08b fix: Fix devices not immediately marked as offline when timeout expires (#27691) 2025-06-11 19:48:52 +02:00
Koen Kanters b7b92da8ff fix(ignore): Cleanup publish options (#27226) 2025-05-03 08:45:45 +02:00
Koen Kanters 39e4468308 fix: Only send JSON state over WebSocket (#27225) 2025-05-03 08:42:07 +02:00
Koen Kanters 69f9002e31 fix: Add interview state (#27163) 2025-04-22 21:27:07 +02:00
Nerivec 6fbb8b5ca2 fix: Migrate to Biome (#27150) 2025-04-18 20:34:47 +02:00
Nerivec 36e2baf081 fix: Use Map for State (#27105) 2025-04-14 21:51:01 +02:00
Nerivec 8df5a484fc feat: Availability improvements (#26811) 2025-04-13 20:49:28 +02:00
Nerivec db578d9d11 fix: Use dynamic import for optional extensions (#26735) 2025-03-15 08:07:56 +01:00
ghoz 07145accba fix(ignore): Add publish to meta of toZigbee converters (#26490)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2025-02-24 22:29:00 +01:00
Nerivec 06f44533af feat: Use Vitest for testing (#25284)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-12-22 20:19:45 +01:00
Nerivec 758ab34747 fix(ignore): import using node: prefix for built-in (#25248) 2024-12-18 22:19:33 +01:00
Koen Kanters c3b4628a1d fix: Remove oneOf bool/obj from settings schema (#25195)
Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
2024-12-17 22:27:55 +01:00
Nerivec 1a9c79bb2f feat: Typing for MQTT API (#25098) 2024-12-07 20:21:30 +00:00
Koen Kanters b6186623f0 feat!: The big cleanup (#24200)
* Remove `deviceGroupMembership`

* Fix controller.ts

* Remove `legacy_api` logic from non-legacy extensions.

* Fix network map coverage.

* Remove all `legacy` extensions.

* Remove `legacy_availability_payload`, `legacy_api`. Remove legacy from configure.

* Fix prettier.

* Remove some leftovers

* Renamed `updateAvailable` to `update_available`

* Remove emitPublishAvailability

* Remove `configuration.yaml`

* Switch to pnpm

* Remove direct mqtt-packet dependency.

* fix pretty

* fix `getDependencyVersion`

* fix pnpm publish

* fix(ignore): fix pnpm publish

* Remove deprecated bridge `config/*`

* Improve update script

* Improve update.sh

---------

Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
2024-12-01 20:06:49 +01:00
Koen Kanters afd80449b3 fix(ignore): Migrate to eslint 9 (#23800)
* Eslint 9

* Automatic changes

* Manual changes

* Process feedback

* u
2024-09-08 14:26:18 +02:00
Nerivec 48d77e4b5e fix: Enforce TS strict type checking (#23601)
* Enforce TS `strict` type checking.

* updates

* updates

* updates

* Updates

* Updates

* pretty

* u

* u

* u

* Updates

* updates

* Updates

* Updates

* `ReadonlyArray`

* scenesChanged

* objectID

* Improve coverage

* u

* u

* process feedback

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-09-07 11:40:50 +00:00
Koen Kanters 22980177b6 fix(ignore): Fix crash when retrieving state (#23679) 2024-08-20 20:57:09 +02:00
Nerivec 13ac8a0f53 fix: Improve looping performance (#23541)
* Use herdsman improved looping.

* Fix lint.

* Fix tests.

* Feedback
2024-08-08 20:21:40 +02:00
Koen Kanters bd7dec0f11 fix(ignore): update dependencies (#23508)
* fix(ignore): update dependencies

* update

---------

Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
2024-08-05 21:08:40 +00:00
Laurent d0f5733db3 fix: Remove group from Home Assistant when removed (#23492)
* Fire event when group gets removed

* Add a unit test for the new behavior

* Make prettier happy

* Add missing return type

* Merge device and group removal events

* Unbreak bridgeLegacy.ts

* Update homeassistant.ts

* Update bridge.ts

* Update bridge.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-08-04 22:14:36 +02:00
Koen Kanters 8397f47649 fix: Fix availability blocking other extensions startup (#23316)
* fix: Fix availability blocking frontend startup

* Process feedback

* fix
2024-07-11 21:07:01 +02:00
Koen Kanters 30227a13ae chore: Implement prettier (#23153)
* chore: Implement prettier

* Run prettier

* fix lint

* process feedback

* process feedback
2024-06-24 18:58:47 +00:00
Nerivec 3d772b5db3 fix: Bind code optimisation/formatting (#23110)
* Bind code optimization/formatting

* Feedback

* Fix coverage
2024-06-23 10:38:00 +02:00
Nerivec f57465324a fix: Availability code optimization/formatting (#23065)
* Availability code optimization/formatting

* Fix mock.

* Fix map => some
2024-06-16 17:25:40 +02:00
Nerivec 2b8eaa196a fix: Enforce no floating promises (#22880)
* Enforce no floating promises.

* forEach => for/of. Fix tests.
2024-06-04 20:05:39 +02:00
Nerivec 919c4eee73 fix: Cleanup old logger leftovers (#22069) 2024-04-04 20:24:39 +02:00
Nerivec 73566dff98 feat: Unified logging across z2m/zh/zhc (#21984)
* Unified logging across z2m/zh/zhc

* Updates

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-04-02 22:33:51 +02:00
Koen Kanters 0a2d9ba952 chore: merge master to dev 2023-12-10 21:21:18 +01:00
Mario Guggenberger 5aeec130b1 fix: Fix availability checks not stopped on extension stop (#20093)
* fix: availability checks not stopped on extension stop

* Add test

* Clarify comments

* Simplify test

* Simplify code
2023-12-10 21:20:59 +01:00
Koen Kanters dd1e0db407 fix(ignore): Use zhc types (#20006)
* fix(ignore): Use zhc TS types

* updates
2023-12-04 10:05:05 +01:00
Rotzbua 83e331323c fix: Correct typos (#19143)
Credit to `codespell`.
2023-10-03 10:54:13 +02:00
Yip Rui Fung d1e50ce534 fix: Use QOS1 for rarely sent discovery and availability messages (#18756)
* Use QOS1 for rarely sent messages

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

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

* Fix tests for discovery and availability using QOS1
2023-08-27 06:26:07 +00:00
Aarni Koskela 8fe36d74ec Typo fixes (#17440)
* Fix "Succesfully"

* Fix herdsman typo

* Fix various other small typos
2023-04-27 09:14:04 +02:00
Koen Kanters 7f1f1497c6 Always return a device state 2022-05-08 09:58:30 +02:00
Koen Kanters 2524e030fa Fix device reconnect resulting in brightness 1 when device is off. #11864 2022-03-17 19:21:35 +01:00
Koen Kanters 8bf06901c2 Availability for groups (#11626)
* Availability for groups. https://github.com/Koenkk/zigbee2mqtt/issues/9176

* Updates

* Fix
2022-03-14 15:51:02 +01:00
Koen Kanters 41ece365aa Allow to configure availablility payloads to be a JSON object. #10802 2022-02-02 19:28:44 +01:00
Koen Kanters 73f02bfee3 Fix crash when availability is enabled per device. #11184 2022-02-02 17:39:45 +01:00
Koen Kanters 912360c1f0 Fix availability passive device timeout config. https://github.com/Koenkk/zigbee2mqtt/pull/10437 2022-01-31 17:28:08 +01:00
Koen Kanters 64f83d74b7 Clear old availability topic when device is renamed. #5244 2022-01-21 20:21:18 +01:00
Koen Kanters 30177b0db4 Restructure settings (#10437)
* -

* deep copy schema

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -
2022-01-09 22:28:44 +01:00
Koen Kanters ee6b035108 Support homeassistant_rename for groups. https://github.com/Koenkk/zigbee2mqtt/discussions/10672 2022-01-09 20:39:15 +01:00
Koen Kanters a56061b36d Attempt to fix crash due to availability state read. #10177 2021-12-15 19:48:32 +01:00
Koen Kanters ea04021438 Cleanup availability experimental log. #9907 2021-12-14 20:38:44 +01:00
Koen Kanters 5e3b18a053 Log failed to ping as warning instead of error. https://github.com/Koenkk/zigbee2mqtt/issues/9700 2021-11-21 22:11:10 +01:00
Koen Kanters 3141a14fec Attempt to fix race condition in availability stop. https://github.com/Koenkk/zigbee2mqtt/issues/9644 2021-11-14 16:18:54 +01:00
Koen Kanters 20b6fd42d3 Stop pinging device (availability feature) when it is removed. https://github.com/Koenkk/zigbee2mqtt/issues/9490 2021-11-04 20:52:10 +01:00
Koen Kanters 0282011255 Replace old availability implementation with new one (#8904)
* Update

* Updates

* More refactoringzzz

* Bindoo

* Loadz of typescripting

* Logga

* Updates

* Updates

* Updates

* Updates

* cleanup

* updates

* Fix coverage

* Fixes

* Updates

* Updates

* Replace old availability implementation with new one.
2021-10-02 10:25:43 +02:00