Commit Graph

815 Commits

Author SHA1 Message Date
Oleksandr Masliuchenko b4473d6e24 fix: Remove predefined endpoint list, remove limits on device friendly name (#21325)
* Get rid of predefined list of endpoints, correct friend name validations

* Fix minor bug while parsing a topic for an unknown device
2024-02-10 16:50:44 +01:00
Oleksandr Masliuchenko 81335e5b4b fix: Remove dependency on predefined list of endpoints (parseEntityID() function) (#21264)
* Add function resolveEntityByID() function as an improved alternative for parseEntityID()

* Port deviceGroupMembership.ts from parseEntityID() to resolveEntityByID()

* Migrade groups.ts from parseEntityID() to resolveEntityByID()

* Improve test coverage on groups functionality

* Migrate from parseEntityID() to resolveEntityByID() for bridge functionality

* Migrate from parseEntityID() to resolveEntityByID() for bind functionality

* Finally get rid of parseEntityID() function

* Fix linter issues

* Move resolveEntityAndEndpoint() function to zigbee.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-02-08 20:54:05 +01:00
Oleksandr Masliuchenko a5a87a79a8 fix: Match endpoint name in the MQTT topic based on endpoints listed in the definition (#21214)
* Add endpoint matching based on the endpoint names list in the device definition

* Cleanup debug prints

* Correct creating endpoint names list, filter out null elements

* Correct test due to slightly changed behavior

* Fix endpoint name lookup when converter does not provide full name-to-id mapping

* Simplify topic name matching

* Remove obsolete branches, improve code coverage

* Make linter happy

* Make linter happy

* Remove dependency on endpoint names while removing device from all groups

* Get rid of predefined list of endpoints when processing group state update

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-02-07 20:12:48 +01:00
Koen Kanters 0361b13b66 Update zigbee-herdsman-converters to 18.25.0 (#21114)
* fix(ignore): update zigbee-herdsman-converters to 18.25.0

* fix

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-30 20:58:29 +01:00
koenkk c37f3e834e chore: remove onlythis 2024-01-30 20:12:52 +01:00
Koen Kanters 0d716288bf Update zigbee-herdsman-converters to 18.22.0 (#21040)
* fix(ignore): update zigbee-herdsman-converters to 18.22.0

* Update homeassistant.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-27 08:55:15 +00:00
Der Mundschenk & Compagnie 6372d84259 fix: Republish correctly on scene changes to Home Assistant (#20952) 2024-01-23 19:25:18 +01:00
Koen Kanters 45579dcf10 Update zigbee-herdsman-converters to 18.18.0 (#20933)
* fix(ignore): update zigbee-herdsman-converters to 18.18.0

* Update bridge.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-22 20:02:57 +00:00
chrthi 97eac16aaf fix: Notify systemd for start, stop, watchdog (#20482)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2024-01-21 21:49:17 +01:00
slugzero e76f568f0f fix: Remove deprecated sendWhen (#20861) 2024-01-18 18:28:52 +01:00
slugzero 0007db42b0 fix(ignore): Ability to trigger events from converters on incoming Zigbee messages (#20776)
* emit event on converter triggers

* use meta.deviceExposesChanged() instead

* add ExposesChanged event for homeassistant discovery

* add tests for receive.ts and homeassistant.ts
2024-01-15 21:08:08 +01:00
Koen Kanters 2bd7df84eb Update zigbee-herdsman-converters to 18.12.0 (#20775)
* fix(ignore): update zigbee-herdsman-converters to 18.12.0

* Update configure.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-13 20:06:27 +00:00
Koen Kanters ce7d022fda Update zigbee-herdsman-converters to 18.10.0 (#20682)
* fix(ignore): update zigbee-herdsman-converters to 18.10.0

* Update bridge.test.js

* Update bridge.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-08 20:14:03 +00:00
Koen Kanters d942db9a92 Update zigbee-herdsman-converters to 18.7.0 (#20607)
* fix(ignore): update zigbee-herdsman-converters to 18.7.0

* Update bridge.test.js

* Update frontend.test.js

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2024-01-06 10:32:21 +00:00
koenkk 212c70913c fix: Prevent extension errors from crashing Zigbee2MQTT https://github.com/Koenkk/zigbee2mqtt/issues/20477 2024-01-06 10:19:56 +01:00
Der Mundschenk & Compagnie b8edf273c6 fix: Support legacy_availability_payload for Home Assistant connection_state (#20547) 2024-01-04 14:38:29 +01:00
koenkk e9aee4c6dc fix: Fix configure on startup crashing coordinator https://github.com/Koenkk/zigbee2mqtt/issues/20526 2024-01-03 10:51:05 +01:00
koenkk 32b0ded17c fix(ignore): fix dee8781e51 2024-01-01 12:18:25 +01:00
koenkk dee8781e51 fix(ignore): fix homeassistant.test.js 2024-01-01 11:42:48 +01:00
Koen Kanters ffa43915f0 Update zigbee-herdsman-converters to 18.0.2 (#20404)
* fix(ignore): update zigbee-herdsman-converters to 18.0.2

* Update bridge.test.js

* Update networkMap.ts

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-12-27 20:53:57 +00:00
Koen Kanters e6e3d92971 fix(ignore): Changes for zhc 18.0.0 (#20390)
* fix(ignore): Changes for zhc 18.0.0

* fix
2023-12-26 19:49:49 +00:00
Koen Kanters 56f57625b0 feat: Support automatically generating device definitions (#20358)
* feat: Support automatically generating device definitions

* updates

* update template
2023-12-25 12:46:57 +01:00
slugzero a5b959a6d5 fix: Clear old Home Assistant discovery topics when exposes are changed (#20313) 2023-12-20 19:46:59 +01:00
Roland Huß b67888f938 fix: Fix load of empty configuration .yaml file failing (#20289)
* Always return an object when loading a YAML file, even when it is empty or containing the `null` value.

Fixes #20283

* Add unit test for having multiple device files, with one is empty. This test breaks without the proposed.
2023-12-20 19:31:49 +01:00
koenkk 8f62a0a618 fix: Fix Home Assistant Entity category config is invalid for sensors warning https://github.com/Koenkk/zigbee2mqtt/issues/20252 2023-12-17 14:24:12 +01:00
Der Mundschenk & Compagnie e0f50218d7 fix: Only republish changed scenes to Home Assistant when changed (#20248) 2023-12-17 09:21:59 +01: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
koenkk d1501052ad fix(ignore): fix bind test 2023-12-09 14:11:45 +01:00
Der Mundschenk & Compagnie a17f650ccb fix: Prevent duplicate Home Assistant scene entities (#20097) 2023-12-08 19:34:37 +01:00
Der Mundschenk & Compagnie 59efc15f3a fix(ignore): Fix "Permit join timeout" template (#20096) 2023-12-08 19:33:30 +01:00
Der Mundschenk & Compagnie f11eb2459b feat: Support bridge discovery for Home Assistant (#19994)
* Simplify getDiscoverKey

* Add support for discovering bridge entities

* Add automatic discovery for bridge

* Make availability configurable and disable it
for `connection_state` entity

* Link devices & groups to bridge

* Additional entities (and some clean-up)
2023-12-06 19:36:45 +01:00
koenkk 8ab96e124f fix: Don't crash on startup when external converters fails to load https://github.com/Koenkk/zigbee2mqtt/issues/20010 2023-12-04 20:40:45 +01:00
koenkk 04d8522b3b fix(ignore): fix dd1e0db407 2023-12-04 10:29:09 +01:00
Der Mundschenk & Compagnie 838629ca42 feat: Add Home Assistant scene discovery (#19838)
* Add device info for Zigbee Groups

* Move Scene and getScenes to utils.ts

* Add auto-discovery for group scenes

* Update scene auto-discovery on change

* Add support for single endpoint scenes

* Add test for onScenesChanged

* Move Scene to types.d.ts

* Allow optional object_id_postfix key in payload

* Add scene name to object_id for nicer HA entity_id
2023-11-26 19:38:53 +01:00
koenkk 8cf41a137a fix(ignore): remove console.log in test 2023-11-22 21:42:44 +01:00
koenkk 01d32cb230 fix(ignore): Fix color_temp_percent test 2023-11-16 21:55:07 +01:00
Nicolas Thumann 45ac44dd06 fix: Make frontend listen on both IPv4 and IPv6 by default (#19660)
* Change: Set frontend host to null by default

* Change: Allow frontend to listen on port without host

* Change: Unit test

* Add: Unit test
2023-11-10 21:57:53 +01:00
Rotzbua be48d545cc fix(ignore): remove unused variable (#19584) 2023-11-05 21:02:15 +01:00
Rotzbua 13443a42ce fix(typo): correct misspell (#19581)
Credit to `codespell`.
2023-11-05 21:01:55 +01:00
Arne Rekdal 64b26e47da fix: Map climate idle to idle instead of off in Home Assistant (#19545)
* Missing HA Climate Idle state

Idle is mapped to idle state in HA

* Update homeassistant.test.js
2023-11-03 20:14:25 +01:00
Koen Kanters e36983b4b5 fix: Publish zigbee-herdsman/zigbee-herdsman-converters version to bridge/info (#19364) 2023-10-21 10:56:31 +02:00
koenkk daaade45d9 fix: Fix device keeps requesting OTA due to incorrect transaction sequence number. https://github.com/Koenkk/zigbee2mqtt/issues/19129 2023-10-07 08:55:16 +02:00
Rotzbua 83e331323c fix: Correct typos (#19143)
Credit to `codespell`.
2023-10-03 10:54:13 +02:00
Koen Kanters e3d1c63463 Update zigbee-herdsman-converters to 15.81.0 (#19032)
* fix(ignore): update zigbee-herdsman-converters to 15.81.0

* fix tests

---------

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

* fix tests

---------

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

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

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

* Fix tests for discovery and availability using QOS1
2023-08-27 06:26:07 +00:00
koenkk 677db105e2 chore: remove duplicate object_id warning for function expose 2023-08-26 08:43:47 +02:00
Koen Kanters 704ecf366e feat: Add Home Assistant origin to discovery (#18741) 2023-08-26 07:56:31 +02:00
Koen Kanters 239c8fc70c Update zigbee-herdsman-converters to 15.61.0 (#18713)
* fix(ignore): update zigbee-herdsman-converters to 15.61.0

* u

* u

---------

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
2023-08-24 08:20:28 +00:00