Commit Graph

82 Commits

Author SHA1 Message Date
Koen Kanters cd4ac0c174 Ignore messages from coordinator. https://github.com/Koenkk/zigbee2mqtt/issues/9218 2021-11-28 20:08:09 +01:00
Koen Kanters 0a7a477281 Send only 1 MQTT message when last_seen is enabled and Zigbee message is received. https://github.com/Koenkk/zigbee2mqtt/issues/9519 2021-11-27 09:31:31 +01:00
Koen Kanters 7e2a2bdd34 Remove led control (#9404) 2021-11-14 15:04:23 +00:00
Koen Kanters f7c0b46bef Catch exception when removing device via pass/blocklist. https://github.com/Koenkk/zigbee2mqtt/issues/9116 2021-10-14 22:18:37 +02:00
Koen Kanters 23b87755cf Stop Zigbee2MQTT with error when initial MQTT connect fails. https://github.com/Koenkk/zigbee2mqtt/issues/8956 2021-10-04 22:08:06 +02:00
Koen Kanters ab3a9da630 Revert "Improve MQTT error handling. https://github.com/Koenkk/zigbee2mqtt/issues/8956"
This reverts commit 45a4978ca8.
2021-10-04 20:51:09 +02:00
Koen Kanters 45a4978ca8 Improve MQTT error handling. https://github.com/Koenkk/zigbee2mqtt/issues/8956 2021-10-03 12:29:54 +02:00
Koen Kanters c28731957a Fix last seen not published when changed. https://github.com/Koenkk/zigbee2mqtt/issues/7423 2021-10-02 10:49:47 +02:00
Koen Kanters 045ee573a0 Final TypeScript refactor (#8859)
* Update

* Updates

* More refactoringzzz

* Bindoo

* Loadz of typescripting

* Logga

* Updates

* Updates

* Updates

* Updates

* cleanup

* updates

* Fix coverage

* Fixes

* Updates

* Updates
2021-10-02 10:09:38 +02:00
Koen Kanters 4125ae0888 TypeScript refactoring (#8567)
* Updates

* Updates

* Updates

* Rename

* Updates

* updates

* Updates

* Updates
2021-09-01 20:39:17 +02:00
Koen Kanters a76c13c461 Make tests compatible with Jest 27 2021-07-05 20:46:53 +02:00
Franck Nijhof 000884b080 Deprecate Home Assistant entity attributes (#7683)
* Deprecate Home Assistant entity attributes

* Adjust test to match latest dev

* Set default only for new installations

* Fix tests
2021-06-08 15:33:14 +02:00
Koen Kanters 0401a13d5d Disable legacy options on new network start. 2021-06-07 09:46:10 +02:00
Koen Kanters 723121d671 Fix tests 2021-05-08 15:52:14 +02:00
Koen Kanters 00c2894bb4 Reread settings on restart. https://github.com/Koenkk/zigbee2mqtt/discussions/6628 2021-03-09 19:50:05 +01:00
John Doe 028792e5b4 Implement extension loading api (#6378)
* Implement extension loading api

* Fix frontend tests

* Implement saving and unloading extensions

* Save after loading

* Add tests

* Fix coverage

* Refactor frontent test calls

* Update controller.js

* Review fixes

* Update utils.js

* Rename list topic

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2021-02-22 21:29:58 +08:00
Koen Kanters 5889588a8a Add zigbee2mqtt/bridge/request/options and zigbee2mqtt/bridge/request/restart (#6089)
* Initial

* Update schema

* Log changed options

* Implement zigbee2mqtt/bridge/request/restart

* Implement restart required

* Updates

* Updatos

* Set rtscts: false defaults

* Updates

* Updates
2021-02-06 23:32:20 +08:00
Koen Kanters 7cf746aa6a Merge branch 'dev' 2021-02-01 18:13:27 +01:00
Lubomir Kaplan 9f5c68e9ec Pass logger to zigbee-herdsman controller (#5988)
* passing logger to zigbee-herdsman controller

* updated controller test for logger passing
2021-01-31 16:14:06 +01:00
Koen Kanters 48767a7bcf Allow to generate panID by setting "pan_id: GENERATE". https://github.com/Koenkk/zigbee2mqtt/issues/5745 2021-01-18 18:01:10 +01:00
Koen Kanters d53b63d67e Allow joining for a specific amount of time. https://github.com/nurikk/z2m-frontend/issues/202 2021-01-03 11:08:33 +01:00
Koen Kanters 9abcaddaba Fix tests 2020-12-13 18:29:08 +01:00
Koen Kanters 49f37acd18 Add adapter_delay option. https://github.com/Koenkk/zigbee2mqtt/issues/4884 2020-11-18 18:46:13 +01:00
Chris Nesbitt-Smith aabb88fbf4 Add force_disable_retain option (#4948)
* support configurable retain on mqtt settings since some servers throw errors and drop the connections if you try (e.g. aws iot)

* Revert "support configurable retain on mqtt settings since some servers throw errors and drop the connections if you try (e.g. aws iot)"

This reverts commit 40d3a9c0bc84c83d2b167e2e3c3a06ca6df80f47.

* support configurable retain on mqtt settings

* support subscribing to the whole base prefix

* Update mqtt.js

* Fixes

* Fixes

* Fix tests

* Updates

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-11-16 17:27:49 +01:00
qm3ster f26ddd93ff Replace "problematic" depenencies
Also one comment typo lol

`node-static` was abandoned and vulnerable, which might matter since
it's used in production usage and not development.
replaced with popular `serve-static` + `finalhandler`

`json-stable-stringify` depended on an unneeded and unlicensed
polyfill for JSON builtin.
2020-09-25 15:58:45 +02:00
Koen Kanters b79fb2b6f5 Don't try to setup reporting for Philips devices that do not support it. https://github.com/Koenkk/zigbee-herdsman/issues/110 2020-09-22 17:42:03 +02:00
Koen Kanters 7fe3167e97 Fix crash when saving state.json fails. #4388 2020-09-19 10:59:12 +02:00
Koen Kanters 9774031169 Sort logged and published JSON objects alphabetically. #4091 2020-08-13 20:00:35 +02:00
Koen Kanters 81db31b784 Fix attribute output not publishing all values. https://github.com/Koenkk/zigbee2mqtt/issues/4054 2020-08-08 16:36:58 +02:00
Koen Kanters b9ba635bea Fix crash when attribute value is undefined of null (publish empty payload in this case). #3980 2020-07-27 22:07:03 +02:00
Koen Kanters ad13564687 Improve error messages when configuration is invalid. #3943 2020-07-23 19:17:26 +02:00
Koen Kanters 67f02adbd0 Prefer blocklist/passlist over blacklist/whitelist 2020-07-15 23:22:32 +02:00
Koen Kanters b1a4926a30 Add cache_state_persistent and cache_state_send_on_startup options. #3496 2020-07-10 22:09:16 +02:00
Koen Kanters 22387fd637 Don't provide defaults for rtscts and baudrate (#3854)
* Don't provide defaults for rtscts and baudrate

* Update herdsman
2020-07-06 21:37:58 +02:00
Koen Kanters 48705c9a9e Fix not connecting to MQTT when permit join fails on startup. #3756 2020-06-21 16:36:36 +02:00
Koen Kanters d22e73ebb4 #3271 Allow to randomize network_key by settings 'network_key: GENERATE' 2020-04-21 21:58:43 +02:00
Koen Kanters a8793ab60b Load extensions from data directory. https://github.com/Koenkk/zigbee2mqtt/issues/3297 2020-04-19 20:08:24 +02:00
Koen Kanters 1d9d63062a Add missing devices to configuration. #3263 2020-04-04 19:15:24 +02:00
Koen Kanters d6fccbd83e Fix tests. 2020-03-31 18:18:15 +02:00
Dustin Sallings 97a4b6b539 Add support for expiring retained messages. (#3082)
* Add support for expiring retained messages.

For most of my environmental monitoring use cases, I want the readings
retained so I can pick them up from clients at any time, but if the
sensor (or zigbee2mqtt) fails, I want the readings to go away so I can
tell the difference between a stale reading and a missing reading.

This is easily accomplished in MQTTv5 using the "message expiry
interval" property.  To add that to zigbee2mqtt, I added a 'version'
option to the mqtt section so I can specify to connect with version 5
and added a 'retention' property to devices allowing me to specify how
long items should be retained.

e.g.

    mqtt:
      base_topic: site/zigbee2mqtt
      server: 'mqtt://myserver'
      user: zigbee
      version: 5
    serial:
      port: /dev/ttyACM0
    devices:
      '0x00358d00022308da':
        friendly_name: someroom
        retain: true
        retention: 900

* Also get from deviceOptions

* Update settings.js

* Update controller.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-12 20:25:37 +01:00
nightdeveloper b59d761ca6 publish announces to log topic (#3101)
* publish announces to log topic

* publish announces to log topic #test fix

* Update controller.js

* Update controller.test.js

* Update deviceAvailability.test.js

Co-authored-by: Andrey Sergeew <avsergeev@neoflex.ru>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-11 18:21:06 +01:00
Jorge Schrauwen b17b9c76ef #3009 filtered_attributes should also work in device_options (#3057) 2020-03-03 18:30:54 +01:00
Jorge Schrauwen 658cc21b4d #3009 allow filtering of mqtt topics and payloads (#3037)
* Allow filtering of attributes in mqtt json payload or published attributes

* Add test for mqtt_attribute_filter

Just doing attribute_and_json should be fine as the code changes are run before this. Doing this tests lets us varify both json or seperate topic get properly filtered.

* Add test for mqtt_attribute_filter on group

* Rename mqtt_attribute_filter to filtered_attributes
2020-03-02 20:08:51 +01:00
Koen Kanters ae5330d090 Update converters. 2020-01-17 22:51:37 +01:00
Twan Coenraad dd0ca2a392 Add keepalive option for MQTT (#2767) 2020-01-17 21:38:46 +01:00
lukeIam 4a0059afcd Allow attribute and json in parallel (#2712)
* Allow attribute and json in parallel

* Fix tests

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-12 15:07:06 +01:00
Koen Kanters 6b7bd9da37 Re-add model to device information. #2497 2019-12-11 20:15:42 +01:00
Wilmar den Ouden 694c45fd96 Make logging transports configurable (#2231)
* feat: Make logging optional

Signed-off-by: wilmardo <info@wilmardenouden.nl>

* feat: be more verbose about what logging is enabled

Signed-off-by: wilmardo <info@wilmardenouden.nl>

* feat: adds tests

Signed-off-by: wilmardo <info@wilmardenouden.nl>

* Updates.

* Updates

* fix tests.

* Remove onlythis.

* Remove another onlythis

* Improve test stability

* Remove another onlythis
2019-11-29 23:36:57 +01:00
Koen Kanters 99fd93f9a7 Allow setting transmit power. https://github.com/Koenkk/zigbee2mqtt/issues/2253 2019-11-27 22:02:49 +01:00
Koen Kanters af770acd2d Make retain a optional option and default it to false. 2019-11-06 20:30:33 +01:00