Commit Graph
266 Commits
Author SHA1 Message Date
Koen Kanters 4d3bbce687 Implement lightWithPostfix Home Assistant configuration. #3003 2020-03-15 09:38:39 +01:00
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
Koen Kanters f1a685bea2 Reduce MQTT subscriptions in deviceBind. https://github.com/Koenkk/zigbee2mqtt/issues/3102 2020-03-11 21:30:01 +01:00
Koen Kanters a17d96c14a Revert "Reduce MQTT subscriptions. #3102"
This reverts commit 82080e3d22.
2020-03-11 21:24:59 +01:00
Koen Kanters 82080e3d22 Reduce MQTT subscriptions. #3102 2020-03-11 19:02:24 +01:00
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
Koen Kanters 4d54e5038b Refuse to start when friendly_name ends with /DIGIT. #2645 2020-03-07 23:06:22 +01:00
Kiall Mac InnesandGitHub 67b4bcf815 Update HA Discovery Info on Rename (#3040)
* Update HA Discovery Info on Rename

Update HA discovery info when a device is renamed. Adds a new deviceRenamed
event to the event bus, allowing the HA extension to react to the rename

Fixes #2440

* Handle Groups correctly wrt HA discovery data refresh

* Cleanup group handling

* Cleanup group handling
2020-03-04 12:55:08 +01:00
Jorge SchrauwenandGitHub b17b9c76ef #3009 filtered_attributes should also work in device_options (#3057) 2020-03-03 18:30:54 +01:00
Jorge SchrauwenandGitHub 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 68750fade0 Fix tests on node 12. https://github.com/Koenkk/zigbee2mqtt/issues/3031 2020-03-02 19:11:43 +01:00
Koen Kanters 9f1b8cf214 Allow to disable homeassistant legacy triggers. #3033 2020-03-01 15:55:20 +01:00
Koen Kanters ed75c85b69 Implement Home Assistant MQTT device trigger. #3033 2020-02-29 18:07:15 +01:00
Koen Kanters a16e3542c0 Update herdsman. #3019 2020-02-29 12:43:53 +01:00
Koen Kanters dd3678f84b TEMP: disable OTA response. https://github.com/Koenkk/zigbee2mqtt/issues/3019 2020-02-28 23:52:30 +01:00
Koen Kanters a40ad0c52f Respond with ABORT when device checks for OTA. https://github.com/Koenkk/zigbee2mqtt/issues/3019 2020-02-28 23:42:59 +01:00
Koen Kanters f6aba5f64a Respond with image not available when OTA is requested but we don't support it. #3019 2020-02-28 23:30:33 +01:00
Koen Kanters 342d4c17b9 Fix debounce, debounce_ignore, retain and qos in device_options not honored. #3004 2020-02-27 21:06:27 +01:00
Christian SchefflerandGitHub 69c477da7d added mqtt log events group_added and group_removed (#3016) 2020-02-27 21:03:56 +01:00
Koen Kanters a36f11a4fb Update converters. 2020-02-25 20:20:52 +01:00
Koen Kanters 9cc84feb67 Allow to rename groups through zigbee2mqtt/bridge/config/rename. https://github.com/Koenkk/zigbee2mqtt/issues/2991 2020-02-23 21:51:30 +01:00
Koen Kanters dd82b29629 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2967 2020-02-23 20:47:38 +01:00
Koen Kanters ad59ff57bc Also remove group from herdsman on remove. #2265 2020-02-22 15:53:05 +01:00
Koen Kanters 6b5b4ab433 Log when update is availabe. https://github.com/Koenkk/zigbee2mqtt/commit/58d987b52328a40b6ac92f343f3e8ceeae3f2a10#r37363068 2020-02-20 20:01:26 +01:00
Koen Kanters 58d987b523 Implement update_available attribute and discover Home Assistant sensor. #2948 2020-02-16 16:00:15 +01:00
Koen Kanters bbf432eae5 Update herdsman and herdsman-converters. 2020-02-13 21:35:37 +01:00
Koen Kanters 87faaa1817 Don't crash when devices doesn't respond to read modelID after update. https://github.com/Koenkk/zigbee2mqtt/issues/2921 2020-02-13 21:10:44 +01:00
Koen Kanters 984bad4cb3 Major OTA improvements. https://github.com/Koenkk/zigbee2mqtt/issues/2921 2020-02-09 20:44:37 +01:00
Koen KantersandGitHub 83291e242e OTA https://github.com/Koenkk/zigbee-herdsman/issues/60 (#2920)
* ota

* Bla

* Update converters.
2020-02-08 19:55:26 +01:00
Koen Kanters 558153ebd6 Update converters. 2020-02-04 20:28:47 +01:00
Koen Kanters 0111681cb7 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2850 2020-01-31 22:42:24 +01:00
Koen Kanters 5488504809 Update converters. 2020-01-29 21:38:37 +01:00
Koen Kanters c87ccea9ba Update converters. 2020-01-29 18:34:40 +01:00
Koen Kanters fe62ceb0f9 Add unbind for default_bind_group. https://github.com/Koenkk/zigbee2mqtt/issues/2772 2020-01-27 20:56:11 +01:00
Koen Kanters 61a3f0e839 Update converters and fix tests for real. 2020-01-26 21:38:04 +01:00
Koen Kanters b58cbd4883 Fix tests. 2020-01-26 19:57:15 +01:00
Koen Kanters 93e96a2e5e Update converters. 2020-01-23 21:00:50 +01:00
Koen Kanters 145f8a577d Update converters. 2020-01-22 21:34:15 +01:00
Koen Kanters dae52a22d7 Update converters. 2020-01-21 21:19:11 +01:00
Koen Kanters ae5330d090 Update converters. 2020-01-17 22:51:37 +01:00
Twan CoenraadandKoen Kanters dd0ca2a392 Add keepalive option for MQTT (#2767) 2020-01-17 21:38:46 +01:00
lukeIamandKoen Kanters 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 cb0b0b5af9 Clear Home Assistant MQTT discovery on device remove. #2678 2020-01-09 21:47:19 +01:00
Koen Kanters 3a463b0782 Update converters. 2020-01-08 20:06:01 +01:00
TilmanKandKoen Kanters 0df966755c Corrected several typos in "Successfully" within log messages (#2697)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-08 19:29:22 +01:00
Daniel ChestertonandKoen Kanters 94d0253f27 Update availability_blacklist and availability_whitelist to allow for friendly names (#2684) 2020-01-08 18:02:49 +01:00
Carl de BillyandKoen Kanters cabb1f3979 Added <operation>_failed logging (#2636)
* Added <operation>_failed logging
for external tools (like Zigbee2MqttAssistant), this will allow the tool to know when an operation is failed.
https://github.com/Koenkk/zigbee2mqtt/issues/2223

* Added _failed logging to binding operations too

* Added _failed to group operations
2020-01-07 21:06:48 +01:00
Koen Kanters c041f0cddc Ignore setup reporting for closuresWindowCovering ZNLDP12LM. #2611 2020-01-07 19:59:43 +01:00
Koen Kanters d3aba2689c Update converters. 2020-01-03 23:29:28 +01:00
Koen Kanters e63d196966 Skip configure when device does not require it. https://github.com/Koenkk/zigbee2mqtt/issues/2588 2019-12-23 20:48:37 +01:00