Tomer
c6ca472ca1
fix: Improve performance when logging is disabled ( #23893 )
...
* Improve log performance
* Bug fix
* Revert sample configuration
* Align package versions
* Revert dependecies version to allow testing
* Update package-lock.json
* Fix prettier issue
* Coverage to 100%
* Fix CR comments
* remove uneeded changes
* Make the same perf optimization to the MQTT messages
* Fix MQTT tests
* prettier fix
* Allow easy mocking of stub logger callTransports function to receive the actual message
* cleanup leftover
* Fix prettier issues
* Finalize logger mock structure and add few lambda log calls
* fix prettier issue
* Run prettier
* Revert "fix prettier issue"
This reverts commit b409d538e3 .
* Update zigbee.ts
Fix prettier issue
* Fix test issues
* Revert await removal
2024-09-12 20:33:05 +02: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 and Koen Kanters
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
efd3d3dfb0
fix: Set zigbee-herdsman transmit power through settings on startup ( #23566 )
...
* fix: Set zigbee-herdsman transmit power through settings on startup
* use advanced
2024-08-09 12:33:59 +00: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 and Koenkk
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 and Koen Kanters
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
d9ba4524e4
fix(ignore): fix 5fcf295ab8
2024-07-25 21:59:40 +02:00
Koen Kanters
af7467bf62
fix(ignore): Update test cases for https://github.com/Koenkk/zigbee2mqtt/pull/23328
2024-07-13 21:20:33 +02:00
Koen Kanters
f97ad2e951
fix(ignore): fix tests
2024-07-03 22:37:12 +02:00
Gernot Messow and Koen Kanters
4210edf60e
fix: Allow definition to override HA discovery payload ( #23075 )
...
* Added function to override payloads for non-conforming devices
* override implementation for Bosch BTH-RA
* unit test including mockup for this device
* Experimental and broken integration of overrideHaConfig
* Not working experiments; mqtt publish debug output
* fixes
* Updates
* fix
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
2024-07-03 21:27:45 +02:00
Koen Kanters
dc7a06cf56
fix: Don't allow homeassistant.discovery_topic to be equal to mqtt.base_topic https://github.com/Koenkk/zigbee2mqtt/issues/23109 ( #23209 )
2024-06-30 10:42:24 +00: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
Jorge Schrauwen and Koen Kanters
ad84374046
fix: Fix OTA overriding custom software version attribute ( #23129 )
...
* fix: OTA loses version info for develco/frient
This fix is not perfect, as it will still print that it got updated from null to null.
We just moved the reconfigure later, which will trigger this https://github.com/Koenkk/zigbee-herdsman-converters/blob/000041cba216822dab151151c493b560678da91a/src/devices/develco.ts#L36
for develco/frient devices that have it in their configure. (Which should be all of them)
Of note though, ZCL marks both dateCode and swBuildId as optional attributes, so Develco/Frient returning UNSUPPORTED_ATTRIBUTE here is not outside of spec. Although I'm not sure there is a cleaner way to do this.
* Update otaUpdate.test.js
* Update otaUpdate.ts
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
2024-06-23 11:24:03 +02: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
9c2264e86e
fix: MQTT code optimization/formatting ( #23072 )
...
* MQTT code optimization/formatting
* Feedback.
* Move `onConnect` logic inside `connect` event.
2024-06-18 13:59:07 +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
ghoz
d41cf43a7c
fix: Exclude homeassistant entries from null cleanup ( #22995 )
...
* exclude homeassistant entries from null cleanup
* Add a test
* Don't hardcode the exclude list, add one more test
* implement suggested changes as per review
2024-06-15 10:27:29 +02:00
ghoz
eff341bd14
fix: Differentiate the MQTT publish/ received from regular MQTT logs ( #23026 )
...
* Differentiate the spammy "MQTT publish"/"received MQTT message" from regular logs
Rather than creating subnamespaces, keep the z2m:mqtt logger namespace only for those 2 , move back to z2m default for the rest.
* fix tests
2024-06-12 21:01:16 +02:00
ghoz and Nerivec
881037c371
feat: Allow hierarchical filtering of logger namespaces ( #22859 )
...
* POC: Allow hierarchical filtering of logger namespaces
matches the closes defined namespace log level:
advanced:
log_namespaced_levels:
'zh:zstack:unpi': info
would also apply to zh:zstack:unpi:write and zh:zstack:unpi:parse
To limit runtime penalty uses the namespacedLevels as a lazy cache
* Move namespace levels to separate cache
Avoid poluting the namespacedLevel in the config / UI
Add cache reset on config time log level change
* Actually use the cache
* Optimize/Cleanup
* Add some namespace hierarchy filter tests
* More coverage.
* Fix #22935
---------
Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com >
2024-06-04 20:17:35 +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
Koen Kanters and Koenkk
8f195f67e6
fix(ignore): update dependencies ( #22883 )
...
* fix(ignore): update dependencies
* Update homeassistant.test.js
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-06-02 11:33:34 +02:00
Koen Kanters
457ed86ef8
fix(ignore): TuYa -> Tuya https://github.com/Koenkk/zigbee2mqtt/discussions/22876
2024-06-01 16:44:22 +02:00
Koen Kanters and Koenkk
f9b0fff185
Update zigbee-herdsman-converters to 19.45.0 ( #22814 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.45.0
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-05-30 19:20:02 +00:00
Mike Ryan
b6ad6418a1
feat: Add api for device re-interview ( #22788 )
...
* feat: add api for device re-interview
- Adds an API that allows for the re-interview of a device. This can be
useful a device firmware upgrade adds new device endpoints (as is the case
when upgrading an Inovelli VZM31-SN to 2.18). Without the ability to
re-interview, one must remove and re-add the device.
* rename from reinterview to interview
* publish devices after interview.
* only allow device ids or names, not endpoints
2024-05-30 20:48:34 +02:00
Koen Kanters
ae8a59dd51
fix(ignore): Fix Home Assistant device_automation being cleared due to ef68cc328e
2024-05-27 16:59:56 +02:00
Koen Kanters
ef68cc328e
fix: Optimize Home Assistant discovery ( #22701 )
...
* fix: Optimize Home Assistant discovery
* update
* u
* u
* u
* fix
2024-05-21 20:53:37 +02:00
Laurent Chardin and Koen Kanters
d484405cf0
fix: Expose custom clusters to MQTT ( #22583 )
...
* (feat) Expose Custom Clusters in MQTT
- Introducing bridge/definitions
- Updating test case for custom clusters
- Updating new path after ZCL revamp with 0.47.0
This change is needed for nurikk/zigbee2mqtt-frontend#2001
* Fixing test case
* Update lib/model/device.ts
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
* Update test/bridge.test.js
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
* Removing the publishDefinition call from some events. updating tests
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
2024-05-21 19:54:18 +02:00
Koen Kanters
63de2c5ccc
fix: Fix Entity 'homeassistant/sensor' is unknown https://github.com/Koenkk/zigbee2mqtt/issues/22258
2024-05-19 21:32:09 +02:00
Koen Kanters and Nerivec
ce6043acb0
fix: Improve settings changing ( #22674 )
...
* Add namespaced levels for logger. Add NS to mqtt. Deprecate 'warn'.
* Improve setting validation.
* Fix setting through frontend
* Support reload + frontend improvements
* update description
* remove requiresRestart
* Fix tests.
* Fix namespaced logging at lower levels. Add better tests.
* fix: Fix settings changing
* remove `removeNullPropertiesFromObject` from bridge
* Add extra test
* update
---------
Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com >
2024-05-19 16:01:28 +02:00
Nerivec and Koen Kanters
2eec6a4d26
fix: Add namespace-specific levels support to logger ( #22619 )
...
* Add namespaced levels for logger. Add NS to mqtt. Deprecate 'warn'.
* Improve setting validation.
* Fix setting through frontend
* Support reload + frontend improvements
* update description
* remove requiresRestart
* Fix tests.
* Fix namespaced logging at lower levels. Add better tests.
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
2024-05-19 15:47:40 +02:00
Nerivec
d26ccaed65
fix: Fix logger crashing on restart ( #22565 )
2024-05-09 21:42:28 +02:00
Nerivec
eb49f523bf
fix: Add settings for finer control over debug log level ( #22426 )
...
* Add settings for finer control over debug log level.
* Updates from feedback.
2024-05-05 21:52:26 +02:00
Koen Kanters and Koenkk
3a61f0acfa
Update zigbee-herdsman-converters to 19.34.0 ( #22411 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.34.0
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-05-02 20:20:06 +00:00
Koen Kanters and Koenkk
4b291bf012
Update zigbee-herdsman-converters to 19.31.1 ( #22341 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.31.1
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-04-29 20:01:56 +00:00
f774753213
fix(ignore): update zigbee-herdsman-converters to 19.19.1 ( #22171 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.19.1
* fix(configure): pass definition to function call (#22154 )
* Pass definition to configure
* fix test
---------
Co-authored-by: Koen Kanters <koenkanters94@gmail.com >
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
Co-authored-by: Sergei Salimov <32013287+mrskycriper@users.noreply.github.com >
2024-04-10 22:02:12 +02:00
Koen Kanters
c98e5a74de
fix: Remove deprecated Home Assistant color_mode ( #22142 )
2024-04-08 21:19:17 +02:00
Nerivec
3c1a4afcb7
fix: Convert logger into a class ( #22129 )
2024-04-07 20:52:55 +02:00
Koen Kanters
002050f35b
fix: Reduce MQTT publishing by excluding debug logging from bridge/logging ( #22066 )
...
* fix: Reduce MQTT publishing by excluding debug logging from `bridge/logging`
* fix tests
* fix
2024-04-06 12:44:43 +02:00
Koen Kanters and Koenkk
701cdda38c
Update zigbee-herdsman-converters to 19.14.0 ( #22065 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.14.0
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-04-04 19:33:39 +00:00
Koen Kanters
bbb6f9e042
fix: Change MQTT publish log to debug ( #22063 )
2024-04-03 18:13:46 +00:00
Koen Kanters
cdd6fb0864
fix(ignore): fix 73566df
2024-04-02 22:39:33 +02:00
Nerivec and Koen Kanters
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 and Koenkk
62844ff637
Update zigbee-herdsman-converters to 19.12.1 ( #22044 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.12.1
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-04-02 20:17:43 +00:00
Koen Kanters and Koenkk
1f3d61dc7f
Update zigbee-herdsman-converters to 19.7.0 ( #21947 )
...
* fix(ignore): update zigbee-herdsman-converters to 19.7.0
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-03-25 21:24:00 +00:00
Koen Kanters and Koenkk
86c2e90e06
Update zigbee-herdsman-converters to 18.49.0 ( #21767 )
...
* fix(ignore): update zigbee-herdsman-converters to 18.49.0
* fix tests
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-03-11 20:40:55 +00:00
Koen Kanters
29543bad4b
fix(ignore): fix tests
2024-03-10 19:54:35 +01:00
koenkk
1110d3f8ef
fix: Fix incorrect update state when Z2M is restarted during OTA update https://github.com/Koenkk/zigbee2mqtt/issues/12794
2024-03-05 22:33:33 +01:00
Koen Kanters and Koenkk
94c92ef021
Update zigbee-herdsman-converters to 18.43.0 ( #21678 )
...
* fix(ignore): update zigbee-herdsman-converters to 18.43.0
* Update configure.test.js
---------
Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com >
2024-03-04 21:44:31 +00:00
Koen Kanters
66fb672492
fix: Fix set endpoint name conversion ( #21653 )
...
* fix: Fix `set` endpoint name conversion https://github.com/Koenkk/zigbee2mqtt/issues/21646
* fix
2024-03-02 21:45:19 +01:00