Compare commits

..
1652 Commits
Author SHA1 Message Date
Koen Kanters 23805c25af 1.12.1 2020-04-08 17:54:22 +02:00
Koen Kanters 0cffae8118 Undev 2020-04-08 17:54:17 +02:00
Koen Kanters 864e8b26d5 Update converters. 2020-04-06 21:39:06 +02:00
Koen Kanters ad48ea2af6 Update herdsman. 2020-04-06 19:14:55 +02:00
ghostcodeandKoen Kanters 418b3d1e5d Action and click trigger for multiple endpoints and 511.344 / ZG2819S support (#3289)
* Home Assistant support for ZG2819S/511.344

* Added 'homeassistant_legacy_triggers' support for devices with multiple endpoints

* Changed code style to pass lint test

* Reverted fix for the action and click trigger to send an empty message for devices with multiple endpoints

* Home Assistant support for the updated ZG2819S converter

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-04-05 21:53:18 +02:00
Koen Kanters 4970d1a927 Update herdsman. 2020-04-05 21:32:24 +02:00
Koen Kanters e71485cd50 Refactor 2020-04-05 20:36:09 +02:00
Koen Kanters 552eec7baa Isolate legacy MQTT log. #3281 2020-04-05 18:36:08 +02:00
Koen Kanters 9df1589361 Move stateChange event to event bus. 2020-04-05 15:48:23 +02:00
Koen Kanters 1e6f99d88f Don't cache properties which start with action_ 2020-04-05 15:41:48 +02:00
Koen Kanters 4fa9aaa0b2 Refactor 2020-04-05 15:41:24 +02:00
Koen Kanters 3ef7555ca2 Refactor 2020-04-05 00:05:05 +02:00
Koen Kanters e0076367d3 Start on legacy api isolation. https://github.com/Koenkk/zigbee2mqtt/issues/3281 2020-04-04 22:47:23 +02:00
Koen Kanters 903cec5760 Allow to disable log rotation. #3280 2020-04-04 19:46:43 +02:00
Koen Kanters 1d9d63062a Add missing devices to configuration. #3263 2020-04-04 19:15:24 +02:00
Jorge Schrauwen 1e28c4285b entityPublish now passes in meta.mapped as an array for groups (#3283) 2020-04-04 18:59:14 +02:00
Koen Kanters 98cf258489 Update converters. 2020-04-03 21:38:43 +02:00
Koen Kanters b15e4d1ad9 Update converters. 2020-04-03 19:19:52 +02:00
Kiall Mac Innes 1abb5b6a48 Fix conflict between illuminance and illuminance_lux (#3275)
* Fix conflict between illuminance and illuminance_lux

On certain devices, e.g. GZCGQ01LM, 9290012607, 9290019758, TERNCY-PP01 etc, both
cfg.sensor_illuminance and cfg.sensor_illuminance_lux are applied. As both of these
had the same object_id, only one would show in Home Assistant. Oddly, a mix of both
would apply - e.g. I would get the illuminance value, with the illuminance_lux unit
of 'lx'.

* Add a test for duplicated type/object_id in HA discovery configs
2020-04-03 11:12:58 +02:00
Koen Kanters 496c5329a2 Update converters. 2020-04-02 18:15:10 +02:00
Koen Kanters 3e1db1787d ZM-CSW032-D doesn't support reporting. https://github.com/Koenkk/zigbee2mqtt/issues/3216 2020-04-02 18:11:49 +02:00
Daniel ZegarraandKoen Kanters 86c3ce3705 Added HA config for radiator valve Siterwell GS361 (#3259)
* Added HA config for radiator valve Siterwell GS361

* Updated payload and state keywords for mqtt msgs

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-04-02 14:29:39 +02:00
Koen Kanters da01a504e7 Update herdsman 2020-04-01 22:36:14 +02:00
Koen Kanters 379847d6d0 Update herdsman and converters. 2020-04-01 21:52:35 +02:00
presslab-us 5952a2a12a Fix definition of Nyce NCZ-3011-HA (#3267) 2020-04-01 21:42:48 +02:00
Koen Kanters f95eb4527a Only setup supported color capabilities. https://github.com/Koenkk/zigbee2mqtt/issues/3260 2020-04-01 20:33:04 +02:00
Koen Kanters defe6a5ec1 Update herdsman. 2020-03-31 21:36:19 +02:00
Koen Kanters 5b34e14a62 Update converters. 2020-03-31 19:59:12 +02:00
presslab-usandKoen Kanters 87d6587779 Support Orvibo RL804QZB (#3252)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-31 19:01:24 +02:00
presslab-usandKoen Kanters 92b6510175 Support Leviton Omnistat2 thermostat (#3249)
* Support Leviton Omnistat2 thermostat

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-31 18:53:51 +02:00
Koen Kanters d6fccbd83e Fix tests. 2020-03-31 18:18:15 +02:00
Koen Kanters eeb85cf096 Update herdsman and converters. 2020-03-30 21:56:34 +02:00
Koen Kanters 7131c05255 DeviceReport: don't crash on binds to non-existing entities. #3245 2020-03-30 19:50:35 +02:00
danieledwardgeorgehitchcock 1ca34536de Added device support for Hue Beyond suspension light (#3246) 2020-03-30 19:45:08 +02:00
presslab-us 7e45ab05cf Fix colortemp ability for Paulmann RGBW Light (#3239) 2020-03-30 19:02:25 +02:00
Koen Kanters 545eca6708 Update converters. 2020-03-29 21:36:59 +02:00
presslab-usandKoen Kanters 6b01418a00 Support Centralite thermostat 3157100 (#3234)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-29 21:22:48 +02:00
presslab-usandKoen Kanters 3bd1f4dc4a Fix power reporting of Centralite 4257050-RZHAC (#3236)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-29 21:14:48 +02:00
presslab-us 00f0381d62 Support Iris hose faucet water timer 27087-03 (#3230) 2020-03-29 20:28:54 +02:00
Koen Kanters 3c9639048e Remove battery_low for HS1CG-E. https://github.com/Koenkk/zigbee2mqtt/issues/3041 2020-03-29 20:19:13 +02:00
Koen Kanters 78c7024980 Update herdsman. 2020-03-29 19:40:33 +02:00
Koen Kanters fb4d86cef5 Allow to change non-setted options via device_options. #3215 2020-03-28 19:48:05 +01:00
Koen Kanters e49b733fae Cover position for ZM-CSW032-D. https://github.com/Koenkk/zigbee2mqtt/issues/3216 2020-03-28 19:30:27 +01:00
Koen Kanters 5092a12298 Change unit of Home Assistant sensor_energy to kWh. https://github.com/Koenkk/zigbee-herdsman-converters/issues/974 2020-03-28 19:26:02 +01:00
presslab-us 15ee48c318 Support Iris smart button 3460-L (#3214) 2020-03-28 19:12:49 +01:00
Koen Kanters ac7ac1a464 Update converters. 2020-03-27 20:44:10 +01:00
presslab-usandKoen Kanters d73bcf3520 Support Sylvania iQBR30 (#3205)
* Support Sylvania iQBR30

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-27 17:45:34 +01:00
Koen Kanters a444a01fa7 Update converters. 2020-03-26 22:24:22 +01:00
presslab-usandKoen Kanters f7b2dff37e Support Centralite Night Light Repeater (#3203)
* Support Centralite Night Light Repeater

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-26 22:15:22 +01:00
presslab-us 676e7e08c6 Support wallyHOME Multi-Sensor (#3202) 2020-03-26 22:09:59 +01:00
Koen Kanters 1c8ba3d28e Mock water_leak value for Home Assistant when it's not available. #3146 2020-03-26 22:01:05 +01:00
presslab-us 4ce9370cc0 Add humidity support for SmartThings (Centralite) 3310-S (#3197) 2020-03-26 21:28:27 +01:00
Koen Kanters a7e38b6bb0 Update zigbee-herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/3111 2020-03-26 20:20:59 +01:00
Koen Kanters 4fe23842cf Don't allow non existing entities on availability_blacklist or availability_whitelist. #3191 2020-03-25 20:46:20 +01:00
Koen Kanters a307747d8c Fix typo. 2020-03-25 20:05:18 +01:00
Koen Kanters 5cd1af569e Fix crash when removing device from group which has no devices in settings. #3185 2020-03-23 22:24:35 +01:00
Nico87LBS dfc897af1a Add Hue Impress outdoor Pedestal (#3186) 2020-03-23 21:51:07 +01:00
Koen Kanters a3b285d1ac Don't allow MQTT wildcard (# or +) in friendly_name. #3175 2020-03-23 19:59:49 +01:00
Koen Kanters 06c792f493 Update herdsman and converters. 2020-03-23 19:42:06 +01:00
Koen Kanters d52d520da8 Update herdsman. 2020-03-22 20:46:39 +01:00
Nico87LBS 5461b3c3f8 Added Hue Econic Outdoor Pedestal (#3174) 2020-03-22 16:36:14 +01:00
Koen Kanters 78c17f0a61 Update converters. 2020-03-21 21:59:10 +01:00
Jorge Schrauwen e226cd229e #3159 Fix incorrect unbind message (#3172) 2020-03-21 21:33:00 +01:00
Addison Lynch 2f557bd397 Add 75541 (#3167) 2020-03-21 15:37:43 +01:00
Koen Kanters ed37570ef0 Update converters. 2020-03-20 19:46:57 +01:00
Koen Kanters 6cc2689593 Log error when there is nothing to bind. #3159 2020-03-20 19:00:00 +01:00
Koen Kanters 92d8eb2b6b Fix unsupported device warnings when device is still being interviewed. #3158 2020-03-20 18:04:28 +01:00
Koen Kanters a30abba973 Make sure that there is always an update_available value for Home Assistant. https://github.com/Koenkk/zigbee2mqtt/issues/3146 2020-03-20 17:50:28 +01:00
Koen Kanters ac8a84feb2 Update converters. 2020-03-19 23:04:39 +01:00
Koen Kanters e3fafcdfed Update herdsman. 2020-03-19 19:39:36 +01:00
Koen Kanters 6b9baf0114 Allow to specify adapter type. https://github.com/Koenkk/zigbee-herdsman/issues/72 2020-03-19 19:34:11 +01:00
Koen Kanters 9b80b6785d Update converters. 2020-03-18 22:50:45 +01:00
Koen Kanters 73dab78c37 Promote to dev 2020-03-18 19:03:33 +01:00
Koen Kanters 840b9d966c 1.12.0 2020-03-18 19:01:45 +01:00
Koen Kanters d514c0b3c1 Undev 2020-03-18 19:01:41 +01:00
Koen Kanters dc856ff8bf Update herdsman and converters. 2020-03-17 18:31:50 +01:00
Koen Kanters 11ee61fb1c Update converters. 2020-03-16 20:20:00 +01:00
r1cht3r 43a2aa27cd changing 3323-G cfg.binary_sensor_contact to cfg.binary_sensor_occupancy (#3137) 2020-03-16 20:07:53 +01:00
Filip CornelissenandKoen Kanters 43c7ce8e8a add support for ROB_200-007-0 (#3125)
* add support for ROB_200-007-0

* Fix automatically discovery for Home assistant for ROB_200-007-0

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-15 22:42:39 +01:00
Koen Kanters 27b3fd2f03 Update converters. 2020-03-15 22:26:03 +01:00
Koen Kanters 66b68da318 Add vendor and description to 'zigbee2mqtt/bridge/config/devices'. #3133 2020-03-15 17:04:10 +01:00
Koen Kanters db57829068 Update converters. 2020-03-15 16:58:48 +01:00
Koen Kanters 15bef07328 Fix LifeControl_Door_Sensor Home Assistant discovery. #3108 2020-03-15 15:25:28 +01:00
Koen Kanters 4d3bbce687 Implement lightWithPostfix Home Assistant configuration. #3003 2020-03-15 09:38:39 +01:00
Koen Kanters cb87b31cdd Update herdsman. 2020-03-14 15:08:00 +01:00
Koen Kanters cee146b062 Update converters. 2020-03-13 19:24:20 +01:00
Kryzek cde5c9696d Update homeassistant.js (#3121)
Related to https://github.com/Koenkk/zigbee-herdsman-converters/pull/1063
2020-03-13 19:20:38 +01:00
Koen Kanters 882c725b13 Update converters. 2020-03-13 18:39:40 +01:00
Dustin SallingsandKoen Kanters 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 9b592d4546 Refuse to start when 'device_options: null' is set. #3107 2020-03-11 20:18:27 +01:00
Koen Kanters 444850f1bc Update converters. 2020-03-11 20:11:47 +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 785079a712 Update herdsman. 2020-03-10 21:30:12 +01:00
Koen Kanters 59281fe1c2 Update herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/2693 2020-03-10 20:29:46 +01:00
Koen Kanters ab85577132 Wait 30 seconds before publishing device states. https://github.com/Koenkk/zigbee2mqtt/issues/105 2020-03-10 19:32:44 +01:00
Koen Kanters da8b8aa373 Fix command_on_template for lightWithPostfix. https://github.com/Koenkk/zigbee2mqtt/issues/3003#issuecomment-596868209 2020-03-10 19:28:19 +01:00
Koen Kanters 052ccfa242 Update converters. 2020-03-10 18:40:16 +01:00
Koen Kanters 8e9729cbbd Update herdsman and converters. 2020-03-09 20:01:51 +01:00
netadmindaveandKoen Kanters 3f7d383ead added config for Third Reality Switch 3RSS007Z (#3089)
* added config for Third Reality Switch 3RSS007Z

* Update homeassistant.js

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-09 18:59:48 +01:00
Koen Kanters b92e3c31d1 Update converters. 2020-03-09 18:09:15 +01:00
Koen Kanters 4d54e5038b Refuse to start when friendly_name ends with /DIGIT. #2645 2020-03-07 23:06:22 +01:00
Koen Kanters 407d329d4f Update herdsman and converters. 2020-03-06 23:34:36 +01:00
Koen Kanters 34b3e66fa5 Add l5 till l8 to postfixes. https://github.com/Koenkk/zigbee-herdsman-converters/pull/1041 2020-03-06 23:18:50 +01:00
Kiall Mac Innes 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
Koen Kanters 3b60a907c8 Fix error on OTA update message without mapped device. 2020-03-03 21:19:00 +01:00
Koen Kanters 2d10c15a94 Update herdsman and converters. 2020-03-03 20:33:10 +01:00
Jorge Schrauwen b17b9c76ef #3009 filtered_attributes should also work in device_options (#3057) 2020-03-03 18:30:54 +01:00
Magnus PernemarkandKoen Kanters 2454136b9b Added MQTT logging to TouchLink Reset process (#3053)
* MQTT logging for TouchLink reset process

* Changed status to be in meta

* Update bridgeConfig.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-03 18:22:28 +01:00
Koen Kanters dc8b6c5294 Update converters. 2020-03-02 21:11: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 68750fade0 Fix tests on node 12. https://github.com/Koenkk/zigbee2mqtt/issues/3031 2020-03-02 19:11:43 +01:00
Koen Kanters ed34422640 Merge branch 'master' into dev 2020-03-02 19:07:49 +01:00
Koen Kanters e140cf5de3 Add branch switcher. 2020-03-02 19:07:38 +01:00
Koen Kanters 43b744987b Add AV2010/32 Home Assistant discovery. #3038 2020-03-01 16:03:08 +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 2eb6f075dc Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/3024 2020-02-29 13:53:35 +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 8f8180f84d Update converters and herdsman. 2020-02-28 23:27:12 +01:00
Cedric Girard 4803be2df9 Add necessary changes for NPM publishing (#3021) 2020-02-28 21:59:01 +01:00
Koen Kanters 05766fa39a Update dependencies. https://github.com/Koenkk/zigbee2mqtt/issues/3007 2020-02-28 20:56:32 +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 Scheffler 69c477da7d added mqtt log events group_added and group_removed (#3016) 2020-02-27 21:03:56 +01:00
Koen Kanters 63be685201 Fix OTA update start on check with / as base_topic prefix. #3010 2020-02-27 20:33:04 +01:00
Koen Kanters 5c0bb33c1b Discover Home Assistant temperature sensor for QBKG12LM. https://github.com/Koenkk/zigbee-herdsman-converters/issues/1020 2020-02-26 22:02:04 +01:00
Koen Kanters 0036176098 Promote to dev. 2020-02-26 18:28:22 +01:00
Koen Kanters 31e56785e4 1.11.0 2020-02-26 18:25:39 +01:00
Koen Kanters 962282b38c Undev 2020-02-26 18:25:36 +01:00
Koen Kanters e241d5ac8a Update converters. 2020-02-26 18:22:36 +01:00
Koen Kanters 1a973d0cd7 Update converters. 2020-02-26 17:30:38 +01:00
Koen Kanters 11ec191580 Don't discover illuminance_lux for RTCGQ11LM. https://github.com/Koenkk/zigbee-herdsman-converters/issues/1017 2020-02-26 17:20:31 +01:00
Koen Kanters 95788b8847 Discover illuminance_lux sensor. 2020-02-25 20:37:42 +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 2a9d0d1875 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2921 2020-02-23 20:26:13 +01:00
Koen Kanters 66173ff689 Update herdsman. 2020-02-23 20:02:29 +01:00
Koen Kanters 645da4e3c0 Update herdsman. 2020-02-23 19:01:02 +01:00
shades684 409df4c193 Matches this pull request: https://github.com/Koenkk/zigbee-herdsman-converters/pull/1010 (#2988) 2020-02-23 13:33:30 +01:00
Koen Kanters aca32e2f02 Update converters. 2020-02-22 19:03:06 +01:00
Koen Kanters 79116a1158 Fix Hue bulbs in a group controlled by a Hue dimmer not reporting off state. #2882 2020-02-22 18:45:30 +01:00
Koen Kanters ad59ff57bc Also remove group from herdsman on remove. #2265 2020-02-22 15:53:05 +01:00
Koen Kanters df67c429bf Undiscover ota_update sensor on device remove. 2020-02-22 00:32:15 +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 c25c32f1be Update converters. 2020-02-19 22:12:25 +01:00
Koen Kanters 9b644ff82d Update herdsman. 2020-02-19 21:46:25 +01:00
Koen Kanters 0289a6c30d Update converters. 2020-02-18 22:07:34 +01:00
Koen Kanters 2b3cdebe41 Fix AC08559 missing Home Assistant colorxy mapping. #2966 2020-02-18 22:05:32 +01:00
Takisg 6ef4fac30a GL-C-007S (#2955)
Gledopto GL-C-007S

Add support for Gledopto GL-C-007S
Zigbee LED controller RGBW plus model
2020-02-17 20:15:57 +01:00
Koen Kanters f0903cd02c Discover action sensor for WXKG11LM. #2953 2020-02-16 20:55:40 +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 9a87abd0f4 Update herdsman and converters. 2020-02-15 16:39:35 +01:00
timstanley1985andKoen Kanters b379830e36 Log ota message to MQTT (#2936)
* Log ota message to MQTT

* Fix lint

* Amend MQTT log messages

* Fix typo

* Fix lint

* some changes.

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-02-14 23:41:34 +01:00
Koen Kanters 97af26b340 Also poll hue bulbs on button 1/2 press of Hue dimmer switch. #2882 2020-02-14 22:41:04 +01:00
rbrack42 7de51340a0 Adding support for Sylvania 72567 Flushmount Light (#2943) 2020-02-14 16:52:07 +01:00
Koen Kanters bbf432eae5 Update herdsman and herdsman-converters. 2020-02-13 21:35:37 +01:00
Koen Kanters eac15a748a npm ci. https://github.com/Koenkk/zigbee2mqtt/issues/2918 2020-02-13 21:31:14 +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 Kanters 13b996eb70 Update converters. 2020-02-08 23:41:22 +01:00
Ricardo Pereira fb7c3a31dd Adding availability support to Commercial Electric Downlight model 53170161 (#2922) 2020-02-08 23:23:44 +01:00
Boris PrüßmannandKoen Kanters 06b6d66090 Feedback requested: add polling for commandOn & commandOff (#2730)
* Add polling for commandOn & commandOf.

When using groups together with devices that do not support reporting, this is needed
to have the new state reflected.

* Update deviceReport.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-02-08 20:53:16 +01:00
Koen Kanters 3d897c55e2 v2.7.0 rocks. 2020-02-08 20:50:07 +01:00
Koen Kanters c5fb651481 Try with v2.8.0 2020-02-08 20:46:26 +01:00
Koen Kanters 7d52a013ad Something wrong with the alpine 12 image? 2020-02-08 20:27:28 +01:00
Koen Kanters e278bb0145 Downgrade node. 2020-02-08 20:20:27 +01:00
Koen Kanters b36da25d68 Attempt to fix Docker build. 2020-02-08 20:17:13 +01:00
Koen Kanters 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 99dc214fbe Update herdsman. 2020-02-07 19:50:48 +01:00
Koen Kanters 5e152f2ce4 Promote to dev. 2020-02-05 21:45:47 +01:00
Koen Kanters 8df6be8813 1.10.0 2020-02-05 21:41:31 +01:00
Koen Kanters 415e764592 Undev 2020-02-05 21:40:58 +01:00
Koen Kanters e8d9cbc19b Update converters. 2020-02-05 21:38:42 +01:00
svh1985 e473590dd9 Added log_file name setting (#2894)
* Added log_file name setting

Added log_file to schema while preserving the default log.txt setting.
Added option to logger to use the filename and support for the %timestamp% var.

* Update logger.js

Added the filename to the console/log output.
2020-02-05 19:37:13 +01:00
Koen Kanters 558153ebd6 Update converters. 2020-02-04 20:28:47 +01:00
Koen Kanters a07a28cb65 Update herdsman. 2020-02-02 21:05:25 +01:00
Koen Kanters 6090f124c0 Update converters. 2020-02-02 14:30:53 +01:00
Koen Kanters 5d8a9a3e51 Update converters. 2020-02-01 17:35:20 +01:00
Koen Kanters 313edcc445 Keep latest log in log.txt (not in log1.txt, etc.). https://github.com/Koenkk/zigbee2mqtt/issues/2855 2020-01-31 23:13:15 +01:00
Koen Kanters 4926fb85ae Await permit join before continuing with startup. https://github.com/Koenkk/zigbee2mqtt/issues/2617 2020-01-31 22:52:39 +01:00
Koen Kanters 0111681cb7 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2850 2020-01-31 22:42:24 +01:00
Koen Kanters 9bc427e32f Update converters. 2020-01-31 21:05:13 +01:00
Koen Kanters 36e39e2f02 Update herdsman. 2020-01-31 20:31:02 +01:00
Rob Long 58e08d1443 Update homeassistant.js (#2861)
Added 5900131C5
2020-01-31 16:27:46 +01:00
Koen Kanters 2e19a8f916 Update converters. 2020-01-30 20:08:31 +01:00
Koen Kanters 5488504809 Update converters. 2020-01-29 21:38:37 +01:00
Michal Szymura 82fb79820a Added support for Sengled E11-U2E (#2853) 2020-01-29 21:21:22 +01:00
Koen Kanters c87ccea9ba Update converters. 2020-01-29 18:34:40 +01:00
Koen Kanters b6cb7acf7e Update converters. 2020-01-27 22:20:48 +01:00
Markus Peter ad286cbbc6 Home assistant config for Philips Hue Discover 17435/30/P7 (#2834) 2020-01-27 21:48:04 +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
a-bailey 833bfcd81a added home assistant extension for LS12128 (#2825) 2020-01-26 19:44:44 +01:00
Philipp Bender 9e413bf35a Added homeassistant mapping for OSRAM A60 DIM Z3 (#2824) 2020-01-26 19:39:43 +01:00
Koen Kanters 3c28ed8f0b Update herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/2749 2020-01-26 19:21:30 +01:00
Koen Kanters 20ba6a5274 Add icon and unit to Home Assistant linkquality sensor. #2806 2020-01-25 20:43:51 +01:00
Koen Kanters bd30b0b4a3 Update converters. 2020-01-25 20:00:22 +01:00
Koen Kanters 93e96a2e5e Update converters. 2020-01-23 21:00:50 +01:00
Koen Kanters e1d51e6171 Fix error when configure section of device is removed. 2020-01-23 20:42:10 +01:00
Marco AddarioandKoen Kanters cb855373ac Added support for Linkind Smart Zigbee LED (#2804)
* Added support for Linkind Smart Zigbee LED

Added support for Linkind Smart Zigbee LED bulb
( https://www.linkind.com/product-page/smart-zigbee-led-9w-a19-bulb-dimmable-tunable-hub-required-alexa-control )

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-23 19:51:41 +01:00
Koen Kanters 145f8a577d Update converters. 2020-01-22 21:34:15 +01:00
Koen Kanters 0d3fa83ab1 Update herdsman. 2020-01-22 20:52:12 +01:00
Koen Kanters dae52a22d7 Update converters. 2020-01-21 21:19:11 +01:00
Koen Kanters e94b34caad Update converters. 2020-01-20 21:36:19 +01:00
wrcvr4andKoen Kanters 43c745df1d Support NUET56-DL27LX1.2 (#2784)
* Support DL27LX1.2

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-20 17:48:33 +01:00
Koen Kanters 2e958f863f Update herdsman. 2020-01-18 23:05:05 +01:00
Koen Kanters 3b1ef5179b Update herdsman. 2020-01-18 20:27:53 +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
Koen Kanters 39ed95371e Log when using non-valid log_level. #2706 2020-01-16 23:33:17 +01:00
Koen Kanters 3f6a95bc0b Don't setup reporting for BASICZBR3 as it doesn't support it. #2740 2020-01-16 22:52:13 +01:00
Koen Kanters 42f1a37499 Promote to dev 2020-01-16 22:44:11 +01:00
Koen Kanters 287f843bbb 1.9.0 2020-01-16 22:32:17 +01:00
Koen Kanters cd4319d281 Remove dev from version. 2020-01-16 22:32:13 +01:00
Viet DzungandKoen Kanters 2188937eea Home Assistant 0.104 breaking change: support new HA separate lock state (#2753)
* Support new HA separate lock state for Xiaomi ZNMS12LM and ZNMS12LM

https://github.com/home-assistant/home-assistant/pull/29808

* Update homeassistant.js

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-16 22:25:58 +01:00
Koen Kanters a9cce7c222 Update converters. 2020-01-16 21:27:28 +01:00
jungmonam f9d85df51b Update homeassistant.js (#2758) 2020-01-16 21:17:55 +01:00
Ashton Kemerling 64315d0fc9 Home assistant bindings for Sylvania 72569 (#2754)
* Home assistant bindings for Sylvania 75269

Related to https://github.com/Koenkk/zigbee-herdsman-converters/pull/913.

* Fix Typo (Again)

Replace 75269 with 72569
2020-01-16 21:15:19 +01:00
MrNickllandKoen Kanters eba84647c1 Update TH1123ZB Home Assistant config (#2752)
* Update homeassistant.js

Added config parameters for Sinope TH1123ZB line voltage thermostat:
- Keypad lockout using the code for Stelpro thermostats.
- Power sensor.

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-16 21:08:14 +01:00
Boris Prüßmann 7d268732de Let ubisys devices expose power consumption via Home Assistant (#2743) 2020-01-15 12:58:03 +01:00
Boris PrüßmannandKoen Kanters a79b2bae81 Add support for Philips Fair Hue ceiling light (#2742)
* Added endpoints for Busch-Jaeger

* Added RM01 to homeassistant.js

* Updated mapping to reflect latest change in converter

* Renamed endpoint according to converted PR

* Support for Philips Hue Fair

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-15 12:57:08 +01:00
Koen Kanters 5c18734e68 Update converters. 2020-01-14 19:06:35 +01:00
Boris PrüßmannandKoen Kanters 2234fd1e8a Added endpoints for Busch-Jaeger (#2723)
* Added endpoints for Busch-Jaeger

* Added RM01 to homeassistant.js

* Updated mapping to reflect latest change in converter

* Renamed endpoint according to converted PR

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-14 18:47:32 +01:00
Koen Kanters 80838bd248 Update converters. 2020-01-13 22:09:21 +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
Martin Raatz 4a14706638 adding support for LUPUS - 1 chanel relay with ZigBee (#2711) 2020-01-12 14:31:06 +01:00
Koen Kanters 9890fb3ae2 Update herdsman and converters. 2020-01-11 18:04:30 +01:00
jungmonam 15d984e21b Update homeassistant.js (#2720) 2020-01-11 16:20:45 +01:00
Koen Kanters 57a5253203 Discovery battery sensor for E1744. #2715 2020-01-11 16:17:22 +01:00
TilmanK 7a8bef3e60 Fixed check if entity is of type "device" in deviceConfigure.js. (#2713)
The current statement (!entity.type === 'device') will always evaluate to false since it compares a boolean to a string.
2020-01-11 15:50:00 +01:00
Daniel Chesterton 77fc851236 Update Docker to Node 12 and use multistage builds to reduce image size (#2703) 2020-01-11 15:11:27 +01:00
Koen Kanters e76633519f Update converters. 2020-01-09 22:10:16 +01:00
Roberto Barbero a652df6ed7 Added Sinope TH1400ZB and TH1500ZB (#2708)
Added for Home Assistant MQTT autodiscovery
2020-01-09 21:56:03 +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 Chesterton 94d0253f27 Update availability_blacklist and availability_whitelist to allow for friendly names (#2684) 2020-01-08 18:02:49 +01:00
Jevgeni Kiski 4ee34fd637 LLKZMK11LM Supports power, temperature and consumption (#2657)
* LLKZMK11LM Supports power, temperature and consumption

LLKZMK11LM already sends power, temperature and consumption in mqtt json.

```
info  2020-01-02 20:06:20: MQTT publish: topic 'zigbee2mqtt/front_outdoor_lights', payload '{"state_l1":"ON","linkquality":54,"state_l2":"OFF","power":35.1,"consumption":2.89,"temperature":33}'
```

Not sure in which units `consumption` is. Not adding right now.

* LLKZMK11LM power consumption

* Linter

* mdi-flash
2020-01-08 17:57:40 +01:00
Carl de Billy 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 8a72916d7d Update converters. 2020-01-07 20:08:12 +01:00
Koen Kanters c041f0cddc Ignore setup reporting for closuresWindowCovering ZNLDP12LM. #2611 2020-01-07 19:59:43 +01:00
Koen Kanters 6245c729cf Update converters. 2020-01-06 21:55:43 +01:00
Carl de BillyandKoen Kanters e5b2f71fcd Added support for Stelpro Ki & Stelpro Maestro (#2628)
* fix potential null exception

* Added support for Stelpro Ki

* Stelpro Ki: Added support for action_mode

(cherry picked from commit 0f740f1aedbedb28d64245531f10a9bfd985e49b)

* Stelpro Ki: fix "lock" status update

(cherry picked from commit 6ac94411183d92d1f658a7d17a724e50587b8571)

* Fixed lint issues

* Stelpro: Fixed local_temperature sensor

* Added support for Stelpro Maestro

* Fix lint

* HASS: Fixed support for action_topic/action_template

* Prevent a non supported device from causing a null-ref

* Update naming.

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-06 21:36:45 +01:00
Koen Kanters d0e9889f7d Fix race condition when Zigbee starts. #2591 2020-01-03 23:43:04 +01:00
Koen Kanters d3aba2689c Update converters. 2020-01-03 23:29:28 +01:00
jasperroandKoen Kanters 7a6d5f9a42 Added hue/saturation mode and tamper to home assistant (#2603)
* Added hue/saturation mode to home assistant extension

* Added tamper to homeassistant

* Fix ESlint stuff

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-03 22:28:21 +01:00
AThomsenandKoen Kanters 89fb54d5c8 Add Nordtronic Box Dimmer 2.0 98425031 (#2629)
* Add Nordtronic Box Dimmer 2.0 98425031

* Update homeassistant.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-03 18:55:57 +01:00
Samuel Gaus afaed3f783 Support new IKEA GUNNARP round panel (#2653)
See: https://github.com/Koenkk/zigbee-herdsman-converters/pull/865
2020-01-03 09:09:28 +01:00
Kryzek dc6bf51b8e Update homeassistant.js (#2651)
Expose battery information to Home Assistant with couple of Trust battery-powered sensors.
Related to https://github.com/Koenkk/zigbee-herdsman-converters/pull/856
2020-01-03 09:04:21 +01:00
Koen Kanters 5f97f19d7f Add brightness_move for groups. #2620 2019-12-31 13:52:23 +01:00
Jack Wilsdon f04e01ff54 Use correct Home Assistant configuration for GL-S-007Z (#2616) 2019-12-27 15:56:24 +01:00
Koen Kanters f069a7e58e Update herdsman and converters. 2019-12-26 22:46:44 +01:00
Phi Dong 2197d4127d Update homeassistant.js (#2606)
Add support for Ecosmart-ZBT-A19-CCT-Bulb (A9A19A60WESDZ02) to Home Assistant
2019-12-26 21:32:34 +01:00
Martin Brooksbank 89fe701197 Added Ajax Online LED Strip HomeAssistant Mapping (#2592) 2019-12-23 21:08:40 +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
fb22 9db1467ed8 Add 4023330P7 (#2574)
Add support for Philips Hue white suspension Amaze
2019-12-23 20:08:43 +01:00
Anthony Lavado 3bab32c1d7 Add support for the EcoSmart D1533 (#2570) 2019-12-23 19:56:55 +01:00
Koen Kanters 66b3bcb639 Update herdsman. 2019-12-19 21:52:45 +01:00
Koen Kanters 6f7d29392e Update herdsman and converters. 2019-12-17 21:35:47 +01:00
Koen Kanters 83e10f446e Update converters. 2019-12-17 19:59:22 +01:00
Koen Kanters af4184e3ff Always log 'No converter available...` to debug. #2543 2019-12-17 19:19:57 +01:00
Koen Kanters 316755a5c8 Fix get device group membership with friendly_name containing slashes. #2546 2019-12-17 19:02:11 +01:00
Wilmar den Ouden 5083bbcc16 feat: create environment variable for the config file (#2519)
Signed-off-by: wilmardo <info@wilmardenouden.nl>
2019-12-16 20:49:25 +01:00
Koen Kanters 981612c64c Support tint_scene for group. https://github.com/Koenkk/zigbee-herdsman-converters/issues/281 2019-12-16 20:17:58 +01:00
Koen Kanters 960f9e44ad Update herdsman. 2019-12-15 20:11:22 +01:00
Koen Kanters 8545a341c9 Promote to dev 2019-12-15 20:04:10 +01:00
Koen Kanters da4d26af62 1.8.0 2019-12-15 17:33:54 +01:00
Koen Kanters f64bf16f6f Update converters. 2019-12-15 16:37:00 +01:00
Koen Kanters 0b9997b7a5 Update converters. 2019-12-15 15:55:10 +01:00
mailq 6f33529c79 Add GL-S-005Z RGBW GU5.3 MR16 (#2533) 2019-12-15 15:07:31 +01:00
Koen Kanters 1972eb450c Update converters. 2019-12-13 19:25:22 +01:00
Markus Pfeiffer f4f910f014 Support for Hive Thermostatic Radiator Valve (#2517) 2019-12-13 19:18:34 +01:00
Wilmar den Ouden 087d1b8761 fix: avoid creating the log/ directory when file not enabled (#2516)
Signed-off-by: wilmardo <info@wilmardenouden.nl>
2019-12-13 19:09:18 +01:00
Timo S 4334e01759 temp_step attribute for climate entities (#2515) 2019-12-13 19:00:02 +01:00
Koen Kanters 6fd059967a Support setting cover position and thermostat occupied heating setpoint via group. #2505 2019-12-13 18:26:03 +01:00
Koen Kanters 61f5776310 Update converters. 2019-12-12 20:55:57 +01:00
stumps444 3f2d50900d Added support for Lockwood keyless deadbolt (#2506) 2019-12-12 20:02:41 +01:00
Koen Kanters be601cffb0 Update herdsman and converters. 2019-12-11 21:54:16 +01:00
Koen Kanters 6b7bd9da37 Re-add model to device information. #2497 2019-12-11 20:15:42 +01:00
Koen Kanters 3a9dfb04a7 Bind closuresWindowCovering. https://github.com/Koenkk/zigbee2mqtt/issues/2496 2019-12-11 20:00:09 +01:00
Thomas Jager 67f8e97b12 Add namron dimmer - homeassistant extension (#2494)
https://github.com/Koenkk/zigbee-herdsman-converters/pull/808
2019-12-11 19:41:06 +01:00
Koen Kanters 37089e440a Update herdsman. 2019-12-11 19:08:22 +01:00
Koen Kanters d17eec5310 Don't allow postfix to be a friendly_name. #2486 2019-12-09 18:27:39 +01:00
Jorge Schrauwen bcf79a7e34 Device Availability: Allow battery devices to report offline/online based on device.lastSeen (#2464)
* Remove execution bits for deviceReceive.js

* deviceAvailability.isPingable should return true if 'availability_lastseen_timeout' is set for device

* deviceAvailability.handleInterval should know how to handle lastseen_timeout setting

* Allow availability_lastseen_timeout for all devices

* Use a default lastseen timeout of 24h

* Updates

* Updates

* Updates

* 25 hours instead of 24.
2019-12-09 18:12:13 +01:00
Koen Kanters 6bd9e74e0c Fix tests 2019-12-08 16:52:23 +01:00
dusanmsk 6aad019328 mqtt listener to rename last paired device. (#2478)
* mqtt listener to rename last paired device.
send zigbee2mqtt/bridge/config/rename_last with payload containing new name and last paired device will be renamed

* Updates
2019-12-08 16:50:18 +01:00
Sven Lankes d05a3a066a add support for Mueller Licht 44435 Tint LED Stripe (#2483) 2019-12-08 14:11:27 +01:00
Koen Kanters 5440aadec0 Log remove docs on failure. #2477 2019-12-07 17:57:39 +01:00
Koen Kanters be30067a39 Let devices only report when there is a change. #2424 2019-12-07 17:54:40 +01:00
Koen Kanters 17560ca885 Check if state is not null. #2450 2019-12-07 17:45:00 +01:00
Marius e00dbbf4a9 Support Hue Go with Bluetooth LCT026 (7602031P7) (#2474) 2019-12-07 17:29:37 +01:00
Koen Kanters 33201367f1 Update herdsman and converters. 2019-12-05 21:33:28 +01:00
Jaron Viëtor 60627ab6e3 Added support for accepting hex color on deviceName/set/color MQTT topic (#2441)
* Added support for accepting hex color on deviceName/set/color MQTT topic

* Update entityPublish.js
2019-12-04 21:23:46 +01:00
Koen Kanters 88a1c2884a Update herdsman and converters. 2019-12-04 21:12:27 +01:00
Koen Kanters a53a19026c Add extra logging when publish to device fails. #2450 2019-12-04 20:46:19 +01:00
Koen Kanters 1459ffea7a Publish availabilty when non pinagable device joins. #2452 2019-12-04 20:21:14 +01:00
Koen Kanters ba26887ea5 Update converters and herdsman. 2019-12-03 20:11:45 +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 5e165810ec Allow to configure manually. https://github.com/Koenkk/zigbee2mqtt/issues/2365 https://github.com/Koenkk/zigbee-herdsman-converters/issues/779#issuecomment-559598591 2019-11-29 09:43:59 +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 c2be95777f Mark nodejs 10, 12 and 13 as supported. #2423 2019-11-27 20:02:18 +01:00
Koen Kanters acce25737f Update converters. 2019-11-27 19:57:25 +01:00
Koen Kanters 134f86a580 Update herdsman. 2019-11-27 18:49:41 +01:00
Koen Kanters 2a81a54609 Stop pinging device when removed. #2419 2019-11-27 18:14:39 +01:00
Koen Kanters 2fcddb5ad5 Update herdsman. 2019-11-26 21:24:41 +01:00
Koen Kanters ac0291f09c Update herdsman. 2019-11-26 20:08:45 +01:00
Koen Kanters 7d1635aff8 Update converters. 2019-11-25 18:39:12 +01:00
Koen Kanters 6c56c95e3f Always make endpoint 1 the coordinator endpoint. 2019-11-25 17:44:44 +01:00
Koen Kanters d37d9ee859 Factory reset device through Touchlink. 2019-11-23 20:44:23 +01:00
Koen Kanters e179e053ce Update herdsman and converters. 2019-11-23 20:19:38 +01:00
Koen Kanters 546a72ff53 Update dependencies. 2019-11-23 12:07:23 +01:00
Koen Kanters c9122eecda Update gitignore. 2019-11-23 12:07:07 +01:00
Kryzek 46d7176976 availability_whitelist (#2387)
* availability_whitelist

* Tests

* Cleanup

* Update deviceAvailability.js
2019-11-23 11:47:37 +01:00
Hans-Wilhelm Warlo 2df1acf532 Return false when mappedDevice is falsy (#2383) 2019-11-22 07:48:11 +01:00
himpich c5bd3a2450 Add support for Innr FL 130 C Color LED Strip - homeassistant extension (#2377) 2019-11-21 20:26:10 +01:00
frontend89 260d2904f3 Add device specific configuration option: debounceIndexes (#2370)
* Add device specific configuration option: debounceIndexes

* Rename debounceIndexes to debounce_ignore

* Lint
2019-11-20 21:21:23 +01:00
Koen Kanters 8ae57e7ef0 Update herdsman and converters. 2019-11-20 20:08:30 +01:00
Koen Kanters b23276f7f3 Re-configure when device rejoins. https://github.com/Koenkk/zigbee-herdsman-converters/issues/758 2019-11-20 19:06:04 +01:00
Koen Kanters fdc8fcc02b Allow to specify endpoint via property. #2356 2019-11-20 17:36:36 +01:00
Koen Kanters ef16fcd505 Fix tests. 2019-11-20 17:35:49 +01:00
Koen Kanters c5898598ae Fix json_attributes_topic discovery for climate. https://github.com/Koenkk/zigbee2mqtt/issues/2321 2019-11-19 20:50:55 +01:00
Koen Kanters 461544ed6a Update converters. 2019-11-18 21:34:23 +01:00
Koen Kanters 661b2f1cc0 Home Assistant: discover json_attributes_topic for all MQTT device types. https://github.com/Koenkk/zigbee2mqtt/issues/2321 2019-11-18 18:14:22 +01:00
Koen Kanters eea660374f Use correct endpoint for binding dimmer. https://github.com/Koenkk/zigbee2mqtt/issues/2343 2019-11-18 17:54:28 +01:00
Kryzek 878a88632b Customizable timestamp (#2357)
* Customizable timestamp

Add a customizable timestamp

* Revert "Customizable timestamp"

This reverts commit 7ae06e8e2c.

* Customizable timestamp

* Update settings.js
2019-11-17 21:29:53 +01:00
Koen Kanters 22c8f14659 Update herdsman and converters. 2019-11-17 21:22:24 +01:00
Koen Kanters d2c4133e56 Update herdsman. 2019-11-16 13:52:49 +01:00
Koen Kanters 44db557a0c Log in local timezone. https://github.com/Koenkk/zigbee2mqtt/issues/2341 2019-11-15 23:04:23 +01:00
胡明春 31246efc64 Add UI support to 'S31 Lite zb' and SA-003-Zigbee (#2340)
* Add UI support to 'S31 Lite zb' and SA-003-Zigbee

* Update homeassistant.js
2019-11-15 22:55:49 +01:00
Koen Kanters a7486d723f Update herdsman converters. 2019-11-14 20:43:20 +01:00
Koen Kanters e33b49e2ff Update herdsman and converters. 2019-11-12 19:40:52 +01:00
Koen Kanters e51ed89641 Promote to dev. 2019-11-12 18:50:38 +01:00
Koen Kanters b459c35219 1.7.1 2019-11-12 18:47:59 +01:00
Koen Kanters d8512c73df Fail gracefully when state retrieval fails after device reconnects. #2318 2019-11-11 19:25:11 +01:00
Koen Kanters fdcaaee955 Fix typo. 2019-11-11 17:45:11 +01:00
Koenkk e2858dc90f Fix topic postfix detection having number. #2309 2019-11-11 17:36:33 +01:00
Jorge Schrauwen 3dbf454d07 Fix minor type in entityPublish.js (#2311) 2019-11-11 17:27:26 +01:00
Koen Kanters fc98b951ff Update herdsman. 2019-11-10 22:31:37 +01:00
Koen Kanters 0b0a9bca4d Update converters. 2019-11-10 19:53:37 +01:00
Jorge Schrauwen be1c81a778 #2296 only publish /availability if the state has changed (#2303) 2019-11-10 17:56:01 +01:00
Koen Kanters b61723923e Promote to 1.7.0+dev. https://github.com/Koenkk/zigbee2mqtt/issues/2263 2019-11-09 21:04:38 +01:00
Koen Kanters 551a58a4a4 1.7.0 2019-11-09 20:40:40 +01:00
Koen Kanters d562541178 Shepherd -> herdsman. 2019-11-09 20:38:47 +01:00
Koen Kanters 720e3930e3 Update herdsman converters. 2019-11-08 18:59:27 +01:00
Koen Kanters 6c453738d4 Update herdsman and converters. 2019-11-07 18:28:17 +01:00
Koen Kanters 6245c6a59f Don't log link to how to support new devices when receiving message without converter. 2019-11-07 18:27:47 +01:00
Koen Kanters dcf1c83a25 Fix tests for real now. 2019-11-07 17:48:03 +01:00
Koen Kanters 2b7d9e6ee7 Fix tests. 2019-11-06 22:08:33 +01:00
Koen Kanters 019b087af1 Fix tests. 2019-11-06 20:51:31 +01:00
Koen Kanters af770acd2d Make retain a optional option and default it to false. 2019-11-06 20:30:33 +01:00
Koen Kanters 23cf8eade9 Make graphviz networkmap ISO_8601_local time. https://github.com/Koenkk/zigbee2mqtt/issues/2239 2019-11-06 19:49:03 +01:00
Tim Kent 45c6f2345c Fix extendedPanID parameter name (#2283)
* Fix extendedPanID parameter name

* Update herdsman and fix tests.
2019-11-06 19:43:12 +01:00
Koen Kanters 00bc4de943 Update herdsman. 2019-11-05 21:35:18 +01:00
Koen Kanters 5cdf820bf6 Update herdsman and converters. 2019-11-05 21:14:19 +01:00
Koen Kanters 99118a0ad8 Update herdsman. 2019-11-05 20:42:32 +01:00
Andreas Brett 34166a5535 fixed typo (#2275) 2019-11-05 07:39:51 +01:00
Jorge Schrauwen 5ad97325be Fix missing retain on add_group, allow specifying of groupID (#2266)
* Accept json for add_group so a groupID can be provided, also set retain property on group creation

* Update util/settings tests for groupID and retain

* Update bridgeConfig tests for add_group with json
2019-11-04 17:59:00 +01:00
Koen Kanters 2fb4e20e1d Update zigbee-herdsman-converters. 2019-11-03 21:23:41 +01:00
Koen Kanters 467c0062bb Dont' crash when removing non-existing device. https://github.com/Koenkk/zigbee2mqtt/issues/2241 2019-11-03 15:02:00 +01:00
Koen Kanters afbfdda0d7 Implement force remove. https://github.com/Koenkk/zigbee2mqtt/issues/2241 2019-11-03 14:54:03 +01:00
Koen Kanters 4265fe05c6 Correctly log name. #2256 2019-11-03 14:29:43 +01:00
Koen Kanters 833769af0c Log name instead of ieeeAddr on ping. https://github.com/Koenkk/zigbee2mqtt/issues/2256 2019-11-03 14:17:57 +01:00
Koen Kanters 8a5f39f6aa Subscribe to nested topics for bind. https://github.com/Koenkk/zigbee2mqtt/issues/2250 2019-11-02 00:03:22 +01:00
Koen Kanters 857fc230d4 Update herdsman. 2019-11-01 23:55:53 +01:00
Koen Kanters 6162dcc4f0 Update zigbee-herdsman. 2019-11-01 23:33:48 +01:00
Koen Kanters 7669682716 Update zigbee-herdsman. 2019-10-30 23:56:46 +01:00
Koen Kanters 4ca8e8e43e Update zigbee-herdsman-converters. 2019-10-30 23:27:46 +01:00
Koen Kanters 5f054862f0 Update zigbee-herdsman-converters. 2019-10-30 23:12:16 +01:00
Koen Kanters 964367fc66 Update zigbee-herdsman-[converters]. 2019-10-30 19:44:02 +01:00
Luke Pomfrey 84915dd1d4 Add homeassistant integration for innr SP 222 smart switch (#2230) 2019-10-30 16:32:55 +01:00
Koen Kanters 344cd60088 Update zigbee-herdsman-converters. 2019-10-28 18:48:20 +01:00
Koenkk 754db956b5 Don't turn on with 255 brightness when transition is provided. https://github.com/Koenkk/zigbee2mqtt/issues/2220 2019-10-28 18:07:15 +01:00
Koenkk 646cd34715 Support secret for network_key. https://github.com/Koenkk/zigbee2mqtt/issues/2209 2019-10-28 18:05:50 +01:00
Koen Kanters cb3ec45294 Fix lint. 2019-10-26 18:25:51 +02:00
Koen Kanters 9eac34a5bb Update zigbee-herdsman-[converters]. 2019-10-26 18:14:51 +02:00
Koen Kanters 7e9dfd4f41 Accept device without log when no ban or whitelist set. 2019-10-26 18:05:40 +02:00
Koen Kanters 63ffe279ea Log uninteresting messages without converters as debug. 2019-10-26 18:03:44 +02:00
Koen Kanters 6f92a41ca9 Update zigbee-herdsman-converters. 2019-10-25 20:43:38 +02:00
Tommy Goode ca19b77e8c Improve support for Centralite 4257050-ZHAC dimmable plug (#2187)
* Add HA power sensors for Centralite 4257050-ZHAC outlet.

* Enable dimming in HA for Centralite 4257050-ZHAC outlet.

* Add new HA sensors for the Iris 3210-L plug.
2019-10-25 20:10:14 +02:00
Koen Kanters 4983048191 Only poll on Hue dimmer switch brightness button. https://github.com/Koenkk/zigbee2mqtt/pull/2122 2019-10-25 19:42:47 +02:00
Koen Kanters 78531a0878 Finish https://github.com/Koenkk/zigbee2mqtt/issues/2201. 2019-10-25 19:17:47 +02:00
Koenkk 505be311a4 Allow to store MQTT credentials separate from configuration.yaml. https://github.com/Koenkk/zigbee2mqtt/issues/2201 2019-10-25 18:43:14 +02:00
Koenkk 02bf8a88bc Also subscribe to groups with slashes. https://github.com/Koenkk/zigbee2mqtt/issues/2200 2019-10-25 18:40:37 +02:00
Jorge Schrauwen a813663de5 Poll device when device does not support reporting. (#2122)
* Support emulation of attReport

Some device do not support attReport for some keys, this will emulate
it.

You can configure which keys that should be read when another device
send a message and the configured device a bind target or in a group the
message was send to.

```yaml
devices:
  '0x0017880104259333':
    friendly_name: bedroom/desk_lamp
    retain: true
    debounce: 0.5
    report_emulate:
      - brightness
      - color
```

Will have the brightness and color queried for example when a hue dimmer
sends commands to the bulb.

* Refactor polling.

* Finish poll tests.

* Update herdsman.

* Improve test stability.
2019-10-24 22:15:40 +02:00
Tommy Goode ec5064bc4d Store last_seen in state.json, so that it is sent out correctly on restart. (#2197) 2019-10-24 07:46:19 +02:00
Koen Kanters ebd2f264a9 Update herdsman. 2019-10-21 21:13:05 +02:00
Koen Kanters 5bd87d338b Update zigbee-herdsman-[converters]. 2019-10-21 20:35:58 +02:00
Koen Kanters ada9316148 birthtimeMS is not realiable on Linux leading to removal of latest instead of oldest log directory which makes the logging stop. 2019-10-21 18:11:16 +02:00
Koen Kanters b476bc2bf8 Update zigbee-herdsman-converters. 2019-10-20 22:52:00 +02:00
Koen Kanters 2076bbae5d Add more logo variants. https://github.com/Koenkk/zigbee2mqtt/issues/2171 2019-10-20 21:56:11 +02:00
Koen Kanters 593dd858d9 Update herdsman. 2019-10-20 21:52:27 +02:00
Koen Kanters c80be7bda2 Don't provide undefined state. https://github.com/Koenkk/zigbee2mqtt/issues/2164 2019-10-20 21:17:18 +02:00
Koen Kanters 01dfcd18ce Install eudev 2019-10-20 17:17:19 +02:00
Koen Kanters 3effa07cf8 Add udevadm #2157 2019-10-20 16:32:00 +02:00
Tommy Goode 6b97df7b47 Add support for battery percentage on Iris 3326-L motion sensor. (#2170) 2019-10-20 11:04:23 +02:00
Tristan Crichton 35a1dd6b0a Add autodiscovery for Innr BF 263 bayonet filament bulb (#2165) 2019-10-20 11:00:32 +02:00
Tommy Goode ff9e6cdacc Improve support for MCT-340 E, MCT-340 SMA, XHS2-SE (#2156)
* Add temperature and battery level reporting for Visonic MCT-340 E contact sensor.

* Improve HA sensors for MCT-340 SMA and XHS2-SE.
2019-10-19 10:32:39 +02:00
Koen Kanters f219e5df9f Fix ban todo. 2019-10-17 22:08:34 +02:00
Koen Kanters f64285703c Implement acceptJoiningDeviceHandler. 2019-10-17 22:01:39 +02:00
Koen Kanters f02ec9a8dd Update herdsman and herdsman-converters. 2019-10-17 19:42:40 +02:00
Tommy Goode 3ca35ad72f Allow a device to be configured even if the interview process fails (#2150)
* Allow a device to be configured even if the interview process fails. This fixes #2148.

* Adjust failing test to account for new behavior.
2019-10-17 18:36:55 +02:00
Timo S da58dcbd7c Eurotronic thermostat improvments (#2124)
* - Setting temperature_command_topic
 to current_heating_setpoint for Eurotronic thermostat
- Thermostat function to dynamically publish values to HA

* Function getTemperatureCommandTopicByVendor()

* strict compare

* Get right setpoint by function and mapping
for current_heating_setpoint

* fix lint

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js
2019-10-17 18:31:42 +02:00
Koen Kanters 7ffe255d93 Install udev. #2145 #2146 2019-10-16 21:54:46 +02:00
Koen Kanters 512f31fbb9 Update zigbee-herdsman. 2019-10-16 21:35:16 +02:00
Koen Kanters f415171036 Allow null for port. https://github.com/Koenkk/zigbee2mqtt/issues/2145 2019-10-16 21:21:52 +02:00
Koen Kanters 4164f01a6b Update zigbee-herdsman and zigbee-herdsman-converters. 2019-10-16 19:44:44 +02:00
Koen Kanters f1b4cd0480 Don't log start error twice. 2019-10-16 19:33:55 +02:00
Koen Kanters 1428e0bb87 Don't setup reporting for Gledopto devices. https://github.com/Koenkk/zigbee2mqtt/issues/2132 2019-10-15 20:16:04 +02:00
Koen Kanters d16981d539 Update zigbee-herdsman. 2019-10-15 20:15:12 +02:00
Dennis Neufeld 2f52878140 Update README.md badge url (#2138)
* Update README.md badge url

* Update README.md
2019-10-15 19:01:33 +02:00
Gabe Cook 9ebb1b96dd Group device staying off when already off (#2140)
* Fix devices within a group staying off if they are off when the group state changes

* Group test cleanups
2019-10-15 16:42:28 +02:00
Koen Kanters 0527b89b49 Update zigbee-herdsman-converters. 2019-10-14 20:32:01 +02:00
Koen Kanters 8bcbb5930a Update zigbee-herdsman-converters. #2133 2019-10-14 18:56:41 +02:00
Gabe Cook 09b7fe699e Fix optimistic group behavior whenever a device is shared between groups (#2134) 2019-10-14 18:04:04 +02:00
Koen Kanters 4abafa9527 Update zigbee-herdsman to 0.9.2. 2019-10-13 00:09:31 +02:00
Koen Kanters f3a51f66fd Make serial and serial.port optional. 2019-10-12 23:18:01 +02:00
Koen Kanters d5925efca7 Only try to configure reporting once. https://github.com/Koenkk/zigbee2mqtt/issues/2123 2019-10-12 18:02:15 +02:00
Koen Kanters 5e0d72c41c Update zigbee-herdsman to 0.9.1. https://github.com/Koenkk/zigbee2mqtt/issues/1429 2019-10-12 14:39:06 +02:00
Koen Kanters ba92f73961 Resolve Coordinator to coordinator. https://github.com/Koenkk/zigbee2mqtt/issues/2100 2019-10-09 19:40:46 +02:00
Koen Kanters f2132f6c50 Update badge. 2019-10-09 18:09:10 +02:00
Koen Kanters 6e6305253e Update zigbee-herdsman-converters. 2019-10-09 18:08:14 +02:00
Tommy Goode dcebba857b Fix power reporting for Iris 3210-L smart plug. (#2105) 2019-10-09 17:58:05 +02:00
Koen Kanters 8d97262d39 Discover thermostat and battery for SPZB0001. https://github.com/Koenkk/zigbee2mqtt/issues/2094 2019-10-07 22:21:41 +02:00
Koen Kanters a9b4188434 Improve test stability. 2019-10-07 22:06:27 +02:00
Koen Kanters 997c5d3e44 Allow to disable Home Assistant device discovery. https://github.com/Koenkk/zigbee2mqtt/issues/2089 2019-10-07 21:58:35 +02:00
Koen Kanters a3bbb93f99 Update zigbee-herdsman and zigbee-herdsman-converters. 2019-10-07 19:34:10 +02:00
Koen Kanters 41c8c2a146 Update zigbee-herdsman-converters. 2019-10-04 19:12:49 +02:00
Koen Kanters 8833fb57b5 Update zigbee-herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/2017 2019-10-04 18:58:07 +02:00
Matt 4a996bd84d Add ZWallRemote0 homeassistant mapping (#2076)
* Add ZWallRemote0 homeassistant mapping

* Fix Spaces in list

* Update homeassistant.js
2019-10-04 18:38:12 +02:00
Koen Kanters 732a97ba0c Don’t write to configuration.yaml when it didn’t change. https://github.com/Koenkk/zigbee2mqtt/issues/2071 2019-10-03 20:06:31 +02:00
Koen Kanters e7bf5ee648 Update zigbee-herdsman-converters. 2019-10-03 19:03:36 +02:00
Gabe Cook 159a846c50 Do not publish a new optimistic group state if any devices within are (#2063)
on. Relates to #764
2019-10-03 17:41:36 +02:00
Koen Kanters a6d3e7209f Update zigbee-herdsman-converters. 2019-10-02 22:01:29 +02:00
Koen Kanters 1a48c85365 Update zigbee-shepherd-converters. 2019-10-01 21:11:44 +02:00
Koen Kanters 6a8abd8ff4 Fix tests. 2019-10-01 20:58:08 +02:00
Koen Kanters b492b0ce5f Improve logging. 2019-10-01 20:50:05 +02:00
Koen Kanters 518232e15e Zigbee-herdsman 0.8.0 2019-10-01 20:22:47 +02:00
Koen Kanters 90c70e8629 Bump zigbee-herdsman-converters. 2019-09-30 21:41:53 +02:00
Gabe Cook fe4f43843d Update other groups with a shared device when a group state updates (#2055)
* Update other groups with a shared device when a group state updates #764

* Add group to test which does not have the shared device to be sure it does not change
2019-09-30 21:18:07 +02:00
Koen Kanters a5ce7e6890 Fix azure pipline triggers and conditions. 2019-09-30 21:16:16 +02:00
Koen Kanters fc3a826f50 Bump zigbee-herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/892 2019-09-30 21:16:00 +02:00
Koen Kanters ebd0415945 Remove triggers. 2019-09-30 20:49:06 +02:00
Koen Kanters ce08668543 Only trigger hassio on dev change. 2019-09-30 20:39:13 +02:00
Koen Kanters 80aa023f7f Azure badge 2019-09-30 20:36:40 +02:00
Koen Kanters e4df2ac66e Add azure pipelines. 2019-09-30 20:31:31 +02:00
Koenkk 9a21e9d956 Migrate to node Docker image and buildx. https://github.com/Koenkk/zigbee2mqtt/issues/2054 2019-09-30 17:29:58 +02:00
Koen Kanters a7e9ad70e3 Bump alpine to 3.10 and other docker improvements. 2019-09-29 21:55:40 +02:00
Koen Kanters 61e2087242 Bump zigbee-herdsman-converters. 2019-09-29 21:37:26 +02:00
Raymond Mouthaan 99ebc46981 Added tzdata and --virtual devtools (#2053)
* Update Dockerfile.arm32v6

using --virtual for devtools, added tzdata

* Update Dockerfile.arm64v8

* Update Dockerfile.amd64

* Lint
2019-09-29 21:32:11 +02:00
Koen Kanters c8eb503ae7 Simplify group optimistic mode. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-09-29 14:35:05 +02:00
Pauline Middelink 7507ad6dcb Remove caching for to_side and from_side. (#2048)
Stop caching `to_side` and `from_side` which only have meaning during the `flip90` action of the MFKZQ01LM Smart Cube.
Fixes #641
2019-09-29 13:42:58 +02:00
Koen Kanters 92fcf5a85a Update zigbee-herdsman-converters. 2019-09-28 18:11:02 +02:00
Koen Kanters 42bc5f274b Fix logger test writing to configuration.yaml. 2019-09-28 13:49:27 +02:00
Koen Kanters 7b8b2c5213 Update zigbee-shepherd-converters 2019-09-28 13:48:25 +02:00
Koen Kanters 9d8e56408a Fix device configuring when paired through zigbee-shepherd. 2019-09-28 13:08:32 +02:00
Koen Kanters caf92c5e30 Update zigbee-shepherd-converters. 2019-09-28 00:26:33 +02:00
Koen Kanters 67f6ccc8a8 Don’t allow duplicate friendly_name. #1876 2019-09-27 22:56:59 +02:00
Koen Kanters bf36f1e8a3 Update zigbee-herdsman-converters and zigbee-herdsman. 2019-09-27 21:58:49 +02:00
Koen Kanters d444969151 Update zigbee-herdsman-converters. 2019-09-26 09:43:40 +02:00
Andreas Brett d12943556c Update controller.js (#2040)
fixed typo
2019-09-26 09:30:12 +02:00
Koen Kanters 9964d8e462 Fix various crashes when removing a device. https://github.com/Koenkk/zigbee2mqtt/issues/2004 2019-09-26 01:14:58 +02:00
Koen Kanters 3083655072 Codeacy badge. 2019-09-26 00:16:24 +02:00
Koen Kanters 265bcf1de3 Add 100% coverage badge. 2019-09-26 00:10:36 +02:00
Koen Kanters bd93d09290 Update zigbee-herdsman-converters. 2019-09-25 23:51:38 +02:00
Koen Kanters ca481d7f76 Update zigbee-shepherd-converters. 2019-09-25 13:38:10 +02:00
Koen Kanters 62e67e99d2 Don’t publish chached states when cache_state is disabled.https://github.com/Koenkk/zigbee2mqtt/issues/2033 2019-09-25 13:15:30 +02:00
Koen Kanters d4011fabc7 Implement group optimistic ‘group_devices’ mode. https://github.com/Koenkk/zigbee2mqtt/issues/764#issuecomment-534146878 2019-09-25 12:51:17 +02:00
Koen Kanters cfefaeb73c Validate settings on startup with JSON schema. 2019-09-25 12:08:39 +02:00
Koen Kanters 34111159ae Update Winston logger to 3.x 2019-09-25 10:55:50 +02:00
Koen Kanters 9d4705fc1c Remove onlyThis. 2019-09-23 23:59:01 +02:00
Koen Kanters 007bc42bf7 Update zigbee-shepherd-converters. 2019-09-23 23:57:41 +02:00
Koen Kanters 3001e2d3a0 Add more properties for coordinator /devices/get. https://github.com/Koenkk/zigbee2mqtt/issues/2020 2019-09-23 23:10:29 +02:00
barrygwn f60b4ddd80 added support for IKEA LED1836G9: TRADFRI bulb E27 WW 806lm (#2022)
* added 'LED1836G9' TRADFRI bulb E27 WW 806lm

* added 'LED1836G9' TRADFRI bulb E27 WW 806lm

* Update homeassistant.js
2019-09-23 22:39:22 +02:00
Koen Kanters e56e620f54 Add test case for https://github.com/Koenkk/zigbee2mqtt/issues/1997 2019-09-23 22:24:03 +02:00
Koen Kanters 41e68c8ffe Update zigbee-herdsman to 0.7.0. 2019-09-23 22:21:27 +02:00
Koen Kanters 63acd4a43b Update zigbee-herdsman and zigbee-shepherd-converters. 2019-09-22 21:29:38 +02:00
Koen Kanters c5218bbd31 Update zigbee-herdsman. 2019-09-22 20:02:46 +02:00
alwashe 4dd9f0ee57 Update homeassistant.js (#2015) 2019-09-22 18:35:47 +02:00
Koen Kanters e441cf1752 Add extra logging for failed to configure. https://github.com/Koenkk/zigbee2mqtt/issues/1957 2019-09-22 18:01:10 +02:00
Koen Kanters e65f9d36d0 Add extra failed to setup reporting logging. https://github.com/Koenkk/zigbee2mqtt/issues/2005 2019-09-22 17:56:12 +02:00
Koen Kanters 9e94148459 Fix group membership args. https://github.com/Koenkk/zigbee2mqtt/issues/2003 2019-09-20 22:09:11 +02:00
Koen Kanters e3d0b97085 Update zigbee-herdsman. 2019-09-20 22:05:47 +02:00
Koen Kanters 5b71eeeed8 Update zigbee-herdsman zigbee-shepherd-converters. 2019-09-20 21:25:56 +02:00
Koen Kanters d4f01e6893 Replace Livolo extension with DeviceEvent. https://github.com/Koenkk/zigbee2mqtt/issues/592 2019-09-19 20:36:05 +02:00
Koen Kanters e9a336fd16 Update zigbee-herdsman to 0.6.13. https://github.com/Koenkk/zigbee2mqtt/issues/1960 2019-09-18 21:18:58 +02:00
Koen Kanters 5f203d15c4 Update zigbee-herdsman to 0.6.12. 2019-09-18 19:39:49 +02:00
felixstorm d7401c817c entityPublish.js - add logger to meta (#1988) 2019-09-17 21:46:16 +02:00
Koen Kanters bd29a5d35c Back to alpine 3.9 2019-09-17 19:59:58 +02:00
Koen Kanters 983f55ce3d npm don’t install dev dependencies. 2019-09-17 19:20:52 +02:00
Koen Kanters 130366575e Bump alpine to 3.10 2019-09-17 19:14:44 +02:00
Koen Kanters 7fb7dbbe0d Docker experimental is still needed. 2019-09-17 19:12:25 +02:00
Koen Kanters a7b3304b57 Is docker experimental still needed? 2019-09-17 19:07:21 +02:00
Koen Kanters c09f55873b Add group optimistic feature. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-09-17 19:01:57 +02:00
Koen Kanters ef7049f899 Update zigbee-herdsman to 0.6.11. https://github.com/Koenkk/zigbee-herdsman/issues/29 2019-09-17 18:41:46 +02:00
Koen Kanters 1a7331609a Fix lint. 2019-09-17 18:38:25 +02:00
Koenkk ff83840f76 Change group state when device state changes. https://github.com/Koenkk/zigbee2mqtt/issues/1971 2019-09-17 18:33:27 +02:00
Koenkk c8a07a5c2d Add base extension. 2019-09-17 18:32:16 +02:00
Koenkk 11aacb8620 Fix networkmap raw graph breaking change. https://github.com/azuwis/zigbee2mqtt-networkmap/issues/6 2019-09-17 18:19:42 +02:00
Koen Kanters d24c41cbba Update zigbee-herdsman. 2019-09-16 20:09:52 +02:00
Koen Kanters e758443190 Fix tests. 2019-09-16 20:03:51 +02:00
Koen Kanters 21dadd631c Don’t throw error when devices is null. https://github.com/Koenkk/zigbee2mqtt/issues/1973 2019-09-16 19:49:49 +02:00
Koen Kanters c32f8961b6 Update zigbee-shepherd-converters. 2019-09-16 19:38:24 +02:00
Koenkk 1f1c771075 Make logging consistent. https://github.com/Koenkk/zigbee2mqtt/issues/1965 2019-09-15 09:13:02 +02:00
Koenkk de8dd74968 Update zigbee-herdsman to 0.6.9. https://github.com/Koenkk/zigbee2mqtt/issues/1960 2019-09-14 08:32:20 +02:00
Koen Kanters f5463dbf0e Add last seen to zigbee2mqtt/bridge/config/devices/get. https://github.com/Koenkk/zigbee2mqtt/issues/1910 2019-09-12 22:50:51 +02:00
Koen Kanters 9c5b3bf4d1 Use lastSeen from zigbee-herdsman. 2019-09-12 22:48:23 +02:00
Koen Kanters 798a4ee565 Fix hardware and software version in devices payload. https://github.com/Koenkk/zigbee2mqtt/issues/1958 2019-09-12 20:58:57 +02:00
Koen Kanters 09743f13f9 Improve publish logging. https://github.com/Koenkk/zigbee2mqtt/issues/1958 2019-09-12 20:53:23 +02:00
Koen Kanters 8f4cf5e520 Update zigbee-herdsman to 0.6.7. https://github.com/Koenkk/zigbee2mqtt/issues/1952 2019-09-12 20:51:24 +02:00
Koen Kanters d53e1330f5 Improve error message when reading invalid YAML file. 2019-09-11 21:42:44 +02:00
Koen Kanters 17f1a865b4 Update zigbee-herdsman to 0.6.6. https://github.com/Koenkk/zigbee2mqtt/issues/1568 2019-09-11 21:12:41 +02:00
Koen Kanters 8b4e0fd865 Log stack on zigbee start error. 2019-09-10 22:07:31 +02:00
Koen Kanters cfae1bf3b0 Default transition for groups. https://github.com/Koenkk/zigbee2mqtt/issues/1948 2019-09-10 19:42:04 +02:00
Koen Kanters 411f1fab73 Update zigbee-herdsman. #1888. 2019-09-09 21:33:34 +02:00
Koen Kanters 053e646f50 Update zigbee-herdsman-converters. 2019-09-09 21:31:57 +02:00
Koen Kanters d83085ea7f Zigbee-herdsman (#1945)
* Update zigbee-herdsman and zigbee-shepherd-converters.

* Force Aqara S2 Lock endvices (#1764)

* Start on zigbee-herdsman controller refactor.

* More updates.

* Cleanup zapp.

* updates.

* Propagate adapter disconnected event.

* Updates.

* Initial refactor to zigbee-herdsman.

* Refactor deviceReceive to zigbee-herdsman.

* Rename

* Refactor deviceConfigure.

* Finish bridge config.

* Refactor availability.

* Active homeassistant extension and more refactors.

* Refactor groups.

* Enable soft reset.

* Activate group membership

* Start on tests.

* Enable reporting.

* Add more controller tests.

* Add more tests

* Fix linting error.

* Data en deviceReceive tests.

* Move to zigbee-herdsman-converters.

* More device publish tests.

* Cleanup dependencies.

* Bring device publish coverage to 100.

* Bring home assistant test coverage to 100.

* Device configure tests.

* Attempt to fix tests.

* Another attempt.

* Another one.

* Another one.

* Another.

* Add wait.

* Longer wait.

* Debug.

* Update dependencies.

* Another.

* Begin on availability tests.

* Improve availability tests.

* Complete deviceAvailability tests.

* Device bind tests.

* More tests.

* Begin networkmap refactors.

* start on networkmap tests.

* Network map tests.

* Add utils tests.

* Logger tests.

* Settings and logger tests.

* Ignore some stuff for coverage and add todos.

* Add remaining missing tests.

* Enforce 100% test coverage.

* Start on groups test and refactor entityPublish to resolveEntity

* Remove joinPathStorage, not used anymore as group information is stored into zigbee-herdsman database.

* Fix linting issues.

* Improve tests.

* Add groups.

* fix group membership.

* Group: log names.

* Convert MQTT message to string by default.

* Fix group name.

* Updates.

* Revert configuration.yaml.

* Add new line.

* Fixes.

* Updates.

* Fix tests.

* Ignore soft reset extension.
2019-09-09 19:48:09 +02:00
Koen Kanters e26ad2aca2 1.6.0 2019-09-09 19:10:16 +02:00
Koen Kanters eb69ea6808 Fix lint 2019-09-09 19:04:07 +02:00
Koen Kanters d0242fbd54 Update zigbee-shepherd-converters to 10.2.5. 2019-09-08 20:52:17 +02:00
Michal Szymura bd8801698f Added Sengled Z01-A60EAE27 to HA Autodiscovery (#1936)
* Added Sengled Z01-A60EAE27 to HA Autodiscovery

* Update homeassistant.js

* Update homeassistant.js
2019-09-06 08:09:41 +02:00
wixoff b77be8e673 Support Hue white ambiance E26 with Bluetooth (#1932) 2019-09-05 19:44:07 +02:00
BIERAAP 1189d16839 Added support TRADFRI bulb GU10 WW 400lm LED1837R5 (#1927) 2019-09-03 18:04:42 +02:00
LagaV b00d4d55fa Adding Philips Adore lights to Home Assistant integration (#1917) 2019-09-01 10:41:29 +02:00
Abílio Costa 4f7e3a179f add support for TRADFRI bulb E27 WS clear 806lm (#1902) 2019-08-31 13:14:46 +02:00
stkang90 1bdbeae144 add support SA-003-Zigbee (#1894)
* add support SA-003-Zigbee

[product detail]
https://ko.aliexpress.com/item/32957480204.html?spm=a2g0o.productlist.0.0.5b4e7321varbKb&algo_pvid=a9497085-a7c0-4863-ba60-f911cb532362&algo_expid=a9497085-a7c0-4863-ba60-f911cb532362-0&btsid=bb62c063-3baf-452c-99a9-ba43e40f04a1&ws_ab_test=searchweb0_0,searchweb201602_4,searchweb201603_52

* Update homeassistant.js
2019-08-28 17:32:31 +02:00
Koen Kanters 48fc7d8d3b Update zigbee-shepherd-converters. 2019-08-21 19:37:36 +02:00
Jorge Schrauwen 8ee3158783 [FIX] #1874: logging of groupid's (#1875)
While trying to get my IKEA remote to work I kept getting 'undefined' groupID's. This fixes it.
2019-08-19 17:44:54 +02:00
Koen Kanters 7d04185f2c Update zigbee-shepherd-converters and zigbee-herdsman. 2019-08-16 19:03:23 +02:00
Kiall Mac Innes 377e9d50dc IKEA TRADFRI E1810 (#1866)
Add the IKEA E1810, which appears to be a replacement for the E1524. Functionally, they appear to
work identically, the only difference I can see is front finish is matte rather than glossy, and
the internals behind the battery cover are slightly different.
2019-08-16 18:41:11 +02:00
felixstorm 9628cf2c95 Home Assistant discovery: allow to delete setting (#1839)
* Home Assistant discovery: allow to delete setting by setting it to `null`

* Home Assistant discovery: support boolean values
2019-08-16 17:44:18 +02:00
hawkefly 4d4a63f913 support aqara s2 lock pro (#1859) 2019-08-16 17:40:47 +02:00
Koen Kanters 22bed9a347 Update zigbee-herdsman. 2019-08-13 20:05:53 +02:00
Kiall Mac Innes d96c3da8d5 Fix commit hash output in version info (#1855) 2019-08-13 20:03:08 +02:00
Leander Seidlitz 6abe7d2fd7 Add support for Osram Smart+ GU10 PAR16 AC08560 (#1850) 2019-08-13 19:47:43 +02:00
Koen Kanters a62d6aad91 Update zigbee-herdsman and zigbee-shepherd-converters. 2019-08-12 19:20:33 +02:00
Koen Kanters c55691daec Fix groups log messages. https://github.com/Koenkk/zigbee2mqtt/issues/1848 2019-08-12 19:13:18 +02:00
acc c9f56f0bbf separate HGZB-01A and HGZB-02A and identify HGZB-01A as a switch (#1844) 2019-08-12 17:47:55 +02:00
felixstorm c53c4c894f Support reporting for closuresWindowCovering cluster (#1837) 2019-08-11 14:13:44 +02:00
felixstorm 6ae307d893 Home Assistant integration - support for ubisys D1, J1, S1, S2 (#1830)
* HomeAssistant integration - support for ubisys D1, J1, S1, S2

* fixes for eslint
2019-08-11 14:13:44 +02:00
hawkefly 511f9406e2 add sensor_action config for WXKG12LM (#1826) 2019-08-11 14:13:44 +02:00
Koen Kanters 9e63a4646e Also query color and color temp when device reconnects. 2019-08-11 14:13:44 +02:00
Kiall Mac Innes da5ca2f0bf Update HA extension to add batt support to E1524 and AC01353010G (#1822)
* Update HA eextension to add batt support to E1524 and AC01353010G

The IKEA E1524 TRADFRI remote control and the Osram SMART+ Motion Sensor
expose a battery and battery_low attribute, update the HA discovery
integration to include these sensors by default.

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js
2019-08-11 14:13:44 +02:00
John Dyer ecbee780db add samsung 2018 water sensor (#1819) 2019-08-11 14:13:44 +02:00
Koen Kanters a604fd6345 Update zigbee-herdsman and zigbee-shepherd-converters. 2019-08-11 14:13:44 +02:00
Koen Kanters 36e52ba4fb Update zigbee-shepherd-converters. 2019-08-11 14:13:44 +02:00
Koen Kanters f67eeffed6 Update zigbee-herdsman to 0.5.1. 2019-08-11 14:13:44 +02:00
Koen Kanters 5e55e1655f Update zigbee-herdsman and zigbee-shepherd-converters. 2019-08-11 14:13:44 +02:00
stkang90 519eb4eecf add support PM-C139-ZB (#1807) 2019-08-11 14:13:44 +02:00
Koen Kanters fd3019dce8 Update zigbee-herdsman to 0.4.5. https://github.com/Koenkk/zigbee2mqtt/issues/1798 2019-08-11 14:13:44 +02:00
Koen Kanters 1ca1be2ea2 Update zigbee-herdsman to 0.4.2. https://github.com/Koenkk/zigbee2mqtt/issues/1798 2019-08-11 14:13:44 +02:00
Koen Kanters 967bf1083c Update zigbee-herdsman to 0.4.1 https://github.com/Koenkk/zigbee2mqtt/issues/1784 2019-08-11 14:13:44 +02:00
GuGu927 c1e8dd990f Add support for Goqual zigbee switch(1~6gang) (#1783)
* Update homeassistant.js

* Update utils.js
2019-08-11 14:13:44 +02:00
Koen Kanters fcb6c37ef0 Set whitelist to empty array when null. https://github.com/Koenkk/zigbee2mqtt/issues/1774 2019-08-11 14:13:44 +02:00
didiht c9ec198c1f correct log of groupid #1785 (#1787) 2019-08-11 14:13:44 +02:00
Koen Kanters a60fdd75dc zcl-id > Zcl. 2019-08-11 14:13:44 +02:00
Koen Kanters 7853f41a0e Bump zigbee-herdsman to 0.4.0. 2019-08-11 14:13:44 +02:00
Koen Kanters 3ed5705253 Update zigbee-shepherd-converters and zigbee-herdsman. 2019-08-11 14:13:44 +02:00
Koen Kanters 5254eea6e0 Update zigbee-herdsman and zigbee-shepherd-converters. 2019-08-11 14:12:30 +02:00
Boostflow 92e930ede3 Added support for Philips Hue Struana (#1747) 2019-07-18 20:24:14 +02:00
Koen Kanters ac3b924065 1.5.1 2019-07-16 18:31:32 +02:00
Koen Kanters dd8a55cf08 Update zigbee-herdsman to 0.1.17. https://github.com/Koenkk/zigbee2mqtt/issues/1734#issuecomment-511403606 2019-07-15 20:04:39 +02:00
clockbrain 3ae2d2b946 Network map routes selectable by mqtt topic (#1736) 2019-07-15 20:02:56 +02:00
Koen Kanters 31b8352f5a 1.5.0 2019-07-13 19:39:20 +02:00
Koen Kanters 503fef807c Add changelog generator tool for new supported devices page. 2019-07-13 19:38:23 +02:00
Koen Kanters 4aab81d9e3 Remove HS1WD (not supported anymore). 2019-07-13 19:38:00 +02:00
Koen Kanters 8d705ade39 Update zigbee-shepherd-converters. 2019-07-13 16:36:24 +02:00
Koen Kanters d3e97953c3 Update zigbee-shepherd-converters. 2019-07-11 20:22:43 +02:00
wixoff 1b859c4dc2 Support for PP-WHT-US new sensors (#1718)
* Support for PP-WHT-US new sensors

* Update homeassistant.js
2019-07-11 19:36:50 +02:00
Koen Kanters 225919bb23 Update zigbee-herdsman to 0.1.6. https://github.com/Koenkk/zigbee2mqtt/issues/1710 2019-07-10 19:04:54 +02:00
Andreas Brett 74b8340afb add TLS/SSL options for connecting to MQTT server (#1706)
* add TLS/SSL options for connecting to MQTT server

* Update mqtt.js

* gotta love travis

* Update mqtt.js

separated processing of mqtt.ca and mqtt.key/mqtt.cert in order to allow for "server-authentication only" as well as "server+client authentication"

* Update mqtt.js
2019-07-10 17:57:41 +02:00
Koen Kanters 08c0f2b614 Lint. 2019-07-08 22:04:38 +02:00
Koen Kanters 61b54c50a5 Update zigbee-shepherd-converters and zigbee-herdsman. 2019-07-08 21:42:07 +02:00
Rick 6400f52a28 Added "alert" for groups (#1704) 2019-07-08 21:06:08 +02:00
clockbrain 97f9f83181 Use penwidth instead of dotted/dashed lines (#1694) 2019-07-06 10:09:44 +02:00
Koen Kanters 90c3fc0320 Add device rename test case. https://github.com/Koenkk/zigbee2mqtt/issues/1687 2019-07-04 20:50:54 +02:00
Koen Kanters 94a7cd8ec9 Update zigbee-shepherd-converters to 10.1.1 2019-07-04 20:16:20 +02:00
Craig Stephen 1df43bdbc4 Add support for UK Hive Bulb E27 & B22 - Warm to cool white (#1683) 2019-07-03 17:38:43 +02:00
Koen Kanters 3daf97283c Fix queue settings. 2019-07-02 19:13:06 +02:00
Koen Kanters aca0c39291 Move queue from advanced. 2019-07-02 19:00:42 +02:00
Koen Kanters 9624384c3f Add queue settings. https://github.com/Koenkk/Z-Stack-firmware/issues/93 2019-07-02 18:56:03 +02:00
Koen Kanters 3b4ee3bc2e Update zigbee-shepherd-converters to 10.1.0. 2019-07-01 16:48:54 +02:00
clockbrain 7a19c8876a Network map fixes (#1676)
* Include scan failed note in network map

* Include relationship in map structure

* Clearer source and destination node naming

* eslint fixes

* More eslint fixes

* Removed empty brackets for no routes

* Reposition short address in device node

* eslint fixes
2019-07-01 16:10:50 +02:00
Koen Kanters 51df6b7e8a Correctly call convert. https://github.com/Koenkk/zigbee2mqtt/issues/1639#issuecomment-506016224 2019-06-27 19:11:21 +02:00
Andreas Brett 7cabe3a523 colors for network map (#1666)
* Update settings.js

added default color options for network map

* Update networkMap.js

- add timestamp node to indicate when the map was created
- colorize nodes by device type
- colorize edges by activity

* Update networkMap.js

make travis happy

* Update networkMap.js

* Update networkMap.js

* Update settings.js

* Refactor

* Move to graphviz.
2019-06-26 19:30:38 +02:00
Viet Dzung 7b2522f712 Support whitelist devices feature #1643 (#1654)
* Support whitelist devices feature #1643

* Control via MQTT

* Log
2019-06-25 19:38:36 +02:00
Koenkk 5a132ad34b Retrieve default ep from mapping. #1662 2019-06-25 19:13:59 +02:00
Koen Kanters 362b910e48 Lint. 2019-06-24 21:10:06 +02:00
Dennis Keitzel 241b300f7b Allow custom home-assistant status topic (#1667) 2019-06-24 20:52:47 +02:00
Koen Kanters 0e9931af6c Improve bind logging. https://github.com/Koenkk/zigbee2mqtt/issues/1662 2019-06-24 20:25:37 +02:00
Koen Kanters f4f297e8a2 Update zigbee-herdsman. 2019-06-24 20:17:07 +02:00
Koen Kanters 5934efa41e Add last_seen when device publish succeeds. https://github.com/Koenkk/zigbee2mqtt/issues/1651 2019-06-24 20:16:03 +02:00
clockbrain 38a1aec823 Network map styling improvements (#1653)
* Weight and style lines based on routes

* Refactor to make End Device case more obvious
2019-06-23 21:22:13 +02:00
Koen Kanters 3c398df658 Lint. 2019-06-23 16:10:44 +02:00
Koen Kanters 91d415404c Update zigbee-shepherd-converters and zigbee-herdsman. 2019-06-23 16:02:43 +02:00
Koen Kanters ef01346776 Update zigbee-shepherd-converters to 10.0.0 and zigbee-herdsman to 0.1.11. 2019-06-19 21:44:44 +02:00
Koen Kanters 801e97143c Fix adding groups with duplicate names. #764 2019-06-19 18:35:57 +02:00
Koen Kanters 304b2efa48 Don’t publish emtpy messages. #1599 2019-06-19 18:11:35 +02:00
Koen Kanters a36ed2032d Update zigbee-herdsman to 0.1.10. 2019-06-19 18:07:13 +02:00
Koen Kanters 17d01e937e Update zigbee-herdsman to 0.1.9. 2019-06-18 22:07:07 +02:00
Koen Kanters 110f80ec84 Lint. 2019-06-17 21:41:48 +02:00
clockbrain b28da0265e Include last seen in device boxes on graphviz map (#1633)
* Include last seen in device boxes on graphviz map

* Refactor

* Fix test cases

* Bind

* Refactor last seen label construction

* style fix
2019-06-17 21:28:27 +02:00
Koenkk 1c529c4873 Add group remove_all without group #764 2019-06-17 21:17:29 +02:00
clockbrain 3981c1c6e4 Include network routes on the map (#1641)
* Initial inclusion of routes on map

* Forgot to include zigbee.js

* Hex string for route address

* Rebaseline to dev

* Cleaner merging of scan arrays

* style fixes
2019-06-16 13:49:15 +02:00
Koen Kanters c48f73e36b Discover action sensor for WXKG03LM. https://github.com/Koenkk/zigbee2mqtt/issues/1640 2019-06-16 13:13:03 +02:00
Koen Kanters 94e03d4189 Update zigbee-herdsman 2019-06-15 22:57:35 +02:00
Koen Kanters e30ff9e722 Move to zigbee-herdsman. 2019-06-15 22:20:54 +02:00
pali 1f63a32170 [graphviz] show network address in hexastring format (#1638)
* [graphviz] show network address in hexastring format

Wireshark shows network address in hexadecimal format, so it's easier to follow messages in Wireshark if both shows address in same format.

* Update networkMap.js

* Update networkMap.js
2019-06-15 17:04:35 +02:00
Jevgeni Kiski e9b5a588cc #1588 Openhab2 compatibility (#1589) 2019-06-15 16:55:33 +02:00
Koen Kanters 4357064203 Update zigbee-shepherd-converters to 9.0.22. 2019-06-15 14:02:58 +02:00
Koen Kanters 86a65ebec0 Merge branch 'master' into dev 2019-06-13 22:10:52 +02:00
Koen Kanters 259ba9d658 Update zigbee-shepherd-converters to 9.0.21. 2019-06-13 22:01:39 +02:00
Dan Chen 9fe76c29ef Add power usage metering to GE Plug-in Smart Switch 45853GE (#1629)
* Create FUNDING.yml

* Add power usage metering to GE Plug-in Smart Switch 45853GE

* Delete FUNDING.yml
2019-06-13 21:48:04 +02:00
clockbrain dd49a76e5c Network map rewrite using queue (#1626)
* Initial rewrite of network map scan using queue

* Rename routerList to scanList

* eslist fixes

* More eslint fixes

* Timeout now dynamic based on number of scanable devices
2019-06-13 21:43:12 +02:00
Anne Meijer 6976f8e70a Added support for HEIMAN HS1CA-E (#1622)
* Create FUNDING.yml

* Adde support for HEIMAN HS1CA-E

* Fixed eslint issues

* Delete FUNDING.yml
2019-06-11 20:07:32 +02:00
Koen Kanters 82dc8437a1 Get rid of logging during test cases. 2019-06-10 00:01:48 +02:00
Koen Kanters fb12d15d9d Fix lint error. 2019-06-09 23:46:19 +02:00
Koen Kanters 852950fc09 Update zigbee-shepherd-converters to 9.0.20. 2019-06-09 23:43:40 +02:00
clockbrain b663e37fd9 Also match network map link by short address (#1611) 2019-06-09 08:16:38 +02:00
Koen Kanters 70fbe714e3 Add trace logging and add trace logging to zigbeeQueue. https://github.com/Koenkk/zigbee2mqtt/issues/1566 2019-06-08 19:56:35 +02:00
Koen Kanters ee8161b807 Don’t add state_topic to payload for thermostat. #1599 2019-06-07 23:55:20 +02:00
Koen Kanters 8ad6aee43a Identify QBKG04LM and QBKG03LM as end device. https://github.com/Koenkk/zigbee2mqtt/issues/1594 2019-06-04 19:23:58 +02:00
clockbrain 4497214588 Network map fixes (#1590)
* Remove device status from network scan topology

* Random start for each lqi scan then sort resultant link map

* Fix log statement order

* Sort network map links by composite key

* Fix typo in link sorting

* Fix eslint formatting
2019-06-02 10:05:44 +02:00
Koen Kanters 08e55e469f Update zigbee-shepherd-converters to 9.0.19. 2019-05-29 20:26:40 +02:00
Koen Kanters c29bfe1455 Allow to specify endpoint when adding device to group. (#1515)
* uu

* Update
2019-05-29 20:11:40 +02:00
Koen Kanters 82ed260d47 Update zigbee-shepherd-converters to 9.0.18. 2019-05-29 19:33:15 +02:00
rachetfoot caff94559e Iterate objects recursively and support array output (#1573)
* Iterate objects recursively and support array output

* Fix eslint errors

* Improve array handling and expand related test

* Improve tests and array support, add special case for color attributes
2019-05-28 20:01:46 +02:00
Koen Kanters c2b4d63e12 Don’t cache elapsed. https://github.com/Koenkk/zigbee2mqtt/issues/1576 2019-05-26 20:03:43 +02:00
Koen Kanters 825f096434 Update zigbee-shepherd-converters to 9.0.17. 2019-05-24 18:32:37 +02:00
clockbrain 4b14222bda Network map error handling (#1565)
* Catch errors from failing network scans

* Tidier code for process result

* Fix eslint format errors
2019-05-24 18:21:53 +02:00
Koen Kanters 927c4dbc05 Create FUNDING.yml 2019-05-24 08:27:35 +02:00
clockbrain c4e9ea208a Add debugging for network scan (#1559)
* Add debugging for network scan

* Fix eslint warning
2019-05-23 18:53:47 +02:00
Koen Kanters af09624cff Update zigbee-shepherd-converters to 9.0.16. 2019-05-22 22:09:13 +02:00
Koen Kanters e4a50b662d Update zigbee-shepherd-converters to 9.0.15. 2019-05-21 21:15:16 +02:00
clockbrain 22b64d09f2 Network map (#1546)
* Initial iterative rewrite of network scan

* Remove unused linkKey

* Restore original log message

* Cleaner array flattening

* Fix various travis warnings

* Add a timeout so partial map can be generated

* Fix further eslint issues

* Add a timeout so partial map can be generated

* Fix further eslint issues
2019-05-21 21:04:14 +02:00
Koen Kanters dc028d5046 Update zigbee-shepherd. 2019-05-21 20:54:49 +02:00
Koen Kanters 0352a738a7 Update zigbee-shepherd-converters to 9.0.14. 2019-05-20 20:53:51 +02:00
Koen Kanters 6adfdacb3c Don’t quit twice. https://github.com/Koenkk/zigbee2mqtt/issues/1550 2019-05-20 20:43:25 +02:00
Koen Kanters 18913a1577 Update zigbee-shepherd-converters to 9.0.12. 2019-05-19 19:51:27 +02:00
Koen Kanters 1e04c229dd Merge remote-tracking branch 'origin/master' into dev 2019-05-19 19:34:02 +02:00
clockbrain 31d21546b9 Simpler network map scan (#1543)
* Initial iterative rewrite of network scan

* Remove unused linkKey

* Restore original log message

* Cleaner array flattening

* Fix various travis warnings
2019-05-19 19:33:30 +02:00
Koen Kanters 7f9104367b Reduce permitJoin interval to 160 seconds to fix pairing devices after pairing E1603. https://github.com/Koenkk/zigbee2mqtt/issues/1099 2019-05-19 19:10:51 +02:00
Koen Kanters 92d0002bbb Update zigbee-shepherd-converters to 9.0.11. 2019-05-19 18:51:00 +02:00
Koen Kanters 0074c32136 Update zigbee-shepherd-converters to 9.0.10. 2019-05-14 21:57:47 +02:00
Koen Kanters faa6aa41a9 Fix AC0251100NJ discovery. 2019-05-14 21:46:55 +02:00
Koen Kanters 3ed9bbde1a Update zigbee-shepherd-converters to 9.0.9 2019-05-14 21:36:07 +02:00
Koen Kanters 8f39ae9d63 Update zigbee-shepherd-converters to 9.0.8. 2019-05-14 21:18:48 +02:00
Koen Kanters a09da4fe10 Update zigbee-shepherd-converters to 9.0.7. 2019-05-14 21:12:13 +02:00
Koen Kanters 9cc82701c1 Fix crash when device not in configuration.yaml 2019-05-14 19:25:13 +02:00
Koen Kanters 190dda5104 Update zigbee-shepherd-converters to 9.0.6 2019-05-14 18:04:47 +02:00
Andreas Brett 3d74a6e031 log friendly name when possible (#1524)
* log friendly name when possible

* make travis happy
2019-05-14 17:51:43 +02:00
Koen Kanters 6b7546547d 1.4.0 2019-05-13 18:29:51 +02:00
Koen Kanters 3649fb1bc9 Update zigbee-shepherd-converter to 9.0.5. 2019-05-12 21:09:12 +02:00
Abílio Costa eb2c4cbdee Add support for EDP redy switch (#1519)
Added in https://github.com/Koenkk/zigbee-shepherd-converters/pull/432/files
2019-05-12 21:05:07 +02:00
Andreas Brett f93a3e1c07 Minor spelling correction (#1522)
* Update devicePublish.test.js

* Update devicePublish.js
2019-05-12 21:03:27 +02:00
Koen Kanters ee9584121a Update zigbee-shepherd-converters to 9.0.4. 2019-05-10 18:25:08 +02:00
Koen Kanters ba1eca82eb Reenable joining after 200 seconds. https://github.com/Koenkk/zigbee2mqtt/issues/1429 #1445 2019-05-07 21:16:25 +02:00
Koen Kanters 68d2d0a73d Update zigbee-shepherd-converters to 9.0.3 2019-05-07 19:25:47 +02:00
Koen Kanters d8d78af4ec Query device state on endDeviceAnnce when using device availability. https://github.com/Koenkk/zigbee2mqtt/issues/1383 2019-05-06 20:29:17 +02:00
Koen Kanters 80e682688d Update zigbee-shepherd-converters to 9.0.2. 2019-05-05 20:14:30 +02:00
Koen Kanters c6617fb7d9 Always keep state. https://github.com/Koenkk/zigbee2mqtt/issues/1489 2019-05-02 20:14:44 +02:00
Koen Kanters 26d8d27e85 Update zigbee-shepherd-converters to 9.0.1. 2019-05-02 19:59:23 +02:00
Chris Price 87232988e7 Add Home Assistant support for Philips Hue PAR38 outdoor bulb (#1488) 2019-05-02 19:44:56 +02:00
Koen Kanters a3d26ceeb2 Update zigbee-shepherd-converters to 9.0.0. 2019-05-01 21:50:01 +02:00
Koen Kanters 1f6e64b4c0 Fix Docker container being killed instead of stopped. #1482 2019-05-01 20:47:53 +02:00
Tadej Štajner 919b8a9b4c Add Home Assistant autodiscovery for Paulmann 50043 switch (#1486)
Depends on https://github.com/Koenkk/zigbee-shepherd-converters/pull/424 being merged.
2019-05-01 18:33:36 +02:00
Koen Kanters 31088255ab Update zigbee-shepherd. https://github.com/Koenkk/zigbee2mqtt/issues/1429 2019-04-30 20:34:28 +02:00
Koen Kanters 39fe50600e Fix crash when there is no state yet. 2019-04-30 19:30:26 +02:00
Koen Kanters a54e256b40 Group configuration via configuration.yaml and group state (#1464)
Group configuration via configuration.yaml and group state.
2019-04-29 20:38:40 +02:00
Koen Kanters 4472c01076 Update zigbee-shepherd-converters to 8.1.5. 2019-04-28 21:14:52 +02:00
Koen Kanters 801be951a4 Discover light for 99432. https://github.com/Koenkk/zigbee-shepherd-converters/pull/416 2019-04-28 21:04:52 +02:00
Koen Kanters cb16ba2f71 Update zigbee-shepherd-converters to 8.1.4. 2019-04-26 21:57:38 +02:00
Koen Kanters 0d587f304e Respond to time requests. https://github.com/Koenkk/zigbee2mqtt/issues/1214 2019-04-26 21:33:29 +02:00
Koen Kanters 21dc1a8c8e Add fan Home Assistant configuration. https://github.com/Koenkk/zigbee-shepherd-converters/pull/416 2019-04-24 20:59:06 +02:00
Andreas Brett 32b76edb7c Improve non-JSON output (#1462)
* Update controller.js

Do not use JSON.stringify when outputting Non-JSON to MQTT. When using JSON.stringify strings are quoted in the MQTT messages but they should not be quoted (MQTT is different from JSON).

* Update controller.js

* Update controller.js

* Update controller.js
2019-04-22 16:29:47 +02:00
Koen Kanters 0eaf0ad5d6 Update zigbee-shepherd-converters. 2019-04-19 20:56:05 +02:00
Javier Rodríguez 1ebd774d6f Support for HLC610-Z Wireless Dimmable Controller (#1451) 2019-04-19 20:44:11 +02:00
Koen Kanters 950b3c7ace Update zigbee-shepherd. 2019-04-19 20:30:39 +02:00
Koen Kanters f8106feb18 Update zigbee-shepherd-converters to 8.1.2 2019-04-18 18:27:41 +02:00
Koen Kanters 69e9dbc5b2 Remove expire_after for action and click. https://github.com/Koenkk/zigbee2mqtt/issues/959 2019-04-17 20:46:27 +02:00
Koen Kanters 75718b360e Don’t identify Trust device as Xiaomi device. https://github.com/Koenkk/zigbee2mqtt/issues/1420 2019-04-17 20:03:40 +02:00
Koen Kanters beb2713cdd Update zigbee-shepherd. 2019-04-17 19:10:53 +02:00
Koen Kanters 2cdbe49385 Merge branch 'master' into dev 2019-04-16 19:57:35 +02:00
Koen Kanters d0e66ed1da Only setup reporting for non battery powered routers. #1064 2019-04-16 17:56:28 +02:00
Koen Kanters 39d6a8e218 1.3.1 2019-04-16 17:47:14 +02:00
Koen Kanters 2f187ae282 Fix device availability. https://github.com/Koenkk/zigbee2mqtt/issues/1395 2019-04-16 17:46:37 +02:00
Koen Kanters 3a5bdffd4e Downgrade zigbee-shepherd. #1378 2019-04-16 17:46:34 +02:00
Simon Rasmussen a1b43d12f6 eCozy homeassitant discovery (#1432)
* WIP

* Fixed paths

* Reverted accidentally removed lines

* Fixed linting issues
2019-04-16 16:31:05 +02:00
Koen Kanters 310f9892d6 Update zigbee-shepherd. 2019-04-14 20:36:01 +02:00
Koen Kanters c2edaed866 Backup coordinator on start. 2019-04-14 18:53:34 +02:00
Koen Kanters 2d4c447ee1 Add CC2652R backup mechanism. 2019-04-14 16:27:02 +02:00
Sembrador b13d87d461 Added support for the L1 and L2 inputs of the xiaomi switch LLKZMK11LM. (#1411)
Added support for the L1 and L2 inputs of the xiaomi switch LLKZMK11LM.
2019-04-13 17:19:05 +02:00
Koen Kanters da9425290e Update zigbee-shepherd. 2019-04-09 21:16:48 +02:00
Koen Kanters 811692fed8 Fix device availability. https://github.com/Koenkk/zigbee2mqtt/issues/1395 2019-04-09 19:17:16 +02:00
Oli 78ff9b1937 harmonize coordinator output statement (#1386)
resize the coordinator payload to be harmonize with the other output.
2019-04-09 19:01:59 +02:00
Oli c6011c0911 simplify the cies for ias (#1387)
* simplify the cies for ias

minimize the code for the cies for ias stuff to be as short as it need.
add some comments.

* fix eslint build error
2019-04-09 18:23:55 +02:00
Koen Kanters 9f16f99424 Update zigbee-shepherd. 2019-04-08 20:32:44 +02:00
Koen Kanters 08ad3a877d Update zigbee-shepherd. 2019-04-07 20:43:52 +02:00
Koen Kanters 24780e6eac Home Assistant: publish counter value for click and action payloads. #959 2019-04-07 18:11:16 +02:00
Simon Rasmussen 2554cf8e8b Improved devicePublish topic parsing (#1373)
* Refactored device publish parsing and added ability to set attributes directly

* Fixed topic subscriptions and null json object

* Fixed tests

* Added more testing of attribute

* Fixed linting issue.
2019-04-07 17:51:27 +02:00
Koen Kanters 4aa5877797 Add extra is pingable logging. #775 2019-04-07 17:47:06 +02:00
Koen Kanters 61942f8411 Update zigbee-shepherd (zigbee 3.0 support, yay!) 2019-04-07 17:43:51 +02:00
Koen Kanters 00ebd441a0 1.3.0 2019-04-07 17:33:34 +02:00
Koen Kanters 4843d85fe9 Update zigbee-shepherd-converters to 8.1.1. 2019-04-07 15:38:27 +02:00
Koen Kanters 32db1fd07a Fix acceptDevIncoming. #538 2019-04-01 20:30:27 +02:00
Koen Kanters cee35c66e6 Don’t setup reporting for CC2530 router. #1227 2019-04-01 19:51:14 +02:00
Koen Kanters 76d7861671 Only do read after write when retrieve_state is enabled. #1349 2019-03-30 21:03:54 +01:00
Koen Kanters 35fd1a68fc Update zigbee-shepherd-converters to 8.1.0 (always assume state). #1349 2019-03-30 20:50:40 +01:00
Koen Kanters 8828ee60ae Setup reporting for all attributes when cluster has no attributes. #1064 2019-03-30 18:20:07 +01:00
Koen Kanters 55c3edfa95 Home Assistant: skip state when bulb is already on when setting color or color temperature. #1349 2019-03-30 18:19:10 +01:00
Koen Kanters 2f52b851a9 Add extra acceptDevIncoming logging. #538 2019-03-30 16:48:58 +01:00
Koen Kanters 91bc56a09f Update zigbee-shepherd (cc-znp). #1343 2019-03-29 20:10:02 +01:00
Koen Kanters c737f569f9 Allow already connected devices to rejoin. #1294 #1334 2019-03-29 19:18:15 +01:00
Koen Kanters de4f9f44fd Fix bind by friendly name. #176 2019-03-29 19:10:13 +01:00
Erik van Luijk 21714855bf Pr expcliv2 (#1344)
* Add multiplatform support

Using the experimental manifest support in docker one can
create a manifest that contain references to other images/tags
build for various architectures. When someone pulls koenkk/zigbee2mqtt
correct image is automatically selected.

Please note that experimental cli support needs to be enabled.

* Update docker.sh

* Use docker cli with experimental cli support enabled only when needed
2019-03-29 18:52:45 +01:00
Koen Kanters 50986591c1 Fix tests. 2019-03-28 21:08:18 +01:00
Erik van Luijk e10999f0f2 Add multiplatform support (#1336)
* Add multiplatform support

Using the experimental manifest support in docker one can
create a manifest that contain references to other images/tags
build for various architectures. When someone pulls koenkk/zigbee2mqtt
correct image is automatically selected.

Please note that experimental cli support needs to be enabled.

* Update docker.sh
2019-03-28 20:56:40 +01:00
Koen Kanters 7015741a08 Add dateCode to getDeviceInfoForMqtt. #1213 2019-03-28 19:58:21 +01:00
Bruceforce 64fa02abab Update ISSUE_TEMPLATE.md (#1338)
Handle the "FAQ stuff" as a comment and give the user a basic issue template.
2019-03-28 16:23:41 +01:00
Koen Kanters 7e6dc67861 Update zigbee-shepherd-converters to 8.0.14. 2019-03-27 18:22:40 +01:00
Koen Kanters 3c5727b320 Add dateCode en update zigbee-shepherd. https://github.com/Koenkk/zigbee2mqtt/issues/1213 2019-03-27 18:18:49 +01:00
Koen Kanters 9ef4d2b810 Check if message has endpoints. 2019-03-27 17:31:25 +01:00
Koen Kanters e96dac2596 Log endpoint on zigbee message received. #642 2019-03-27 17:09:55 +01:00
Koen Kanters 9a15e8c118 Improve ban functionallity. #816 2019-03-26 21:40:31 +01:00
Justin Hornosty 25408769e6 Publish and respond to bridge/config/devices/get (#1329)
* - When sent a empty payload to bridge/config/devices/get , publish to
  'bridge/config/devices'
- For bridge/config/devices & bridge/config/devices/get only ever
  publish to the corresponding topic if a empty payload is sent.
- Make sure devicesPublish doesn't treat messages to
  bridge/config/devices/get as a zigbee device.

* fix eslinting errors

* Update bridgeConfig.js
2019-03-26 20:40:50 +01:00
Koen Kanters 2328ecb2ee Update zigbee-shepherd-converters to 8.0.13. 2019-03-25 21:53:39 +01:00
carlos-villanueva b2a453bec3 Add support for smartthings button (model: IM6001-BTP01) (#1312)
* Add support for smartthings button (model: IM6001-BTP01)

* Fix lint
2019-03-24 15:05:56 +01:00
Koen Kanters 20d9bac317 Don’t ping in Xiaomi extension when device availability is enabled. #1248 2019-03-24 14:46:38 +01:00
Koen Kanters 40596bab6a Always ping xiaomi devices through ‘basic’ mechanism. #1248 2019-03-24 14:38:08 +01:00
Willi Eggeling 69d04d0648 shutdown controller on SIGTERM (#1313)
Previously, the controller was only properly shutdown on SIGINT.
SIGTERM is used by kill (unix) and to stop Docker containers.
2019-03-24 14:27:49 +01:00
Koen Kanters 363f4e1c3b Merge branch 'master' into dev 2019-03-24 14:26:49 +01:00
Koen Kanters 008fda4d90 Introduce new ping mechanism (‘basic’) and use it for Xiaomi. https://github.com/Koenkk/zigbee2mqtt/issues/1248 2019-03-23 17:45:28 +01:00
Koen Kanters c64158b75d CC2530/CC2531 routers are not Xiaomi devices. https://github.com/Koenkk/zigbee2mqtt/issues/1248 2019-03-23 17:20:30 +01:00
Koen Kanters 1ea694cb1a Update zigbee-shepherd-convertes to 8.0.12. 2019-03-23 15:32:18 +01:00
Koen Kanters e537784d34 Update zigbee-shepherd-converters to 8.0.11. 2019-03-22 23:37:07 +01:00
Koen Kanters 0277591085 Update zigbee-shepherd-converters to 8.0.10. 2019-03-22 22:45:59 +01:00
Koen Kanters 7b2480be52 Update zigbee-shepherd-conveters to 8.0.9. 2019-03-21 20:34:54 +01:00
Martin Helff 70c30736a1 add more details to device list (#1296) 2019-03-21 20:00:13 +01:00
Koen Kanters 24cf72f166 Update zigbee-shepherd. https://github.com/Koenkk/zigbee2mqtt/issues/1295 2019-03-21 19:59:25 +01:00
Martin Helff e5081b2856 set reportableChange default value to 1 to avoid report flooding (#1293) 2019-03-21 19:43:15 +01:00
Fredrik Lindqvist 4048cb81a4 Update discord link to the #welcome-rules channel (#1290)
New invite link for the new channel structure.
2019-03-20 07:10:37 +01:00
Koen Kanters 2af2a8ea05 Update zigbee-shepherd-converters to 8.0.8. 2019-03-19 20:58:12 +01:00
Oli 1b066d9f59 extend controller.js function getDeviceInfoForMqtt (#1274)
* Add Discord channel. https://github.com/Koenkk/zigbee2mqtt.io/issues/31

* extend controller.js function getDeviceInfoForMqtt

extend controller.js with 
``
zclVersion,
appVersion,
stackVersion,
hwVersion,
swBuildId,
``

* Rework #2

Only Publish hwVersion and swBuildId as this seems to be valid as posible.
Map with default option 'unknown' to be in a good way.

* Fix tests

* Update README.md
2019-03-19 20:29:41 +01:00
Koen Kanters 5c9b31b2fc Don’t create state when cache_state is set to false. #1287 2019-03-19 20:02:17 +01:00
Koen Kanters 61d85af3fd Publish brightness: 0 when turn off trough brightness. https://github.com/Koenkk/zigbee-shepherd-converters/issues/353 2019-03-19 19:43:06 +01:00
Martin Helff 789ec0cc90 query groups through MQTT bridge/config/groups (#1276)
* query groups through MQTT bridge/config/groups

* linter adjustments

* linter adjustments
2019-03-19 19:18:22 +01:00
Koen Kanters b97f5d1afa Add Discourse link. 2019-03-19 19:15:58 +01:00
Koen Kanters 4cb0c0bbb0 Update zigbee-shepherd-converters to 8.0.7. 2019-03-18 18:21:21 +01:00
Stoinov 6d24a49062 Expand attribute output. #493 (#1277)
* Expand attribute output. #493

If attribute is actually an Object, expand it in the format `topic/key-subkey` in order to keep the same amount of topic levels for predictable parsing.
This only expands the first level of contained object. If more expansion are needed a more robust method should be implemented rather than just nesting `if`s.

* Fixing whitespace

fixing https://travis-ci.org/Koenkk/zigbee2mqtt/builds/507616980

* first time splitting line... obviously

Not sure what the proper approach is, but I guess we can put all params on new line.

* identation... really...

How is that `eslint`? any other requests?
2019-03-18 18:17:29 +01:00
Koenkk bee722c9c4 Skip re-transmitted Xiaomi messages. #1238 2019-03-18 17:59:36 +01:00
Koenkk 36bba0154d Fix groupid logging. 2019-03-18 17:32:53 +01:00
Oli a2a90bcdbd Log zigbee2mqtt version information to bridge/config (#1267)
* add coordinator_firmware to bridge/config

* Add zigbee2mqtt version and commit

* Whoops
2019-03-17 20:07:24 +01:00
Koen Kanters 1043053812 Update zigbee-shehperd. 2019-03-17 20:03:07 +01:00
Koen Kanters e6044da604 Implemented device debounce option. #1264 2019-03-16 23:41:46 +01:00
Koen Kanters a8cf925fcb Update zigbee-shepherd, zigbee-shepherd-converters and zcl-id. 2019-03-16 22:55:37 +01:00
Koen Kanters ad835e090b Add Discord channel. https://github.com/Koenkk/zigbee2mqtt.io/issues/31 2019-03-16 20:53:22 +01:00
Koen Kanters 3a96473e2b Improve device bind robustness. https://github.com/Koenkk/zigbee2mqtt/issues/176 2019-03-16 20:07:34 +01:00
Koen Kanters 661f79ce93 Whoops! Fix tests 2019-03-15 23:42:36 +01:00
Koen Kanters 7461fec28b Update zigbee-shepherd-converters to 8.0.4. 2019-03-15 23:33:24 +01:00
Koen Kanters 8b4b9bea19 Refactor property cache responsibility to state. 2019-03-15 23:18:19 +01:00
Koen Kanters fdcf2e8c3d Option to set Home Assistant discovery topic. #1019 2019-03-15 22:41:39 +01:00
Koen Kanters b39e195763 Update zigbee-shepherd. 2019-03-15 22:06:02 +01:00
Koen Kanters f2cdbeab38 Update zigbee-shepherd-converters to 8.0.3. 2019-03-15 21:58:49 +01:00
Koen Kanters f37d52b870 Discover click sensor for QBKG03LM, QBKG04LM, QBKG11LM and QBKG12LM. https://github.com/Koenkk/zigbee2mqtt/issues/723 2019-03-15 21:52:21 +01:00
Koen Kanters 969585c84e Allow to bind specific endpoint. #176 2019-03-15 21:19:42 +01:00
Koen Kanters d4d85633d2 Log groupID. #1238 2019-03-15 19:07:26 +01:00
Koen Kanters f54f3bd40f Add coordinator to zigbee2mqtt/bridge/config/devices. #1236 2019-03-14 20:30:06 +01:00
Koen Kanters 03ca8ec24d Update zigbee-shepherd-converters to 8.0.2. 2019-03-13 20:02:53 +01:00
Koen Kanters a65fbd6e2c Update zigbee-shepherd-converters to 8.0.1. 2019-03-13 19:48:31 +01:00
Koen Kanters ac28ca2841 Update to zigbee-shepherd-converters 8.0.0 2019-03-13 19:41:58 +01:00
Koen Kanters 79d11e295b Fix crash on empty advanced section. https://github.com/Koenkk/zigbee2mqtt/issues/1237 2019-03-12 21:58:45 +01:00
Koen Kanters 9f31cd86a3 Implemented MQTT group add and remove. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-03-12 21:19:04 +01:00
Koen Kanters c722b611dd Fix livolo queue push. #1241 2019-03-12 20:14:58 +01:00
Roger 3c4fa40a32 Add Securifi Peanut Smart Plug (#1230) 2019-03-11 17:55:25 +01:00
Koen Kanters d81a972f1b Allow to override Home Assistant device discovery payload. https://github.com/Koenkk/zigbee2mqtt/pull/1030 2019-03-10 21:48:40 +01:00
Koen Kanters 0f9333f8b9 Fix elapsed being a string value instead of bool. https://github.com/Koenkk/zigbee2mqtt/pull/1206 2019-03-10 21:34:20 +01:00
Koen Kanters 6e60063337 Update zigbee-shepherd and zigbee-shepherd-converters to 7.2.8. 2019-03-10 14:12:11 +01:00
Andrey 438626691e Allow to configure elapsed via MQTT (#1206)
* Allow to configure elapsed via MQTT

* Update bridgeConfig.js
2019-03-10 14:04:09 +01:00
qm3ster a978b26001 Use toStrictEqual for objects
Not sure why `jest-codemods` didn't do this.
Changed some primitives to use `toBe`.
2019-03-10 13:32:36 +01:00
qm3ster 7cec70aba8 Add @types/jest for editor completion 2019-03-10 13:32:36 +01:00
qm3ster df1825d65e Use mockReturnValue instead of mockImplementation where possible 2019-03-10 13:32:36 +01:00
qm3ster 532b3b2484 Use toHaveBeenNthCalledWith in some cases 2019-03-10 13:32:36 +01:00
qm3ster 84a5277d45 Replace sinon with jest builtins 2019-03-10 13:32:36 +01:00
qm3ster acbab01b7e Apply jest-codemods
`chai` ELIMINATED
2019-03-10 13:32:36 +01:00
qm3ster 6a4073b305 Use jest instead of mocha
Oh nice, coverage works now
2019-03-10 13:32:36 +01:00
Koen Kanters 18aee4803b Merge branch 'master' into dev 2019-03-09 21:45:24 +01:00
Koen Kanters e5ca977579 1.2.1 2019-03-09 21:40:09 +01:00
Koen Kanters 1e1e0e4ca9 Fix no console logging. #1218 2019-03-09 21:36:07 +01:00
qm3ster 3b1fae1452 Remove whitespace 2019-03-09 21:09:39 +01:00
qm3ster cf2f10394a Mock fs in settings test 2019-03-09 21:09:39 +01:00
qm3ster 9eed7e271e Extract IO from settings.js 2019-03-09 21:09:39 +01:00
qm3ster 07765093be Fix all typos of separate 2019-03-09 21:09:39 +01:00
Koen Kanters 5f19d9cc82 1.2.0 2019-03-09 21:03:16 +01:00
Koen Kanters e2ebe5e1ff Update zigbee-shepherd-converters to 7.2.7. 2019-03-09 17:04:41 +01:00
qm3ster a93838be15 codemod: object-shorthand
Also fixed `new (` and `formatter` by hand.
2019-03-09 16:30:05 +01:00
qm3ster 044e8466ed Simplify settings getters 2019-03-09 16:30:05 +01:00
qm3ster c0bdf2e3a2 Lazy load settings on first use 2019-03-09 16:30:05 +01:00
qm3ster 9321a04ecc Move resolveEntity into settings.js
Had to refer to `module.exports.`
because all of those functions get mocked in tests.
2019-03-09 16:30:05 +01:00
Koen Kanters 184eef72b0 Update zigbee-shepherd-converters to 7.2.6. 2019-03-08 17:39:15 +01:00
Mihal Malostanidis bb6c226d55 Test improvements (#1207)
* Add missing `zcl-id` dependency

* Improve devicePublish test

Now passes in both mocha and jest
Each test now waits for all publishes, such as readbacks,
and asserts their number.
Replaced `calledOnce` and such with numeric assertion,
for a more informative error message.

* Use sinon default sandbox

* Take assert out of chai

Improves clutter, but also `jest-codemods` also makes use of this.

* Replace proxyquire with simple cache delete

* Reduce shared mutable state in settings.test
2019-03-08 16:56:53 +01:00
Koen Kanters e892a54013 Update zigbee-shepherd-converters to 7.2.5. 2019-03-06 22:09:51 +01:00
Koen Kanters 2c6176ff10 Fix parse topic when topic ends with postfix. https://github.com/Koenkk/zigbee2mqtt/issues/1200 2019-03-06 21:38:49 +01:00
Koen Kanters 83b8fc9778 Add top and bottom to postfixes. https://github.com/Koenkk/zigbee-shepherd-converters/pull/319 2019-03-06 21:08:33 +01:00
Koen Kanters f0e9ebe4ed Fix readRsp spamming no converter available messages. https://github.com/Koenkk/zigbee2mqtt/issues/1064 2019-03-05 19:41:59 +01:00
Koen Kanters 8902bd1d60 Fix zcl-id dependency. https://github.com/Koenkk/zigbee2mqtt/issues/1182 2019-03-05 19:27:37 +01:00
Markus Goy 1857ac525b Added Home Assistant autodiscovery configuration (#1187) 2019-03-04 20:04:42 +01:00
Koen Kanters 6427da244f Implement attribute output. https://github.com/Koenkk/zigbee2mqtt/issues/493 2019-03-04 18:13:36 +01:00
Koen Kanters 339816c160 Update zigbee-shepherd-converters to 7.2.4 2019-03-04 17:41:33 +01:00
Koen Kanters 2a3670d3d7 Update zigbee-shepherd-converters to 7.2.3 2019-03-03 18:37:46 +01:00
Koen Kanters 889e972176 Update zigbee-shepherd-converters to 7.2.2. https://github.com/Koenkk/zigbee2mqtt/issues/1176 2019-03-02 17:27:29 +01:00
Koen Kanters e213356c40 Update zigbee-shepherd-* dependencies. 2019-03-02 17:04:21 +01:00
Andreas Brett 1cde620d70 add support for local ISO8601 timestamp format (#1171)
* add support for local ISO8601 timestamp format

added local ISO8601 timestamp format for local rather than UTC-based timestamps

ISO8601 = 2019-03-01T15:32:45.941+0000
ISO8601_Local = 2019-03-01T16:32:45.941+0100 (for TZ GMT+1)

* fixed indentation

* tabs to spaces

* comply with Travis

* comply with Travis once again

* Removed spaces to make Travis happy

* updates
2019-03-02 16:47:36 +01:00
Koen Kanters ae14fa5cd6 Update zigbee-shepherd-converters to 7.2.0. 2019-03-02 16:35:00 +01:00
Jakub 672a0cac4f Hide network_key from debug output (#1169)
* Hide network_key from debug output

There's no need to print this key.

* strings must use singlequote

* Update zigbee.js
2019-03-02 14:04:52 +01:00
Andreas Brett 4ea55fe22a fixed typo (#1173) 2019-03-01 17:15:03 +01:00
Koen Kanters 05769ce1a3 Update zigbee-shepherd. #518 #176 2019-02-28 20:31:57 +01:00
Koen Kanters 61116ec670 Fix tests. 2019-02-26 21:06:48 +01:00
Koen Kanters 709046db2a Add binary battery low sensor for HS1SA and HS3SA. https://github.com/Koenkk/zigbee2mqtt/issues/1159 2019-02-26 21:00:20 +01:00
pixel::doc bef8a682ca Create docker-compose.yml (#1156) 2019-02-26 20:55:51 +01:00
Koen Kanters 8f0794cb8f Also assume brightness on publish. https://github.com/Koenkk/zigbee2mqtt/issues/1155 2019-02-26 20:53:30 +01:00
Koen Kanters cd2fb54615 Changes to report/bind functionallity. 2019-02-26 20:46:34 +01:00
Koen Kanters 7893f9256f Refactor report to new queue mechanism. 2019-02-26 19:33:32 +01:00
Koen Kanters 09f26a104c Restore zigbee.js changes. 2019-02-26 19:33:32 +01:00
Koen Kanters 5ffae5a09a Remove unecessary device param. 2019-02-26 19:33:32 +01:00
jbn f7ceb62eec fix lint more errors 2019-02-26 19:33:32 +01:00
jbn b8f689fe6e fix lint errors 2019-02-26 19:33:32 +01:00
jbn 09e0fe8e3f setup automatic attribute change reporting 2019-02-26 19:33:32 +01:00
jbn fdf97180b0 Fix race condition when configuring devices 2019-02-26 19:33:32 +01:00
Koen Kanters 5a9aef6d3b Change to action_color. https://github.com/Koenkk/zigbee-shepherd-converters/pull/304 2019-02-26 19:29:53 +01:00
Koen Kanters 863230eaa3 Fix cover_position typo. #294 2019-02-25 17:56:47 +01:00
Koen Kanters cb0cc149a1 ZNCLDJ11LM position Home Assistant discovery. #294 2019-02-24 21:35:48 +01:00
Koen Kanters 516bd704c6 Allow devices and groups to be specified in separate file. https://github.com/Koenkk/zigbee2mqtt/issues/1148 2019-02-24 15:49:41 +01:00
Joe Lu 46e75374b6 - added AXIS Gear and Keen Home vent to homeassistant.js (#1150) 2019-02-24 13:29:46 +01:00
Koen Kanters ee167e603a Update zigbee-shepherd-converters to 7.1.12. 2019-02-23 19:30:17 +01:00
Koen Kanters 9b12933a99 Dont cache action_group. 2019-02-23 19:13:01 +01:00
Koen Kanters ea7a4b1955 Remove last_seen from state when last_seen is disabled. https://github.com/Koenkk/zigbee2mqtt/issues/1075 2019-02-23 16:22:01 +01:00
Koen Kanters 147a130628 Update zigbee-shepherd-converters to 7.1.11 2019-02-23 16:02:45 +01:00
Koen Kanters 1fda02ae7c Allow to change device specific options via MQTT. https://github.com/Koenkk/zigbee2mqtt/issues/1132 2019-02-22 20:10:00 +01:00
Koen Kanters 4a664cf230 Implement zigbee queue. #1027 2019-02-22 18:58:50 +01:00
Andreas Brett 1a0baee788 log address resolution errors through MQTT (#1145)
* log address resolution errors through MQTT

* fixed params
2019-02-22 12:49:08 +01:00
Andreas Brett 1287a596f9 fix typo (#1142) 2019-02-22 10:54:10 +01:00
Andreas Brett 1862c8b035 fixed typo (#1135)
* fixed typo

* Update deviceConfigure.js
2019-02-21 18:47:05 +01:00
Andreas Brett 8c848b8368 add device model to log (#1136)
* add device model to log

* Update deviceReceive.js
2019-02-21 18:45:22 +01:00
Koen Kanters bdfabeb3da Discover linkquality sensor for all devices. https://github.com/Koenkk/zigbee2mqtt/issues/757 2019-02-20 20:10:38 +01:00
Koen Kanters ec0ee53c7a Log zigbee publish errors to MQTT. #1123 2019-02-20 17:57:28 +01:00
Koen Kanters 14f5c4d3c9 Prepare Home Assistant discovery for group support. #764 2019-02-19 19:43:50 +01:00
Koen Kanters f3e13f16f3 Add more don’t cache properties. https://github.com/Koenkk/zigbee-shepherd-converters/pull/284 2019-02-19 19:31:58 +01:00
Koen Kanters 061285bd17 Update zigbee-shepherd. 2019-02-19 19:31:05 +01:00
Andreas Brett 25448f823e Fix typo (#1124) 2019-02-19 19:16:18 +01:00
Koen Kanters 99006895b5 Merge branch 'master' into dev 2019-02-19 19:15:09 +01:00
Koen Kanters 26bed2d998 Allow to configure last_seen via MQTT. https://github.com/Koenkk/zigbee2mqtt/issues/1075 2019-02-18 19:46:57 +01:00
Koen Kanters cc45413e2d Add settings.set api. 2019-02-18 19:46:19 +01:00
Koen Kanters ba77860489 Exit when zigbee-shepherd fails to start. https://github.com/Koenkk/zigbee2mqtt/issues/1110 2019-02-18 19:24:26 +01:00
Koen Kanters 14377c04a0 Update zigbee-shepherd. 2019-02-18 19:19:52 +01:00
Glen Takahashi 3238687f60 Add group membership command (#1056)
* Group membership

* Fix lint

* Update deviceGroupMembership.js

* Update deviceGroupMembership.js
2019-02-18 18:21:54 +01:00
Ruslan Sayfutdinov 0632f83baf Create default and system MQTT postfixes (#1114) 2019-02-18 17:57:57 +01:00
Koen Kanters 259a3417e2 Coordinator group is not needed anymore. #102 2019-02-18 17:42:50 +01:00
Koen Kanters a20ec7caa1 Update zigbee-shepherd-converters to 7.1.10. 2019-02-17 15:14:36 +01:00
Koen Kanters b08bf33ccf Soft reset via MQTT. https://github.com/Koenkk/zigbee2mqtt/issues/1099 2019-02-16 19:40:34 +01:00
Koen Kanters 577bb0d12c Replace force_update with expire_after for home assistant buttons. https://github.com/Koenkk/zigbee2mqtt/issues/959 2019-02-15 23:31:44 +01:00
JLFN 92d88b680a All in one install (#1098)
* All in one install

Need to have user Pi added

* move to folder scripts
2019-02-15 23:08:35 +01:00
JLFN 00900958ef Zigbee2Socat installer (#1097)
* Zigbee2Socat

Zigbee2Socat installer


    -a, --addr IP       Listen on this IP-address
    -p, --port PORT     Listen on this port
    -u, --uninstall     Uninstall zigbee-socatvusb.service
    -v, --verbose       Print more information
    -m, --man           Make and display manual
    -h, --help          Display this help message

* All in one installer

* Update installer.sh

* Delete installer.sh

* Rename to install

* Rename zigbee2socat_install.sh to scripts/zigbee2socat_installer.sh
2019-02-15 23:08:11 +01:00
Koen Kanters 11a6e36a82 Correctly resolve device friendlyName when lookup via ieeAddr. 2019-02-14 20:12:27 +01:00
Koen Kanters d6b9627146 Don’t return error when coordinator is already in group. https://github.com/Koenkk/zigbee2mqtt/issues/1064 2019-02-14 19:47:25 +01:00
Koen Kanters 15cad740ee Update zigbee-shepherd-converters to 7.1.9. 2019-02-14 19:45:52 +01:00
Koen Kanters ab14cca0ee Update coordinator group documentation link. 2019-02-14 19:34:29 +01:00
MoskitoHorst 87889c0688 tint Remote (#1085)
* tint Remote

Added tint remote to group devices

* Update coordinatorGroup.js

* Update homeassistant.js
2019-02-14 19:33:21 +01:00
Koen Kanters 17a6fff3ce Publish group state. #764 2019-02-14 18:13:51 +01:00
Koen Kanters f171d54e4b Refactor extension names. 2019-02-13 21:03:23 +01:00
Koen Kanters 9faeb53ddb Refactor addCoordinatorToGroup. 2019-02-13 20:43:22 +01:00
Koen Kanters 21a782d2c6 Reporting: also bind cluster to coordinator. https://github.com/Koenkk/zigbee2mqtt/issues/1064 2019-02-13 20:26:31 +01:00
Koen Kanters 88cec5dfa6 Check for valid Zigbee channel. https://github.com/Koenkk/zigbee2mqtt/issues/1077 2019-02-13 20:06:14 +01:00
Koen Kanters a62f4289a7 Log more to MQTT. #1075 2019-02-13 19:49:06 +01:00
Koen Kanters 1b5e010cd3 Cleanup docs. 2019-02-13 19:30:14 +01:00
Koen Kanters 0f053425f3 Merge branch 'master' into dev 2019-02-13 19:28:35 +01:00
Koen Kanters 04e68014da Update link to zigbee2mqtt.io. #1072 2019-02-12 21:39:37 +01:00
Koen Kanters 54dbb9732f Cleanup dependencies. 2019-02-12 21:28:39 +01:00
Koen Kanters 8703847337 Merge branch 'master' into dev 2019-02-12 21:26:37 +01:00
Koen Kanters a85c68cca0 Update link. 2019-02-12 21:19:14 +01:00
Koen Kanters 4592b00fe1 Move docs to zigbee2mqtt.io repo. #1072 2019-02-12 21:16:42 +01:00
Koen Kanters d9ddce5797 Delete CNAME 2019-02-12 19:51:41 +01:00
qosmio b3310c49ca Adding support for OSRAM Lightify BR30 RGBW to Home Assistant (#1070)
* Add support for Sengled E12-N14 (BR30) Light

* .

* Add Osram BR30 RGBW LED to HA
2019-02-12 19:33:45 +01:00
Koen Kanters 781b542f92 Update zigbee-shepherd. #937 2019-02-12 19:21:18 +01:00
Koen Kanters 43726d8bb1 Create CNAME 2019-02-12 16:01:00 +01:00
Koen Kanters 8137b6f417 Delete CNAME 2019-02-12 15:24:42 +01:00
Koen Kanters c439508129 Create CNAME 2019-02-12 15:22:26 +01:00
Koen Kanters e5233494af Update zigbee-shehperd-converters to 7.1.8. 2019-02-11 19:59:50 +01:00
Wesley Elfring a2d378cc86 Add CC2530 + CC2591 case to docs (#1068)
Add info about a 3d printed case option for the CC2530 + CC2591 combination to the documentation
2019-02-11 19:37:09 +01:00
Koen Kanters 3d151298ae Update zigbee-shepherd-converters to 7.1.7. 2019-02-10 20:35:26 +01:00
Koen Kanters 5554579683 Fix configure section documentation. #1058 2019-02-10 20:05:13 +01:00
Russell Joyce ce2455510b Fixed link (and minor text edits) in 'How to support new devices' (#1054) 2019-02-10 19:29:02 +01:00
Russell Joyce bf526f6f50 Added Home Assistant support for Innr RS 225 bulb (#1053) 2019-02-10 14:40:54 +01:00
Koen Kanters 004f4a5eb9 Update zigbee-shepherd-converters to 7.1.5. 2019-02-09 20:25:08 +01:00
Koen Kanters 059e4719c6 Log ‘Failed to ping’ on debug instead of error when device is already unavailable. #775 2019-02-09 19:50:32 +01:00
timstanley1985 a0278b7577 Allow to override Home Assistant discovery configuration. (#1030)
* Add expiry_after configuration option

* Failed attempt at moving expire_after to under a homeassistant sub-section

* Update.
2019-02-09 19:42:31 +01:00
Koen Kanters 0f89053d05 Update zigbee-shepherd-converters to 7.1.4. 2019-02-09 01:01:08 +01:00
way2many e1ff6bdac5 Add support for Hue white ambiance suspension Fair (#1048) 2019-02-09 00:37:07 +01:00
Koen Kanters 73221f50f5 Merge branch 'master' into dev 2019-02-09 00:36:04 +01:00
Koen Kanters 37405ee079 1.1.1 2019-02-09 00:33:06 +01:00
Koen Kanters 52fb19360e Revert "Set state of stateless properties to ‘idle’ after publish. #959"
This reverts commit 0826db07d0.
2019-02-09 00:29:40 +01:00
Koen Kanters e47b672bcb Revert "Fix Home Assistant automation trigger reliability by adding a small delay. #958"
This reverts commit f4bf504642.
2019-02-09 00:29:16 +01:00
Koen Kanters 63c88cba5b Revert "Fix tests."
This reverts commit b6fda868ed.
2019-02-09 00:28:59 +01:00
Koen Kanters f0d0a62471 Update zigbee-shepherd. https://github.com/Koenkk/zigbee2mqtt/issues/1001 2019-02-09 00:26:18 +01:00
Bruceforce a497cf0457 Added information on how to flash firmware without re-pairing (#1045)
* Added information on how to flash firmware without re-pairing

* Fixed typos and added `permit_join` info

* Update index.md
2019-02-08 18:29:07 +01:00
pfischbach ed5675960e Update homeassistant.js
Add support for Bosch Motion Sensor RADON TriTech ZB
2019-02-07 19:46:16 +01:00
Koen Kanters ba5bf3c209 Remove payload.command_topic_prefix from payload. #1046 2019-02-07 19:33:00 +01:00
Glen Takahashi e40a3ba3bf Add docs on how to use HUSBZB to sniff (#1036)
* Add docs on how to use HUSBZB to sniff

* Update index.md
2019-02-06 21:26:17 +01:00
Glen Takahashi ecf1b9ded4 Show how to also get network key without re-pairing device (#1035)
* Show how to also get network key without re-pairing device

* Update how_to_sniff_zigbee_traffic.md
2019-02-06 21:21:58 +01:00
orrpan 314ab1b705 Venv documentation (#1033)
* Added guide for virtual environment

* grammer

* Update virtual_environment.md

* Update virtual_environment.md

* Update index.md
2019-02-06 21:12:23 +01:00
Koen Kanters b6fda868ed Fix tests. 2019-02-06 20:52:44 +01:00
Koen Kanters 443a14e40a Add coordinator to group 99 by default. https://github.com/Koenkk/zigbee2mqtt/issues/997 2019-02-06 20:33:58 +01:00
Koen Kanters c68790f2c4 Fix layout. 2019-02-06 19:51:27 +01:00
JLFN c9d00875c0 cc2530 with esp8266 (#1025)
* cc2530 with esp8266

Running cc2530 on an esp8266 with Espeasy with ser2net and then mounting on zigbee2mqtt server  with socat.

* Update esp8266_cc2530.md

* Update esp8266_cc2530.md

* Update esp8266_cc2530.md

* Update esp8266_cc2530.md

* Rename esp8266_cc2530.md to how_to_esp8266_with_cc2530.md

* Rename how_to_esp8266_with_cc2530.md to how_tos_esp8266_with_cc2530.md

* Update
2019-02-06 19:50:47 +01:00
Koen Kanters 0120284356 Update CC2531 flashing instructions. 2019-02-06 19:18:46 +01:00
Koen Kanters aa9e81d64d Fix integrity checksum failed #1026 2019-02-06 08:12:42 +01:00
Koen Kanters f4bf504642 Fix Home Assistant automation trigger reliability by adding a small delay. #959 2019-02-05 18:53:51 +01:00
Koen Kanters 5fc7760db6 Update zigbee-shepherd-converters to 7.1.3. 2019-02-05 18:26:17 +01:00
Koen Kanters ffa4fe35d9 Update availability_timeout documentation. #1020 2019-02-05 18:05:15 +01:00
Koen Kanters 778720b1b5 Fix availability_timeout typo. 2019-02-05 17:43:22 +01:00
Koen Kanters 0826db07d0 Set state of stateless properties to ‘idle’ after publish. #959 2019-02-05 17:41:47 +01:00
Koen Kanters 7642b295e1 Add option to enable livolo code. #592 2019-02-04 18:39:45 +01:00
Koen Kanters c9c599b60b Refactor publishDeviceState to publishEntityState (for future group support). 2019-02-04 18:36:49 +01:00
ptvo c0a87ff520 Improved Livolo extension (#1016)
* Improved Livolo extension (pause polling after 3 unsuccessful attempts)

* Added: queuing of all Zigbee messages

* Fixed problem with .startsWith
2019-02-04 16:55:44 +01:00
Glen Takahashi 4fbb6667ef super minor group typo (#1013) 2019-02-04 16:53:15 +01:00
Koen Kanters 1357b06185 Fix CC2530 link. 2019-02-03 18:42:30 +01:00
Koen Kanters 6d16875a37 Update zigbee-shepherd-converters to 7.1.2 2019-02-03 18:16:01 +01:00
Roman Zhukov f7f9a1699b Fix Xiaomi Gas Leak Sensor Homeassistant mqtt discovery config (#1009)
Remove battery sensor
2019-02-03 18:07:17 +01:00
Koen Kanters 46b96640f3 How to improve network range. 2019-02-03 18:06:30 +01:00
Koen Kanters 51c91e685e Check if device has manufName. #1005 2019-02-03 17:11:41 +01:00
Koen Kanters 8a6582739f Add missing SPZB0001. 2019-02-03 15:04:43 +01:00
Koen Kanters c569840d6c Update zigbee-shepherd-converters to 7.1.1. 2019-02-03 14:49:44 +01:00
Koen Kanters 2302240897 Fix linting. 2019-02-03 14:39:35 +01:00
Giel 60349171d2 Always read after write for devices that require it. (#1004)
* Always read after write for devices that require it.

Devices with readAfterWriteTime set, even if it's 0, will get their
state read after write because those devices don't automatically
report it themselves.

Devices that are capable of reporting but don't do it by default
should have `report: true` set in the device-specific config and
we won't read after write.

* Fix tests
2019-02-03 14:39:00 +01:00
Koen Kanters 35f0def29f Comment out Livolo switch code. #592 #1005 2019-02-03 14:25:01 +01:00
Koen Kanters a512ca2bd5 Add ext_pan_id to docs. 2019-02-02 20:32:13 +01:00
Koen Kanters 96dcb93859 Update zigbee-shepherd-converters to 7.1.0. 2019-02-02 20:31:55 +01:00
ptvo 37d516d770 Some improvements (extPanId, .configure, Livolo) (#982)
* Added the new ext_pan_id options (required update of zigbee-shepherd)
Improved code for configure
Added the new extension for Livolo.

* Formatting corrections

* Update controller.js

* Updated Livolo extension

* Improvements in the extensions for Livolo.

* Fixed conflict.

* Add default ext_pan_id.

* Remove duplicate extension.

* Update deviceConfigure.

* Update comment.

* Updates.
2019-02-02 20:09:20 +01:00
Koen Kanters 6c59bff223 Add re-pair warning to alternative flashing methods. #990 2019-02-02 18:20:34 +01:00
Koen Kanters f16616d3a6 Fix alternative flashing methods firmware link. #990 2019-02-02 18:19:26 +01:00
Koen Kanters 959e7458a4 Fix availability tests. 2019-02-02 18:15:03 +01:00
Koen Kanters 5828ee9989 Implement availability blacklist. #775 2019-02-02 18:10:25 +01:00
Koen Kanters 054892641b Check availability for new devices. #775 2019-02-02 17:58:38 +01:00
Koen Kanters c0326ec2bb Add reflashing stick warning. #990 2019-02-02 15:22:59 +01:00
Koen Kanters 189c0f360e Guard callbacks. 2019-02-02 02:14:31 +01:00
Koen Kanters dc70840c8a Use defaultCfg. 2019-02-02 02:00:20 +01:00
Koen Kanters 0b3c8df810 Fix linting. 2019-02-02 01:52:21 +01:00
Koen Kanters 4405e71610 Retrieve device state after device offline -> online. #775 2019-02-02 01:47:53 +01:00
Koen Kanters fd4a88acd0 Refactor zigbee publish queue to zigbee.js 2019-02-02 01:41:05 +01:00
Koen Kanters 3963a8d26f Refactor ping queue to zigbee.js. 2019-02-02 00:57:51 +01:00
Koen Kanters 720addd906 Update zigbee-shepherd-converters to 7.0.30. 2019-02-02 00:53:18 +01:00
Koen Kanters 4558bffd41 Don’t setup reporting for binding, use report functionallity. #782 2019-02-02 00:37:42 +01:00
Koen Kanters 89c66094c6 Setup reporting for X/Y color. #966 2019-02-02 00:35:45 +01:00
Koen Kanters ae08deb2fd Refactor and remove unnecessary bind. #966 2019-02-02 00:31:30 +01:00
Koen Kanters ff02e54f25 1.1.1 2019-02-01 23:36:20 +01:00
Koen Kanters 963064dc22 Fix Cannot read property 'close' of undefined. #937 https://github.com/danielwelch/hassio-zigbee2mqtt/issues/97 2019-02-01 23:33:59 +01:00
Koen Kanters 0d9741e511 Update zigbee-shepherd-converters to 7.0.28. 2019-02-01 19:58:12 +01:00
Koen Kanters 7d9c21ba24 Fix reporting. 2019-02-01 19:43:22 +01:00
Koen Kanters b8744ce890 Add reporting feature. #966 2019-02-01 19:04:49 +01:00
Koen Kanters dd8ee60535 Drop node 8 and 9 support. 2019-02-01 17:14:56 +01:00
Koen Kanters d5c6e39e7d Refactor device reconfigure when device comes online and mark online. #966 #775 2019-01-31 21:42:53 +01:00
jbn 588124b971 Add announcement handler to deviceAvailability extension 2019-01-31 21:33:37 +01:00
clockbrain a7eea5ecad Add reparenting statement to end devices (#983) 2019-01-31 20:24:04 +01:00
Koen Kanters e13bdf1a31 Add FAQ to index 2019-01-31 20:20:13 +01:00
Koen Kanters 30823a5a0c Update zigbee-shepherd. 2019-01-31 19:22:14 +01:00
Bruceforce 5bee8ccafe Update how_to_secure_network.md (#963)
* Update how_to_secure_network.md

Make clear that the key consists of 16 hex values and gave an example how to generate a key with command line tools.

* Clarified info about network key notation

* clarified network key notation (dec or hex)

* Update how_to_secure_network.md

Make clear that the key consists of 16 hex values and gave an example how to generate a key with command line tools.

* Remove trailing comma. #916
2019-01-31 19:09:49 +01:00
Bruceforce 8ffd7653ac [devicePublish.js] Increase timeout (#974)
This should avoid a non-function state of the app when too many
requests arrive at a specific time frame (e. g. turning a lot of lights
out in the same time).
See discussion in #362
2019-01-30 18:08:15 +01:00
Koen Kanters 99a29293dd Mock homeassistant zigbee2mqtt version. 2019-01-30 18:07:44 +01:00
Koen Kanters 9d61184013 Fix table layout of How to create a CC2530 router 2019-01-30 17:46:03 +01:00
Andreas Brett 4f300aa72d added ZBOSS for Windows users (#968) 2019-01-30 17:44:41 +01:00
Koen Kanters cf7e0d1aa9 1.1.0 2019-01-29 21:45:36 +01:00
Koen Kanters 17874cfdc1 Make availability_timeout non experimental. #775 2019-01-29 20:17:56 +01:00
Koen Kanters e12a371093 Fix before_install tag 2019-01-29 20:13:05 +01:00
Koen Kanters 7e74b8c549 Update zigbee-shepherd-converters to 7.0.27. 2019-01-29 20:11:06 +01:00
Koen Kanters cdf64823ef Merge branch 'master' into dev
# Conflicts:
#	docs/configuration/configuration.md
#	docs/getting_started/pairing_devices.md
#	docs/index.md
#	docs/information/mqtt_topics_and_message_structure.md
2019-01-29 19:57:02 +01:00
Koen Kanters 5d195fc299 Update link to group support firmware. 2019-01-29 19:55:24 +01:00
Koen Kanters fd932926e7 Update zigbee-shepherd-converters to 7.0.26. 2019-01-28 22:22:20 +01:00
zipbee 38159a536c Add support for Gledopto devices with multiple lights in one controller (#956) 2019-01-28 22:11:55 +01:00
MarkAdamson 7e2ca5a97e Added support for Salus SP600 Smart Plug (#954) 2019-01-28 22:10:44 +01:00
Robin Meis b95dcd0f9b Adding missing T for MQTT (#957) 2019-01-28 21:19:38 +01:00
Mikkel Kroman 73f0f8fe43 Fix Docker images having the wrong platform (#952)
* travis: Update Docker and add experimental support

* travis: Build images with experimental --platform

* Update docker.sh
2019-01-27 20:32:52 +01:00
Koen Kanters 16f3e884fc Update zigbee-shepherd-converters to 7.0.25. 2019-01-27 00:45:31 +01:00
Sebastian Raff c5e6b9dd13 add hue/saturation color (#948)
* add hue/saturation color

https://github.com/Koenkk/zigbee-shepherd-converters/pull/239

* Update mqtt_topics_and_message_structure.md
2019-01-27 00:32:15 +01:00
Koen Kanters cae5d1a004 Implement queue for Xiaomi router polling. https://github.com/Koenkk/zigbee2mqtt/issues/927 2019-01-26 21:19:20 +01:00
krikk 85375ffbae How to connect a CC2530 coordinator using a USB to serial adapter (#940)
* mini howto connect cc2530 an needing configuration

hope this helps

* missing link

* Update how_to_connect_cc2530_via_usb_to_serial_adapter.md

* update

* Update cc_sniffer_devices.md
2019-01-26 21:11:42 +01:00
Boris Hajduk 43fc66c436 Update flashing_the_cc2531.md (#926) 2019-01-24 17:46:30 +01:00
nldroid 5718cd0157 Added Why is this needed for E1524 remote (#922)
Added some explanation for the E1524 remote procedure.
2019-01-23 18:05:51 +01:00
Koen Kanters dd6e34a152 Fix tests. 2019-01-22 20:44:40 +01:00
Koen Kanters 1ddf60bef0 Fix some of the clogging issues. #914 #842 2019-01-22 20:31:50 +01:00
Koen Kanters 6ff3954b71 Update zigbee-shepherd-converters to 7.0.23. 2019-01-22 20:22:16 +01:00
Simon Rasmussen 6dd2926a1d Refactored light specific transtime to generic readAfterWriteTime value (#910)
* Refactored light specific transtime value to generic readAfterWriteTime
value

* Added line break
2019-01-22 20:08:57 +01:00
clockbrain 5970e498f3 Add styling to graphviz devices and links (#894)
* Add styling to graphviz devices and links

* Fix eslint error and gvrender_set_style warning
2019-01-22 20:07:38 +01:00
Simon Rasmussen dcd81cbbf2 Updated docs to reflect thermostat enums (#912) 2019-01-22 20:06:10 +01:00
Laurent 9e5fb04314 Elapsed time (#909)
* new elapsed attribute giving the elapsed time since the previous msg

* configurable elapsed attribute

* Update deviceReceive.js

* Update deviceReceive.js
2019-01-22 20:02:34 +01:00
Koen Kanters d324a91a5f Change unit of sensor_linkquality to -. #883 2019-01-21 18:51:53 +01:00
Koen Kanters fcfeac81e4 Fix state when controlling brightness via brightness_percent. https://github.com/Koenkk/zigbee2mqtt/issues/902 2019-01-21 18:02:50 +01:00
Fredrik Lindqvist c44816efee Add simple step for securing Zigbee network (#899)
* Add simple step for securing zigbee network

* Update configuration.md

* Update how_to_secure_network.md

* Update index.md
2019-01-21 17:51:21 +01:00
Koen Kanters 86f19affa1 Ensure that state and brightness are executed before other commands. #788 2019-01-21 17:38:06 +01:00
Koen Kanters e21bfc1567 Fix tests. 2019-01-19 14:10:59 +01:00
Koen Kanters 329c290505 Update docs. 2019-01-19 14:06:26 +01:00
Hmmbob b624a8ccad Update integrating-with-homeassistant.js (#890) 2019-01-19 14:05:15 +01:00
Koen Kanters a43cd5a864 Ignore messages from coordinator. https://github.com/Koenkk/zigbee2mqtt/issues/801 2019-01-18 22:23:47 +01:00
Koen Kanters 5f6b37bf83 Support mesh networks in grapvhiz networkmap. https://github.com/Koenkk/zigbee2mqtt/issues/652 2019-01-18 22:11:01 +01:00
Koen Kanters 653dfc7b6f Update zigbee-shepherd-converters to 7.0.22. https://github.com/Koenkk/zigbee2mqtt/issues/887 2019-01-18 22:00:33 +01:00
Koen Kanters aa87443c95 Add unit_of_measurment to linkquality sensor. https://github.com/Koenkk/zigbee2mqtt/issues/883 2019-01-18 21:41:41 +01:00
Koen Kanters f5a5668359 Update zigbee-shepherd-converters to 7.0.21. 2019-01-18 20:45:24 +01:00
pnewnam 5f2e93f64d Add Device Map for Sengled downlight E1ACA4ABE38A (#881)
* Add Device Map for Sengled downlight E1ACA4ABE38A

Add mapping for Sengled recessed downlight E1A-AC2

* Add image for Sengled downlight E1A-AC2

* Add Sengled model E1A-AC2

* Add Sengled model E1A-AC2 downlight

* Update supported_devices.md
2019-01-18 20:37:29 +01:00
Laurent 7cd30a3a05 configurable last_seen (#874)
* configurable last_seen

* Refactor last_seen.
2019-01-18 20:31:55 +01:00
Ivan Salazar 34a3e3c00b add Sengled E11-G13 bulbs to deviceAvailability.js (#860)
* add Sengled E11-G13 bulbs to deviceAvailability.js

* Update deviceAvailability.js

* Refactor and add tests

* Fix linting issue
2019-01-16 20:41:41 +01:00
Koen Kanters 28e32884d9 Update zigbee-shepherd-converters to 7.0.20 2019-01-15 21:19:07 +01:00
Timo Matthias dda2e064b2 Fix Typo (#863)
* Update coordinatorGroup.js

Fix Typo

* Update deviceAvailability.js

Fix Typo
2019-01-15 17:46:53 +01:00
Koenkk 9605e724e1 Update zigbee-shepherd-converters to 7.0.19 2019-01-14 18:19:59 +01:00
Koenkk 6912f8108d Refactor json_attributes to json_attributes_topic. https://github.com/Koenkk/zigbee2mqtt/issues/840 2019-01-14 18:04:33 +01:00
Koenkk 3c0e784afb Update zigbee-shepherd-converters to 7.0.18. 2019-01-14 17:38:49 +01:00
Koen Kanters be50d650a4 Update-zigbee-shepherd-converters to 7.0.16 2019-01-13 19:12:13 +01:00
Chrischi- a5057ac101 added hilips Hue power-on behavior (#851)
* added hilips Hue power-on behavior

i also removed json syntax highlighting where comments were added. They generate a syntax error (red).
JSON doesn't support comments.

* Update mqtt_topics_and_message_structure.md
2019-01-13 18:21:22 +01:00
Sander 72a74d7dc1 Add device support for iCasa Zigbee 3.0 Dimmer (#846)
* Add device support for iCasa Zigbee 3.0 Dimmer

* Update homeassistant.js
2019-01-13 17:28:56 +01:00
Koen Kanters dccdc5aafa Publish one MQTT message when a zigbee message is converted twice. #827 2019-01-11 22:38:16 +01:00
Koen Kanters 6dd60c09bf Fix tests. 2019-01-10 18:29:13 +01:00
Koen Kanters 4ec905efca Update zigbee-shepherd-converters to 7.0.14. 2019-01-10 18:23:22 +01:00
Koen Kanters f62eabcb6d Update zigbee-shepherd-converters to 7.0.13 2019-01-10 17:52:58 +01:00
mkventure fd2cf41f0f Update homeassistant.js for HGZB-01A & 464800 (#831)
- Add Nue HGZB-01A ZigBee Smart Light Controller to enable autodiscovery. (ref: PR#203 on zigbee-shepherd-converters,  https://github.com/Koenkk/zigbee-shepherd-converters/pull/203)
- Add Hue 464800 Hue white ambiance BR30 flood light
2019-01-09 20:57:14 +01:00
Koen Kanters 755d101738 Fix crash when there are no endpoints. #819 2019-01-09 20:49:22 +01:00
Koen Kanters 6fdd58be8a Update zigbee-shepherd-converters to 7.0.12. 2019-01-08 22:07:13 +01:00
Koen Kanters 26083a62d9 Update zigbee-shepherd-converters to 7.0.11 2019-01-08 19:38:56 +01:00
Koen Kanters 30b35e7272 Prevent Message without device! messages when pairing devices. 2019-01-08 19:22:09 +01:00
Koenkk f6c01a02c9 Home Assistant: set precision in value_template. #787 2019-01-08 19:00:47 +01:00
Koenkk 35b9e6204d Implement banning devices. #816 2019-01-08 19:00:02 +01:00
boojew 84f9d09b3f Rebased and added D1531 and D1532 bulbs (#829) 2019-01-08 18:46:38 +01:00
sebastianheierhoff f260bf974b Experimental ecozy support (WIP) - Documentation (#784)
* Added ecozy Smart Thermostat documentation

* Added initial documentation for ecozy and fixed Typo

* Fixing doc issues

* Fixing doc issues

* Update mqtt_topics_and_message_structure.md

* Finalizing documentation for ecozy and Bitron thermostats

* Update mqtt_topics_and_message_structure.md

* Update mqtt_topics_and_message_structure.md
2019-01-08 18:45:35 +01:00
Koen Kanters a2ea9c548f Improve logging. 2019-01-07 18:18:14 +01:00
Koen Kanters 932a66a5c4 Home Assistant: create separate sensor for battery. #787 2019-01-06 15:42:25 +01:00
Koen Kanters 3d0541a32d Add ‘%’ unit_of_measurement for Home Assistant battery sensor. #787 2019-01-06 15:35:30 +01:00
Koen Kanters 3bb1f0f10b Update zigbee-shepherd-converters to 7.0.10. 2019-01-06 15:31:08 +01:00
MarkAdamson 85b042ac25 Add support for Hive HALIGHTDIMWWB22 (Bayonet mount) (#800) 2019-01-06 14:37:38 +01:00
davidedmundson f1fe1edb49 Add 3321-S to home assistant (#797) 2019-01-05 20:56:30 +01:00
Frank 70d177485d added support for IKEA SURTE light door 38x64 (#804)
* added support for IKEA SURTE light door 38x64

* added ikea l1531 to documentation

* Revert "added ikea l1531 to documentation"

This reverts commit ee16a3d713.
2019-01-05 16:11:44 +01:00
allofmex fd44537984 Docu added for occupancy_timeout on SML001 (#796) 2019-01-03 14:32:34 +01:00
Koen Kanters dc20816043 Add configuration for CC2530 devices. #721 2019-01-02 21:41:53 +01:00
qosmio c6d09df01a Add support for Sengled E12-N14 (BR30) Light (#793) 2019-01-01 23:42:26 +01:00
Koen Kanters 74cdde23b9 Prevent battery devices to be checked for availability. https://github.com/Koenkk/zigbee2mqtt/issues/775 2019-01-01 22:15:05 +01:00
Koen Kanters 57aefe477d Update zigbee-shepherd-converters to 7.0.9. 2019-01-01 22:03:39 +01:00
netztrip d5a3ce3871 Add support for round Hue Aurelle LTC016 (#789) 2019-01-01 13:28:50 +01:00
Koen Kanters 92de1ca942 Implement binding feature. #765 #782 (#783)
* Start on bind implementation. https://github.com/Koenkk/zigbee2mqtt/issues/765

* Finish binding implementation.
2018-12-30 22:42:55 +01:00
Koen Kanters 6f477c2923 Add hex color to documentation. https://github.com/Koenkk/zigbee-shepherd-converters/pull/180 2018-12-30 20:15:07 +01:00
Koen Kanters 5453c082c4 Fix typo availablility -> availability. #777 #775 2018-12-30 20:08:31 +01:00
Koen Kanters 07fbc1b9a3 Add how to create a CC2530 router. #465 2018-12-30 17:26:00 +01:00
Gergely Markics afeed4f372 Add device availability functionality for HASS based on router devices ping and attribute reporting also available on battery-powered devices (#761)
* Discovery on HASS restart and last_message attribute added

- On restarting Home Assistant, resending device discovery information
- Add timestamp on receiving message from Zigbee

* Add option: add_timestamp in settings

* typo

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js

* Update controller.js

* Update zigbee.js

* Add files via upload

* Update zigbee.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update homeassistant.js

* Update deviceAvailabilityHandler.js

* Update deviceAvailabilityHandler.js

* Update homeassistant.js

* Fix checkonline callback.

* Refactor.

* Refactor.
2018-12-29 19:55:59 +01:00
Koen Kanters 2a197a4ba8 Add tutorial on how to sniff zigbee traffic. #716 2018-12-28 14:02:03 +01:00
Koen Kanters 5e4e6d81de Add FAQ. 2018-12-27 23:26:53 +01:00
Koen Kanters faede151f3 Update zigbee-shepherd-converters to 7.0.7. #142 2018-12-27 22:51:16 +01:00
Koen Kanters ea4aaf2cfa Fix groups docs (groups -> group). https://github.com/Koenkk/zigbee2mqtt/issues/764 2018-12-27 22:39:41 +01:00
Koen Kanters ac94b95bba Update zigbee-shepherd-converters to 7.0.6. 2018-12-27 22:23:57 +01:00
Koen Kanters 708c497614 Update zigbee-shepherd. 2018-12-27 22:01:24 +01:00
DJTerentjev bd8aaea767 Add Gledopto GL-S-007Z to supported devices (#756)
* Upload GL-S-007Z image

* Add GL-S-007Z to supported devices

* Change GL-S-007Z image

* Update supported_devices.md

* Add "how to" for modelID 'undefined'

* Update how_to_support_new_devices.md

* Update how_to_support_new_devices.md

* Resize image

* Resize GL-S-007Z image

* modelID is 'undefined'

* Update supported_devices.md

* Update how_to_support_new_devices.md

* Update pairing_devices.md

* Update pairing_devices.md
2018-12-27 21:30:31 +01:00
Evildime ac4ca88b8a Add support for Xiaomi Aqara Curtain Motor (ZNCLDJ11LM) (#758)
* Add support for Xiaomi Aqara Curtain Motor (ZNCLDJ11LM)

* Update mqtt_topics_and_message_structure.md
2018-12-27 21:10:31 +01:00
Koen Kanters 8651fd7162 Merge branch 'master' into dev 2018-12-27 21:08:30 +01:00
Koen Kanters 03ff4e6e5a Finish groups documentation. #15 2018-12-27 19:37:39 +01:00
Koen Kanters 3bc2ec8c79 Simplify groups api. 2018-12-27 18:43:34 +01:00
Koen Kanters c4804e574e Fix tests. 2018-12-27 18:21:48 +01:00
Gergely Markics 5d3461c4c6 Add the timestamp of last received zigbee message visible in HASS (#739)
* Add timestamp on receiving message from Zigbee

Add last_message to the payload

* Discovery on HASS restart and last_message attribute added

- On restarting Home Assistant, resending device discovery information
- Add timestamp on receiving message from Zigbee

* Add option: add_timestamp in settings

* Add option: add_timestamp in settings

* Add option: add_timestamp in settings

* typo

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update homeassistant.js

* Update settings.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update deviceReceive.js

* Fix tests

* Fix lint

* Fix lint
2018-12-26 17:33:39 +01:00
Koen Kanters 9380bbcadf Update README.md 2018-12-26 12:54:50 +01:00
Koen Kanters 3a0fe60b22 Update README.md 2018-12-26 12:44:45 +01:00
Der-Jan a1eea76dd4 Added OSRAM MR16 (#748) 2018-12-24 19:08:11 +01:00
Koen Kanters 69e805c882 Allow to configure network_key. https://github.com/Koenkk/zigbee2mqtt/issues/685 2018-12-24 16:29:06 +01:00
Koen Kanters 0fe3a9b45c Improve group support. #15 2018-12-24 00:39:58 +01:00
Koen Kanters ecf64c8058 Fix typo in logging. 2018-12-22 00:15:33 +01:00
Koen Kanters d3f705162d Group support #15 (#745)
* Start on group support. #15

* Implement publishing to zigbee groups. https://github.com/Koenkk/zigbee2mqtt/issues/15

* Complete first version of group support.

* Fix tests.
2018-12-22 00:07:53 +01:00
Koenkk bd8282a41a Update zigbee-shepherd-converters to 7.0.4. 2018-12-20 21:49:15 +01:00
Koenkk 82e87d563e Add semver dependency. https://github.com/Koenkk/zigbee2mqtt/issues/726 2018-12-19 17:36:06 +01:00
Koenkk d6c2b536ee Introduce device_options. https://github.com/Koenkk/zigbee2mqtt/issues/708 2018-12-19 17:33:02 +01:00
Koen Kanters 919178840f Merge branch 'master' into dev 2018-12-17 21:30:14 +01:00
Koen Kanters 84593a55ee 1.0.1 2018-12-17 21:28:17 +01:00
Koen Kanters 1b8154bac1 Fix crash when transition is used. #712 2018-12-17 21:27:13 +01:00
Koen Kanters 8a133de1d1 Fixed alternative_flashing_methods.md. #718 2018-12-17 19:54:58 +01:00
Koen Kanters 75dddf462e Update zigbee-shepherd-converters to 7.0.3. https://github.com/Koenkk/zigbee2mqtt/issues/708 2018-12-15 22:02:23 +01:00
Koen Kanters 91bbb0d4a8 1.0.0 2018-12-15 19:41:04 +01:00
Koen Kanters d25d093a1a Fix home assistant docs. 2018-12-15 19:38:29 +01:00
Koen Kanters 0bf91fd300 Sync with wiki. 2018-12-15 14:07:33 +01:00
Koen Kanters bf285681b4 Update stale.yml 2018-12-15 14:07:09 +01:00
Koen Kanters cf9a5b7553 Update zigbee-shepherd-converters to 7.0.2. 2018-12-14 22:08:01 +01:00
Koen Kanters c2a0a6b2d1 Require at least Home Assistant 0.84. https://github.com/Koenkk/zigbee2mqtt/pull/689 2018-12-14 21:50:48 +01:00
Koen Kanters eaff35421f Add logo to documentation. 2018-12-14 19:43:23 +01:00
Koen Kanters ec20bfdd15 Cleanup references to wiki. 2018-12-14 19:37:57 +01:00
Koen Kanters 1f2d3ec850 Update README.md with new logo! 2018-12-14 19:30:03 +01:00
Koen Kanters d9b418cdde Cleanup duplicate device images. 2018-12-14 19:29:43 +01:00
Koen Kanters 56ea61be3e Fix docs tests. 2018-12-13 21:40:47 +01:00
cbrherms b59afbd10d Change mqtt lights to new schema attribute (#689)
* Change mqtt lights to new schema attribute

* Update docs
2018-12-13 21:18:13 +01:00
EmmanuelLM 21fc5f0275 Update homeassistant.js (#694)
Add support for Innr B22 RGBW (BY 185 C)
2018-12-13 21:13:18 +01:00
Koen Kanters 9d6f6186b0 Merge branch 'master' into dev 2018-12-13 20:57:37 +01:00
Koen Kanters 590a897e9b Move docs from wiki to github pages. 2018-12-13 20:54:14 +01:00
Koen Kanters 753e8c3da7 Implement Home Assistant device registry. #646 2018-12-07 23:17:29 +01:00
Koen Kanters ef57083ae9 Always set name to friendly_name + object_id. #668 2018-12-07 23:13:20 +01:00
Koen Kanters 1fa13f3f96 Always set unique_id. https://github.com/Koenkk/zigbee2mqtt/pull/419 #668 #646 2018-12-07 23:09:56 +01:00
Adán SDPC 0fb84294f0 Stop caching forgotten and keyerror properties (#667)
* feat(device_receive): stop caching `forgotten` and `keyerror` properties

After this change, the `forgotten` and `keyerror` properties as emitted
by the Xiaomi Vima Smart Lock will stop being cached. Previously they
were mostly useless, because after they were set to `true`, they were
never being unset or set back to `false` upon a successful unlock.

Close #666

* chore(device_receive): order uncached properties lexicographically

As the list of uncached properties grows over time, it could be
useful to order them lexicographically. This will make life easier
to any developer looking for a particular property in the list, and
in overall makes things look tidier.
2018-12-07 17:51:34 +01:00
Koen Kanters 828df38e09 Fix failing docgen test. 2018-12-06 21:28:23 +01:00
Koen Kanters a13bd85ef3 Update zigbee-shepherd-converters to 7.0.1 2018-12-06 21:27:41 +01:00
Koen Kanters 65526e7f68 Revert "Experimental support for home assistant device registry. https://github.com/Koenkk/zigbee2mqtt/issues/646"
This reverts commit 7ea1fc66c2.
2018-12-06 21:27:41 +01:00
johnnyletrois 81d04d3dae Support Iris 3326-L occupancy/temperature sensor (#651)
* Support Iris 3326-L occupancy/temperature sensor

* Support for Iris contact sensor 3320-L
2018-12-06 21:27:41 +01:00
Koen Kanters 16c222d3b3 Support iAS cluster. (#654)
* Implement zapp-cie. https://github.com/Koenkk/zigbee2mqtt/issues/507

* Cleanup cie app. https://github.com/Koenkk/zigbee2mqtt/issues/507

* Update package.json

* Update zigbee.js
2018-12-06 21:27:41 +01:00
Koen Kanters 0e61618935 Experimental support for home assistant device registry. https://github.com/Koenkk/zigbee2mqtt/issues/646 2018-12-06 21:27:41 +01:00
Koen Kanters bede1032e6 Refresh state after transition. https://github.com/Koenkk/zigbee-shepherd-converters/issues/155 2018-12-06 21:27:41 +01:00
Koen Kanters 0786f22ce6 Prepare for github pages. 2018-12-06 21:27:41 +01:00
Koen Kanters c9c4fad7df Fix bridge/config topic. https://github.com/Koenkk/zigbee2mqtt/issues/626 2018-12-06 21:27:41 +01:00
Koen Kanters a52d3ea073 Publish bridge config. https://github.com/Koenkk/zigbee2mqtt/issues/626 2018-12-06 21:27:41 +01:00
Koen Kanters dcc410f6c5 Update zigbee-shepherd-converters to 6.0.7. 2018-12-06 21:27:41 +01:00
Dennis van den Bos c7743e6734 added Climax PSS-23ZBS power plug (#644) 2018-12-06 21:27:41 +01:00
Koenkk cc56141c39 Docker unlock nodejs and npm version. 2018-12-06 21:27:41 +01:00
Koenkk 60c2593669 Skip state when brightness is also published (reduces amount of useless zigbee commands). 2018-12-06 21:27:41 +01:00
Koenkk db945c90be Update zigbee-shepherd-converters to 6.0.6. https://github.com/Koenkk/zigbee2mqtt/issues/627 2018-12-06 21:27:41 +01:00
Koenkk 9df1065634 Add test with brightness as number. 2018-12-06 21:27:41 +01:00
Koenkk 65f23171e6 Update zigbee-shepherd-converters to 6.0.4 2018-12-06 21:27:41 +01:00
Koenkk 920d1c91c7 Update zigbee-shepherd-converters to 6.0.1 2018-12-06 21:27:41 +01:00
Koenkk 698b40554e Improve tests. 2018-12-06 21:27:41 +01:00
Koenkk cb9beaa2ad Fix getDeviceInfoForMqtt crash. https://github.com/Koenkk/zigbee2mqtt/issues/632 2018-12-06 21:27:41 +01:00
Koenkk d652856e90 Update zigbee-shepherd-converters 6.0.0. https://github.com/Koenkk/zigbee2mqtt/issues/608 2018-12-06 21:27:41 +01:00
Koenkk 7d09d065c5 Update zigbee-shepherd-converters to 5.0.3. https://github.com/Koenkk/zigbee2mqtt/issues/627 2018-12-06 21:27:41 +01:00
Koenkk 352fa2db50 More tests. 2018-12-06 21:27:41 +01:00
Koenkk 349ebad659 Move docs to repo 2018-12-06 21:27:41 +01:00
Koenkk 8fefa16fbc Prepare for github pages. 2018-12-06 21:27:41 +01:00
Koenkk 99b330e85e Lint 2018-12-06 21:27:41 +01:00
Koenkk 3f49e2e596 Don’t use unsupported json_attributes binary_sensor attribute. https://github.com/Koenkk/zigbee2mqtt/issues/605 2018-12-06 21:27:41 +01:00
Koenkk dcb75b19d3 Default postfix to empty string. https://github.com/Koenkk/zigbee2mqtt/issues/593 2018-12-06 21:27:41 +01:00
Koenkk c213a96133 Add missing device images. 2018-12-06 21:27:41 +01:00
Koenkk 78984a65ab Add devices images to repository. 2018-12-06 21:27:41 +01:00
Koenkk 6c059c3898 Update zigbee-shepherd-converters (remove onAfIncomingMsg code). https://github.com/Koenkk/zigbee2mqtt/issues/553 2018-12-06 21:27:41 +01:00
Koenkk ac6eb19aff Fix node version requirement. https://github.com/Koenkk/zigbee2mqtt/issues/596 2018-12-06 21:27:41 +01:00
Koenkk 6df4e39f18 Refactor! 2018-12-06 21:27:36 +01:00
Koenkk b0d3c2f964 0.2.0 2018-11-14 19:18:31 +01:00
Koenkk f797a12250 Update zigbee-shepherd-converters. 2018-11-14 18:32:02 +01:00
Jonas Janz 081d3c3dfe update docs for Home Hssistant (#583)
This adds a hint that you 'need' to set "hass/state" as a topic if you want zigbee2mqtt to resend the cached values on restarts.
2018-11-11 20:04:34 +01:00
Koenkk 7ca966ce39 npm is not installed by default anymore in Alpine. 2018-11-07 20:25:38 +01:00
Koenkk fc664bdc68 Fix node version to >=8.11 10 and implement check on startup. https://github.com/Koenkk/zigbee2mqtt/issues/552 2018-11-07 20:05:14 +01:00
Koenkk 2cb27b14f9 Allow ‘/‘ in friendly_name. https://github.com/Koenkk/zigbee2mqtt/issues/470 2018-11-07 19:40:58 +01:00
Koenkk 86a102e081 Only mock state after set. #518 2018-11-06 21:20:03 +01:00
Koenkk 9119e54c2c Prepare for read commands. https://github.com/Koenkk/zigbee2mqtt/issues/518 2018-11-05 21:55:30 +01:00
Dustin Wyatt f379bc0391 add linkquality to json_attributes for HA discovery (#566) 2018-11-05 19:39:36 +01:00
Koenkk 2e736bf501 Update zigbee-shepherd-converters to 4.0.11 2018-10-31 17:10:28 +01:00
Stanislav Demydiuk 1e7f985d4e Support both DeviceID and FriendlyName in device control topic (#476) 2018-10-30 21:23:34 +01:00
Koenkk 61c4ff33e0 Update zigbee-shepherd-converters to 4.0.10 2018-10-29 21:34:48 +01:00
mmnpkf 73ae48f387 Add Sengled Element Classic (A60) - B22 fitting (#544)
* Add Sengled Element Classic (A60) - B22 fitting

The Sengled Element Classic with Edison fitting (E27) is already defined - model E11-G23.  The same bulb comes with a bayonet fitting (B22) with a slightly different model number - E11-G33.

* Update homeassistant.js

* Update homeassistant.js
2018-10-29 21:12:37 +01:00
Stanislav Demydiuk 0a1c60b2cf Add Link for Domoticz integration to Readme (#546) 2018-10-29 08:29:28 +01:00
Koenkk 4eb56319c4 Update zigbee-shepherd-converters to 4.0.9 2018-10-25 20:44:55 +02:00
mmnpkf d8ea36af29 Add Nue Double GPO (au version) to Home Assistant (#506)
* Update homeassistant.js

Add code to expose Nue double power outlet (au version) to Home Assistant

* Update homeassistant.js
2018-10-25 20:43:31 +02:00
Felix Triller d0cf61bf10 Use Home Assistant's device_class (#528)
* Use Home Assistant's device_class for sensors.

* Unit for pressure should be hPa

* There is no device_class lock
2018-10-24 21:10:42 +02:00
Koenkk ddb83cc6e4 Handle zigbee commands sequentially (and refactor it). #529 2018-10-23 20:39:48 +02:00
Jens Willmer e54de4bea7 Adding update script (#525)
* Adding update script

Fix #389

* Update update.sh :)

* Make executable & update update.sh
2018-10-22 18:08:03 +02:00
Koenkk 97cc56b691 0.1.8 2018-10-19 22:44:26 +02:00
Koenkk c9df5c8221 Update zigbee-shepherd-converters to 4.0.7. 2018-10-19 22:27:29 +02:00
dcshoes23 7f13e2c3e6 Add homeassistant auto-discovery support for CE LED potlight 4" (#505) 2018-10-19 22:20:11 +02:00
Koenkk 0aab565083 Update zigbee-shepherd-converters to 4.0.6 2018-10-17 21:17:45 +02:00
Kiall Mac Innes 153f8bcfb5 Add Philips Hue white ambiance E14 (LTW012) HA Support (#491)
Adds HA support for LTW012 devices - See https://github.com/Koenkk/zigbee-shepherd-converters/pull/100
2018-10-17 18:25:33 +02:00
Simon van der Veldt c04ed81adb Fix typo in logging messages (#486) 2018-10-16 17:51:54 +02:00
Koen Kanters a1cf75456b Fix state caching. #485 2018-10-16 17:34:46 +02:00
Koenkk b063e67e24 Update zigbee-shepherd-converters to 4.0.5. https://github.com/Koenkk/zigbee2mqtt/issues/467 2018-10-15 19:07:12 +02:00
Koenkk a4da482225 0.1.7 2018-10-15 17:37:06 +02:00
Koenkk 98302bebd1 Update zigbee-shepherd-converters to 4.0.3 2018-10-09 21:28:32 +02:00
AnhDuc85 2197328db5 add homeassistant config for Osram Outdoor Lantern W RGBW OSRAM (#464) 2018-10-09 20:47:29 +02:00
Koen Kanters c5b9176614 Fix unique_id being set when not all devices have a friendly_name. 2018-10-08 20:25:04 +02:00
Laurent 0322354c37 [RFC] graphviz network map, display all devices (#443)
* network map, more info

* add a get(All)Devices method to zigbee

* graphviz: display all devices

loop through all devices, display all devices even those that haven't
responded to the lqi scan.

* makes eslint happy :)

* remove null chars from network map graphviz output

makes graphviz happy :-)

* Improvements to graphviz network map

* Always add device type
2018-10-07 21:46:54 +02:00
Koenkk b692c94fe9 Update zigbee-shepherd. https://github.com/Koenkk/zigbee-shepherd/pull/6 2018-10-05 22:08:47 +02:00
Koenkk 1496861811 Fix https://github.com/Koenkk/zigbee2mqtt/issues/373 again. 2018-10-05 20:54:57 +02:00
Koen Kanters 5459152f01 Fix Koenkk. #451 2018-10-05 19:35:23 +02:00
Koenkk 1db926173d Refactor router polling & only poll Xiaomi routers, refactor soft reset timeout and disable by default. #274 2018-10-02 21:15:12 +02:00
Koenkk da9ee71d80 Fix crash when deviceSettings are missing. 2018-10-02 20:35:14 +02:00
Phil Hawthorne d9f02230a0 Add autodiscovery support for Sylvania MR16 (#435)
Adds auto discovery support for the MR16 smart bulbs from
Osram/Sylvania.
2018-10-01 16:39:23 +02:00
Koenkk bf68f4575f Update zigbee-shepherd-converters to 4.0.2 2018-09-29 23:05:18 +02:00
Koenkk 33ea08ad22 Update dependencies for. #388 2018-09-29 23:05:18 +02:00
UnrealKazu 3a17db7c79 Add support for TRADFRI Control Outlet (#413)
The control outlet is a switch, hence the switch configuration.
2018-09-29 23:05:18 +02:00
Koenkk e55252b9ff Mock state ON when moveToLevelWithOnOff succeeds. https://github.com/Koenkk/zigbee-shepherd-converters/pull/81 2018-09-29 23:05:18 +02:00
Koenkk 71d12c3c71 Revert "Allow joining through specified device."
This reverts commit bf85ea1494.
2018-09-29 23:05:18 +02:00
Koenkk bc7b2bd5e0 Allow joining through specified device. 2018-09-29 23:05:18 +02:00
Koenkk 50d58d3dff Always call zigbee shepherd permit join (in both true and false). 2018-09-29 23:05:18 +02:00
Koenkk 4180bd8933 Add friendly_name to graphviz network map. #252 2018-09-29 23:05:18 +02:00
Koenkk 172d11677b Update zigbee-shepherd-converters. 2018-09-29 23:05:18 +02:00
Plácido Revilla ab5537e18c Add support for GE 45857 in-wall smart dimmer (#394)
* Add support for homeassistant discovery of E11-N1EA

* Add support for GE 45857 in-wall smart dimmer
2018-09-29 23:05:18 +02:00
Viet Dzung b06e3b61f2 Support cfg in foundation and functional (#390)
* Support cfg in foundation and functional

* Update zigbee-shepherd-converters.
2018-09-29 23:05:18 +02:00
Stanislav Demydiuk 03d913defc Add ability to send device information in MQTT message payload (#374) 2018-09-29 23:05:18 +02:00
Koenkk e4bcac5411 Update zigbee-shepherd. https://github.com/Koenkk/zigbee-shepherd/pull/4 2018-09-29 23:05:18 +02:00
Koenkk 5ed29d045b 0.1.6 2018-09-23 11:21:24 +02:00
Koen Kanters 75acffa8c7 Fix topicPrefix parsing. #387 2018-09-21 11:12:51 +02:00
Koenkk ade84dc6c0 Fix MQTT command with prefix, introduced in #c22f8b3. #387 2018-09-20 16:16:57 +02:00
Koenkk 7d49e136a6 0.1.5 2018-09-19 21:00:03 +02:00
Koenkk 0c1dba7208 Fix functional command. #386 2018-09-19 20:59:30 +02:00
Koenkk 63f4f681c4 0.1.4 2018-09-19 18:59:52 +02:00
Unknown 1afbe05318 Update zigbee-shepherd-converters. 2018-09-18 22:24:17 +02:00
Plácido Revilla 8376b7c5f6 Add support for homeassistant discovery of E11-N1EA (#379) 2018-09-18 18:07:33 +02:00
Unknown b71a9920de Update zcl-packet. #373 2018-09-18 18:03:27 +02:00
Unknown 2fd59cb7ef Remove log_directory_timestamp option, implement default settings, no : in timestamp. #356 #381 2018-09-18 17:51:34 +02:00
Zhong Jianxin 60e72c612c Allow no timestamp in log directory (#356)
* Allow no timestamp in log directory

* Update log_directory_timestamp option
2018-09-17 22:55:17 +02:00
Koen Kanters fbbc1fad73 Merge pull request #371 from dzungpv/dev
Fix foundation error from #8433571
2018-09-14 08:34:58 +02:00
Koen Kanters d5de918247 Revert 2018-09-14 08:33:28 +02:00
Koen Kanters f916ec5f4c Update foundation publish 2018-09-14 08:31:11 +02:00
Viet Dzung 469a01ebb6 Fix foundation error from #8433571 2018-09-14 10:01:07 +07:00
Koenkk 6ede5a373e Update zigbee-shepherd/zcl-packet. 2018-09-12 22:16:59 +02:00
Koenkk 6e1af542e5 Update zigbee-shepherd-converter. 2018-09-11 22:04:37 +02:00
Koen Kanters 53051e9192 Merge pull request #351 from lolorc/linkquality0
don't ignore linkquality when its value is 0
2018-09-11 21:42:03 +02:00
Koenkk 542a5f1564 Update zigbee-shepherd-converters. #355 2018-09-11 21:41:24 +02:00
Koen Kanters b82f0e46aa Use hasOwnProperty for linkquality check. https://stackoverflow.com/questions/13632999/if-key-in-object-or-ifobject-hasownpropertykey 2018-09-11 21:38:01 +02:00
Koen Kanters f0f2dc847b Merge pull request #355 from dzungpv/dev
Support Foundation Command for use in zigbee-shepherd converter
2018-09-11 21:34:25 +02:00
Koenkk 8433571b1e Refactor multiple foundation. 2018-09-11 21:28:30 +02:00
Koenkk 2141d670bf Update dependencies. 2018-09-11 18:01:48 +02:00
Viet Dzung fccb4de565 Fix Lint error 2018-09-11 14:28:04 +07:00
Viet Dzung 236afaacaf Support Foundation Command for use in zigbee-shepherd converter https://github.com/zigbeer/zcl-packet/wiki/6.-Appendix#FoundCmdTbl 2018-09-11 13:59:49 +07:00
Koenkk f463ca68a5 Improve zigbee message debug logging. 2018-09-10 18:06:29 +02:00
Laurent 7502ba5312 don't ignore linkquality when its value is 0 2018-09-09 19:28:38 +02:00
Koen Kanters c05b70b30b Merge pull request #325 from sebastianheierhoff/master
Fix issue #306: Sending config msg works only with default topic
2018-09-03 16:24:23 +02:00
sebastianheierhoff c22f8b36ba Fix issue #306: Sending config msg works only with default topic 2018-08-31 12:34:59 +02:00
Koenkk 7276d116c2 Update dependencies. 2018-08-30 18:06:52 +02:00
Koen Kanters 1b7549dd73 Merge pull request #316 from sebastianheierhoff/master
Fix issue #229: router devices can't be managed by zigbee2mqtt
2018-08-30 17:59:22 +02:00
Koen Kanters 7e4fff8454 Merge pull request #313 from TheCellMC/master
Add support for Philips Hue motion sensor
2018-08-30 17:53:09 +02:00
sebastianheierhoff ad43d61f28 Fix issue #229: router devices can't be managed by zigbee2mqtt 2018-08-29 19:22:36 +02:00
sebastianheierhoff ed5c52654f Fix issue #229: router devices can't be managed by zigbee2mqtt 2018-08-29 19:19:54 +02:00
sebastianheierhoff 4f1b521bee Fix issue #229: router devices can't be managed by zigbee2mqtt 2018-08-29 18:49:01 +02:00
TheCellMC a46f06a312 Update homeassistant.js 2018-08-29 09:14:20 +02:00
TheCellMC 6311dfb0f1 Update homeassistant.js 2018-08-29 09:11:41 +02:00
TheCellMC ee82a885f7 Update homeassistant.js 2018-08-29 08:57:11 +02:00
TheCellMC 88e6c10fb2 Added support for hue motion sensor 2018-08-29 08:44:31 +02:00
TheCellMC 88524b7aed Added support for hue motion sensor 2018-08-29 08:44:22 +02:00
Koenkk b2a27dd64a Implement basic graphviz networkmap. #252 2018-08-28 22:07:57 +02:00
Koenkk 2a520b0e81 Raw implementation of network map. #252 2018-08-28 21:55:00 +02:00
Koenkk 0c32f25203 Update zigbee-shepherd-converters to 2.0.44 2018-08-25 00:11:42 +02:00
Koen Kanters 1aa020875a Merge pull request #218 from arontsang/master
Allow user to able use the same kind of click multiple times
2018-08-25 00:02:19 +02:00
Koen Kanters 9e5acdc94e Merge branch 'dev' into master 2018-08-24 23:59:39 +02:00
Koen Kanters 417879b6a8 Add force_update: true for action 2018-08-24 23:58:44 +02:00
Koen Kanters 4ee7845b2a Merge pull request #292 from carpenike/master
Added Self Signed CA Support
2018-08-17 18:41:36 +02:00
Koen Kanters fb9600d55d Change selfsigned to reject_unauthorized 2018-08-17 18:39:45 +02:00
Koen Kanters 47de3e20ae Remove selfsigned from configuration.yaml 2018-08-17 18:34:33 +02:00
Koenkk c8c8417192 0.1.3 2018-08-17 18:32:11 +02:00
Ryan Holt c00f091d7f removed trailing whitespace 2018-08-17 12:25:02 -04:00
Ryan Holt b0b2bd2444 adjusted whitespace to remove tabs and replace with spaces. 2018-08-17 12:22:27 -04:00
Ryan Holt 1e0c64caf5 made true default within commented section. 2018-08-17 12:17:18 -04:00
Ryan Holt db1fd6dd12 removed dockerfile 2018-08-17 12:16:47 -04:00
Ryan Holt 9ee0049248 adjusted to support self-signed certificates on mqtt 2018-08-17 12:15:44 -04:00
Koen Kanters 56a0f6256b Merge pull request #287 from tb-killa/logfile-extended
Logfile extended
2018-08-16 20:12:07 +02:00
Koenkk 197a3cdebc Update log file extension. 2018-08-16 20:04:29 +02:00
tb-killa c520985a4f Implement cleanup-function for logfiles 2018-08-16 19:07:32 +02:00
tb-killa 931926cd96 add fs and bring in advanced logname with dateformat 2018-08-16 19:07:32 +02:00
tb-killa 427c99cd83 add moment to logger.js 2018-08-16 19:06:48 +02:00
tb-killa c2cd02e790 add moment to package.json 2018-08-16 19:06:48 +02:00
Koenkk a921394240 Merge branch 'dev' of https://github.com/Koenkk/zigbee2mqtt into dev 2018-08-16 18:56:51 +02:00
Koenkk 21f047f4aa Use localtimestamp for file logging. #289 2018-08-16 18:56:33 +02:00
Koenkk 9a70c95672 Start adding tests. 2018-08-15 22:19:54 +02:00
Koenkk fc2e93d96f Update dependencies 2018-08-15 21:10:19 +02:00
Koenkk 494c15a731 Update dependencies. 2018-08-13 20:37:01 +02:00
Koen Kanters 23a2feb7cf Merge pull request #275 from redmusicxd/patch-1
Trust ZLED-2709
2018-08-13 19:22:39 +02:00
redmusicxd f4ceccaa9b Trust ZLED-2709 2018-08-13 19:22:24 +02:00
Koenkk b4398e21c3 Fix linting 2018-08-13 19:21:55 +02:00
tb-killa 3900d56d6e Extend ping function with friendlyName logging 2018-08-13 19:21:55 +02:00
tb-killa 08f64b96be remove arrow separator 2018-08-13 19:21:55 +02:00
tb-killa 8411c0b30d Change logger-formatter confirm to zigbee-shepherd debug 2018-08-13 19:21:55 +02:00
Koenkk 43260a3a83 Implement mqtt last will message. #267 2018-08-13 19:21:55 +02:00
Koenkk 6f4013fd94 Update zigbee-shepherd-converters. https://github.com/Koenkk/zigbee2mqtt/issues/204 2018-08-13 19:21:55 +02:00
Koenkk 426a89914f Update zigbee-shepherd. #252 2018-08-13 19:21:55 +02:00
tb-killa 4fa1a4c57a Extend configureDevice with friendlyName Output 2018-08-13 19:21:55 +02:00
Koenkk 5ddfcea8f3 Log coordinator firmware version on startup. 2018-08-13 19:21:55 +02:00
Koenkk 502c0cb852 Log error when zigbee command fails. #254 2018-08-13 19:21:55 +02:00
Koenkk 07d8fd5605 Update zigbee-shepherd. 2018-08-13 19:21:55 +02:00
Daniel Welch 445ccb5bbd Update trigger-downstream.sh to dev branch
https://github.com/Koenkk/zigbee-shepherd-converters/pull/46#issuecomment-410533163
@Koenkk
The problem here was that this script is triggered with pushes to `master`, not `dev`. I've updated the edge add-on version to use the `dev` branch rather than `master`. A new image is building now and should be available soon using the dev branch.
2018-08-13 19:21:55 +02:00
Koenkk 74c8758a3b Update zigbee-shepherd. 2018-08-13 19:21:55 +02:00
Koenkk 1f6f73e8d2 Allow to log to custom directory. #207 #182 2018-08-13 19:21:55 +02:00
Koenkk 04b2f24d6b Persist devices state across restarts. #249 2018-08-13 19:21:55 +02:00
Alex Mekkering 5e96c46a7a Update to serialport 6.2.2 2018-08-13 19:21:55 +02:00
Koenkk ec4f5e1472 Update dependencies. 2018-08-13 19:21:55 +02:00
Koenkk 32a512ea6b Update zcl-packet. #150 2018-08-13 19:21:55 +02:00
Koenkk 46a3461e76 Update dependencies 2018-08-13 19:21:55 +02:00
Koenkk fe92e9c421 Fix package.json 2018-08-13 19:21:55 +02:00
Koenkk 2f02168fcb Update to latest zcl-packet. #150 #198 2018-08-13 19:21:55 +02:00
Koenkk 2ba86a13eb Add linkquality to messages. #173 2018-08-13 19:21:55 +02:00
Koen Kanters 7dd1c75be0 Update issue template. #264 2018-08-09 17:56:51 +02:00
Koen Kanters b5f0e9b958 Update ISSUE_TEMPLATE.md 2018-08-08 19:05:22 +02:00
Koenkk bd901ec9dd Add issue template. #264 2018-08-08 19:04:24 +02:00
Koenkk a3d89c0137 0.1.2 2018-07-31 17:20:50 +02:00
Koenkk f1ae2194c9 Lock zigbee-shepherd version. #236 2018-07-31 17:18:19 +02:00
Koenkk 738c31c758 0.1.1 2018-07-27 18:06:57 +02:00
Koenkk f8fcf3a7c8 Temp: lock zcl-packet to older version. #198 2018-07-27 17:49:56 +02:00
Koen Kanters ae863ba5ab Merge pull request #219 from jaaps/hue-bloom
Add Hue Bloom support
2018-07-27 17:39:45 +02:00
Koenkk 5e66019390 Update zigbee-shepherd-converters. 2018-07-27 17:39:31 +02:00
jaaps 696e6b4787 Add Hue Bloom support 2018-07-27 10:09:13 +02:00
Aron Tsang 7403fc7ce4 Add force update 2018-07-27 03:17:09 +08:00
Aron Tsang 79d8cb69c0 Expire clicks after 1 second so you can click again 2018-07-27 03:00:07 +08:00
Koen Kanters b33878304f Merge pull request #214 from Koenkk/issue_148
Add support for MQTT client ID. #148
2018-07-24 18:34:02 +02:00
Koenkk 6e71c48108 Merge branch 'issue_148' of https://github.com/Koenkk/zigbee2mqtt into issue_148 2018-07-24 18:31:41 +02:00
Koenkk 2b7aeed4fb Add support for MQTT client ID. #148 2018-07-24 18:31:16 +02:00
Koen Kanters b3cedc4ad1 Merge pull request #206 from tb-killa/rename-devices
Rename devices (friendly_name) ->  (#177)
2018-07-24 18:27:04 +02:00
Koenkk 8ea62f535e Update change friendly name of device. 2018-07-24 18:25:16 +02:00
Koenkk de879858a5 Update zigbee-shepherd-converters to 2.0.33. 2018-07-22 18:49:45 +02:00
Koenkk d4ba3ae069 Update zigbee-shepherd-converters. 2018-07-21 21:28:42 +02:00
Koenkk 0e608c7b2e Add disable_led option. #133 2018-07-21 21:13:28 +02:00
tb-killa aab18de88d ADD Rename Function via MQTT Command 2018-07-21 18:19:11 +02:00
tb-killa 6d684b7c11 ADD RenameFriendlyName Function 2018-07-21 18:15:56 +02:00
Koenkk 396e4b1bed Update zigbee-shepherd-converters. 2018-07-18 22:50:28 +02:00
Koenkk 04d7a87765 Fix logging of unsupported cid. #199 2018-07-18 22:30:51 +02:00
Koenkk 49878e093d Log message on unsupported cid. 2018-07-14 21:22:50 +02:00
Koenkk 209624cbef Update zigbee-shepherd-converters to 2.0.28. 2018-07-14 21:10:46 +02:00
Koen Kanters 65a9645677 Merge pull request #191 from tomusher/gledopto-rgbcct-controller-support
Add mapping for Gledopto RGB+CCT controller for Home Assistant
2018-07-12 17:47:29 +02:00
Koen Kanters ad41ed6dcf Merge branch 'dev' into gledopto-rgbcct-controller-support 2018-07-12 17:43:44 +02:00
Tom Usher b494136c22 Add mapping for Gledopto RGB+CCT controller for Home Assistant 2018-07-11 13:19:01 +01:00
Koenkk 356ed9fa39 Update zigbee-shepherd and zigbee-shepherd-conveters for 324131092621 support. #36 2018-07-10 18:43:31 +02:00
Koenkk 8b5938f73f Update zigbee-shepherd-converters. 2018-07-07 23:39:30 +02:00
Koenkk 51d8c79ef2 Update zigbee-shepherd (includes firmware revision information). https://github.com/Koenkk/zigbee2mqtt/issues/178 2018-07-05 21:23:30 +02:00
Koenkk 3897541366 Log zigbee-shepherd information on startup. #178 2018-07-05 20:06:38 +02:00
Koenkk 0eee507edb Travis.yml check if TRAVIS_TAG is set to “”. 2018-07-05 20:00:12 +02:00
Koenkk caf87e805d Update zcl-packet. https://github.com/Koenkk/zigbee2mqtt/issues/150 2018-07-05 19:43:54 +02:00
Koenkk ae41b7bc43 Push correct docker tags. 2018-07-03 19:17:47 +02:00
Koenkk 50b12a757c Fix docker.sh 2018-07-03 19:11:20 +02:00
Koenkk 9e933ea1ab Debug docker.sh 2018-07-03 19:07:15 +02:00
Koenkk 713263c428 Run with bash. 2018-07-03 19:04:21 +02:00
Koenkk 74e7c7d73a 0.1.0 2018-07-03 18:57:39 +02:00
Koenkk bf2d733c0e Add .npmrc 2018-07-03 18:57:36 +02:00
Koenkk 6be6472fa3 Prepare for v0.1 2018-07-03 18:22:45 +02:00
Koenkk 7cec5f2d96 Update zigbee-shepherd-converters to 2.0.20. 2018-06-30 23:47:51 +02:00
Koen Kanters ca59993863 Merge pull request #168 from matchett808/feat/home-assistant-config-for-nanoleaf-bulb
feat: home assistant nanoleaf mapping
2018-06-30 23:44:12 +02:00
Koen Kanters c1f9f630b1 Merge branch 'master' into feat/home-assistant-config-for-nanoleaf-bulb 2018-06-30 23:38:49 +02:00
iain fef68c122f feat: home assistant nanoleaf mapping 2018-06-30 18:56:13 +01:00
Koenkk 8f45de6a3f Stale bot use stale label. 2018-06-30 09:55:13 +02:00
Koenkk a15dcf8345 Add stale bot. 2018-06-30 09:54:23 +02:00
Koenkk f2ec895ec0 Update zigbee-shepherd-converters to 2.0.19. https://github.com/Koenkk/zigbee2mqtt/issues/154#issuecomment-401495951 2018-06-30 09:48:21 +02:00
Koenkk 52c51b687d And instructions on how to (soft) reset stick. #156 2018-06-28 19:49:16 +02:00
Koenkk a1cb4ca214 Update zigbee-shepherd-converters to 2.0.18. 2018-06-27 21:31:00 +02:00
Koen Kanters 2ba2864f87 Merge pull request #152 from Koenkk/issue_138
Homeassistant: dont set unique_id when friendlyName set. #138
2018-06-26 21:36:14 +02:00
Koenkk ecc734cff9 Add support for MQTT client ID. #148 2018-06-26 19:33:26 +02:00
Koen Kanters 420171e060 Add '9290011370' to homeassistant.js 2018-06-25 22:06:11 +02:00
Koenkk 8a2e9075bf Update zigbee-shepherd-converters to 2.0.17. 2018-06-25 22:00:43 +02:00
Koenkk 4f7328fe60 Update zigbee-shepherd-converters to 2.0.16. 2018-06-25 20:19:23 +02:00
Koenkk f03ade2775 Don't log 'Connecting with device' when device is already known. 2018-06-25 20:18:50 +02:00
Koenkk 094c288c3c Update zigbee-shepherd-converters. #142 2018-06-24 19:40:43 +02:00
Koenkk 19f6d5f72a Homeassistant: dont set unique_id when friendlyName set. #138 2018-06-24 14:21:56 +02:00
Koen Kanters 01a26adefd Merge pull request #137 from keesschollaart81/patch-2
Show why we have an error during initialization
2018-06-21 20:24:57 +02:00
Kees Schollaart a43e3969ed Show why we have an error during initialization 2018-06-21 20:11:08 +02:00
Koenkk 9dbdfc0a2e Set send cached state for home assistant to 20 seconds. #105 2018-06-20 22:02:29 +02:00
Koenkk bf6cc8fee3 Update zigbee-shepherd-converters. 2018-06-20 21:10:09 +02:00
Koenkk 7d2474060a Update zigbee-shepherd-converters. 2018-06-20 20:17:42 +02:00
Koenkk 4c4fcd7216 Update zigbee-shepherd-converters. 2018-06-17 17:15:43 +02:00
Koenkk 8bd08910a4 Docker write hash to correct file. 2018-06-17 16:38:11 +02:00
Koenkk 6985ee1b6e Fix arm32v6 Dockerfile 2018-06-17 11:40:59 +02:00
Koenkk 026fb1bd78 Fix homeassistant docgen, set command_topic_prefix in command_topic. #117 2018-06-17 01:35:44 +02:00
Koenkk b5a3fa67d9 Fix commit variable arm docker images. 2018-06-16 22:53:33 +02:00
Koenkk d980d0abcc Update zigbee-shepherd-converters. 2018-06-16 22:17:01 +02:00
Koenkk 0d6c001f2c Fix report on/off for devices with multiple states (e.g. state_left/state_right). #117 2018-06-16 20:38:44 +02:00
Koenkk 95db22e12b Update zigbee-shepherd-converters. 2018-06-16 01:43:51 +02:00
Koenkk 9f120826c1 Dockerfile fix quotes. 2018-06-16 01:32:54 +02:00
Koenkk 885f50839c Docker build fix exec format error. 2018-06-16 01:15:35 +02:00
Koenkk d1993e81da Travis: don't push hassio images. 2018-06-16 01:08:57 +02:00
Koenkk df99c7edf5 Log zigbee message data on one line. 2018-06-16 01:04:32 +02:00
Koen Kanters c372618eac Merge pull request #125 from ciotlosm/add_version_support
Add support for version numbers and hash
2018-06-16 00:15:36 +02:00
Koenkk deab0004f2 Set version to 0.0.0 2018-06-16 00:12:38 +02:00
Koenkk d69111f577 Add .hash.json for Docker. 2018-06-16 00:10:08 +02:00
Koenkk 96191a2836 Update log version on startup 2018-06-15 17:49:15 +02:00
Koen Kanters c6592029ea Merge pull request #123 from ciotlosm/allow_port_speed
Port speed for cc2530 models
2018-06-15 17:17:56 +02:00
Marius Ciotlos b6aabcca64 Add support for version numbers and hash 2018-06-15 14:02:40 +03:00
Marius Ciotlos 01effab24c Fixes #97 2018-06-14 22:48:25 +03:00
Koen Kanters 3591f4f976 Merge pull request #110 from ciotlosm/add_log_level
Added loging level through mqtt
2018-06-14 20:31:25 +02:00
Koenkk ae9f071ffc Update logger.js 2018-06-14 20:27:43 +02:00
Koenkk b12d868866 Update npm-shrinkwrap.json 2018-06-14 20:27:29 +02:00
Marius Ciotlos 949d236697 Removed dependency 2018-06-14 20:11:08 +02:00
Marius Ciotlos 4cb98b6257 Added debug for mqtt message as well 2018-06-14 20:11:08 +02:00
Marius Ciotlos 7fe9d6731a Force debug on logger if DEBUG is set 2018-06-14 20:09:43 +02:00
Marius Ciotlos 15fca170ad Fixed travis error from lint 2018-06-14 20:09:43 +02:00
Marius Ciotlos 2071b0f69f Added possibility to update log_level from configuration 2018-06-14 20:09:43 +02:00
Marius Ciotlos 2b4fc21585 Updated debug and moved message to info 2018-06-14 20:09:43 +02:00
Marius Ciotlos f40de00d32 Rollback of debug as it doesn't cover dependencies this way 2018-06-14 20:09:43 +02:00
Marius Ciotlos 1d49f349b9 Added message data logging in debug mode 2018-06-14 20:09:43 +02:00
Marius Ciotlos e29d5f70ae Added allowed levels when setting level fails 2018-06-14 20:09:43 +02:00
Marius Ciotlos dc5a090d44 Corrections @c727 suggestions 2018-06-14 20:09:43 +02:00
Marius Ciotlos 06142115af Fixed lint problems 2018-06-14 20:09:43 +02:00
Marius Ciotlos c1b597c02f Added loging level through mqtt 2018-06-14 20:09:43 +02:00
Koenkk 744444ceb9 logger.debug incoming MQTT messages. #105 #110 2018-06-14 20:06:35 +02:00
Koenkk 7a13626da7 Fix crash on MQTT message device model not known. 2018-06-14 20:00:57 +02:00
Koenkk d86aa10875 Xiaomi devices: check if exsist. #116 2018-06-14 18:19:54 +02:00
Koenkk 85e86dbdc2 Fix homeassistant docgen. 2018-06-14 18:14:58 +02:00
Koenkk b0cdcf2e21 Update docgen for homeassistant. 2018-06-13 20:28:35 +02:00
Koenkk b3108a26d0 Update zigbee-shepherd-converters to 2.0.6. 2018-06-13 20:23:26 +02:00
Koenkk 3196c0a974 Send all cached status on hass/status:online. #105 2018-06-13 19:51:40 +02:00
Koenkk 7041637e5b Update zigbee-shepherd-converters to 2.0.5. 2018-06-12 21:02:24 +02:00
Koen Kanters 501b9652b8 Add ciotlosm to contributors 2018-06-11 20:40:14 +02:00
Koenkk 3c062a330d Resend cached states on MQTT reconnect. #105 2018-06-11 20:31:05 +02:00
Koenkk cd13286ca7 Homeassisant: rediscover devices on MQTT reconnect. #105 2018-06-11 20:20:18 +02:00
Koen Kanters b7252379b9 Merge pull request #99 from ciotlosm/add_device_remove
Add device remove
2018-06-10 17:41:25 +02:00
Koenkk cbc1b3ab39 removed_device -> device_removed 2018-06-10 17:37:16 +02:00
Koenkk db0d8c1cdd Best effort remove device 2018-06-10 17:35:14 +02:00
Koenkk 3b1b9db992 Update dependencies 2018-06-10 08:05:50 +02:00
Koenkk 7bf5b2fd76 Update dependencies 2018-06-09 18:19:50 +02:00
Koen Kanters e7ba350770 Use forked zcl-packet. 2018-06-09 18:19:15 +02:00
Koenkk 884e3aa475 Refactor remove device & remove from home assistant 2018-06-09 12:33:40 +02:00
Koenkk aec871cd27 Add zcl-packet dependency 2018-06-09 11:29:28 +02:00
Koenkk 7d706b8ff4 Update dependencies 2018-06-08 20:43:49 +02:00
Koenkk 63c0a962ae Add ICTC-G-1 homeassistant mapping. 2018-06-08 20:34:34 +02:00
Koenkk cf3775e0b8 Update zigbee-shepherd-converters to 2.0.0. 2018-06-08 20:20:35 +02:00
Marius Ciotlos 7c53e9bb15 Added settings removal and bug fixes 2018-06-07 20:41:11 +03:00
Marius Ciotlos 9bc87b765a Formatting 2018-06-06 22:19:50 +03:00
Marius Ciotlos 0f2f7462a5 Added force remove 2018-06-06 22:13:32 +03:00
tb-killa 34feef6cf4 Update controller.js
ADD "remove" MQTT Topic with "message" - Check
2018-06-06 21:45:36 +03:00
tb-killa 0328ad7cb6 Update zigbee.js
Add "removedevice" Function into zigbee.js
2018-06-06 21:45:36 +03:00
Koen Kanters ca27f9faf2 Add homeassistant mappings 2018-06-05 20:27:36 +02:00
Koenkk 125f15b61f Update dependencies 2018-06-05 20:22:44 +02:00
Koen Kanters fb1feca3ca Merge pull request #95 from ciotlosm/master
Added unique id for easier renaming of sensors in HA
2018-06-05 00:32:54 +02:00
Marius Ciotlos 584a5f1b19 Added unique id for easier renamig of sensors in HA 2018-06-04 23:05:34 +03:00
Koenkk a976c1db93 Update zigbee-shepherd-converters to 1.0.1. #36 #62 2018-06-04 21:36:51 +02:00
Koenkk eae8a80588 Update zigbee-shepherd-converters to 1.0.0. 2018-06-04 20:03:53 +02:00
Koenkk bb9b6dd550 Update zigbee-shepherd-converters to 0.2.0. 2018-06-04 19:23:23 +02:00
Koen Kanters d15cbe0a29 Merge pull request #94 from ciotlosm/master
Spell check
2018-06-04 18:26:19 +02:00
Marius Ciotlos 324180c292 Spell check :( 2018-06-04 19:24:26 +03:00
Koen Kanters d243f08f17 Merge pull request #93 from ciotlosm/master
Improved getting started
2018-06-04 18:23:21 +02:00
Marius Ciotlos 977d26eeda Improved getting started
Added terminology
2018-06-04 19:17:01 +03:00
Koenkk b7c525de65 Increase recovery timeout. #79 2018-06-04 17:36:46 +02:00
Koen Kanters 49685cb681 Fix typo in docgen.js 2018-06-04 17:26:59 +02:00
Koen Kanters 7334d50fbf Merge pull request #91 from ciotlosm/master
Updated documentation
2018-06-04 17:25:55 +02:00
Koen Kanters eab7665726 Update README.md 2018-06-04 17:25:39 +02:00
Koen Kanters 54342f6fe9 Update README.md 2018-06-04 17:23:47 +02:00
Marius Ciotlos 95f9bc2535 Updated documentation 2018-06-04 14:46:24 +03:00
Koen Kanters b5661d297b Merge pull request #89 from keesschollaart81/patch-1
Mention the hassio addon
2018-06-04 08:01:11 +02:00
Kees Schollaart 4fee0ff501 Mention the hassio addon
I did not know about the hassio addon for this project and it's not mention anywhere other than in a closed issue so I thought it made sense to reference it here.
2018-06-03 15:09:50 +02:00
Koenkk 8ada85e1ce Log to MQTT when pairing with device. #85 2018-06-03 00:50:30 +02:00
Koenkk a8dca627d9 Allow spaces in MQTT device commands (for friendly names with spaces in it). #86 2018-06-03 00:42:15 +02:00
Koenkk 95f21947fc Update zigbee-shepherd-converters 2018-06-02 19:56:52 +02:00
Koenkk ab64d079aa Don't mutate stateCache. #82 2018-06-02 19:11:49 +02:00
Koenkk 898081fcb4 Remove firmware. #83 2018-06-01 23:54:57 +02:00
Koenkk 993908eb19 Update zigbee-shepherd-converters to 0.1.11 2018-06-01 22:05:49 +02:00
Koenkk f0b19cc696 Try to recover in zigbee-shepherd start failure. #79 2018-06-01 21:04:48 +02:00
Koenkk 811cf2943f Allow DEBUG in Docker. #70 2018-06-01 19:29:03 +02:00
Koenkk 3377853dab Update zigbee-shepherd-converters to 0.1.10. 2018-05-31 19:21:31 +02:00
Koenkk d6c7e75e22 Trigger danielwelch/hassio-zigbee2mqtt rebuild. https://github.com/danielwelch/hassio-zigbee2mqtt/issues/19 2018-05-31 19:11:28 +02:00
Koenkk ffa6012079 Support light transitions. #72 2018-05-30 22:28:08 +02:00
Koenkk 7b2763a053 Log devices to bridge/log. #77 2018-05-30 18:09:24 +02:00
Koenkk 77f344198c MQTT publish log message when new device connects. #77 2018-05-30 18:00:08 +02:00
Koenkk 6d73dd143c Add endpoint to request connected devices. #77 2018-05-30 17:52:46 +02:00
Koenkk 625b6c51d8 Update zigbee-shepherd-converters to 0.1.7 2018-05-29 19:12:45 +02:00
Koenkk 9396bde1f3 Add cache_state option to configuration.yaml. #70 2018-05-28 21:10:58 +02:00
Koenkk ae01f30f71 Log device type on startup. #26 2018-05-28 20:40:30 +02:00
Koenkk b8fb13043b Add AB3257001NJ. #62 2018-05-28 20:01:28 +02:00
Koenkk 2d7a6ecaf3 homeassistant discovery: fix crash when not in configuration.yaml. #63 2018-05-28 19:41:27 +02:00
Koenkk 7801493a7a Update zigbee-shepherd-converters to 0.1.5. #71 2018-05-28 19:33:29 +02:00
Koenkk 5666a59524 Add Hive active light bulb (HALIGHTDIMWWE27). #68 2018-05-27 17:16:01 +02:00
Koenkk 995649d0da Update zigbee-shepherd-converters to 0.1.3 2018-05-26 16:12:11 +02:00
Koenkk fd894a9ce3 Add homeassistant configuration for AA70155 and AA69697 2018-05-26 11:00:56 +02:00
Koenkk 9c249328e3 Update zigbee-shepherd-converters to 0.1.2. 2018-05-26 10:58:38 +02:00
Koenkk 0bc6cf7a69 Update zcl-packet. #42 2018-05-25 19:51:05 +02:00
Koenkk 08f3f96d73 Use js-yaml as yaml parser instead of yawn-yaml. #64 2018-05-25 16:42:29 +02:00
Koenkk 312ed033db Dont add advanced configuration by default. 2018-05-24 20:19:04 +02:00
Koenkk fb27bd292f Use zigbee-shepherd-converters. #45 2018-05-24 13:09:58 +02:00
Koenkk 06f6329241 Docgen: replace all instances. 2018-05-24 12:50:54 +02:00
Koenkk 92d0e44184 Update docgen. 2018-05-24 12:36:26 +02:00
Koenkk ad4f77b5ce Link to How to support new devices page. 2018-05-24 12:09:36 +02:00
Koenkk f25e6a50b9 Refactor mqtt2zigbee to toZigbee and add convertes move devices. #45 2018-05-23 18:23:51 +02:00
Koenkk 5be2c412c1 Parsers -> converters. 2018-05-23 17:57:45 +02:00
Koenkk 3fdfc6f57f Move converters to devices.js. #45 2018-05-23 17:55:30 +02:00
Koenkk bc4dff65ff Remove disableCache. #45 2018-05-22 19:10:16 +02:00
Koenkk bcbe3eb075 Update docs 2018-05-22 18:25:09 +02:00
Diogo Gomes 567bdca276 Edp redy - Power Plug (#53)
* fixed json

* added mqtt commands

* added endpoints

* support battery status

* added firmware for CC2531 USB Stick with maximum number of possible devices (48)

* support aqara magnet

* added support for wall switch

* update regex

* Update README.md

* added automatic chip selection

* fix reconnect

* Update README.md

* added missing dependency

* fix magnets

* fix topic

* support for aqara button

* yaml based configuration

* restore project defaults

* save bridgeID

* default values

Don’t change the configured bridgeID (backward compatible with bridgeID
= “bridge”)

* personal configuration

* added EDP RE:DY

* don't mess remote

* don't mess remote

* don't mess remote

* fix

* clean

* lint

* generic

* lint

* Update devices.js

* Update zigbee2mqtt.js

* lint

* Refactor configure reports.

* Fix lint.
2018-05-21 13:21:18 +02:00
Koen Kanters b912386786 Merge pull request #50 from ptvoinfo/master
Some improvements
2018-05-21 12:03:36 +02:00
Koenkk b38eb76274 Change comment in controller.js 2018-05-21 12:00:35 +02:00
Koenkk 02818ddaf5 Refactor softResetTimeout 2018-05-21 11:59:01 +02:00
Koenkk 78c4f43496 Update controller.js 2018-05-21 11:52:16 +02:00
Koenkk 26f378237f Update sensor_power. 2018-05-21 11:50:14 +02:00
Koenkk f886259f92 Refactor controller.js. 2018-05-21 11:49:02 +02:00
Koenkk 2f607c4cad Support LED1536G5 E12 version. #57 2018-05-21 11:17:28 +02:00
Koenkk 1b111c1250 Support LED1622G12. #56 2018-05-21 11:11:24 +02:00
Koenkk f58b0fa4f2 Add voltage to homeassisant power sensor. 2018-05-17 18:41:03 +02:00
Koenkk 8207321c30 Update ZNCZ02LM converters. 2018-05-17 18:33:32 +02:00
Koenkk 7f5865aaf9 Update lumi.router device specification. 2018-05-17 18:03:54 +02:00
Koenkk 0fdec7c225 Refactor zigbee.js 2018-05-17 17:48:41 +02:00
ptvoinfo 55a1709103 Added polling for routers (prevents deep sleep mode of Xiaomi routers)
Added more parsers for Xiaomi Power Plug
Added a custom router
2018-05-17 17:39:01 +02:00
Koenkk c5cb60e998 Enforce code style. #45 2018-05-17 17:20:46 +02:00
Koenkk 5a95e2fc8c Add 'WXKG02LM' and 'WXKG03LM' to battery parser. #43 2018-05-16 20:21:22 +02:00
Koenkk f750bb34f9 Support JTYJ-GD-01LM/BW. #4 2018-05-16 20:15:50 +02:00
Koenkk 5ee79b28d9 Add homeassistant configuration for F7C033. #40 2018-05-16 19:52:44 +02:00
Koenkk a70bccd2b6 Update .tavis.yml 2018-05-16 19:50:13 +02:00
Koenkk efd2fba1b5 Support Belkin WeMo smart LED bulb (F7C033). #40 2018-05-16 19:44:38 +02:00
Koenkk 9d82ad32d0 battery -> battery3V. #45 2018-05-16 19:40:21 +02:00
Koenkk 8559ea2301 Refactor homeassistant configuration out of devices.js. #45 2018-05-16 19:40:05 +02:00
Koenkk ca40cf622a Move logging devices on startup to controller.js. #45 2018-05-16 19:29:47 +02:00
Koenkk e3c9448656 cId -> cid. #45 2018-05-16 19:22:47 +02:00
Koenkk 2521af7d78 Allow device specific QoS configuration. #47 2018-05-15 18:42:26 +02:00
Koenkk debc96c232 Allow to set device specific occupancy_timeout. #27 2018-05-15 18:06:16 +02:00
Koenkk 17aba009af Set default occupancy timeout to 60 seconds. #27 2018-05-15 18:00:06 +02:00
Koenkk ff61f24b74 Make panID configurable. #34 2018-05-12 15:54:02 +02:00
Koen Kanters 604fa925e4 Merge pull request #39 from danielwelch/master
configure datapath with env variable
2018-05-12 15:31:23 +02:00
Koenkk b01b1a07bb Add support for TRADFRI bulb E27 W opal 1000lm. #21 2018-05-12 15:05:18 +02:00
Koenkk 44002ed1c3 Update configure data path code 2018-05-12 10:58:06 +02:00
Koen Kanters d3f271f984 Update description of LED1536G5 2018-05-12 09:21:36 +02:00
Daniel Welch d0306aedea missing semicolon 2018-05-11 23:16:37 -04:00
Daniel Welch 03123fb783 configure datapath with env variable 2018-05-11 23:04:15 -04:00
Koen Kanters d583a61c9f Merge pull request #37 from marcusaram/led1536g5-2
Add support for IKEA TRADFRI bulb E14 WS opal 400lm
2018-05-11 20:39:50 +02:00
Marcus Aram 8d0623f24e Add support for IKEA TRADFRI bulb E14 WS opal 400lm 2018-05-11 20:19:47 +02:00
Koenkk 0d92109323 Fix docgen 2018-05-11 20:05:33 +02:00
Koenkk aa08151049 Merge branch 'dev' 2018-05-11 19:40:19 +02:00
Koenkk 1efe6867ed Prepare for merge to master. 2018-05-11 19:36:43 +02:00
Koenkk e01a4ec5b2 Update documentation for Home Assistant integration. #21. 2018-05-11 19:20:32 +02:00
Koenkk 1a688cf363 Add disableCache option and remove disablePublish option for converters. #32 2018-05-11 19:14:18 +02:00
Koen Kanters 624f1ced68 Merge pull request #23 from ciotlosm/add_cube
Added xiaomi cube
2018-05-11 19:03:24 +02:00
Marius Ciotlos 54f3843a03 Fixed TODO in devices.js 2018-05-11 09:25:33 +03:00
Marius Ciotlos 8b8604dbf4 Add battery support for cube 2018-05-10 11:36:21 +03:00
Koenkk 02a747066a Move MFKZQ01LM ignore parsers to end. 2018-05-10 11:34:56 +03:00
Koenkk c8df9747ad Refactor MFKZQ01LM converters to use homeassistant.sensor_action 2018-05-10 11:34:56 +03:00
Koenkk b41cacd992 Add homeassistant sensor_action 2018-05-10 11:34:56 +03:00
Marius Ciotlos 06fb89da3a Added credits and corrected comment to reflect code 2018-05-10 11:34:56 +03:00
Marius Ciotlos 50103e381c Added xiaomi cube 2018-05-10 11:34:56 +03:00
Koen Kanters 080feddf28 Merge pull request #30 from marcusaram/led1650r5
Add support for IKEA TRADFRI bulb GU10 W 400lm
2018-05-10 09:37:06 +02:00
Marcus Aram 4e214a0686 Support for IKEA TRADFRI bulb GU10 W 400lm 2018-05-10 09:25:33 +02:00
Koenkk 80149c3579 Travis: push hass.io addon images. #22 2018-05-09 22:56:18 +02:00
Koenkk 896a7a097c Use alpine as base image. #22 2018-05-09 22:15:59 +02:00
Koenkk 41ad606137 Use @oskarn97 CC2531 firmware which support upto 48 devices. #26 2018-05-08 20:51:01 +02:00
Koenkk 4fc4c7b83a Add ssIasZone parser for SJCGQ11LM to directly detect water_leak. #17 2018-05-08 20:47:33 +02:00
Koenkk 8436768dc0 Use @kirovilya zigbee-shepherd fork. #17 2018-05-08 20:46:52 +02:00
Koenkk beb2c5efb0 Rename sensor_button to sensor_click to keep naming for sensors consistent. #23 2018-05-08 20:13:01 +02:00
Koenkk b3257c714a Add debug logging for incoming zigbee messages. #25 2018-05-08 19:57:50 +02:00
Koenkk 6b1570b259 Docker ignore more files. #22 2018-05-07 17:46:58 +02:00
Koenkk e371fcae30 Use nodejs 8 (LTS) because nodejs 10 is not supported. 2018-05-07 17:35:26 +02:00
Koenkk 8523aa61b0 Support LED1623G12. #21 2018-05-06 18:08:10 +02:00
Koenkk 8ad1d49870 Also log to file. #16 2018-05-04 23:01:02 +02:00
Koenkk f55ec62c6c Update README.md 2018-05-01 19:18:34 +02:00
Koenkk 254c0e9fa5 Link to How to support new devices. 2018-05-01 18:51:38 +02:00
Koenkk 17cb59b958 Support QBKG03LM. #4 2018-04-29 14:09:49 +02:00
Koenkk 78b0e00d14 Support QBKG04LM. #4 2018-04-27 23:58:46 +02:00
Koenkk 0ee1d27099 Support QBCZ11LM. #4 2018-04-27 14:10:13 +02:00
Koenkk ce370750c0 Swap badge 2018-04-26 21:15:13 +02:00
Koenkk f36a23ce7b Fix .travis/wiki.sh when there are no updates 2018-04-26 20:54:36 +02:00
Koen Kanters 640ce11e34 Travis set docker username. 2018-04-26 20:41:08 +02:00
Koen Kanters 03af9da97d Travis build docker images. 2018-04-26 20:35:07 +02:00
Koen Kanters 97bca73ba2 Travis now updates wiki automatically! :) 2018-04-26 20:02:14 +02:00
Koen Kanters 5d41c97655 Travis: commit stuff. 2018-04-26 20:00:23 +02:00
Koen Kanters 305fb70d78 Update travis 2018-04-26 19:56:00 +02:00
Koen Kanters 0a9f2d497a Update travis and check if it works. 2018-04-26 19:51:55 +02:00
Koen Kanters 6a90937cfa Improve travis 2018-04-26 19:46:00 +02:00
Koen Kanters 0bac4ba9bf Travis for generating wiki. 2018-04-26 19:40:44 +02:00
Koen Kanters 975bc741e2 Dockerize. #5 2018-04-26 19:37:07 +02:00
Koen Kanters c3ca0249c4 Improve color temp/xy and brightness level feedback. 2018-04-25 22:01:53 +02:00
Koen Kanters bc1e3d68f9 lightingColorCtrl parser support currentX/Y 2018-04-25 21:50:41 +02:00
Koen Kanters 875ca536e0 Fix homeassistant discover crash when device undefined. 2018-04-25 21:34:26 +02:00
Koen Kanters a13080f399 Refactor & remove home assistant pair switch discovery. 2018-04-25 20:54:41 +02:00
Koen Kanters d20012e4d8 Update docgen. 2018-04-25 19:41:20 +02:00
Koen Kanters 87fb513758 Simplify YAML configuration. 2018-04-25 19:29:03 +02:00
Koen Kanters 3322d6cb20 Allow settings permit_join via home assistant switch. 2018-04-24 19:30:56 +02:00
Koen Kanters e0feacea0b Improve MQTT switch support. 2018-04-24 19:03:09 +02:00
Koen Kanters 8673fa27e2 Improve naming of configuration 2018-04-24 18:04:36 +02:00
Koen Kanters 97f54facde Update docgen. 2018-04-23 22:41:33 +02:00
Koen Kanters df797617f5 Move planned to support to issue #4 2018-04-23 22:39:24 +02:00
Koen Kanters 7a6cc080d4 Support ZNCZ02LM. #4 2018-04-23 22:36:30 +02:00
Koen Kanters 1543373b7f Improve support current supported devices. 2018-04-23 21:44:06 +02:00
Koen Kanters 59f16f76f1 Refactor devices.js 2018-04-23 18:29:35 +02:00
Koen Kanters 500bce2418 Perform home assistant MQTT discovery on startup. 2018-04-23 18:17:47 +02:00
Koen Kanters 41b2fb3fc9 Emojis! 2018-04-23 18:00:49 +02:00
Koen Kanters df819e3318 Add architecture 2018-04-23 17:55:44 +02:00
Koen Kanters b29a5a9c1b Support WXKG03LM. #4 2018-04-22 21:36:04 +02:00
Koen Kanters b80d16c4b3 Support SJCGQ11LM. #4 2018-04-22 21:23:35 +02:00
Koen Kanters 8109bf68e7 Add home assistant MQTT discovery for missing devices. #9 2018-04-21 23:05:53 +02:00
Koen Kanters f584b5dcca Add respond to button clicks example. 2018-04-21 23:01:52 +02:00
Koen Kanters 2e20798aef Fix command_topic 2018-04-21 22:46:52 +02:00
Koen Kanters 1319f8087c Docgen update for home assistant discovery. #9 2018-04-21 22:41:27 +02:00
Koen Kanters 2e579b66ad Docgen specify directory. 2018-04-21 19:19:51 +02:00
Koen Kanters d71fadd73f Homeassistant discovery for WXKG11LM. #9 2018-04-21 18:14:34 +02:00
Koen Kanters 5fa8ce9913 Support LED1535R6 2018-04-21 17:51:38 +02:00
Koen Kanters 4d3d15f5b9 Support WXKG02LM. #4 2018-04-21 13:01:57 +02:00
Koen Kanters 5b52defe9e Add more logging 2018-04-21 12:45:22 +02:00
Koen Kanters fc9a0be1e9 Support WSDCGQ11LM. #4 2018-04-21 12:20:47 +02:00
Koen Kanters 65ad81a7b6 Support discovering multiple homeassistant sensors of same type. #9 2018-04-21 12:15:00 +02:00
Koen Kanters 79d405afe9 Support RTCGQ11LM. #4 2018-04-21 09:14:18 +02:00
Koen Kanters bc3fca9d68 Homeassistant discovery: allow multiple homeassistant sensor/devics per device. #9 2018-04-21 09:13:14 +02:00
Koen Kanters 14f14e909d Hue go rgb -> xy 2018-04-21 00:16:50 +02:00
Koen Kanters 679182d2d4 Update header. #8 2018-04-21 00:10:20 +02:00
Koen Kanters 823a9ea248 Support light devices MQTT discovery. #9 2018-04-20 23:58:03 +02:00
Koen Kanters aebce9099b Support settings colors. #7 2018-04-20 23:40:17 +02:00
Koen Kanters e6e558eae7 Improve homeassistant discovery. #8 2018-04-20 23:39:20 +02:00
Koen Kanters b9552f8ab3 Support homeassistant discovery for MCCGQ11LM. #9 2018-04-20 19:54:12 +02:00
Koen Kanters 7cd8e74a7e Implement homeasisstant MQTT discovery. #9 2018-04-20 19:53:40 +02:00
Koen Kanters f9860f5b9d Dont handle messages without cid. 2018-04-19 23:15:09 +02:00
Koen Kanters 21575673b3 Support MCCGQ11LM. #4 2018-04-19 23:00:07 +02:00
Koen Kanters 6499b78108 Move WXKG11LM 2018-04-19 22:46:59 +02:00
Koen Kanters c49b3f4ae3 Support WXKG11LM. #4 2018-04-19 22:45:53 +02:00
Koen Kanters 3133cb7dae Docgen: log per vendor. 2018-04-18 22:27:44 +02:00
Koen Kanters eb063efeb4 Update Hue Go documentation. #7 2018-04-18 22:17:03 +02:00
Koen Kanters 0771e2c5a0 Support Hue Go. #7 2018-04-18 22:11:00 +02:00
Koen Kanters 69736a883e Use device retain setting. 2018-04-18 22:07:18 +02:00
Koen Kanters 31c6d794a9 Select endpoint dynamically needed for Hue support. #7 2018-04-18 21:57:39 +02:00
Koen Kanters 90cc4ad0e1 Improve robustness. 2018-04-18 21:55:00 +02:00
Koen Kanters 3b068daa12 Log vendor on startup. 2018-04-18 21:01:42 +02:00
Koen Kanters 3b317535d3 Fixes & improvements. #8 2018-04-18 20:53:22 +02:00
Koen Kanters dec470fb51 Add eslint & fixes. #8 2018-04-18 19:10:33 +02:00
Koen Kanters 3872d58561 Update README.md 2018-04-18 18:48:35 +02:00
Koenkk abe9655bc1 Update package.json 2018-04-18 18:42:38 +02:00
Koen Kanters d06522d488 Refactor and rename. #8 2018-04-18 18:26:13 +02:00
Koen Kanters bc52e11693 Dimming -> brightness for TRADFRI bulb. 2018-04-16 21:57:40 +02:00
Koen Kanters 0a73511609 Make parser type specific. 2018-04-16 21:49:25 +02:00
Koen Kanters 7057b2f9d7 Support tradfri light bulbs. 2018-04-16 21:41:24 +02:00
Koen Kanters 49f37047cc Return if device is not supported. 2018-04-16 20:08:38 +02:00
Koen Kanters dd6d6cd407 Cache all states. 2018-04-15 21:52:58 +02:00
Koen Kanters 8d9911b4b5 Move mqtt bridge state. 2018-04-15 21:23:49 +02:00
Koen Kanters fa61d17f0b Better battery status parsing. 2018-04-15 01:26:04 +02:00
Koen Kanters 8356fda183 Make retain device specific. 2018-04-15 01:14:43 +02:00
Koen Kanters 39600b394e Switch to json based messages. 2018-04-15 01:11:37 +02:00
Koen Kanters 905feb3701 Add option to retain MQTT messages. 2018-04-14 19:20:34 +02:00
Koen Kanters 6290f6beec Move arm32v7 Docker. 2018-04-14 15:25:57 +00:00
Koen Kanters 6c8f1733d4 Rename dockerfile. 2018-04-14 17:00:05 +02:00
Koen Kanters fbb6b27b44 Add arm32v7 docker. 2018-04-14 16:56:28 +02:00
Koen Kanters d7031d259b Use winston logger. 2018-04-14 16:17:25 +02:00
Koen Kanters 4c2948145a Support battery level. #3 2018-04-14 15:46:36 +02:00
Koen Kanters 5c8da2d36a Allow multiple parsers for one message. 2018-04-14 15:29:07 +02:00
Koen Kanters dd7388c802 Update doc gen. 2018-04-13 19:29:17 +02:00
Koen Kanters 7026f42db3 Add planned to support. 2018-04-13 19:00:17 +02:00
Koen Kanters f5aa448ec0 Merge branch 'master' of https://github.com/Koenkk/xiaomi-zb2mqtt 2018-04-12 17:01:18 +02:00
Koen Kanters 93624ddaca Update WXKG01LM documentation. 2018-04-12 16:58:33 +02:00
Koen Kanters c7fc392c5f Update README.md 2018-04-11 22:06:12 +02:00
Koen Kanters 0055302bdc Support MQTT authentication. #2 2018-04-11 21:09:19 +02:00
Koen Kanters 2cfd078b2d Add npm start again. #2 2018-04-11 20:59:18 +02:00
Koen Kanters 3d3a8d6e95 Automatically generated docs. #2 2018-04-11 20:54:22 +02:00
Koen Kanters dc211027ed More robust MQTT handling. #2 2018-04-11 20:14:12 +02:00
Koen Kanters 4c6ab0ee49 Fix yaml read exception. #2 2018-04-11 20:00:18 +02:00
Koen Kanters a8bbd85b15 Use Xiaomi model ids. #2 2018-04-11 19:55:54 +02:00
Koen Kanters 1b6365b136 Start via npm start. 2018-04-11 19:01:44 +02:00
Koen Kanters ecae4d1c3b Add some happy and sad faces. 2018-04-09 22:17:24 +02:00
Koen Kanters 7dae18c6b5 Add firmware. 2018-04-09 21:32:13 +02:00
Koen Kanters 808370307b Update readme and package.json. 2018-04-09 20:48:30 +02:00
Koen Kanters 26027bfb85 Perfy is nice but we dont need it :(. #2 2018-04-09 20:27:32 +02:00
Koen Kanters d6b26239a1 Force documentation consistency. #2 2018-04-09 20:21:23 +02:00
Koen Kanters 3ee7c54e22 Support more sensor. #2 2018-04-09 20:01:49 +02:00
Koen Kanters e56162d222 Switch: support single, double, triple, quadruple and long clicks. #2 2018-04-09 18:36:32 +02:00
Koen Kanters 3f5dda0c51 .gitkeep is not needed anymore. 2018-04-09 17:56:04 +02:00
Koen Kanters 1ca19a792d Use base_topic from configuration.yaml. 2018-04-09 17:47:26 +02:00
Koen Kanters 43f45f5860 Move join parameter to configuration.yaml. 2018-04-09 17:45:02 +02:00
Koen Kanters e17f2c30c0 YAML configuration. 2018-04-09 17:37:21 +02:00
Koen Kanters 63a05fc443 Refactor message parsing. 2018-04-09 17:09:52 +02:00
Koen Kanters 366b5be765 Add config file. 2018-04-08 17:25:28 +02:00
Koen Kanters 3f4fc31835 Change location of database. 2018-04-08 16:41:42 +02:00
Koen Kanters 658b3624ac Refactor. 2018-04-08 16:32:28 +02:00
Koen Kanters 55e1657c80 Add --join parameter 2018-04-08 15:51:33 +02:00
Koen Kanters bc40911f2f Quit zigbee-shepherd friendly. 2018-04-08 15:33:47 +02:00
Koen Kanters 3f37c439c9 Add more logging. 2018-04-08 15:28:59 +02:00
Koen Kanters fb60982077 Refactor. 2018-04-08 15:00:36 +02:00
Koen Kanters fd68c243a8 Allow to set device and mqtt url with CLI arguments. 2018-04-08 14:46:20 +02:00
Koen Kanters c516973b4a Unlock version in package.json because we have npm-shrinkwrap.json now. 2018-04-08 14:15:34 +02:00
Koen Kanters c8c51e0118 Add npm shrinkwrap 2018-04-08 14:11:31 +02:00
Koen Kanters 2b843781e0 Fix package.json. 2018-04-08 14:09:17 +02:00
Andrew Linden 4eda443b3f updated readme 2018-01-01 11:37:03 +02:00
Andrew Linden d160efbde6 At startup list all currently joined deviced and set them to be "online" so shepherd wont try to query them for info (that would fail, because the devices go to sleep) 2017-12-24 22:41:01 +02:00
Andrew Linden 59926ffeea Added support for occupancy sensor and door sensor.
Changed the temp and humidity sensor topic for humidity from relative_humidity to just humidity
2017-12-08 11:29:34 +02:00
Andrew Linden c446539c95 Bugfixes and switch to upstream zigbee-shepherd 2017-11-28 12:38:12 +02:00
Andrew Linden 2aa7366a82 fix errors introduced by previous merge 2017-11-26 14:33:32 +02:00
Andrew Linden 91799d6d96 Merge pull request #1 from jpbarraca/master
Added support for Xiaomi Aqara Temperature Humidity Sensor
2017-11-18 12:19:38 +02:00
João Paulo Barraca 3fcc8278d8 Fixed bug 2017-09-27 23:08:29 +01:00
João Paulo Barraca 0b1a4f772e Updated readme 2017-09-27 22:59:15 +01:00
João Paulo Barraca aa5db1624a Added support for Xiaomi Aqara Temperature Humidity Sensor 2017-09-27 22:56:21 +01:00
Andrew Linden 42722b78e6 fix 2017-09-27 21:37:33 +03:00
Andrew Linden e44636eb4c info about config 2017-09-27 21:16:52 +03:00
Andrew Linden 22e73009da what kind of clicks each switch supports 2017-09-27 20:03:55 +03:00
Andrew Linden b52bd61e34 Initial commit 2017-09-27 19:39:10 +03:00
Andrew Linden d7cb4b5b4f Initial commit 2017-09-27 16:38:22 +03:00
147 changed files with 34254 additions and 3179 deletions
+15
View File
@@ -0,0 +1,15 @@
.eslintignore
.eslintrc.json
.git
.github
.gitignore
.npmrc
.travis*
.travis.yml
README.md
docker/Dockerfile*
images
node_modules
scripts
test
update.sh
+2
View File
@@ -0,0 +1,2 @@
node_modules/*
test/
+21
View File
@@ -0,0 +1,21 @@
{
"env": {
"jest/globals": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "google", "plugin:jest/recommended", "plugin:jest/style"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"require-jsdoc": "off",
"indent": ["error", 4],
"max-len": ["error", { "code": 120 }],
"no-prototype-builtins": "off"
},
"plugins": [
"jest"
]
}
+2
View File
@@ -0,0 +1,2 @@
github: [koenkk]
custom: https://www.paypal.me/koenkk
+30
View File
@@ -0,0 +1,30 @@
<!--
Did you read the FAQ?
https://www.zigbee2mqtt.io/information/FAQ.html
Unsupported device?
https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
A question?
Read the documentation: https://www.zigbee2mqtt.io/
Bug report:
- First make sure you are on the latest version of zigbee2mqtt.
- Make sure you are running the latest CC253X firmware from https://github.com/koenkk/z-stack-firmware.
- Provide a clear description of the problem.
- If applicable, provide steps how to reproduce the problem.
- Provide a log with `log_level` set to `debug`, see https://www.zigbee2mqtt.io/configuration/configuration.html
- DON'T copy logs directly here, post a link to https://hastebin.com/ or https://pastebin.com/.
-->
<!--Start your bug report below this line-->
# Bug Report
## What happened
## What did you expect to happen
## How to reproduce it (minimal and precise)
## Debug Info
zigbee2mqtt version:
CC253X firmware version:
+1
View File
@@ -0,0 +1 @@
preferredBranch: dev
+13
View File
@@ -0,0 +1,13 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+72
View File
@@ -0,0 +1,72 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# data
data/database.db
data/config.json
data/log*.txt
data/state.json
data/log
data-backup/
data/coordinator_backup.json
data/.storage
data/database.db.backup
# MacOS indexing file
.DS_Store
+25
View File
@@ -0,0 +1,25 @@
#tests
test
coverage
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
.github
azure-pipelines.yaml
#linters
.jscsrc
.jshintrc
.eslintrc*
.dockerignore
.eslintignore
#editor settings
.vscode
#src
docs
docker
images
+2
View File
@@ -0,0 +1,2 @@
tag-version-prefix=""
+75
View File
@@ -0,0 +1,75 @@
<div align="center">
<a href="https://github.com/koenkk/zigbee2mqtt">
<img width="150" height="150" src="images/logo.png">
</a>
<br>
<br>
<div style="display: flex;">
<a href="https://dev.azure.com/koenkk/zigbee/_build?definitionId=5">
<img src="https://dev.azure.com/koenkk/zigbee/_apis/build/status/Koenkk.zigbee2mqtt?branchName=dev">
</a>
<a href="https://github.com/Koenkk/zigbee2mqtt/releases">
<img src="https://img.shields.io/github/release/koenkk/zigbee2mqtt.svg">
</a>
<a href="https://github.com/Koenkk/zigbee2mqtt/stargazers">
<img src="https://img.shields.io/github/stars/koenkk/zigbee2mqtt.svg">
</a>
<a href="https://www.paypal.me/koenkk">
<img src="https://img.shields.io/badge/donate-PayPal-blue.svg">
</a>
<a href="https://discord.gg/dadfWYE">
<img src="https://img.shields.io/discord/556563650429583360.svg">
</a>
<a href="http://zigbee2mqtt.discourse.group/">
<img src="https://img.shields.io/discourse/https/zigbee2mqtt.discourse.group/status.svg">
</a>
<a>
<img src="https://img.shields.io/badge/Coverage-100%25-brightgreen.svg">
</a>
<a href="https://www.codacy.com/manual/Koenkk/zigbee2mqtt?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Koenkk/zigbee2mqtt&amp;utm_campaign=Badge_Grade">
<img src="https://api.codacy.com/project/badge/Grade/24f1e0fe39f04daa810e8a1416693d3f">
</a>
<a href="https://www.npmjs.com/package/zigbee2mqtt">
<img src="https://img.shields.io/npm/v/zigbee2mqtt">
</a>
</div>
<h1>Zigbee2mqtt 🌉 🐝</h1>
<p>
Allows you to use your Zigbee devices <b>without</b> the vendors bridge or gateway.
</p>
<p>
It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.
</p>
</div>
## [Getting started](https://www.zigbee2mqtt.io/#getting-started)
The [documentation](https://www.zigbee2mqtt.io/) provides you all the information needed to get up and running! Make sure you don't skip sections if this is your first visit, as there might be important details in there for you.
If you aren't familiar with **Zigbee** terminology make sure you [read this](https://www.zigbee2mqtt.io/information/zigbee_network.html) to help you out.
## [Integrations](https://www.zigbee2mqtt.io/#integration)
Zigbee2mqtt integrates well with (almost) every home automation solution because it uses MQTT. However the following integrations are worth mentioning:
<img align="left" height="100px" width="100px" src="https://user-images.githubusercontent.com/7738048/40914297-49e6e560-6800-11e8-8904-36cce896e5a8.png">
### [Home Assistant](https://www.home-assistant.io/)
- [Hassio](https://www.home-assistant.io/hassio/): Using [the official addon](https://github.com/danielwelch/hassio-zigbee2mqtt) from [danielwelch](https://github.com/danielwelch)
- Generic install or Hassbian: Using instructions [here](https://www.zigbee2mqtt.io/integration/home_assistant.html)
<img align="left" height="100px" width="100px" src="https://user-images.githubusercontent.com/2734836/47615848-b8dd8700-dabd-11e8-9d77-175002dd8987.png">
### [Domoticz](https://www.domoticz.com/)
- Integration implemented in [domoticz-zigbee2mqtt-plugin](https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin)
<br>
## Architecture
![Architecture](images/architecture.png)
## Supported devices
See [Supported devices](https://www.zigbee2mqtt.io/information/supported_devices.html) to check whether your device is supported. There is quite an extensive list, including devices from vendors like Xiaomi, Ikea, Philips, OSRAM and more.
If it's not listed in [Supported devices](https://www.zigbee2mqtt.io/information/supported_devices.html), support can be added (fairly) easy, see [How to support new devices](https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html).
## Support & help
If you need assistance you can check [opened issues](https://github.com/Koenkk/zigbee2mqtt/issues). Feel free to help with Pull Requests when you were able to fix things or add new devices or just share the love on social media.
+90
View File
@@ -0,0 +1,90 @@
trigger:
tags:
include:
- '*'
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
steps:
# Prepare
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- bash: npm ci
displayName: 'Install dependencies'
# Verify
- bash: npm run test-with-coverage
displayName: 'Test'
- bash: npm run eslint
displayName: 'Lint'
# NPM
- task: Npm@1
inputs:
command: publish
publishEndpoint: npm
displayName: 'Publish to npm'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), ne(variables['Build.Reason'], 'PullRequest'))
# Docker
- task: DockerInstaller@0
displayName: Docker install
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
dockerVersion: 19.03.5
releaseType: stable
- task: Docker@2
displayName: Docker registry login
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
command: login
containerRegistry: docker_registry
- bash: |
sudo wget -O /usr/local/bin/buildx https://github.com/docker/buildx/releases/download/v0.3.1/buildx-v0.3.1.linux-amd64
sudo chmod a+x /usr/local/bin/buildx
docker run --rm --privileged hypriot/qemu-register:v2.7.0
buildx create --use
buildx ls
displayName: 'Docker setup'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- bash: |
buildx build \
--build-arg COMMIT=$(git rev-parse --short HEAD) \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 \
-f docker/Dockerfile \
--push \
-t koenkk/zigbee2mqtt:latest-dev \
.
displayName: 'Docker build dev'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'), ne(variables['Build.Reason'], 'PullRequest'))
- bash: |
TAG="$(git describe --tags)"
buildx build \
--build-arg COMMIT=$(git rev-parse --short HEAD) \
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7,linux/386 \
-f docker/Dockerfile \
--push \
-t koenkk/zigbee2mqtt:latest -t "koenkk/zigbee2mqtt:$TAG" \
.
displayName: 'Docker build release'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), ne(variables['Build.Reason'], 'PullRequest'))
# Trigger downstream
- bash: |
BODY="{\"request\": {\"branch\": \"master\"}}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $(TRAVIS_TOKEN)" \
-d "$BODY" \
"https://api.travis-ci.org/repo/danielwelch%2Fhassio-zigbee2mqtt/requests"
displayName: 'Trigger Hass.io build'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'), ne(variables['Build.Reason'], 'PullRequest'))
+20
View File
@@ -0,0 +1,20 @@
# Home Assistant integration (MQTT discovery)
homeassistant: false
# allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://localhost'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
-30
View File
@@ -1,30 +0,0 @@
import EventBus from "./eventBus";
import type Extension from "./extension/extension";
import Mqtt, { type MqttPublishOptions } from "./mqtt";
import State from "./state";
import Zigbee from "./zigbee";
export declare class Controller {
#private;
readonly eventBus: EventBus;
readonly zigbee: Zigbee;
readonly state: State;
readonly mqtt: Mqtt;
private restartCallback;
private exitCallback;
readonly extensions: Set<Extension>;
readonly extensionArgs: ConstructorParameters<typeof Extension>;
private sdNotify;
constructor(restartCallback: () => Promise<void>, exitCallback: (code: number, restart: boolean) => Promise<void>);
start(): Promise<void>;
enableDisableExtension(enable: boolean, name: string): Promise<void>;
getExtension(name: string): Extension | undefined;
addExtension(extension: Extension): Promise<void>;
removeExtension(extension: Extension): Promise<void>;
private startExtension;
private stopExtension;
stop(restart?: boolean, code?: number, signal?: NodeJS.Signals | undefined): Promise<void>;
exit(code: number, restart?: boolean): Promise<void>;
publishEntityState(entity: Group | Device, payload: KeyValue, stateChangeReason?: StateChangeReason): Promise<void>;
iteratePayloadAttributeOutput(topicRoot: string, payload: KeyValue, options: Partial<MqttPublishOptions>): Promise<void>;
}
//# sourceMappingURL=controller.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../lib/controller.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAUnD,OAAO,IAAI,EAAE,EAAC,KAAK,kBAAkB,EAAC,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,MAAM,SAAS,CAAC;AAO5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,qBAAa,UAAU;;IAGnB,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,KAAK,EAAE,KAAK,CAAC;IAC7B,SAAgB,IAAI,EAAE,IAAI,CAAC;IAC3B,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,YAAY,CAAoD;IACxE,SAAgB,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3C,SAAgB,aAAa,EAAE,qBAAqB,CAAC,OAAO,SAAS,CAAC,CAAC;IACvE,OAAO,CAAC,QAAQ,CAA2C;IAE3D,YAAY,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,EA4ChH;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA+H3B;IAEW,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkF/E;IAEM,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMvD;IAEW,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAS5D;IAEK,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzD;YAEa,cAAc;YAQd,aAAa;IAQrB,IAAI,CAAC,OAAO,UAAQ,EAAE,IAAI,SAAI,EAAE,MAAM,GAAE,MAAM,CAAC,OAAO,GAAG,SAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCnG;IAEK,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvD;IAEW,kBAAkB,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8E9H;IAEK,6BAA6B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B7H;CACJ"}
-69
View File
@@ -1,69 +0,0 @@
type ListenerKey = object;
type Stats = {
devices: Map<string, // IEEE address
{
lastSeenChanges?: {
messages: number;
first: number;
};
leaveCounts: number;
networkAddressChanges: number;
}>;
mqtt: {
published: number;
received: number;
};
};
export default class EventBus {
private callbacksByExtension;
private emitter;
readonly stats: Stats;
constructor();
emitAdapterDisconnected(): void;
onAdapterDisconnected(key: ListenerKey, callback: () => Promise<void>): void;
emitPermitJoinChanged(data: eventdata.PermitJoinChanged): void;
onPermitJoinChanged(key: ListenerKey, callback: (data: eventdata.PermitJoinChanged) => void): void;
emitEntityRenamed(data: eventdata.EntityRenamed): void;
onEntityRenamed(key: ListenerKey, callback: (data: eventdata.EntityRenamed) => void): void;
emitEntityRemoved(data: eventdata.EntityRemoved): void;
onEntityRemoved(key: ListenerKey, callback: (data: eventdata.EntityRemoved) => void): void;
emitLastSeenChanged(data: eventdata.LastSeenChanged): void;
onLastSeenChanged(key: ListenerKey, callback: (data: eventdata.LastSeenChanged) => void): void;
emitDeviceNetworkAddressChanged(data: eventdata.DeviceNetworkAddressChanged): void;
onDeviceNetworkAddressChanged(key: ListenerKey, callback: (data: eventdata.DeviceNetworkAddressChanged) => void): void;
emitDeviceAnnounce(data: eventdata.DeviceAnnounce): void;
onDeviceAnnounce(key: ListenerKey, callback: (data: eventdata.DeviceAnnounce) => void): void;
emitDeviceInterview(data: eventdata.DeviceInterview): void;
onDeviceInterview(key: ListenerKey, callback: (data: eventdata.DeviceInterview) => void): void;
emitDeviceJoined(data: eventdata.DeviceJoined): void;
onDeviceJoined(key: ListenerKey, callback: (data: eventdata.DeviceJoined) => void): void;
emitEntityOptionsChanged(data: eventdata.EntityOptionsChanged): void;
onEntityOptionsChanged(key: ListenerKey, callback: (data: eventdata.EntityOptionsChanged) => void): void;
emitExposesChanged(data: eventdata.ExposesChanged): void;
onExposesChanged(key: ListenerKey, callback: (data: eventdata.ExposesChanged) => void): void;
emitDeviceLeave(data: eventdata.DeviceLeave): void;
onDeviceLeave(key: ListenerKey, callback: (data: eventdata.DeviceLeave) => void): void;
emitDeviceMessage(data: eventdata.DeviceMessage): void;
onDeviceMessage(key: ListenerKey, callback: (data: eventdata.DeviceMessage) => void): void;
emitMQTTMessage(data: eventdata.MQTTMessage): void;
onMQTTMessage(key: ListenerKey, callback: (data: eventdata.MQTTMessage) => void): void;
emitMQTTMessagePublished(data: eventdata.MQTTMessagePublished): void;
onMQTTMessagePublished(key: ListenerKey, callback: (data: eventdata.MQTTMessagePublished) => void): void;
emitPublishEntityState(data: eventdata.PublishEntityState): void;
onPublishEntityState(key: ListenerKey, callback: (data: eventdata.PublishEntityState) => void): void;
emitGroupMembersChanged(data: eventdata.GroupMembersChanged): void;
onGroupMembersChanged(key: ListenerKey, callback: (data: eventdata.GroupMembersChanged) => void): void;
emitDevicesChanged(): void;
onDevicesChanged(key: ListenerKey, callback: () => void): void;
emitScenesChanged(data: eventdata.ScenesChanged): void;
onScenesChanged(key: ListenerKey, callback: (data: eventdata.ScenesChanged) => void): void;
emitReconfigure(data: eventdata.Reconfigure): void;
onReconfigure(key: ListenerKey, callback: (data: eventdata.Reconfigure) => void): void;
emitStateChange(data: eventdata.StateChange): void;
onStateChange(key: ListenerKey, callback: (data: eventdata.StateChange) => void): void;
emitExposesAndDevicesChanged(device: Device): void;
private on;
removeListeners(key: ListenerKey): void;
}
export {};
//# sourceMappingURL=eventBus.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../lib/eventBus.ts"],"names":[],"mappings":"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"}
-34
View File
@@ -1,34 +0,0 @@
import Extension from "./extension";
export default class Availability extends Extension {
/** Mapped by IEEE address */
private readonly timers;
/** Mapped by IEEE address or Group ID */
private readonly lastPublishedAvailabilities;
/** Mapped by IEEE address */
private readonly pingBackoffs;
/** IEEE addresses, waiting for last seen changes to take them out of "availability sleep" */
private readonly backoffPausedDevices;
/** Mapped by IEEE address */
private readonly retrieveStateDebouncers;
private pingQueue;
private pingQueueExecuting;
private stopped;
private getTimeout;
private getMaxJitter;
private getBackoff;
private getPauseOnBackoffGt;
private isActiveDevice;
private isAvailable;
private resetTimer;
private clearTimer;
private addToPingQueue;
private removeFromPingQueue;
private pingQueueExecuteNext;
start(): Promise<void>;
private publishAvailabilityForAllEntities;
private publishAvailability;
private onLastSeenChanged;
stop(): Promise<void>;
private retrieveState;
}
//# sourceMappingURL=availability.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../lib/extension/availability.ts"],"names":[],"mappings":"AASA,OAAO,SAAS,MAAM,aAAa,CAAC;AAcpC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IAC/C,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,yCAAyC;IACzC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAuC;IACnF,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,6FAA6F;IAC7F,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAqB;IAC1D,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAiC;IACzE,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,UAAU;IAqClB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,mBAAmB;YAOb,oBAAoB;IA4DnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA+BpC;YAEa,iCAAiC;YAQjC,mBAAmB;YAoCb,iBAAiB;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CASnC;IAED,OAAO,CAAC,aAAa;CAoDxB"}
-15
View File
@@ -1,15 +0,0 @@
import Extension from "./extension";
export default class Bind extends Extension {
#private;
private pollDebouncers;
start(): Promise<void>;
private parseMQTTMessage;
private onMQTTMessage;
private publishResponse;
onGroupMembersChanged(data: eventdata.GroupMembersChanged): Promise<void>;
getSetupReportingEndpoints(bind: zh.Bind, coordinatorEp: zh.Endpoint): zh.Endpoint[];
setupReporting(binds: zh.Bind[]): Promise<void>;
disableUnnecessaryReportings(target: zh.Group | zh.Endpoint): Promise<void>;
poll(data: eventdata.DeviceMessage): Promise<void>;
}
//# sourceMappingURL=bind.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../lib/extension/bind.ts"],"names":[],"mappings":"AAaA,OAAO,SAAS,MAAM,aAAa,CAAC;AA4KpC,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAS;;IAEvC,OAAO,CAAC,cAAc,CAAiC;IAGxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpC;IAED,OAAO,CAAC,gBAAgB;YAiFJ,aAAa;YA+InB,eAAe;IAcjB,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpF;IAED,0BAA0B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAkBnF;IAEK,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCpD;IAEK,4BAA4B,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDhF;IAEW,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwE7D;CACJ"}
-59
View File
@@ -1,59 +0,0 @@
import Device from "../model/device";
import type Group from "../model/group";
import type { Zigbee2MQTTDevice, Zigbee2MQTTResponse } from "../types/api";
import Extension from "./extension";
export default class Bridge extends Extension {
#private;
private zigbee2mqttVersion;
private zigbeeHerdsmanVersion;
private zigbeeHerdsmanConvertersVersion;
private coordinatorVersion;
private restartRequired;
private lastJoinedDeviceIeeeAddr?;
private lastBridgeLoggingPayload?;
private logTransport;
private requestLookup;
start(): Promise<void>;
stop(): Promise<void>;
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
/**
* Requests
*/
deviceOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/device/options">>;
groupOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/group/options">>;
bridgeOptions(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/options">>;
deviceRemove(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/remove">>;
groupRemove(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/remove">>;
healthCheck(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/health_check">>;
coordinatorCheck(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/coordinator_check">>;
groupAdd(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/add">>;
deviceRename(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/rename">>;
groupRename(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/group/rename">>;
restart(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/restart">>;
backup(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/backup">>;
installCodeAdd(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/install_code/add">>;
permitJoin(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/permit_join">>;
touchlinkIdentify(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/identify">>;
touchlinkFactoryReset(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/factory_reset">>;
touchlinkScan(message: KeyValue | string): Promise<Zigbee2MQTTResponse<"bridge/response/touchlink/scan">>;
/**
* Utils
*/
changeEntityOptions<T extends "device" | "group">(entityType: T, message: KeyValue | string): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/options" : "bridge/response/group/options">>;
deviceReportingConfigure(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/reporting/configure">>;
deviceReportingRead(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/reporting/read">>;
deviceInterview(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/interview">>;
deviceGenerateExternalDefinition(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/device/generate_external_definition">>;
action(message: string | KeyValue): Promise<Zigbee2MQTTResponse<"bridge/response/action">>;
renameEntity<T extends "device" | "group">(entityType: T, message: string | KeyValue): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/rename" : "bridge/response/group/rename">>;
removeEntity<T extends "device" | "group">(entityType: T, message: string | KeyValue): Promise<Zigbee2MQTTResponse<T extends "device" ? "bridge/response/device/remove" : "bridge/response/group/remove">>;
getEntity(type: "group", id: string): Group;
getEntity(type: "device", id: string): Device;
getEntity(type: "group" | "device", id: string): Device | Group;
publishInfo(): Promise<void>;
publishDevices(): Promise<void>;
publishGroups(): Promise<void>;
publishDefinitions(): Promise<void>;
getDefinitionPayload(device: Device): Zigbee2MQTTDevice["definition"] | undefined;
}
//# sourceMappingURL=bridge.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../lib/extension/bridge.ts"],"names":[],"mappings":"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"}
-14
View File
@@ -1,14 +0,0 @@
import Extension from "./extension";
/**
* This extension calls the zigbee-herdsman-converters definition configure() method
*/
export default class Configure extends Extension {
private configuring;
private attempts;
private topic;
private onReconfigure;
private onMQTTMessage;
start(): Promise<void>;
private configure;
}
//# sourceMappingURL=configure.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../lib/extension/configure.ts"],"names":[],"mappings":"AAOA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;IAC5C,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,KAAK,CAAuE;YAEhE,aAAa;YAUb,aAAa;IA8BxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA0B9B;YAEa,SAAS;CAqE1B"}
-34
View File
@@ -1,34 +0,0 @@
declare abstract class Extension {
protected zigbee: Zigbee;
protected mqtt: Mqtt;
protected state: State;
protected publishEntityState: PublishEntityState;
protected eventBus: EventBus;
protected enableDisableExtension: (enable: boolean, name: string) => Promise<void>;
protected restartCallback: () => Promise<void>;
protected addExtension: (extension: Extension) => Promise<void>;
/**
* Besides initializing variables, the constructor should do nothing!
*
* @param {Zigbee} zigbee Zigbee controller
* @param {Mqtt} mqtt MQTT controller
* @param {State} state State controller
* @param {Function} publishEntityState Method to publish device state to MQTT.
* @param {EventBus} eventBus The event bus
* @param {enableDisableExtension} enableDisableExtension Enable/disable extension method
* @param {restartCallback} restartCallback Restart Zigbee2MQTT
* @param {addExtension} addExtension Add an extension
*/
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
/**
* Is called once the extension has to start
*/
start(): Promise<void>;
/**
* Is called once the extension has to stop
*/
stop(): Promise<void>;
adjustMessageBeforePublish(_entity: Group | Device, _message: KeyValue): void;
}
export default Extension;
//# sourceMappingURL=extension.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../lib/extension/extension.ts"],"names":[],"mappings":"AAAA,uBAAe,SAAS;IACpB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACvB,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACjD,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,SAAS,CAAC,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,SAAS,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;;;;;;;;;OAWG;IACH,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAUxD;IAED;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IAE/B;;OAEG;IAGG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1B;IAEM,0BAA0B,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAG;CAC1F;eAEc,SAAS"}
-10
View File
@@ -1,10 +0,0 @@
import type { ExternalDefinitionWithExtend } from "zigbee-herdsman-converters";
import ExternalJSExtension from "./externalJS";
type TModule = ExternalDefinitionWithExtend | ExternalDefinitionWithExtend[];
export default class ExternalConverters extends ExternalJSExtension<TModule> {
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
protected removeJS(name: string, _mod: TModule): Promise<void>;
protected loadJS(name: string, mod: TModule, newName?: string): Promise<void>;
}
export {};
//# sourceMappingURL=externalConverters.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"externalConverters.d.ts","sourceRoot":"","sources":["../../lib/extension/externalConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,4BAA4B,CAAC;AAK7E,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAE/C,KAAK,OAAO,GAAG,4BAA4B,GAAG,4BAA4B,EAAE,CAAC;AAE7E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IACxE,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAcxD;IAED,UAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAInE;IAED,UAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBlF;CACJ"}
-10
View File
@@ -1,10 +0,0 @@
import type Extension from "./extension";
import ExternalJSExtension from "./externalJS";
type TModule = new (...args: ConstructorParameters<typeof Extension>) => Extension;
export default class ExternalExtensions extends ExternalJSExtension<TModule> {
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
protected removeJS(_name: string, mod: TModule): Promise<void>;
protected loadJS(name: string, mod: TModule, newName?: string): Promise<void>;
}
export {};
//# sourceMappingURL=externalExtensions.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"externalExtensions.d.ts","sourceRoot":"","sources":["../../lib/extension/externalExtensions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAE/C,KAAK,OAAO,GAAG,KAAK,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,SAAS,CAAC,KAAK,SAAS,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IACxE,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAcxD;IAED,UAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;IAED,UAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BlF;CACJ"}
-33
View File
@@ -1,33 +0,0 @@
import Extension from "./extension";
export default abstract class ExternalJSExtension<M> extends Extension {
protected folderName: string;
protected mqttTopic: string;
protected requestRegex: RegExp;
protected basePath: string;
protected nodeModulesSymlinked: boolean;
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>, mqttTopic: string, folderName: string);
/**
* In case the external JS is not in the Z2M install dir (e.g. when `ZIGBEE2MQTT_DATA` is used), the external
* JS cannot import from `node_modules`.
* To workaround this create a symlink to `node_modules` in the external JS dir.
* https://nodejs.org/api/esm.html#no-node_path
*/
private symlinkNodeModulesIfNecessary;
start(): Promise<void>;
stop(): Promise<void>;
private getFilePath;
protected getFileCode(name: string): string;
protected getFiles(): Generator<{
name: string;
code: string;
}>;
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
protected abstract removeJS(name: string, mod: M): Promise<void>;
protected abstract loadJS(name: string, mod: M, newName?: string): Promise<void>;
private remove;
private save;
private loadFiles;
private publishExternalJS;
private importFile;
}
//# sourceMappingURL=externalJS.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"externalJS.d.ts","sourceRoot":"","sources":["../../lib/extension/externalJS.ts"],"names":[],"mappings":"AAUA,OAAO,SAAS,MAAM,aAAa,CAAC;AAKpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,mBAAmB,CAAC,CAAC,CAAE,SAAQ,SAAS;IAClE,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,oBAAoB,UAAS;IAEvC,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EACrD,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAQrB;IAED;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IAuBtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAKpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CASnC;IAED,OAAO,CAAC,WAAW;IAQnB,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;IAED,SAAS,CAAE,QAAQ,IAAI,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAQ7D;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BpE;IAED,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAE7D,MAAM;YAwBN,IAAI;YA+BV,SAAS;YAqBT,iBAAiB;YAQjB,UAAU;CAc3B"}
-18
View File
@@ -1,18 +0,0 @@
import Extension from "./extension";
/**
* This extension servers the frontend
*/
export declare class Frontend extends Extension {
private mqttBaseTopic;
private server;
private wss;
private baseUrl;
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
start(): Promise<void>;
stop(): Promise<void>;
private onUpgrade;
private onWebSocketConnection;
private onMQTTPublishMessageOrEntityState;
}
export default Frontend;
//# sourceMappingURL=frontend.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../lib/extension/frontend.ts"],"names":[],"mappings":"AAeA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,qBAAa,QAAS,SAAQ,SAAS;IACnC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,GAAG,CAAoB;IAC/B,OAAO,CAAC,OAAO,CAAS;IAExB,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAQxD;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAqFpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAanC;IAEK,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,qBAAqB;IAsC7B,OAAO,CAAC,iCAAiC;CA4BlD;eAEc,QAAQ"}
-13
View File
@@ -1,13 +0,0 @@
import Extension from "./extension";
export default class Groups extends Extension {
#private;
private lastOptimisticState;
start(): Promise<void>;
onStateChange(data: eventdata.StateChange): Promise<void>;
private shouldPublishPayloadForGroup;
private areAllMembersOffOrClosed;
private parseMQTTMessage;
private onMQTTMessage;
private publishResponse;
}
//# sourceMappingURL=groups.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../lib/extension/groups.ts"],"names":[],"mappings":"AAWA,OAAO,SAAS,MAAM,aAAa,CAAC;AA0BpC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;;IAEzC,OAAO,CAAC,mBAAmB,CAA+B;IAG3C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAoGpE;IAED,OAAO,CAAC,4BAA4B;IASpC,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,gBAAgB;YAsEJ,aAAa;YA6DnB,eAAe;CAahC"}
-8
View File
@@ -1,8 +0,0 @@
import Extension from "./extension";
export default class Health extends Extension {
#private;
start(): Promise<void>;
stop(): Promise<void>;
clearStats(): void;
}
//# sourceMappingURL=health.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../lib/extension/health.ts"],"names":[],"mappings":"AAKA,OAAO,SAAS,MAAM,aAAa,CAAC;AAOpC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;;IAG1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAGnC;IAED,UAAU,IAAI,IAAI,CAIjB;CA+CJ"}
-86
View File
@@ -1,86 +0,0 @@
import type { Zh } from "zigbee-herdsman-converters/lib/types";
import Extension from "./extension";
interface MockProperty {
property: string;
value: KeyValue | string | null;
}
interface DiscoveryEntry {
mockProperties: MockProperty[];
type: string;
object_id: string;
discovery_payload: KeyValue;
endpoint?: Zh.Endpoint;
}
interface ActionData {
action: string;
button?: string;
scene?: string;
region?: string;
}
/**
* This class handles the bridge entity configuration for Home Assistant Discovery.
*/
declare class Bridge {
private coordinatorIeeeAddress;
private coordinatorType;
private coordinatorFirmwareVersion;
private discoveryEntries;
readonly options: {
ID?: string;
homeassistant?: KeyValue;
};
get ID(): string;
get name(): string;
get hardwareVersion(): string;
get firmwareVersion(): string;
get configs(): DiscoveryEntry[];
constructor(ieeeAdress: string, version: zh.CoordinatorVersion, discovery: DiscoveryEntry[]);
isDevice(): this is Device;
isGroup(): this is Group;
}
/**
* This extensions handles integration with HomeAssistant
*/
export declare class HomeAssistant extends Extension {
private discovered;
private discoveryTopic;
private discoveryRegex;
private discoveryRegexWoTopic;
private groupMemberLookup;
private statusTopic;
private legacyActionSensor;
private experimentalEventEntities;
private zigbee2MQTTVersion;
private discoveryOrigin;
private bridge;
private bridgeIdentifier;
private actionValueTemplate;
constructor(zigbee: Zigbee, mqtt: Mqtt, state: State, publishEntityState: PublishEntityState, eventBus: EventBus, enableDisableExtension: (enable: boolean, name: string) => Promise<void>, restartCallback: () => Promise<void>, addExtension: (extension: Extension) => Promise<void>);
start(): Promise<void>;
private getDiscovered;
private exposeToConfig;
onEntityRemoved(data: eventdata.EntityRemoved): Promise<void>;
onGroupMembersChanged(data: eventdata.GroupMembersChanged): Promise<void>;
onPublishEntityState(data: eventdata.PublishEntityState): Promise<void>;
onEntityRenamed(data: eventdata.EntityRenamed): Promise<void>;
private getConfigs;
private discover;
private onMQTTMessage;
onZigbeeEvent(data: {
device: Device;
}): Promise<void>;
onScenesChanged(data: eventdata.ScenesChanged): Promise<void>;
private getDevicePayload;
adjustMessageBeforePublish(entity: Device | Group | Bridge, message: KeyValue): void;
private getEncodedBaseTopic;
private getDiscoveryTopic;
private publishDeviceTriggerDiscover;
private getBridgeEntity;
parseActionValue(action: string): ActionData;
private buildAction;
private prepareActionEventTypes;
private parseGroupsFromRegex;
private getActionValueTemplate;
}
export default HomeAssistant;
//# sourceMappingURL=homeassistant.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"homeassistant.d.ts","sourceRoot":"","sources":["../../lib/extension/homeassistant.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,sCAAsC,CAAC;AAK7D,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,UAAU,YAAY;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,UAAU,cAAc;IACpB,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;CAC1B;AASD,UAAU,UAAU;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAoZD;;GAEG;AACH,cAAM,MAAM;IACR,OAAO,CAAC,sBAAsB,CAAS;IACvC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,0BAA0B,CAAS;IAC3C,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,QAAQ,CAAC,OAAO,EAAE;QACd,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,aAAa,CAAC,EAAE,QAAQ,CAAC;KAC5B,CAAC;IAGF,IAAI,EAAE,IAAI,MAAM,CAEf;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,eAAe,IAAI,MAAM,CAE5B;IACD,IAAI,eAAe,IAAI,MAAM,CAE5B;IACD,IAAI,OAAO,IAAI,cAAc,EAAE,CAE9B;IAED,YAAY,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,kBAAkB,EAAE,SAAS,EAAE,cAAc,EAAE,EAY1F;IAED,QAAQ,IAAI,IAAI,IAAI,MAAM,CAEzB;IACD,OAAO,IAAI,IAAI,IAAI,KAAK,CAEvB;CACJ;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,SAAS;IACxC,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,qBAAqB,CAA8B;IAC3D,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,kBAAkB,CAAU;IACpC,OAAO,CAAC,yBAAyB,CAAU;IAE3C,OAAO,CAAC,kBAAkB,CAAS;IAEnC,OAAO,CAAC,eAAe,CAA0C;IAEjE,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,mBAAmB,CAAS;IAEpC,YACI,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,QAAQ,EAClB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EACxE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACpC,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,EAuBxD;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAyDpC;IAED,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,cAAc;IAs3BV,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CASxE;IAEW,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;IAEW,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkElF;IAEW,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BxE;IAED,OAAO,CAAC,UAAU;YA8HJ,QAAQ;YAuSF,aAAa;IAkErB,aAAa,CAAC,IAAI,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D;IAEW,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBxE;IAED,OAAO,CAAC,gBAAgB;IAoDf,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAoB5F;IAED,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,iBAAiB;YAKX,4BAA4B;IA2C1C,OAAO,CAAC,eAAe;IA0IvB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAwB3C;IAED,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,sBAAsB;CA0BjC;eAEc,aAAa"}
-15
View File
@@ -1,15 +0,0 @@
import type { Zigbee2MQTTNetworkMap } from "../types/api";
import Extension from "./extension";
/**
* This extension creates a network map
*/
export default class NetworkMap extends Extension {
#private;
start(): Promise<void>;
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
raw(topology: Zigbee2MQTTNetworkMap): Zigbee2MQTTNetworkMap;
graphviz(topology: Zigbee2MQTTNetworkMap): string;
plantuml(topology: Zigbee2MQTTNetworkMap): string;
networkScan(includeRoutes: boolean): Promise<Zigbee2MQTTNetworkMap>;
}
//# sourceMappingURL=networkMap.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"networkMap.d.ts","sourceRoot":"","sources":["../../lib/extension/networkMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAKxE,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS;;IAI9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpC;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCpE;IAED,GAAG,CAAC,QAAQ,EAAE,qBAAqB,GAAG,qBAAqB,CAE1D;IAED,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAqEhD;IAED,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAmDhD;IAEK,WAAW,CAAC,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8IxE;CACJ"}
-11
View File
@@ -1,11 +0,0 @@
import Extension from "./extension";
/**
* This extension calls the zigbee-herdsman-converters onEvent.
*/
export default class OnEvent extends Extension {
#private;
start(): Promise<void>;
stop(): Promise<void>;
private callOnEvent;
}
//# sourceMappingURL=onEvent.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"onEvent.d.ts","sourceRoot":"","sources":["../../lib/extension/onEvent.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;;IAW3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAuCpC;IAEc,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CASnC;YAEa,WAAW;CAmB5B"}
-22
View File
@@ -1,22 +0,0 @@
import Extension from "./extension";
type UpdateState = "updating" | "idle" | "available" | "scheduled";
export interface UpdatePayload {
update: {
progress?: number;
remaining?: number;
state: UpdateState;
installed_version: number | null;
latest_version: number | null;
latest_source: string | null;
latest_release_notes: string | null;
};
}
export default class OTAUpdate extends Extension {
#private;
start(): Promise<void>;
clearState(): void;
private onZigbeeEvent;
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
}
export {};
//# sourceMappingURL=otaUpdate.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"otaUpdate.d.ts","sourceRoot":"","sources":["../../lib/extension/otaUpdate.ts"],"names":[],"mappings":"AAaA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,KAAK,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,WAAW,CAAC;QACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;KACvC,CAAC;CACL;AAuBD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;;IAS7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAepC;IAGD,UAAU,IAAI,IAAI,CAGjB;YAWmB,aAAa;IAmJrB,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsPpE;CAwDJ"}
-18
View File
@@ -1,18 +0,0 @@
import Extension from "./extension";
export declare const loadTopicGetSetRegex: () => void;
interface ParsedTopic {
ID: string;
endpoint: string | undefined;
attribute: string;
type: "get" | "set";
}
export default class Publish extends Extension {
start(): Promise<void>;
parseTopic(topic: string): ParsedTopic | undefined;
parseMessage(parsedTopic: ParsedTopic, data: eventdata.MQTTMessage): KeyValue | undefined;
updateMessageHomeAssistant(message: KeyValue, entityState: KeyValue): void;
onMQTTMessage(data: eventdata.MQTTMessage): Promise<void>;
private getDefinitionConverters;
}
export {};
//# sourceMappingURL=publish.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../lib/extension/publish.ts"],"names":[],"mappings":"AAQA,OAAO,SAAS,MAAM,aAAa,CAAC;AAKpC,eAAO,MAAM,oBAAoB,QAAO,IAEvC,CAAC;AAKF,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAE3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAED,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAsBjD;IAED,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS,CAcxF;IAED,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,GAAG,IAAI,CAezE;IAEW,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqNpE;IAED,OAAO,CAAC,uBAAuB;CAOlC"}
-13
View File
@@ -1,13 +0,0 @@
import Extension from "./extension";
export default class Receive extends Extension {
private elapsed;
private debouncers;
private throttlers;
start(): Promise<void>;
onPublishEntityState(data: eventdata.PublishEntityState): void;
publishDebounce(device: Device, payload: KeyValue, time: number, debounceIgnore: string[] | undefined): void;
publishThrottle(device: Device, payload: KeyValue, time: number): Promise<void>;
isPayloadConflicted(newPayload: KeyValue, oldPayload: KeyValue, debounceIgnore: string[] | undefined): boolean;
onDeviceMessage(data: eventdata.DeviceMessage): Promise<void>;
}
//# sourceMappingURL=receive.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../lib/extension/receive.ts"],"names":[],"mappings":"AASA,OAAO,SAAS,MAAM,aAAa,CAAC;AAIpC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAE1C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,UAAU,CAAqE;IACvF,OAAO,CAAC,UAAU,CAAoD;IAGvD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;IAEK,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAgBnE;IAED,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CA0B3G;IAEK,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYpF;IAMD,mBAAmB,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAU7G;IAEW,eAAe,CAAC,IAAI,EAAE,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAuFxE;CACJ"}
-28
View File
@@ -1,28 +0,0 @@
import type { OtaExtraMetas } from "zigbee-herdsman/dist/controller/tstype";
import type { CustomClusters } from "zigbee-herdsman/dist/zspec/zcl/definition/tstype";
import * as zhc from "zigbee-herdsman-converters";
export default class Device {
#private;
zh: zh.Device;
definition?: zhc.Definition;
private _definitionModelID?;
get ieeeAddr(): string;
get ID(): string;
get options(): DeviceOptionsWithId;
get name(): string;
get isSupported(): boolean;
get customClusters(): CustomClusters;
get otaExtraMetas(): OtaExtraMetas;
get interviewed(): boolean;
constructor(device: zh.Device);
exposes(): zhc.Expose[];
resolveDefinition(ignoreCache?: boolean): Promise<void>;
reInterview(eventBus: EventBus): Promise<void>;
ensureInSettings(): void;
endpoint(key?: string | number): zh.Endpoint | undefined;
endpointName(endpoint: zh.Endpoint): string | undefined;
getEndpointNames(): string[];
isDevice(): this is Device;
isGroup(): this is Group;
}
//# sourceMappingURL=device.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../lib/model/device.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,kDAAkD,CAAC;AACrF,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAYlD,MAAM,CAAC,OAAO,OAAO,MAAM;;IAChB,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IACnC,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAGpC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,EAAE,IAAI,MAAM,CAEf;IACD,IAAI,OAAO,IAAI,mBAAmB,CAGjC;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,cAAc,IAAI,cAAc,CAEnC;IACD,IAAI,aAAa,IAAI,aAAa,CAEjC;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,YAAY,MAAM,EAAE,EAAE,CAAC,MAAM,EAE5B;IAED,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,CAWtB;IAEK,iBAAiB,CAAC,WAAW,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1D;IAEK,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAenD;IAED,gBAAgB,IAAI,IAAI,CAIvB;IAED,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,QAAQ,GAAG,SAAS,CAgBvD;IAED,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,CAgBtD;IAED,gBAAgB,IAAI,MAAM,EAAE,CAY3B;IAED,QAAQ,IAAI,IAAI,IAAI,MAAM,CAEzB;IAED,OAAO,IAAI,IAAI,IAAI,KAAK,CAEvB;CACJ"}
-16
View File
@@ -1,16 +0,0 @@
import type * as zhc from "zigbee-herdsman-converters";
export default class Group {
zh: zh.Group;
private resolveDevice;
get ID(): number;
get options(): GroupOptions;
get name(): string;
constructor(group: zh.Group, resolveDevice: (ieeeAddr: string) => Device | undefined);
ensureInSettings(): void;
hasMember(device: Device): boolean;
membersDevices(): Generator<Device>;
membersDefinitions(): zhc.Definition[];
isDevice(): this is Device;
isGroup(): this is Group;
}
//# sourceMappingURL=group.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../lib/model/group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAIvD,MAAM,CAAC,OAAO,OAAO,KAAK;IACf,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;IACpB,OAAO,CAAC,aAAa,CAA2C;IAGhE,IAAI,EAAE,IAAI,MAAM,CAEf;IACD,IAAI,OAAO,IAAI,YAAY,CAG1B;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,YAAY,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EAGnF;IAED,gBAAgB,IAAI,IAAI,CAIvB;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjC;IAEA,cAAc,IAAI,SAAS,CAAC,MAAM,CAAC,CAQnC;IAED,kBAAkB,IAAI,GAAG,CAAC,UAAU,EAAE,CAUrC;IAED,QAAQ,IAAI,IAAI,IAAI,MAAM,CAEzB;IACD,OAAO,IAAI,IAAI,IAAI,KAAK,CAEvB;CACJ"}
-43
View File
@@ -1,43 +0,0 @@
import type { IClientPublishOptions } from "mqtt";
export interface MqttPublishOptions {
clientOptions: IClientPublishOptions;
baseTopic: string;
skipLog: boolean;
skipReceive: boolean;
meta: {
isEntityState?: boolean;
};
}
export default class Mqtt {
private publishedTopics;
private connectionTimer?;
private client;
private eventBus;
private republishRetainedTimer?;
private defaultPublishOptions;
retainedMessages: {
[s: string]: {
topic: string;
payload: string;
options: MqttPublishOptions;
};
};
get info(): {
version: 3 | 4 | 5 | undefined;
server: string;
};
get stats(): {
connected: boolean;
queued: number;
};
constructor(eventBus: EventBus);
connect(): Promise<void>;
disconnect(): Promise<void>;
subscribe(topic: string): Promise<void>;
unsubscribe(topic: string): Promise<void>;
private onConnect;
onMessage(topic: string, message: Buffer): void;
isConnected(): boolean;
publish(topic: string, payload: string, options?: Partial<MqttPublishOptions>): Promise<void>;
}
//# sourceMappingURL=mqtt.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"mqtt.d.ts","sourceRoot":"","sources":["../lib/mqtt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,qBAAqB,EAAa,MAAM,MAAM,CAAC;AAU5E,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,qBAAqB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,sBAAsB,CAAC,CAAiB;IAChD,OAAO,CAAC,qBAAqB,CAAqB;IAC3C,gBAAgB,EAAE;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,kBAAkB,CAAA;SAAC,CAAA;KAAC,CAAM;IAE3G,IAAI,IAAI;QAEA,OAAO;QACP,MAAM;MAEb;IAED,IAAI,KAAK;QAED,SAAS;QACT,MAAM;MAEb;IAED,YAAY,QAAQ,EAAE,QAAQ,EAS7B;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAiG7B;IAEK,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAchC;IAEK,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5C;IAEK,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9C;YAEmB,SAAS;IAShB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAY3D;IAED,WAAW,IAAI,OAAO,CAErB;IAEK,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkDtG;CACJ"}
-19
View File
@@ -1,19 +0,0 @@
declare class State {
private readonly eventBus;
private readonly zigbee;
private readonly state;
private readonly file;
private timer?;
constructor(eventBus: EventBus, zigbee: Zigbee);
start(): void;
stop(): void;
clear(): void;
private load;
private save;
exists(entity: Device | Group): boolean;
get(entity: Group | Device): KeyValue;
set(entity: Group | Device, update: KeyValue, reason?: string): KeyValue;
remove(id: string | number): boolean;
}
export default State;
//# sourceMappingURL=state.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../lib/state.ts"],"names":[],"mappings":"AA8BA,cAAM,KAAK;IAMH,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAN3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwC;IAC9D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IACpD,OAAO,CAAC,KAAK,CAAC,CAAiB;IAE/B,YACqB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EAIlC;IAED,KAAK,IAAI,IAAI,CAKZ;IAED,IAAI,IAAI,IAAI,CAcX;IAED,KAAK,IAAI,IAAI,CAEZ;IAED,OAAO,CAAC,IAAI;IAoBZ,OAAO,CAAC,IAAI;IAgBZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAEtC;IAED,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAEpC;IAED,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAWvE;IAED,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAEnC;CACJ;eAEc,KAAK"}
-942
View File
@@ -1,942 +0,0 @@
import type * as zigbeeHerdsman from "zigbee-herdsman/dist";
import type { ZclPayload } from "zigbee-herdsman/dist/adapter/events";
import type { Eui64 } from "zigbee-herdsman/dist/zspec/tstypes";
import type { Cluster, ClusterName, CustomClusters } from "zigbee-herdsman/dist/zspec/zcl/definition/tstype";
import type { GenericZdoResponse, RoutingTableEntry } from "zigbee-herdsman/dist/zspec/zdo/definition/tstypes";
import type * as zigbeeHerdsmanConverter from "zigbee-herdsman-converters";
import type { Base } from "zigbee-herdsman-converters/lib/exposes";
export type * as ZSpec from "zigbee-herdsman/dist/zspec";
export type * as Zcl from "zigbee-herdsman/dist/zspec/zcl";
export type * as Zdo from "zigbee-herdsman/dist/zspec/zdo";
export type Zigbee2MQTTFeatures = {
base: Base;
switch: zigbeeHerdsmanConverter.Switch;
lock: zigbeeHerdsmanConverter.Lock;
binary: zigbeeHerdsmanConverter.Binary;
list: zigbeeHerdsmanConverter.List;
numeric: zigbeeHerdsmanConverter.Numeric;
enum: zigbeeHerdsmanConverter.Enum;
text: zigbeeHerdsmanConverter.Text;
composite: zigbeeHerdsmanConverter.Composite;
light: zigbeeHerdsmanConverter.Light;
cover: zigbeeHerdsmanConverter.Cover;
fan: zigbeeHerdsmanConverter.Fan;
climate: zigbeeHerdsmanConverter.Climate;
};
import type { UpdatePayload } from "../extension/otaUpdate";
import type { LogLevel, schemaJson } from "../util/settings";
type KeyValue = Record<string, any>;
export interface OnboardInitData {
page: "form";
settings: Zigbee2MQTTSettings;
settingsSchema: typeof schemaJson;
devices: {
name: string;
path: Zigbee2MQTTSettings["serial"]["port"];
adapter?: Zigbee2MQTTSettings["serial"]["adapter"];
baudRate?: Zigbee2MQTTSettings["serial"]["baudrate"];
rtscts?: Zigbee2MQTTSettings["serial"]["rtscts"];
}[];
}
export interface OnboardDoneData {
page: "done";
frontendUrl: string | null;
}
export interface OnboardFailureData {
page: "failure";
errors: string[];
}
export type OnboardData = OnboardInitData | OnboardDoneData | OnboardFailureData;
export type OnboardSubmitResponse = {
success: true;
frontendUrl: string | null;
} | {
success: false;
error: string;
};
export type Zigbee2MQTTDeviceOptions = {
disabled?: boolean;
retention?: number;
availability?: boolean | {
timeout: number;
max_jitter?: number;
backoff?: boolean;
pause_on_backoff_gt?: number;
};
optimistic?: boolean;
debounce?: number;
debounce_ignore?: string[];
throttle?: number;
filtered_attributes?: string[];
filtered_cache?: string[];
filtered_optimistic?: string[];
icon?: string;
homeassistant?: KeyValue;
friendly_name: string;
description?: string;
qos?: 0 | 1 | 2;
disable_automatic_update_check?: boolean;
};
export type Zigbee2MQTTGroupOptions = {
ID: number;
optimistic?: boolean;
off_state?: "all_members_off" | "last_member_state";
filtered_attributes?: string[];
filtered_cache?: string[];
filtered_optimistic?: string[];
homeassistant?: KeyValue;
friendly_name: string;
description?: string;
qos?: 0 | 1 | 2;
};
export type Zigbee2MQTTSettings = {
version?: number;
/** only used internally during startup, removed on successful Z2M start */
onboarding?: true;
homeassistant: {
enabled: boolean;
discovery_topic: string;
status_topic: string;
experimental_event_entities: boolean;
legacy_action_sensor: boolean;
};
availability: {
enabled: boolean;
active: {
timeout: number;
max_jitter: number;
backoff: boolean;
pause_on_backoff_gt: number;
};
passive: {
timeout: number;
};
};
mqtt: {
base_topic: string;
include_device_information: boolean;
force_disable_retain: boolean;
version?: 3 | 4 | 5;
user?: string;
password?: string;
server: string;
ca?: string;
keepalive?: number;
key?: string;
cert?: string;
client_id?: string;
reject_unauthorized?: boolean;
server_name?: string;
maximum_packet_size: number;
};
serial: {
disable_led: boolean;
port?: string;
adapter?: "deconz" | "zstack" | "ezsp" | "zigate" | "ember" | "zboss" | "zoh";
baudrate?: number;
rtscts?: boolean;
};
passlist: string[];
blocklist: string[];
map_options: {
graphviz: {
colors: {
fill: {
enddevice: string;
coordinator: string;
router: string;
};
font: {
coordinator: string;
router: string;
enddevice: string;
};
line: {
active: string;
inactive: string;
};
};
};
};
ota: {
update_check_interval: number;
disable_automatic_update_check: boolean;
zigbee_ota_override_index_location?: string;
image_block_request_timeout?: number;
image_block_response_delay?: number;
default_maximum_data_size?: number;
};
frontend: {
enabled: boolean;
package: "zigbee2mqtt-frontend" | "zigbee2mqtt-windfront";
auth_token?: string;
host?: string;
port: number;
base_url: string;
url?: string;
ssl_cert?: string;
ssl_key?: string;
notification_filter?: string[];
disable_ui_serving?: boolean;
};
devices: {
[s: string]: Zigbee2MQTTDeviceOptions;
};
groups: {
[s: string]: Omit<Zigbee2MQTTGroupOptions, "ID">;
};
device_options: KeyValue;
advanced: {
log_rotation: boolean;
log_console_json: boolean;
log_symlink_current: boolean;
log_output: ("console" | "file" | "syslog")[];
log_directory: string;
log_file: string;
log_level: LogLevel;
log_namespaced_levels: Record<string, LogLevel>;
log_syslog: KeyValue;
log_debug_to_mqtt_frontend: boolean;
log_debug_namespace_ignore: string;
log_directories_to_keep: number;
pan_id: number | "GENERATE";
ext_pan_id: number[] | "GENERATE";
channel: number;
adapter_concurrent?: number;
adapter_delay?: number;
cache_state: boolean;
cache_state_persistent: boolean;
cache_state_send_on_startup: boolean;
last_seen: "disable" | "ISO_8601" | "ISO_8601_local" | "epoch";
elapsed: boolean;
network_key: number[] | "GENERATE";
timestamp_format: string;
output: "json" | "attribute" | "attribute_and_json";
transmit_power?: number;
/** 3.0: default to false (JSON schema & settings `defaults`) */
enable_external_js: boolean;
};
health: {
/** in minutes */
interval: number;
reset_on_check: boolean;
};
};
export interface Zigbee2MQTTScene {
id: number;
name: string;
}
export interface Zigbee2MQTTDeviceEndpoint {
name?: string;
bindings: Zigbee2MQTTDeviceEndpointBinding[];
configured_reportings: Zigbee2MQTTDeviceEndpointConfiguredReporting[];
clusters: {
input: string[];
output: string[];
};
scenes: Zigbee2MQTTScene[];
}
export interface Zigbee2MQTTDeviceEndpointBinding {
cluster: string;
target: Zigbee2MQTTDeviceEndpointBindingTarget;
}
export type Zigbee2MQTTDeviceEndpointBindingTarget = {
type: "endpoint";
ieee_address: string;
endpoint: number;
} | {
type: "group";
id: number;
};
export interface Zigbee2MQTTDeviceEndpointConfiguredReporting {
cluster: string;
attribute: string | number;
minimum_report_interval: number;
maximum_report_interval: number;
reportable_change: number;
}
export interface Zigbee2MQTTDeviceDefinition {
source: "native" | "generated" | "external";
model: string;
vendor: string;
description: string;
exposes: zigbeeHerdsmanConverter.Expose[];
supports_ota: boolean;
options: zigbeeHerdsmanConverter.Option[];
version: `0.0.${number}`;
icon: string;
}
export interface Zigbee2MQTTDevice {
ieee_address: zigbeeHerdsman.Models.Device["ieeeAddr"];
type: zigbeeHerdsman.Models.Device["type"];
network_address: zigbeeHerdsman.Models.Device["networkAddress"];
supported: boolean;
friendly_name: string;
disabled: boolean;
description?: string;
definition?: Zigbee2MQTTDeviceDefinition;
power_source: zigbeeHerdsman.Models.Device["powerSource"];
software_build_id: zigbeeHerdsman.Models.Device["softwareBuildID"];
date_code: zigbeeHerdsman.Models.Device["dateCode"];
model_id: zigbeeHerdsman.Models.Device["modelID"];
interviewing: boolean;
interview_completed: boolean;
interview_state: zigbeeHerdsman.Models.Device["interviewState"];
manufacturer: zigbeeHerdsman.Models.Device["manufacturerName"];
endpoints: Record<number, Zigbee2MQTTDeviceEndpoint>;
}
export interface Zigbee2MQTTGroupMember {
ieee_address: zigbeeHerdsman.Models.Device["ieeeAddr"];
endpoint: number;
}
export interface Zigbee2MQTTGroup {
id: number;
friendly_name: "default_bind_group" | string;
description?: string;
scenes: Zigbee2MQTTScene[];
members: Zigbee2MQTTGroupMember[];
}
export interface Zigbee2MQTTNetworkMap {
nodes: {
ieeeAddr: string;
friendlyName: string;
type: string;
networkAddress: number;
manufacturerName?: string;
modelID?: string;
failed?: string[];
lastSeen?: number;
definition?: {
model: string;
vendor: string;
supports: string;
description: string;
};
}[];
links: {
source: {
ieeeAddr: string;
networkAddress: number;
};
target: {
ieeeAddr: string;
networkAddress: number;
};
deviceType: number;
rxOnWhenIdle: number;
relationship: number;
permitJoining: number;
depth: number;
lqi: number;
routes: RoutingTableEntry[];
/** @deprecated 3.0 */
linkquality: number;
/** @deprecated 3.0 */
sourceIeeeAddr: string;
/** @deprecated 3.0 */
targetIeeeAddr: string;
/** @deprecated 3.0 */
sourceNwkAddr: number;
}[];
}
/**
* Zigbee2MQTT state/request/response API endpoints
*/
export interface Zigbee2MQTTAPI {
"bridge/logging": {
message: string;
level: LogLevel;
namespace: string;
};
"bridge/state": {
state: "online" | "offline";
};
"bridge/definitions": {
clusters: Readonly<Record<ClusterName, Cluster>>;
custom_clusters: Record<string, CustomClusters>;
actions: string[];
};
"bridge/event": {
type: "device_leave" | "device_joined" | "device_announce";
data: {
friendly_name: string;
ieee_address: string;
};
} | {
type: "device_interview";
data: {
friendly_name: string;
ieee_address: string;
status: "started" | "failed";
} | {
friendly_name: string;
ieee_address: string;
status: "successful";
supported: boolean;
definition: Zigbee2MQTTDeviceDefinition | undefined;
};
};
"bridge/info": {
os: {
version: string;
node_version: string;
cpus: string;
memory_mb: number;
};
mqtt: {
version: number | undefined;
server: string;
};
version: string;
commit: string | undefined;
zigbee_herdsman_converters: {
version: string;
};
zigbee_herdsman: {
version: string;
};
coordinator: {
ieee_address: string;
type: string;
meta: {
[s: string]: number | string;
};
};
network: {
pan_id: number;
/** `0x${string}` 8-len */
extended_pan_id: string;
channel: number;
};
log_level: "debug" | "info" | "warning" | "error";
permit_join: boolean;
permit_join_end: number | undefined;
restart_required: boolean;
config: Zigbee2MQTTSettings;
config_schema: typeof schemaJson;
};
"bridge/health": {
/** time of message, msec from epoch, UTC */
response_time: number;
os: {
load_average: number[];
memory_used_mb: number;
memory_percent: number;
};
process: {
uptime_sec: number;
memory_used_mb: number;
memory_percent: number;
};
mqtt: {
connected: boolean;
queued: number;
received: number;
published: number;
};
devices: Record<string, {
messages: number;
messages_per_sec: number;
leave_count: number;
network_address_changes: number;
}>;
};
"bridge/devices": Zigbee2MQTTDevice[];
"bridge/groups": Zigbee2MQTTGroup[];
"bridge/converters": {
name: string;
code: string;
}[];
"bridge/extensions": {
name: string;
code: string;
}[];
"bridge/request/permit_join": {
/** [0-254], 0 meaning disable */
time: number;
device?: string;
} | `${number}`;
"bridge/response/permit_join": {
/** [0-254], 0 meaning disable */
time: number;
device?: string;
};
"bridge/request/health_check": "";
"bridge/response/health_check": {
/** XXX: currently always returns true */
healthy: boolean;
};
"bridge/request/coordinator_check": "";
"bridge/response/coordinator_check": {
missing_routers: {
ieee_address: string;
friendly_name: string;
}[];
};
"bridge/request/restart": "";
"bridge/response/restart": Record<string, never>;
"bridge/request/networkmap": {
type: "raw" | "graphviz" | "plantuml";
routes: boolean;
} | "raw" | "graphviz" | "plantuml";
"bridge/response/networkmap": {
type: "raw";
routes: boolean;
value: Zigbee2MQTTNetworkMap;
} | {
type: "graphviz" | "plantuml";
routes: boolean;
value: string;
};
"bridge/request/extension/save": {
name: string;
code: string;
};
"bridge/response/extension/save": Record<string, never>;
"bridge/request/extension/remove": {
name: string;
};
"bridge/response/extension/remove": Record<string, never>;
"bridge/request/converter/save": {
name: string;
code: string;
};
"bridge/response/converter/save": Record<string, never>;
"bridge/request/converter/remove": {
name: string;
};
"bridge/response/converter/remove": Record<string, never>;
"bridge/request/backup": "";
"bridge/response/backup": {
/** base64 encoded ZIP archive */
zip: string;
};
"bridge/request/install_code/add": {
value: string;
};
"bridge/response/install_code/add": {
value: string;
};
/**
* Applied on-the-fly:
* - newSettings.homeassistant
* - newSettings.advanced?.log_level
* - newSettings.advanced?.log_namespaced_levels
* - newSettings.advanced?.log_debug_namespace_ignore
*/
"bridge/request/options": {
options: Record<string, unknown>;
};
"bridge/response/options": {
restart_required: boolean;
};
"bridge/request/device/bind": {
from: string;
from_endpoint: string | number | "default";
to: string | number;
to_endpoint?: string | number;
clusters?: string[];
skip_disable_reporting?: boolean;
};
"bridge/response/device/bind": {
from: string;
from_endpoint: string | number;
to: string | number;
to_endpoint: string | number | undefined;
clusters: string[];
failed: string[];
};
"bridge/request/device/unbind": {
from: string;
from_endpoint: string | number | "default";
to: string | number;
to_endpoint?: string | number;
clusters?: string[];
skip_disable_reporting?: boolean;
};
"bridge/response/device/unbind": {
from: string;
from_endpoint: string | number;
to: string | number;
to_endpoint: string | number | undefined;
clusters: string[];
failed: string[];
};
"bridge/request/device/binds/clear": {
target: string;
ieee_list?: Eui64[];
};
"bridge/response/device/binds/clear": {
target: string;
ieee_list?: Eui64[];
};
"bridge/request/device/configure": {
id: string | number;
} | string;
"bridge/response/device/configure": {
id: string | number;
};
"bridge/request/device/remove": {
id: string;
block?: boolean;
force?: boolean;
keep_config?: boolean;
clear_cache?: boolean;
};
"bridge/response/device/remove": {
id: string;
block: boolean;
force: boolean;
keep_config: boolean;
clear_cache: boolean;
};
"bridge/request/device/ota_update/check": {
id: string;
/** expected to point to an index json if provided */
url?: string | null;
};
"bridge/request/device/ota_update/check/downgrade": {
id: string;
/** expected to point to an index json if provided */
url?: string | null;
};
"bridge/response/device/ota_update/check": {
id: string;
update_available: boolean;
downgrade?: boolean;
source?: string;
release_notes?: string;
};
"bridge/request/device/ota_update/update": {
id: string;
url?: string | null;
/**
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
*/
hex?: {
data: string;
file_name?: string;
} | null;
image_block_request_timeout?: number | null;
image_block_response_delay?: number | null;
/** may be overridden internally to match specific device needs */
default_maximum_data_size?: number | null;
};
"bridge/request/device/ota_update/update/downgrade": {
id: string;
url?: string | null;
/**
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
*/
hex?: {
data: string;
file_name?: string;
} | null;
image_block_request_timeout?: number | null;
image_block_response_delay?: number | null;
/** may be overridden internally to match specific device needs */
default_maximum_data_size?: number | null;
};
"bridge/request/device/ota_update/update/abort": {
id: string;
};
"bridge/response/device/ota_update/update/abort": {
id: string;
};
"bridge/response/device/ota_update/update": {
id: string;
from: {
file_version: number;
software_build_id?: string;
date_code?: string;
} | undefined;
to: {
file_version: number;
software_build_id?: string;
date_code?: string;
} | undefined;
};
"bridge/request/device/ota_update/schedule": {
id: string;
url?: string | null;
/**
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
*/
hex?: {
data: string;
file_name?: string;
} | null;
};
"bridge/request/device/ota_update/schedule/downgrade": {
id: string;
url?: string | null;
/**
* Full firmware file in hex form (expected compatible with `Buffer.from(hex, "hex")`)
* If file name supplied, will be used instead of <ieee_utc> to store firmware in data dir.
*/
hex?: {
data: string;
file_name?: string;
} | null;
};
"bridge/response/device/ota_update/schedule": {
id: string;
url?: string;
};
"bridge/request/device/ota_update/unschedule": {
id: string;
};
"bridge/response/device/ota_update/unschedule": {
id: string;
};
"bridge/request/device/interview": {
id: string | number;
};
"bridge/response/device/interview": {
id: string | number;
};
"bridge/request/device/generate_external_definition": {
id: string | number;
};
"bridge/response/device/generate_external_definition": {
id: string | number;
source: string;
};
"bridge/request/device/options": {
id: string;
options: Record<string, unknown>;
};
"bridge/response/device/options": {
id: string;
from: Record<string, unknown>;
to: Record<string, unknown>;
restart_required: boolean;
};
"bridge/request/device/rename": {
last: true;
from?: string;
to: string;
homeassistant_rename?: boolean;
} | {
last: false | undefined;
from: string;
to: string;
homeassistant_rename?: boolean;
};
"bridge/response/device/rename": {
from: string;
to: string;
homeassistant_rename: boolean;
};
"bridge/request/device/reporting/configure": {
id: string;
endpoint: string | number;
cluster: string | number;
attribute: string | number | {
ID: number;
type: number;
};
minimum_report_interval: number;
maximum_report_interval: number;
reportable_change?: number;
option: Record<string, unknown>;
};
"bridge/response/device/reporting/configure": {
id: string;
endpoint: string | number;
cluster: string | number;
attribute: string | number | {
ID: number;
type: number;
};
minimum_report_interval: number;
maximum_report_interval: number;
reportable_change?: number;
};
"bridge/request/device/reporting/read": {
id: string;
endpoint: string | number;
cluster: string | number;
configs: {
direction?: number;
attribute: string | number | {
ID: number;
type: number;
};
}[];
manufacturer_code?: number;
};
"bridge/response/device/reporting/read": {
id: string;
endpoint: string | number;
cluster: string | number;
configs: zigbeeHerdsman.Zcl.ClustersTypes.TFoundation["readReportConfigRsp"];
manufacturer_code?: number;
};
"bridge/request/group/remove": {
id: string;
force?: boolean;
};
"bridge/response/group/remove": {
id: string;
force: boolean;
};
"bridge/request/group/add": {
friendly_name: string;
id?: string;
};
"bridge/response/group/add": {
friendly_name: string;
id: number;
};
"bridge/request/group/rename": {
from: string;
to: string;
homeassistant_rename?: boolean;
};
"bridge/response/group/rename": {
from: string;
to: string;
homeassistant_rename: boolean;
};
"bridge/request/group/options": {
id: string;
options: Record<string, unknown>;
};
"bridge/response/group/options": {
id: string;
from: Record<string, unknown>;
to: Record<string, unknown>;
restart_required: boolean;
};
"bridge/request/group/members/add": {
device: string;
group: string;
endpoint: string | number | "default";
skip_disable_reporting?: boolean;
};
"bridge/response/group/members/add": {
device: string;
group: string;
endpoint: string | number | "default";
};
"bridge/request/group/members/remove": {
device: string;
group: string;
endpoint: string | number | "default";
skip_disable_reporting?: boolean;
};
"bridge/response/group/members/remove": {
device: string;
group: string;
endpoint: string | number | "default";
};
"bridge/request/group/members/remove_all": {
device: string;
endpoint: string | number | "default";
skip_disable_reporting?: boolean;
};
"bridge/response/group/members/remove_all": {
device: string;
endpoint: string | number | "default";
};
"bridge/request/touchlink/factory_reset": {
ieee_address: string;
channel: number;
} | "";
"bridge/response/touchlink/factory_reset": {
ieee_address: string;
channel: number;
} | Record<string, never>;
"bridge/request/touchlink/scan": "";
"bridge/response/touchlink/scan": {
found: {
ieee_address: string;
channel: number;
}[];
};
"bridge/request/touchlink/identify": {
ieee_address: string;
channel: number;
};
"bridge/response/touchlink/identify": {
ieee_address: string;
channel: number;
};
"bridge/request/action": {
action: string;
params?: Record<string, unknown>;
};
"bridge/response/action": GenericZdoResponse | ZclPayload | undefined;
/**
* entity state response
*/
"{friendlyName}": {
[key: string]: unknown;
update?: UpdatePayload["update"];
};
"{friendlyName}/availability": {
state: "online" | "offline";
};
/** entity set request (tries to match endpoint to definition, else uses "default") */
"{friendlyNameOrId}/set": {
[attribute: string]: {
[key: string]: unknown;
} | string | boolean;
};
/** entity set request (tries to match endpoint to definition, else uses "default") */
"{friendlyNameOrId}/set/{attribute}": {
[key: string]: unknown;
};
/** entity set request */
"{friendlyNameOrId}/{endpoint}/set": {
[attribute: string]: {
[key: string]: unknown;
} | string | boolean;
};
/** entity set request */
"{friendlyNameOrId}/{endpoint}/set/{attribute}": {
[key: string]: unknown;
};
/** entity get request (tries to match endpoint to definition, else uses "default") */
"{friendlyNameOrId}/get": {
[attribute: string]: {
[key: string]: unknown;
} | string | boolean;
};
/** entity get request (tries to match endpoint to definition, else uses "default") */
"{friendlyNameOrId}/get/{attribute}": {
[key: string]: unknown;
};
/** entity get request */
"{friendlyNameOrId}/{endpoint}/get": {
[attribute: string]: {
[key: string]: unknown;
} | string | boolean;
};
/** entity get request */
"{friendlyNameOrId}/{endpoint}/get/{attribute}": {
[key: string]: unknown;
};
}
export type Zigbee2MQTTRequestEndpoints = "bridge/request/permit_join" | "bridge/request/health_check" | "bridge/request/coordinator_check" | "bridge/request/restart" | "bridge/request/networkmap" | "bridge/request/extension/save" | "bridge/request/extension/remove" | "bridge/request/converter/save" | "bridge/request/converter/remove" | "bridge/request/backup" | "bridge/request/install_code/add" | "bridge/request/options" | "bridge/request/device/bind" | "bridge/request/device/unbind" | "bridge/request/device/binds/clear" | "bridge/request/device/configure" | "bridge/request/device/remove" | "bridge/request/device/ota_update/check" | "bridge/request/device/ota_update/check/downgrade" | "bridge/request/device/ota_update/update" | "bridge/request/device/ota_update/update/downgrade" | "bridge/request/device/ota_update/update/abort" | "bridge/request/device/ota_update/schedule" | "bridge/request/device/ota_update/schedule/downgrade" | "bridge/request/device/ota_update/unschedule" | "bridge/request/device/interview" | "bridge/request/device/generate_external_definition" | "bridge/request/device/options" | "bridge/request/device/rename" | "bridge/request/device/reporting/configure" | "bridge/request/device/reporting/read" | "bridge/request/group/remove" | "bridge/request/group/add" | "bridge/request/group/rename" | "bridge/request/group/options" | "bridge/request/group/members/add" | "bridge/request/group/members/remove" | "bridge/request/group/members/remove_all" | "bridge/request/touchlink/factory_reset" | "bridge/request/touchlink/scan" | "bridge/request/touchlink/identify" | "bridge/request/action" | "{friendlyNameOrId}/set" | "{friendlyNameOrId}/set/{attribute}" | "{friendlyNameOrId}/{endpoint}/set" | "{friendlyNameOrId}/{endpoint}/set/{attribute}" | "{friendlyNameOrId}/get" | "{friendlyNameOrId}/get/{attribute}" | "{friendlyNameOrId}/{endpoint}/get" | "{friendlyNameOrId}/{endpoint}/get/{attribute}";
export type Zigbee2MQTTResponseEndpoints = "bridge/response/permit_join" | "bridge/response/health_check" | "bridge/response/coordinator_check" | "bridge/response/restart" | "bridge/response/networkmap" | "bridge/response/extension/save" | "bridge/response/extension/remove" | "bridge/response/converter/save" | "bridge/response/converter/remove" | "bridge/response/backup" | "bridge/response/install_code/add" | "bridge/response/options" | "bridge/response/device/bind" | "bridge/response/device/unbind" | "bridge/response/device/binds/clear" | "bridge/response/device/configure" | "bridge/response/device/remove" | "bridge/response/device/ota_update/check" | "bridge/response/device/ota_update/update" | "bridge/response/device/ota_update/update/abort" | "bridge/response/device/ota_update/schedule" | "bridge/response/device/ota_update/unschedule" | "bridge/response/device/interview" | "bridge/response/device/generate_external_definition" | "bridge/response/device/options" | "bridge/response/device/rename" | "bridge/response/device/reporting/configure" | "bridge/response/device/reporting/read" | "bridge/response/group/remove" | "bridge/response/group/add" | "bridge/response/group/rename" | "bridge/response/group/options" | "bridge/response/group/members/add" | "bridge/response/group/members/remove" | "bridge/response/group/members/remove_all" | "bridge/response/touchlink/factory_reset" | "bridge/response/touchlink/scan" | "bridge/response/touchlink/identify" | "bridge/response/action";
export type Zigbee2MQTTRequest<T extends Zigbee2MQTTRequestEndpoints> = {
transaction?: string;
} & Zigbee2MQTTAPI[T];
export type Zigbee2MQTTResponseOK<T extends Zigbee2MQTTResponseEndpoints> = {
status: "ok";
data: Zigbee2MQTTAPI[T];
transaction?: string;
};
export type Zigbee2MQTTResponseError = {
status: "error";
data: Record<string, never>;
error: string;
transaction?: string;
};
export type Zigbee2MQTTResponse<T extends Zigbee2MQTTResponseEndpoints> = Zigbee2MQTTResponseOK<T> | Zigbee2MQTTResponseError;
//# sourceMappingURL=api.d.ts.map
-1
View File
File diff suppressed because one or more lines are too long
-10
View File
@@ -1,10 +0,0 @@
declare function joinPath(file: string): string;
declare function getPath(): string;
declare function _testReload(): void;
declare const _default: {
joinPath: typeof joinPath;
getPath: typeof getPath;
_testReload: typeof _testReload;
};
export default _default;
//# sourceMappingURL=data.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../lib/util/data.ts"],"names":[],"mappings":"AAQA,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtC;AAED,iBAAS,OAAO,IAAI,MAAM,CAEzB;AAED,iBAAS,WAAW,IAAI,IAAI,CAE3B"}
-34
View File
@@ -1,34 +0,0 @@
import winston from "winston";
import * as settings from "./settings";
declare class Logger {
private level;
private output;
private directory;
private logger;
private fileTransport;
private debugNamespaceIgnoreRegex?;
private namespacedLevels;
private cachedNamespacedLevels;
init(): void;
get winston(): winston.Logger;
addTransport(transport: winston.transport): void;
removeTransport(transport: winston.transport): void;
getDebugNamespaceIgnore(): string;
setDebugNamespaceIgnore(value: string): void;
getLevel(): settings.LogLevel;
setLevel(level: settings.LogLevel): void;
getNamespacedLevels(): Record<string, settings.LogLevel>;
setNamespacedLevels(nsLevels: Record<string, settings.LogLevel>): void;
private resetCachedNamespacedLevels;
private cacheNamespacedLevel;
private log;
error(messageOrLambda: string | (() => string), namespace?: string): void;
warning(messageOrLambda: string | (() => string), namespace?: string): void;
info(messageOrLambda: string | (() => string), namespace?: string): void;
debug(messageOrLambda: string | (() => string), namespace?: string): void;
private cleanup;
end(): Promise<void>;
}
declare const _default: Logger;
export default _default;
//# sourceMappingURL=logger.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/util/logger.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AAIvC,cAAM,MAAM;IACR,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,aAAa,CAAuD;IAC5E,OAAO,CAAC,yBAAyB,CAAC,CAAS;IAC3C,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,sBAAsB,CAAqC;IAE5D,IAAI,IAAI,IAAI,CA6GlB;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,CAE5B;IAEM,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI,CAEtD;IAEM,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,GAAG,IAAI,CAEzD;IAEM,uBAAuB,IAAI,MAAM,CAEvC;IAEM,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAElD;IAEM,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAEnC;IAEM,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAG9C;IAEM,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAE9D;IAEM,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAG5E;IAED,OAAO,CAAC,2BAA2B;IAInC,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,GAAG;IASJ,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAE9E;IAEM,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAEhF;IAEM,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAE7E;IAEM,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,EAAE,SAAS,SAAQ,GAAG,IAAI,CAM9E;IAGD,OAAO,CAAC,OAAO;IA0BF,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBhC;CAEJ"}
-15
View File
@@ -1,15 +0,0 @@
/** Anything mergeable: a plain-ish object, explicitly not an array or another iterable. */
export type UnknownRecord = Record<string | number, unknown> & {
[Symbol.iterator]?: never;
};
/**
* Merge all sources into `target` recursively.
*
* Key behavior:
* - ignore properties `__proto__`, `constructor` & `prototype`
* - assumes no infinite circular possible (unhandled for perf)
*
* Pass empty object `{}` as `target` to return a new object without modifying any existing objects.
*/
export declare function objectAssignDeep<T extends UnknownRecord, S extends readonly UnknownRecord[]>(target: T, ...sources: S): T & UnionToIntersection<S[number]>;
//# sourceMappingURL=objectAssignDeep.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"objectAssignDeep.d.ts","sourceRoot":"","sources":["../../lib/util/objectAssignDeep.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAA;CAAC,CAAC;AA+B3F;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,SAAS,aAAa,EAAE,EACxF,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,CAAC,GACd,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAsBpC"}
-2
View File
@@ -1,2 +0,0 @@
export declare function onboard(): Promise<boolean>;
//# sourceMappingURL=onboarding.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../lib/util/onboarding.ts"],"names":[],"mappings":"AAgQA,wBAAsB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAgEhD"}
-10
View File
@@ -1,10 +0,0 @@
/**
* Handle sd_notify protocol, @see https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html
* No-op if running on unsupported platforms or without Type=notify
* Soft-fails if improperly setup (this is not necessary for Zigbee2MQTT to function properly)
*/
export declare function initSdNotify(): Promise<{
notifyStopping: () => void;
stop: () => void;
} | undefined>;
//# sourceMappingURL=sd-notify.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"sd-notify.d.ts","sourceRoot":"","sources":["../../lib/util/sd-notify.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAC,GAAG,SAAS,CAAC,CA0DxG"}
-238
View File
@@ -1,238 +0,0 @@
import schemaJson from "./settings.schema.json";
export { schemaJson };
export declare const CURRENT_VERSION = 5;
/** NOTE: by order of priority, lower index is lower level (more important) */
export declare const LOG_LEVELS: readonly string[];
export type LogLevel = "error" | "warning" | "info" | "debug";
export declare const defaults: {
homeassistant: {
enabled: false;
discovery_topic: string;
status_topic: string;
legacy_action_sensor: false;
experimental_event_entities: false;
};
availability: {
enabled: false;
active: {
timeout: number;
max_jitter: number;
backoff: true;
pause_on_backoff_gt: number;
};
passive: {
timeout: number;
};
};
frontend: {
enabled: false;
package: "zigbee2mqtt-windfront";
port: number;
base_url: string;
};
mqtt: {
base_topic: string;
include_device_information: false;
force_disable_retain: false;
maximum_packet_size: number;
keepalive: number;
reject_unauthorized: true;
version: 4;
};
serial: {
disable_led: false;
};
passlist: never[];
blocklist: never[];
map_options: {
graphviz: {
colors: {
fill: {
enddevice: string;
coordinator: string;
router: string;
};
font: {
coordinator: string;
router: string;
enddevice: string;
};
line: {
active: string;
inactive: string;
};
};
};
};
ota: {
update_check_interval: number;
disable_automatic_update_check: false;
image_block_request_timeout: number;
image_block_response_delay: number;
default_maximum_data_size: number;
};
device_options: {};
advanced: {
log_rotation: true;
log_console_json: false;
log_symlink_current: false;
log_output: ("console" | "file")[];
log_directory: string;
log_file: string;
log_level: "debug" | "info";
log_namespaced_levels: {};
log_syslog: {};
log_debug_to_mqtt_frontend: false;
log_debug_namespace_ignore: string;
log_directories_to_keep: number;
pan_id: number;
ext_pan_id: number[];
channel: number;
adapter_concurrent: undefined;
adapter_delay: undefined;
cache_state: true;
cache_state_persistent: true;
cache_state_send_on_startup: true;
last_seen: "disable";
elapsed: false;
network_key: number[];
timestamp_format: string;
output: "json";
enable_external_js: true;
};
health: {
interval: number;
reset_on_check: false;
};
};
export declare function writeMinimalDefaults(): void;
export declare function setOnboarding(value: boolean): void;
export declare function write(): void;
export declare function validate(): string[];
export declare function validateNonRequired(): string[];
/**
* Get the settings actually written in the yaml.
* Env vars are applied on top.
* Defaults merged on startup are not included.
*/
export declare function getPersistedSettings(): Partial<Settings>;
export declare function get(): Settings;
export declare function set(path: string[], value: string | number | boolean | KeyValue): void;
export declare function apply(settings: Record<string, unknown>, throwOnError?: boolean): boolean;
export declare function getGroup(IDorName: string | number): GroupOptions | undefined;
export declare function getDevice(IDorName: string): DeviceOptionsWithId | undefined;
export declare function addDevice(id: string): DeviceOptionsWithId;
export declare function blockDevice(id: string): void;
export declare function removeDevice(IDorName: string): void;
export declare function addGroup(name: string, id?: string): GroupOptions;
export declare function removeGroup(IDorName: string | number): void;
export declare function changeEntityOptions(IDorName: string, newOptions: KeyValue): boolean;
export declare function changeFriendlyName(IDorName: string, newName: string): void;
export declare function reRead(): void;
export declare const testing: {
write: typeof write;
clear: () => void;
defaults: {
homeassistant: {
enabled: false;
discovery_topic: string;
status_topic: string;
legacy_action_sensor: false;
experimental_event_entities: false;
};
availability: {
enabled: false;
active: {
timeout: number;
max_jitter: number;
backoff: true;
pause_on_backoff_gt: number;
};
passive: {
timeout: number;
};
};
frontend: {
enabled: false;
package: "zigbee2mqtt-windfront";
port: number;
base_url: string;
};
mqtt: {
base_topic: string;
include_device_information: false;
force_disable_retain: false;
maximum_packet_size: number;
keepalive: number;
reject_unauthorized: true;
version: 4;
};
serial: {
disable_led: false;
};
passlist: never[];
blocklist: never[];
map_options: {
graphviz: {
colors: {
fill: {
enddevice: string;
coordinator: string;
router: string;
};
font: {
coordinator: string;
router: string;
enddevice: string;
};
line: {
active: string;
inactive: string;
};
};
};
};
ota: {
update_check_interval: number;
disable_automatic_update_check: false;
image_block_request_timeout: number;
image_block_response_delay: number;
default_maximum_data_size: number;
};
device_options: {};
advanced: {
log_rotation: true;
log_console_json: false;
log_symlink_current: false;
log_output: ("console" | "file")[];
log_directory: string;
log_file: string;
log_level: "debug" | "info";
log_namespaced_levels: {};
log_syslog: {};
log_debug_to_mqtt_frontend: false;
log_debug_namespace_ignore: string;
log_directories_to_keep: number;
pan_id: number;
ext_pan_id: number[];
channel: number;
adapter_concurrent: undefined;
adapter_delay: undefined;
cache_state: true;
cache_state_persistent: true;
cache_state_send_on_startup: true;
last_seen: "disable";
elapsed: false;
network_key: number[];
timestamp_format: string;
output: "json";
enable_external_js: true;
};
health: {
interval: number;
reset_on_check: false;
};
};
CURRENT_VERSION: number;
};
//# sourceMappingURL=settings.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../lib/util/settings.ts"],"names":[],"mappings":"AAKA,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAIhD,OAAO,EAAC,UAAU,EAAC,CAAC;AAGpB,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,8EAA8E;AAC9E,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAmD,CAAC;AAC5F,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAY9D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;YAWH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;QAwBjB,QAAQ;YACJ,MAAM;gBACF,IAAI;oBACA,SAAS;oBACT,WAAW;oBACX,MAAM;;gBAEV,IAAI;oBACA,WAAW;oBACX,MAAM;oBACN,SAAS;;gBAEb,IAAI;oBACA,MAAM;oBACN,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CU,CAAC;AAmCvC,wBAAgB,oBAAoB,IAAI,IAAI,CA+B3C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAclD;AAED,wBAAgB,KAAK,IAAI,IAAI,CA0D5B;AAED,wBAAgB,QAAQ,IAAI,MAAM,EAAE,CAoDnC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAW9C;AA8GD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAAC,QAAQ,CAAC,CAMxD;AAED,wBAAgB,GAAG,IAAI,QAAQ,CAO9B;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,CAkBrF;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,UAAO,GAAG,OAAO,CAuBrF;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,CAe5E;AAYD,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAe3E;AAWD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAgBzD;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAQ5C;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAKnD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAiChE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAO3D;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,GAAG,OAAO,CAiCnF;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAwB1E;AAED,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,eAAO,MAAM,OAAO;;iBAEL,IAAI;;;;;;;;;;;;;;;;;;gBA/pBD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;YAwBjB,QAAQ;gBACJ,MAAM;oBACF,IAAI;wBACA,SAAS;wBACT,WAAW;wBACX,MAAM;;oBAEV,IAAI;wBACA,WAAW;wBACX,MAAM;wBACN,SAAS;;oBAEb,IAAI;wBACA,MAAM;wBACN,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+nB3B,CAAC"}
-1019
View File
File diff suppressed because it is too large Load Diff
-11
View File
@@ -1,11 +0,0 @@
/**
* Order of execution:
* - Transfer
* - Change
* - Add
* - Remove
*
* Should allow the most flexibility whenever combination of migrations is necessary (e.g. Transfer + Change)
*/
export declare function migrateIfNecessary(): void;
//# sourceMappingURL=settingsMigration.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"settingsMigration.d.ts","sourceRoot":"","sources":["../../lib/util/settingsMigration.ts"],"names":[],"mappings":"AAshBA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAoGzC"}
-11
View File
@@ -1,11 +0,0 @@
import type { IncomingMessage, ServerResponse } from "node:http";
export type StaticFileServer = (request: IncomingMessage, response: ServerResponse) => void;
/** Terminal `404` handler for requests no file matched, mirroring the response `finalhandler` used to produce. */
export declare function sendNotFound(request: IncomingMessage, response: ServerResponse): void;
/**
* Serves `dir` on top of a plain `node:http` server, preferring the precompressed `.br`/`.gz` variant of a file when the client accepts it.
*
* Requests that match no file are answered by {@link sendNotFound}.
*/
export declare function createStaticFileServer(dir: string, logError: (message: string) => void): StaticFileServer;
//# sourceMappingURL=staticFileServer.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"staticFileServer.d.ts","sourceRoot":"","sources":["../../lib/util/staticFileServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAI/D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;AAI5F,kHAAkH;AAClH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAYrF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAoCzG"}
-2
View File
@@ -1,2 +0,0 @@
export declare function stringify(value: object): string;
//# sourceMappingURL=stringify.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../lib/util/stringify.ts"],"names":[],"mappings":"AA2JA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C"}
-96
View File
@@ -1,96 +0,0 @@
import type * as zhc from "zigbee-herdsman-converters";
import type { Zigbee2MQTTAPI, Zigbee2MQTTResponse, Zigbee2MQTTResponseEndpoints, Zigbee2MQTTScene } from "../types/api";
export declare const DEFAULT_BIND_GROUP_ID = 901;
declare function capitalize(s: string): string;
export declare function getZigbee2MQTTVersion(includeCommitHash?: boolean): Promise<{
commitHash?: string;
version: string;
}>;
declare function getDependencyVersion(depend: string): Promise<{
version: string;
}>;
declare function formatDate(time: number, type: "ISO_8601" | "ISO_8601_local" | "epoch" | "relative"): string | number;
declare function objectIsEmpty(object: object): boolean;
declare function objectHasProperties(object: {
[s: string]: unknown;
}, properties: string[]): boolean;
declare function equalsPartial(object: KeyValue, expected: KeyValue): boolean;
declare function getObjectProperty<T>(object: KeyValue, key: string, defaultValue: NoInfer<T>): T;
declare function getResponse<T extends Zigbee2MQTTResponseEndpoints>(request: KeyValue | string, data: Zigbee2MQTTAPI[T], error?: string): Zigbee2MQTTResponse<T>;
declare function parseJSON(value: string, fallback: string): KeyValue | string;
/**
* Delete all keys from passed object that have null/undefined values.
*
* @param {KeyValue} obj Object to process (in-place)
* @param {string[]} [ignoreKeys] Recursively ignore these keys in the object (keep null/undefined values).
*/
declare function removeNullPropertiesFromObject(obj: KeyValue, ignoreKeys?: string[]): void;
declare function toNetworkAddressHex(value: number): string;
declare function getAllFiles(path_: string): string[];
declare function validateFriendlyName(name: string, throwFirstError?: boolean): string[];
declare function sleep(seconds: number): Promise<void>;
declare function sanitizeImageParameter(parameter: string): string;
declare function isAvailabilityEnabledForEntity(entity: Device | Group, settings: Settings): boolean;
declare function isZHEndpoint(obj: unknown): obj is zh.Endpoint;
declare function flatten<Type>(arr: Type[][]): Type[];
declare function arrayUnique<Type>(arr: Type[]): Type[];
declare function isZHGroup(obj: unknown): obj is zh.Group;
export declare const hours: (hours: number) => number;
export declare const minutes: (minutes: number) => number;
export declare const seconds: (seconds: number) => number;
declare function publishLastSeen(data: eventdata.LastSeenChanged, settings: Settings, allowMessageEmitted: boolean, publishEntityState: PublishEntityState): Promise<void>;
declare function filterProperties(filter: string[] | undefined, data: KeyValue): void;
export declare function isNumericExpose(expose: zhc.Expose): expose is zhc.Numeric;
export declare function assertEnumExpose(expose: zhc.Expose): asserts expose is zhc.Enum;
export declare function assertNumericExpose(expose: zhc.Expose): asserts expose is zhc.Numeric;
export declare function assertBinaryExpose(expose: zhc.Expose): asserts expose is zhc.Binary;
export declare function isEnumExpose(expose: zhc.Expose): expose is zhc.Enum;
export declare function isBinaryExpose(expose: zhc.Expose): expose is zhc.Binary;
export declare function isLightExpose(expose: zhc.Expose): expose is zhc.Light;
export declare function assertString(value: unknown, property: string): asserts value is string;
declare function getScenes(entity: zh.Endpoint | zh.Group): Zigbee2MQTTScene[];
declare function deviceNotCoordinator(device: zh.Device): boolean;
declare function matchBase64File(value: string | undefined): {
extension: string;
data: string;
} | false;
declare function saveBase64DeviceIcon(base64Match: {
extension: string;
data: string;
}): string;
declare const noop: () => void;
declare const _default: {
matchBase64File: typeof matchBase64File;
saveBase64DeviceIcon: typeof saveBase64DeviceIcon;
capitalize: typeof capitalize;
getZigbee2MQTTVersion: typeof getZigbee2MQTTVersion;
getDependencyVersion: typeof getDependencyVersion;
formatDate: typeof formatDate;
objectIsEmpty: typeof objectIsEmpty;
objectHasProperties: typeof objectHasProperties;
equalsPartial: typeof equalsPartial;
getObjectProperty: typeof getObjectProperty;
getResponse: typeof getResponse;
parseJSON: typeof parseJSON;
removeNullPropertiesFromObject: typeof removeNullPropertiesFromObject;
toNetworkAddressHex: typeof toNetworkAddressHex;
isZHEndpoint: typeof isZHEndpoint;
isZHGroup: typeof isZHGroup;
hours: typeof hours;
minutes: typeof minutes;
seconds: typeof seconds;
validateFriendlyName: typeof validateFriendlyName;
sleep: typeof sleep;
sanitizeImageParameter: typeof sanitizeImageParameter;
isAvailabilityEnabledForEntity: typeof isAvailabilityEnabledForEntity;
publishLastSeen: typeof publishLastSeen;
getAllFiles: typeof getAllFiles;
filterProperties: typeof filterProperties;
flatten: typeof flatten;
arrayUnique: typeof arrayUnique;
getScenes: typeof getScenes;
deviceNotCoordinator: typeof deviceNotCoordinator;
noop: typeof noop;
};
export default _default;
//# sourceMappingURL=utils.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/util/utils.ts"],"names":[],"mappings":"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"}
-17
View File
@@ -1,17 +0,0 @@
import { YAMLException } from "js-yaml";
export declare class YAMLFileException extends YAMLException {
file: string;
constructor(error: YAMLException, file: string);
}
declare function read(file: string): KeyValue;
declare function readIfExists(file: string, fallback?: KeyValue): KeyValue;
declare function writeIfChanged(file: string, content: KeyValue): void;
declare function updateIfChanged(file: string, key: string, value: KeyValue): void;
declare const _default: {
read: typeof read;
readIfExists: typeof readIfExists;
updateIfChanged: typeof updateIfChanged;
writeIfChanged: typeof writeIfChanged;
};
export default _default;
//# sourceMappingURL=yaml.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../lib/util/yaml.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,aAAa,EAAC,MAAM,SAAS,CAAC;AAElD,qBAAa,iBAAkB,SAAQ,aAAa;IAChD,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAQ7C;CACJ;AAED,iBAAS,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAYpC;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,QAAa,GAAG,QAAQ,CAErE;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAM7D;AAED,iBAAS,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAMzE"}
-57
View File
@@ -1,57 +0,0 @@
import { Controller } from "zigbee-herdsman";
import Device from "./model/device";
import Group from "./model/group";
export default class Zigbee {
#private;
private eventBus;
private groupLookup;
private deviceLookup;
private coordinatorIeeeAddr;
constructor(eventBus: EventBus);
get zhController(): Controller;
start(abortSignal: AbortSignal): Promise<boolean>;
private logDeviceInterview;
private generateNetworkKey;
private generateExtPanID;
private generatePanID;
getCoordinatorVersion(): Promise<zh.CoordinatorVersion>;
isStopping(): boolean;
backup(): Promise<void>;
coordinatorCheck(): Promise<{
missingRouters: Device[];
}>;
getNetworkParameters(): Promise<zh.NetworkParameters>;
stop(): Promise<void>;
getPermitJoin(): boolean;
getPermitJoinEnd(): number | undefined;
permitJoin(time: number, device?: Device): Promise<void>;
resolveDevicesDefinitions(ignoreCache?: boolean, abortSignal?: AbortSignal | undefined): Promise<void>;
private resolveDevice;
private resolveGroup;
resolveEntity(key: string | number | zh.Device): Device | Group | undefined;
resolveEntityAndEndpoint(id: string): {
ID: string;
entity: Device | Group | undefined;
endpointID?: string;
endpoint?: zh.Endpoint;
};
firstCoordinatorEndpoint(): zh.Endpoint;
devicesAndGroupsIterator(devicePredicate?: (value: zh.Device) => boolean, groupPredicate?: (value: zh.Group) => boolean): Generator<Device | Group>;
groupsIterator(predicate?: (value: zh.Group) => boolean): Generator<Group>;
devicesIterator(predicate?: (value: zh.Device) => boolean): Generator<Device>;
private acceptJoiningDeviceHandler;
touchlinkFactoryResetFirst(): Promise<boolean>;
touchlinkFactoryReset(ieeeAddr: string, channel: number): Promise<boolean>;
addInstallCode(installCode: string): Promise<void>;
touchlinkIdentify(ieeeAddr: string, channel: number): Promise<void>;
touchlinkScan(): Promise<{
ieeeAddr: string;
channel: number;
}[]>;
createGroup(id: number): Group;
deviceByNetworkAddress(networkAddress: number): Device | undefined;
groupByID(id: number): Group | undefined;
removeDeviceFromLookup(ieee: string): boolean;
removeGroupFromLookup(id: number): boolean;
}
//# sourceMappingURL=zigbee.d.ts.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"zigbee.d.ts","sourceRoot":"","sources":["../lib/zigbee.ts"],"names":[],"mappings":"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"}
+30
View File
@@ -0,0 +1,30 @@
FROM node:12-alpine as base
WORKDIR /app
RUN apk add --no-cache tzdata eudev
COPY package.json .
# Dependencies
FROM base as dependencies
COPY npm-shrinkwrap.json .
RUN apk add --no-cache --virtual .buildtools make gcc g++ python linux-headers git && \
npm ci --production && \
apk del .buildtools
# Release
FROM base as release
COPY --from=dependencies /app/node_modules ./node_modules
COPY lib ./lib
COPY index.js docker/run.sh data/configuration.yaml ./
RUN chmod +x /app/run.sh
RUN mkdir /app/data
ARG COMMIT
RUN echo "{\"hash\": \"$COMMIT\"}" > .hash.json
ENTRYPOINT ["./run.sh"]
+1
View File
@@ -0,0 +1 @@
qemu-aarch64-static and qemu-arm-static are taken from https://github.com/resin-io/qemu/releases/tag/v2.9.0%2Bresin1
+14
View File
@@ -0,0 +1,14 @@
version: '3'
services:
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
volumes:
- ./data:/app/data
devices:
# CC251
#- /dev/ttyUSB_cc2531:/dev/ttyACM0
# CC2530 / GBAN GB2530S
#- /dev/ttyUSB_cc2530:/dev/ttyACM0
restart: always
network_mode: host
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
if [ ! -z "$ZIGBEE2MQTT_DATA" ]; then
DATA="$ZIGBEE2MQTT_DATA"
else
DATA="/app/data"
fi
echo "Using '$DATA' as data directory"
if [ ! -f "$DATA/configuration.yaml" ]; then
echo "Creating configuration file..."
cp /app/configuration.yaml "$DATA/configuration.yaml"
fi
exec npm start
Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

+146
View File
@@ -0,0 +1,146 @@
<svg class="thumb" width="1000" height="1000" viewBox="0,0,600,600" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns1="http://www.inkscape.org/namespaces/inkscape" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<defs></defs>
<g transform="matrix(1.8288,0,0,1.8288,-76.3478,13.5303)">
<g transform="matrix(1.6652,0,0,1.6704,50.2843,0.6537)">
<svg width="186.77" height="186.769" viewBox="-5,-5,186.77,186.769">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk4">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g>
<polygon points="51.774,176.769 0,124.995 0,51.774 51.774,0 124.995,0 176.77,51.774 176.77,124.995 124.995,176.769 " fill="url('#linearGradientSk1zes2vk4')"></polygon>
</g>
</svg>
</g>
<g transform="matrix(1.6204,0,0,1.6204,53.946,5.3)">
<svg width="186.77" height="186.769" viewBox="-5,-5,186.77,186.769">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vka">
<stop offset="0%" stop-color="#ffc038"></stop>
<stop offset="100%" stop-color="#ffc038"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g>
<polygon points="51.774,176.769 0,124.995 0,51.774 51.774,0 124.995,0 176.77,51.774 176.77,124.995 124.995,176.769 " fill="url('#linearGradientSk1zes2vka')"></polygon>
</g>
</svg>
</g>
<g transform="matrix(1.6146,0,0,1.6146,185.8484,123.0829)">
<svg width="27.265" height="16.606891038197716" viewBox="36.308,71.828,27.265,16.606891038197716">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vkg">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g></g>
<g></g>
<g>
<path d="M41.308,76.828c1.197,2.07,2.931,3.953,5.371,5.497c0,0,1.453,1.163,3.373,1.108c1.918,0.051,3.375-1.107,3.375-1.107 c2.289-1.446,3.958-3.192,5.146-5.112c-2.274,0.496-4.875,0.754-7.556,0.754C47.714,77.968,44.316,77.583,41.308,76.828z" fill="url('#linearGradientSk1zes2vkg')"></path>
</g>
</svg>
</g>
<g transform="matrix(1.6146,0,0,1.6146,182.6191,109.0829)">
<svg width="31.991999999999997" height="16.800092191011956" viewBox="34.051,63.36,31.991999999999997,16.800092191011956">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vkm">
<stop offset="0%" stop-color="#ffffff"></stop>
<stop offset="100%" stop-color="#ffffff"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g></g>
<g></g>
<g>
<path d="M39.051,68.36c0.055,1.736,0.307,3.47,0.818,5.141c5.94,2.063,15.1,2.206,20.244,0.407c0.563-1.692,0.85-3.453,0.93-5.221 c-2.995,0.938-6.551,1.364-10.114,1.364C46.659,70.052,42.394,69.434,39.051,68.36z" fill="url('#linearGradientSk1zes2vkm')"></path>
</g>
</svg>
</g>
<g transform="matrix(1.6146,0,0,1.6146,182.6191,96.0829)">
<svg width="31.867999999999995" height="16.630912092367097" viewBox="34.128,55.641000000000005,31.867999999999995,16.630912092367097">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vks">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g></g>
<g></g>
<g>
<path d="M50.929,62.06c-3.902,0-7.81-0.511-11.006-1.419c-0.373,1.537-0.658,3.156-0.795,4.812 c5.78,2.114,15.619,2.598,21.868,0.309c-0.119-1.662-0.384-3.297-0.745-4.846C57.427,61.692,54.187,62.06,50.929,62.06z" fill="url('#linearGradientSk1zes2vks')"></path>
</g>
</svg>
</g>
<g transform="matrix(1.6146,0,0,1.6146,185.041,84.8902)">
<svg width="28.836000000000006" height="15.788046460420631" viewBox="35.678,48.491,28.836000000000006,15.788046460420631">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vky">
<stop offset="0%" stop-color="#ffffff"></stop>
<stop offset="100%" stop-color="#ffffff"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g></g>
<g></g>
<g>
<path d="M59.514,58.241c-0.571-1.815-1.232-3.435-1.862-4.75c-2.599,0.543-5.42,0.809-8.212,0.809 c-2.458,0-4.881-0.204-7.097-0.579c-0.564,1.205-1.146,2.646-1.665,4.246C46.062,59.501,53.848,59.813,59.514,58.241z" fill="url('#linearGradientSk1zes2vky')"></path>
</g>
</svg>
</g>
<g transform="matrix(1.6146,0,0,1.6146,120.4554,23.9828)">
<svg width="108.32981691822947" height="57.54144295152284" viewBox="-4.359346882061053,10.889,108.32981691822947,57.54144295152284">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk14">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g></g>
<g></g>
<g></g>
<g></g>
<g>
<path d="M58.786,38.047c-0.651-1.481-1.406-2.589-1.406-2.589c-0.11-0.123-0.253-0.232-0.394-0.342 c0.422-1.017,0.659-2.14,0.659-3.324c0-3.374-1.896-6.271-4.6-7.523l2.116-7.369l6.143-0.228c0.215-0.007,0.382-0.188,0.378-0.405 c-0.008-0.215-0.19-0.375-0.406-0.378l-6.396,0.238c-0.152,0.006-0.287,0.095-0.346,0.239l-3.563,7.305 c-0.302-0.039-0.607-0.065-0.92-0.065c-0.314,0-0.621,0.026-0.924,0.066l-3.565-7.308c-0.058-0.138-0.193-0.23-0.349-0.237 l-6.393-0.236c-0.216-0.001-0.396,0.161-0.407,0.376c-0.006,0.218,0.163,0.398,0.38,0.405l6.143,0.23l2.118,7.368 c-2.703,1.252-4.598,4.147-4.597,7.52c0,1.184,0.239,2.307,0.659,3.323c-0.148,0.11-0.288,0.223-0.393,0.344 c0,0-0.739,1.108-1.38,2.663C29.184,41.662-2.639,46.12,0.916,55.936c3.944,10.877,25.455,7.546,29.052,4.598 c5.007-4.104,9.231-7.95,11.843-11c0.224,0.512,0.459,0.979,0.694,1.396c4.583,0.822,10.289,0.82,14.998-0.245 c0.166-0.346,0.332-0.731,0.496-1.137c2.625,3.011,6.768,6.769,11.648,10.77c3.596,2.949,25.106,6.275,29.048-4.599 C102.202,46.038,71.295,41.566,58.786,38.047z" fill="url('#linearGradientSk1zes2vk14')"></path>
</g>
</svg>
</g>
<g transform="matrix(0.5515,-0.0096,0.0096,0.5515,184.0296,161.5473)">
<svg width="91.9" height="160" style="overflow: visible;">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk1g">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g transform="matrix(1,0,0,1,0,75)">
<path d="M 28.2-77.4L 28.2-77.4L 28.2 5.4Q 28.2 7.3 27.35 8.15Q 26.5 9 24.6 9L 24.6 9L 10.1 9Q 8.2 9 7.35 8.15Q 6.5 7.3 6.5 5.4L 6.5 5.4L 6.5-77.4Q 6.5-79.3 7.35-80.15Q 8.2-81 10.1-81L 10.1-81L 24.6-81Q 26.5-81 27.35-80.15Q 28.2-79.3 28.2-77.4ZM 85.39999999999998-77.4L 85.39999999999998-77.4L 85.39999999999998 5.4Q 85.39999999999998 7.3 84.54999999999998 8.15Q 83.69999999999999 9 81.79999999999998 9L 81.79999999999998 9L 67.29999999999998 9Q 65.39999999999998 9 64.54999999999998 8.15Q 63.69999999999998 7.3 63.69999999999998 5.4L 63.69999999999998 5.4L 63.69999999999998-77.4Q 63.69999999999998-79.3 64.54999999999998-80.15Q 65.39999999999998-81 67.29999999999998-81L 67.29999999999998-81L 81.79999999999998-81Q 83.69999999999999-81 84.54999999999998-80.15Q 85.39999999999998-79.3 85.39999999999998-77.4Z" data-textpath="| |" data-text-anchor="middle" data-font-size="100" data-letterspacing="0" data-side="left" data-offset="0.5" data-dx="0" data-dy="0" data-xmlspace="preserve" data-href="" data-font="Bungee" data-font-src="/Content/clientfonts/bungee.woff" data-font-scale="contain" transform="translate(0,0)" data-x="0" data-y="0" fill="url('#linearGradientSk1zes2vk1g')"></path>
</g>
</svg>
</g>
<g transform="matrix(0.5,0,0,0.5,136.759,231)">
<svg width="289.30000000000007" height="160" style="overflow: visible;">
<defs>
<linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="linearGradientSk1zes2vk1j">
<stop offset="0%" stop-color="#000000"></stop>
<stop offset="100%" stop-color="#000000"></stop>
</linearGradient>
</defs>
<g transform="matrix(1,0,0,1,0,75)">
<path d="M 25.4 0L 25.4 0L 10.5 0Q 8.6 0 7.75-0.85Q 6.9-1.7 6.9-3.6L 6.9-3.6L 6.9-68.4Q 6.9-70.3 7.75-71.15Q 8.6-72 10.5-72L 10.5-72L 26.6-72Q 28.2-72 29.25-71.3Q 30.3-70.6 31.2-69L 31.2-69L 40.2-52.7Q 40.7-51.8 41.05-51.4Q 41.4-51 42-51L 42-51L 42.9-51Q 43.5-51 43.85-51.4Q 44.2-51.8 44.7-52.7L 44.7-52.7L 53.6-69Q 54.5-70.6 55.55-71.3Q 56.6-72 58.2-72L 58.2-72L 74.4-72Q 76.3-72 77.15-71.15Q 78-70.3 78-68.4L 78-68.4L 78-3.6Q 78-1.7 77.15-0.85Q 76.3 0 74.4 0L 74.4 0L 59 0Q 57.1 0 56.25-0.85Q 55.4-1.7 55.4-3.6L 55.4-3.6L 55.4-38.8L 49.5-27.9Q 48.6-26.2 47.35-25.45Q 46.1-24.7 44.2-24.7L 44.2-24.7L 40.2-24.7Q 38.3-24.7 37.05-25.45Q 35.8-26.2 34.9-27.9L 34.9-27.9L 29-38.8L 29-3.6Q 29-1.7 28.15-0.85Q 27.3 0 25.4 0ZM 129.4 9L 129.4 9L 114 9Q 112.10000000000001 9 111.25 8.15Q 110.4 7.3 110.4 5.4L 110.4 5.4L 110.4-0.1Q 98.80000000000001-1.8 94.75-7.05Q 90.7-12.3 90.7-19.8L 90.7-19.8L 90.7-53Q 90.7-57.6 92.05000000000001-61.35Q 93.4-65.1 96.85000000000001-67.8Q 100.30000000000001-70.5 106.4-72Q 112.5-73.5 121.80000000000001-73.5L 121.80000000000001-73.5Q 131.10000000000002-73.5 137.15-72Q 143.2-70.5 146.65-67.8Q 150.10000000000002-65.1 151.45-61.35Q 152.8-57.6 152.8-53L 152.8-53L 152.8-19.8Q 152.8-16 151.9-12.75Q 151-9.5 148.8-7Q 146.60000000000002-4.5 142.75-2.7Q 138.9-0.9 133-0.1L 133-0.1L 133 5.4Q 133 7.3 132.15 8.15Q 131.3 9 129.4 9ZM 113.4-49.3L 113.4-22Q 113.4-20 114.9-18.65Q 116.4-17.3 121.80000000000001-17.3L 121.80000000000001-17.3Q 127.2-17.3 128.7-18.65Q 130.2-20 130.2-22L 130.2-22L 130.2-49.3Q 130.2-51.2 128.7-52.55Q 127.2-53.9 121.80000000000001-53.9L 121.80000000000001-53.9Q 116.4-53.9 114.9-52.55Q 113.4-51.2 113.4-49.3L 113.4-49.3ZM 199 0L 199 0L 182.79999999999998 0Q 180.9 0 180.04999999999998-0.85Q 179.2-1.7 179.2-3.6L 179.2-3.6L 179.2-52.7L 164.5-52.7Q 162.6-52.7 161.75-53.55Q 160.9-54.4 160.9-56.3L 160.9-56.3L 160.9-68.4Q 160.9-70.3 161.75-71.15Q 162.6-72 164.5-72L 164.5-72L 217.3-72Q 219.2-72 220.05-71.15Q 220.89999999999998-70.3 220.89999999999998-68.4L 220.89999999999998-68.4L 220.89999999999998-56.3Q 220.89999999999998-54.4 220.05-53.55Q 219.2-52.7 217.3-52.7L 217.3-52.7L 202.6-52.7L 202.6-3.6Q 202.6-1.7 201.75-0.85Q 200.89999999999998 0 199 0ZM 264.6 0L 264.6 0L 248.40000000000003 0Q 246.50000000000006 0 245.65000000000003-0.85Q 244.80000000000004-1.7 244.80000000000004-3.6L 244.80000000000004-3.6L 244.80000000000004-52.7L 230.10000000000005-52.7Q 228.20000000000005-52.7 227.35000000000005-53.55Q 226.50000000000006-54.4 226.50000000000006-56.3L 226.50000000000006-56.3L 226.50000000000006-68.4Q 226.50000000000006-70.3 227.35000000000005-71.15Q 228.20000000000005-72 230.10000000000005-72L 230.10000000000005-72L 282.90000000000003-72Q 284.80000000000007-72 285.65000000000003-71.15Q 286.50000000000006-70.3 286.50000000000006-68.4L 286.50000000000006-68.4L 286.50000000000006-56.3Q 286.50000000000006-54.4 285.65000000000003-53.55Q 284.80000000000007-52.7 282.90000000000003-52.7L 282.90000000000003-52.7L 268.20000000000005-52.7L 268.20000000000005-3.6Q 268.20000000000005-1.7 267.35-0.85Q 266.50000000000006 0 264.6 0Z" data-textpath="MQTT" data-text-anchor="middle" data-font-size="100" data-letterspacing="0" data-side="left" data-offset="0.5" data-dx="0" data-dy="0" data-xmlspace="preserve" data-href="" data-font="Bungee" data-font-src="/Content/clientfonts/bungee.woff" data-font-scale="contain" transform="translate(0,0)" data-x="0" data-y="0" fill="url('#linearGradientSk1zes2vk1j')"></path>
</g>
</svg>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

+23
View File
@@ -0,0 +1,23 @@
const semver = require('semver');
const engines = require('./package.json').engines;
const version = engines.node;
if (!semver.satisfies(process.version, version)) {
console.log(`\t\tZigbee2mqtt requires node version ${version}, you are running ${process.version}!\n`); // eslint-disable-line
}
const Controller = require('./lib/controller');
const controller = new Controller();
controller.start();
process.on('SIGINT', handleQuit);
process.on('SIGTERM', handleQuit);
let stopping = false;
function handleQuit() {
if (!stopping) {
stopping = true;
controller.stop();
}
}
+350
View File
@@ -0,0 +1,350 @@
const MQTT = require('./mqtt');
const Zigbee = require('./zigbee');
const EventBus = require('./eventBus');
const State = require('./state');
const logger = require('./util/logger');
const settings = require('./util/settings');
const objectAssignDeep = require('object-assign-deep');
const utils = require('./util/utils');
// Extensions
const ExtensionEntityPublish = require('./extension/entityPublish');
const ExtensionDeviceReceive = require('./extension/deviceReceive');
const ExtensionNetworkMap = require('./extension/networkMap');
const ExtensionSoftReset = require('./extension/softReset');
const ExtensionHomeAssistant = require('./extension/homeassistant');
const ExtensionDeviceConfigure = require('./extension/deviceConfigure');
const ExtensionDeviceGroupMembership = require('./extension/deviceGroupMembership');
const ExtensionBridgeLegacy = require('./extension/bridgeLegacy');
const ExtensionGroups = require('./extension/groups');
const ExtensionDeviceAvailability = require('./extension/deviceAvailability');
const ExtensionDeviceBind = require('./extension/deviceBind');
const ExtensionDeviceReport = require('./extension/deviceReport');
const ExtensionDeviceEvent = require('./extension/deviceEvent');
const ExtensionOTAUpdate = require('./extension/otaUpdate');
class Controller {
constructor() {
this.zigbee = new Zigbee();
this.mqtt = new MQTT();
this.eventBus = new EventBus();
this.state = new State(this.eventBus);
this.publishEntityState = this.publishEntityState.bind(this);
this.onZigbeeAdapterDisconnected = this.onZigbeeAdapterDisconnected.bind(this);
// Initialize extensions.
const args = [this.zigbee, this.mqtt, this.state, this.publishEntityState, this.eventBus];
this.extensions = [
new ExtensionEntityPublish(...args),
new ExtensionDeviceReceive(...args),
new ExtensionDeviceGroupMembership(...args),
new ExtensionDeviceConfigure(...args),
new ExtensionNetworkMap(...args),
new ExtensionGroups(...args),
new ExtensionDeviceBind(...args),
new ExtensionDeviceEvent(...args),
new ExtensionOTAUpdate(...args),
];
/* istanbul ignore else */
if (settings.get().advanced.legacy_api) {
this.extensions.push(new ExtensionBridgeLegacy(...args));
}
if (settings.get().advanced.report) {
this.extensions.push(new ExtensionDeviceReport(...args));
}
if (settings.get().homeassistant) {
this.extensions.push(new ExtensionHomeAssistant(...args));
}
/* istanbul ignore next */
if (settings.get().advanced.soft_reset_timeout !== 0) {
this.extensions.push(new ExtensionSoftReset(...args));
}
if (settings.get().advanced.availability_timeout) {
this.extensions.push(new ExtensionDeviceAvailability(...args));
}
}
async start() {
const settingsErrors = settings.validate();
if (settingsErrors) {
logger.error(`Refusing to start, configuration.yaml is not valid, found the following errors:`);
for (const error of settingsErrors) {
logger.error(`\t - ${error}`);
}
logger.error(
`If you don't know how to solve this, read https://www.zigbee2mqtt.io/configuration/configuration.html`,
);
process.exit(1);
}
this.state.start();
const info = await utils.getZigbee2mqttVersion();
logger.info(`Starting zigbee2mqtt version ${info.version} (commit #${info.commitHash})`);
// Start zigbee
try {
await this.zigbee.start();
this.callExtensionMethod('onZigbeeStarted', []);
this.zigbee.on('event', this.onZigbeeEvent.bind(this));
this.zigbee.on('adapterDisconnected', this.onZigbeeAdapterDisconnected);
} catch (error) {
logger.error('Failed to start zigbee');
logger.error('Exiting...');
logger.error(error.stack);
process.exit(1);
}
// Log zigbee clients on startup
const devices = this.zigbee.getClients();
logger.info(`Currently ${devices.length} devices are joined:`);
for (const device of devices) {
const entity = this.zigbee.resolveEntity(device);
logger.info(
(entity.settings ? entity.settings.friendlyName : entity.device.ieeeAddr) +
` (${entity.device.ieeeAddr}): ` +
(entity.definition ?
`${entity.definition.model} - ${entity.definition.vendor} ${entity.definition.description} ` :
'Not supported ') +
`(${entity.device.type})`,
);
}
// Enable zigbee join.
if (settings.get().permit_join) {
logger.warn('`permit_join` set to `true` in configuration.yaml.');
logger.warn('Allowing new devices to join.');
logger.warn('Set `permit_join` to `false` once you joined all devices.');
}
await this.zigbee.permitJoin(settings.get().permit_join);
// MQTT
this.mqtt.on('message', this.onMQTTMessage.bind(this));
await this.mqtt.connect();
// Send all cached states.
if (settings.get().advanced.cache_state) {
for (const device of this.zigbee.getClients()) {
if (this.state.exists(device.ieeeAddr)) {
this.publishEntityState(device.ieeeAddr, this.state.get(device.ieeeAddr));
}
}
}
// Add devices which are in database but not in configuration to configuration
for (const device of this.zigbee.getClients()) {
if (!settings.getDevice(device.ieeeAddr)) {
settings.addDevice(device.ieeeAddr);
}
}
// Call extensions
await this.callExtensionMethod('onMQTTConnected', []);
}
async stop() {
// Call extensions
await this.callExtensionMethod('stop', []);
// Wrap-up
this.state.stop();
await this.mqtt.disconnect();
try {
await this.zigbee.stop();
process.exit(0);
} catch (error) {
logger.error('Failed to stop zigbee');
process.exit(1);
}
}
async onZigbeeAdapterDisconnected() {
logger.error('Adapter disconnected, stopping');
await this.stop();
}
async onZigbeeEvent(type, data) {
const resolvedEntity = this.zigbee.resolveEntity(data.device || data.ieeeAddr);
if (data.device && !resolvedEntity.settings) {
// Only deviceLeave doesn't have a device (not interesting to add to settings)
resolvedEntity.settings = settings.addDevice(data.device.ieeeAddr);
}
const name = resolvedEntity && resolvedEntity.settings ? resolvedEntity.settings.friendlyName : null;
if (type === 'message') {
logger.debug(
`Received Zigbee message from '${name}', type '${data.type}', cluster '${data.cluster}'` +
`, data '${JSON.stringify(data.data)}' from endpoint ${data.endpoint.ID}` +
(data.hasOwnProperty('groupID') ? ` with groupID ${data.groupID}` : ``),
);
} else if (type === 'deviceJoined') {
logger.info(`Device '${name}' joined`);
} else if (type === 'deviceInterview') {
if (data.status === 'successful') {
logger.info(`Successfully interviewed '${name}', device has successfully been paired`);
if (resolvedEntity.definition) {
const {vendor, description, model} = resolvedEntity.definition;
logger.info(`Device '${name}' is supported, identified as: ${vendor} ${description} (${model})`);
} else {
logger.warn(
`Device '${name}' with Zigbee model '${data.device.modelID}' is NOT supported, ` +
`please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html`,
);
}
} else if (data.status === 'failed') {
logger.error(`Failed to interview '${name}', device has not successfully been paired`);
} else {
/* istanbul ignore else */
if (data.status === 'started') {
logger.info(`Starting interview of '${name}'`);
}
}
} else if (type === 'deviceAnnounce') {
logger.debug(`Device '${name}' announced itself`);
} else {
/* istanbul ignore else */
if (type === 'deviceLeave') {
logger.warn(`Device '${name || data.ieeeAddr}' left the network`);
}
}
// Call extensions
this.callExtensionMethod('onZigbeeEvent', [type, data, resolvedEntity]);
}
onMQTTMessage(payload) {
const {topic, message} = payload;
logger.debug(`Received MQTT message on '${topic}' with data '${message}'`);
// Call extensions
this.callExtensionMethod('onMQTTMessage', [topic, message]);
}
async publishEntityState(IDorName, payload, stateChangeReason=null) {
const resolvedEntity = this.zigbee.resolveEntity(IDorName);
if (!resolvedEntity || !resolvedEntity.settings) {
logger.error(`'${IDorName}' does not exist, skipping publish`);
return;
}
const isDevice = resolvedEntity.type === 'device';
if (isDevice && settings.get().advanced.last_seen !== 'disable' && resolvedEntity.device.lastSeen) {
payload.last_seen = utils.formatDate(resolvedEntity.device.lastSeen, settings.get().advanced.last_seen);
}
let messagePayload = {...payload};
const currentState = this.state.exists(resolvedEntity.settings.ID) ?
this.state.get(resolvedEntity.settings.ID) : {};
const newState = objectAssignDeep.noMutate(currentState, payload);
// Update state cache with new state.
this.state.set(resolvedEntity.settings.ID, newState, stateChangeReason);
if (settings.get().advanced.cache_state) {
// Add cached state to payload
messagePayload = newState;
}
const deviceOptions = settings.get().device_options;
const options = {
retain: utils.getObjectsProperty([resolvedEntity.settings, deviceOptions], 'retain', false),
qos: utils.getObjectsProperty([resolvedEntity.settings, deviceOptions], 'qos', 0),
};
const retention = utils.getObjectsProperty([resolvedEntity.settings, deviceOptions], 'retention', false);
if (retention !== false) {
options.properties = {messageExpiryInterval: retention};
}
if (isDevice && settings.get().mqtt.include_device_information) {
const attributes = [
'ieeeAddr', 'networkAddress', 'type', 'manufacturerID', 'manufacturerName', 'powerSource',
'applicationVersion', 'stackVersion', 'zclVersion', 'hardwareVersion', 'dateCode', 'softwareBuildID',
];
messagePayload.device = {
friendlyName: resolvedEntity.name,
model: resolvedEntity.definition ? resolvedEntity.definition.model : 'unknown',
};
attributes.forEach((a) => messagePayload.device[a] = resolvedEntity.device[a]);
}
// filter mqtt message attributes
if (deviceOptions.filtered_attributes) {
deviceOptions.filtered_attributes.forEach((a) => delete messagePayload[a]);
}
if (resolvedEntity.settings.filtered_attributes) {
resolvedEntity.settings.filtered_attributes.forEach((a) => delete messagePayload[a]);
}
this.eventBus.emit('publishEntityState', {payload: messagePayload, entity: resolvedEntity});
if (Object.entries(messagePayload).length) {
if (settings.get().experimental.output === 'attribute_and_json') {
await this.mqtt.publish(resolvedEntity.name, JSON.stringify(messagePayload), options);
await this.iteratePayloadAttributeOutput(`${resolvedEntity.name}/`, messagePayload, options);
} else if (settings.get().experimental.output === 'json') {
await this.mqtt.publish(resolvedEntity.name, JSON.stringify(messagePayload), options);
} else {
/* istanbul ignore else */
if (settings.get().experimental.output === 'attribute') {
await this.iteratePayloadAttributeOutput(`${resolvedEntity.name}/`, messagePayload, options);
}
}
}
}
async iteratePayloadAttributeOutput(topicRoot, payload, options) {
for (const [key, value] of Object.entries(payload)) {
let subPayload = value;
let message;
// Special cases
if (key === 'color' && utils.objectHasProperties(subPayload, ['r', 'g', 'b'])) {
subPayload = [subPayload.r, subPayload.g, subPayload.b];
}
// Check Array first, since it is also an Object
if (Array.isArray(subPayload)) {
message = subPayload.map((x) => `${x}`).join(',');
} else if (typeof subPayload === 'object') {
return this.iteratePayloadAttributeOutput(`${topicRoot}${key}-`, subPayload, options);
} else {
message = typeof subPayload === 'string' ? subPayload : JSON.stringify(subPayload);
}
await this.mqtt.publish(`${topicRoot}${key}`, message, options);
}
}
async callExtensionMethod(method, parameters) {
for (const extension of this.extensions) {
if (extension[method]) {
try {
await extension[method](...parameters);
} catch (error) {
/* istanbul ignore next */
logger.error(`Failed to call '${extension.constructor.name}' '${method}' (${error.stack})`);
/* istanbul ignore next */
if (process.env.JEST_WORKER_ID !== undefined) {
throw error;
}
}
}
}
}
}
module.exports = Controller;
+24
View File
@@ -0,0 +1,24 @@
const events = require('events');
const assert = require('assert');
const allowedEvents = [
'deviceRemoved', // Device has been removed
'deviceRenamed', // Device has been renamed
'groupRenamed', // Group has been renamed
'publishEntityState', // Entity state will be published
'stateChange', // Entity changes its state
];
class EventBus extends events.EventEmitter {
emit(event, data) {
assert(allowedEvents.includes(event), `Event '${event}' not supported`);
super.emit(event, data);
}
on(event, callback) {
assert(allowedEvents.includes(event), `Event '${event}' not supported`);
super.on(event, callback);
}
}
module.exports = EventBus;
+52
View File
@@ -0,0 +1,52 @@
class BaseExtension {
/**
* Besides intializing variables, the constructor should do nothing!
*
* @param {Zigbee} zigbee Zigbee controller
* @param {MQTT} mqtt MQTT controller
* @param {State} state State controller
* @param {Function} publishEntityState Method to publish device state to MQTT.
* @param {EventBus} eventBus The event bus
*/
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
this.zigbee = zigbee;
this.mqtt = mqtt;
this.state = state;
this.publishEntityState = publishEntityState;
this.eventBus = eventBus;
}
/**
* This method is called by the controller once Zigbee has been started.
*/
// onZigbeeStarted() {}
/**
* This method is called by the controller once connected to the MQTT server.
*/
// onMQTTConnected() {}
/**
* Is called when a Zigbee message from a device is received.
* @param {string} type Type of the message
* @param {Object} data Data of the message
* @param {Object?} resolvedEntity Resolved entity returned from this.zigbee.resolveEntity()
* @param {Object?} settingsDevice Device settings
*/
// onZigbeeEvent(type, data, resolvedEntity) {}
/**
* Is called when a MQTT message is received
* @param {string} topic Topic on which the message was received
* @param {Object} message The received message
* @return {boolean} if the message was handled
*/
// onMQTTMessage(topic, message) {}
/**
* Is called once the extension has to stop
*/
// stop() {}
}
module.exports = BaseExtension;
+462
View File
@@ -0,0 +1,462 @@
const settings = require('../util/settings');
const logger = require('../util/logger');
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
const utils = require('../util/utils');
const assert = require('assert');
const BaseExtension = require('./baseExtension');
const configRegex =
new RegExp(`${settings.get().mqtt.base_topic}/bridge/config/((?:\\w+/get)|(?:\\w+/factory_reset)|(?:\\w+))`);
const allowedLogLevels = ['error', 'warn', 'info', 'debug'];
class BridgeLegacy extends BaseExtension {
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
super(zigbee, mqtt, state, publishEntityState, eventBus);
// Bind functions
this.permitJoin = this.permitJoin.bind(this);
this.lastSeen = this.lastSeen.bind(this);
this.elapsed = this.elapsed.bind(this);
this.reset = this.reset.bind(this);
this.logLevel = this.logLevel.bind(this);
this.devices = this.devices.bind(this);
this.groups = this.groups.bind(this);
this.rename = this.rename.bind(this);
this.renameLast = this.renameLast.bind(this);
this.remove = this.remove.bind(this);
this.forceRemove = this.forceRemove.bind(this);
this.ban = this.ban.bind(this);
this.deviceOptions = this.deviceOptions.bind(this);
this.addGroup = this.addGroup.bind(this);
this.removeGroup = this.removeGroup.bind(this);
this.whitelist = this.whitelist.bind(this);
this.touchlinkFactoryReset = this.touchlinkFactoryReset.bind(this);
this.lastJoinedDeviceName = null;
// Set supported options
this.supportedOptions = {
'permit_join': this.permitJoin,
'last_seen': this.lastSeen,
'elapsed': this.elapsed,
'reset': this.reset,
'log_level': this.logLevel,
'devices': this.devices,
'groups': this.groups,
'devices/get': this.devices,
'rename': this.rename,
'rename_last': this.renameLast,
'remove': this.remove,
'force_remove': this.forceRemove,
'ban': this.ban,
'device_options': this.deviceOptions,
'add_group': this.addGroup,
'remove_group': this.removeGroup,
'whitelist': this.whitelist,
'touchlink/factory_reset': this.touchlinkFactoryReset,
};
}
whitelist(topic, message) {
try {
const entity = settings.getEntity(message);
assert(entity, `Entity '${message}' does not exist`);
settings.whitelistDevice(entity.ID);
logger.info(`Whitelisted '${entity.friendlyName}'`);
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: 'device_whitelisted', message: {friendly_name: entity.friendlyName}}),
);
} catch (error) {
logger.error(`Failed to whitelist '${message}' '${error}'`);
}
}
deviceOptions(topic, message) {
let json = null;
try {
json = JSON.parse(message);
} catch (e) {
logger.error('Failed to parse message as JSON');
return;
}
if (!json.hasOwnProperty('friendly_name') || !json.hasOwnProperty('options')) {
logger.error('Invalid JSON message, should contain "friendly_name" and "options"');
return;
}
const entity = settings.getEntity(json.friendly_name);
assert(entity, `Entity '${json.friendly_name}' does not exist`);
settings.changeDeviceOptions(entity.ID, json.options);
logger.info(`Changed device specific options of '${json.friendly_name}' (${JSON.stringify(json.options)})`);
}
async permitJoin(topic, message) {
await this.zigbee.permitJoin(message.toLowerCase() === 'true');
this.publish();
}
async reset(topic, message) {
try {
await this.zigbee.reset('soft');
logger.info('Soft resetted ZNP');
} catch (error) {
logger.error('Soft reset failed');
}
}
lastSeen(topic, message) {
const allowed = ['disable', 'ISO_8601', 'epoch', 'ISO_8601_local'];
if (!allowed.includes(message)) {
logger.error(`${message} is not an allowed value, possible: ${allowed}`);
return;
}
settings.set(['advanced', 'last_seen'], message);
logger.info(`Set last_seen to ${message}`);
}
elapsed(topic, message) {
const allowed = ['true', 'false'];
if (!allowed.includes(message)) {
logger.error(`${message} is not an allowed value, possible: ${allowed}`);
return;
}
settings.set(['advanced', 'elapsed'], message === 'true');
logger.info(`Set elapsed to ${message}`);
}
logLevel(topic, message) {
const level = message.toLowerCase();
if (allowedLogLevels.includes(level)) {
logger.info(`Switching log level to '${level}'`);
logger.setLevel(level);
} else {
logger.error(`Could not set log level to '${level}'. Allowed level: '${allowedLogLevels.join(',')}'`);
}
this.publish();
}
async devices(topic, message) {
const coordinator = await this.zigbee.getCoordinatorVersion();
const devices = this.zigbee.getDevices().map((device) => {
const payload = {
ieeeAddr: device.ieeeAddr,
type: device.type,
networkAddress: device.networkAddress,
};
if (device.type !== 'Coordinator') {
const definition = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
const friendlyDevice = settings.getDevice(device.ieeeAddr);
payload.model = definition ? definition.model : device.modelID;
payload.vendor = definition ? definition.vendor : '-';
payload.description = definition ? definition.description : '-';
payload.friendly_name = friendlyDevice ? friendlyDevice.friendly_name : device.ieeeAddr;
payload.manufacturerID = device.manufacturerID;
payload.manufacturerName = device.manufacturerName;
payload.powerSource = device.powerSource;
payload.modelID = device.modelID;
payload.hardwareVersion = device.hardwareVersion;
payload.softwareBuildID = device.softwareBuildID;
payload.dateCode = device.dateCode;
payload.lastSeen = device.lastSeen;
} else {
payload.friendly_name = 'Coordinator';
payload.softwareBuildID = coordinator.type;
payload.dateCode = coordinator.meta.revision.toString();
payload.lastSeen = Date.now();
}
return payload;
});
if (topic.split('/').pop() == 'get') {
this.mqtt.publish(`bridge/config/devices`, JSON.stringify(devices), {});
} else {
this.mqtt.publish('bridge/log', JSON.stringify({type: 'devices', message: devices}));
}
}
groups(topic, message) {
const payload = settings.getGroups().map((g) => {
const group = {...g};
delete group.friendlyName;
return group;
});
this.mqtt.publish('bridge/log', JSON.stringify({type: 'groups', message: payload}));
}
rename(topic, message) {
const invalid = `Invalid rename message format expected {old: 'friendly_name', new: 'new_name} got ${message}`;
let json = null;
try {
json = JSON.parse(message);
} catch (e) {
logger.error(invalid);
return;
}
// Validate message
if (!json.new || !json.old) {
logger.error(invalid);
return;
}
this._renameInternal(json.old, json.new);
}
renameLast(topic, message) {
if (!this.lastJoinedDeviceName) {
logger.error(`Cannot rename last joined device, no device has joined during this session`);
return;
}
this._renameInternal(this.lastJoinedDeviceName, message);
}
_renameInternal(from, to) {
try {
const isGroup = settings.getGroup(from) !== null;
settings.changeFriendlyName(from, to);
logger.info(`Successfully renamed - ${from} to ${to} `);
const entity = this.zigbee.resolveEntity(to);
const eventData = isGroup ? {group: entity.group} : {device: entity.device};
this.eventBus.emit(`${isGroup ? 'group' : 'device'}Renamed`, eventData);
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `${isGroup ? 'group' : 'device'}_renamed`, message: {from, to}}),
);
} catch (error) {
logger.error(`Failed to rename - ${from} to ${to}`);
}
}
addGroup(topic, message) {
let id = null;
let name = null;
try {
// json payload with id and friendly_name
const json = JSON.parse(message);
if (json.hasOwnProperty('id')) {
id = json.id;
name = `group_${id}`;
}
if (json.hasOwnProperty('friendly_name')) {
name = json.friendly_name;
}
} catch (e) {
// just friendly_name
name = message;
}
if (name == null) {
logger.error('Failed to add group, missing friendly_name!');
return;
}
const group = settings.addGroup(name, id);
this.zigbee.createGroup(group.ID);
this.mqtt.publish('bridge/log', JSON.stringify({type: `group_added`, message: name}));
logger.info(`Added group '${name}'`);
}
removeGroup(topic, message) {
const name = message;
const entity = this.zigbee.resolveEntity(message);
assert(entity && entity.type === 'group', `Group '${message}' does not exist`);
settings.removeGroup(message);
entity.group.removeFromDatabase();
this.mqtt.publish('bridge/log', JSON.stringify({type: `group_removed`, message}));
logger.info(`Removed group '${name}'`);
}
async forceRemove(topic, message) {
await this.removeForceRemoveOrBan('force_remove', message);
}
async remove(topic, message) {
await this.removeForceRemoveOrBan('remove', message);
}
async ban(topic, message) {
await this.removeForceRemoveOrBan('ban', message);
}
async removeForceRemoveOrBan(action, message) {
const entity = this.zigbee.resolveEntity(message.trim());
const lookup = {
ban: ['banned', 'Banning', 'ban'],
force_remove: ['force_removed', 'Force removing', 'force remove'],
remove: ['removed', 'Removing', 'remove'],
};
if (!entity) {
logger.error(`Cannot ${lookup[action][2]}, device '${message}' does not exist`);
this.mqtt.publish('bridge/log', JSON.stringify({type: `device_${lookup[action][0]}_failed`, message}));
return;
}
const cleanup = () => {
// Fire event
this.eventBus.emit('deviceRemoved', {device: entity.device});
// Remove from configuration.yaml
settings.removeDevice(entity.settings.ID);
// Remove from state
this.state.remove(entity.settings.ID);
logger.info(`Successfully ${lookup[action][0]} ${entity.settings.friendlyName}`);
this.mqtt.publish('bridge/log', JSON.stringify({type: `device_${lookup[action][0]}`, message}));
};
try {
logger.info(`${lookup[action][1]} '${entity.settings.friendlyName}'`);
if (action === 'force_remove') {
await entity.device.removeFromDatabase();
} else {
await entity.device.removeFromNetwork();
}
cleanup();
} catch (error) {
logger.error(`Failed to ${lookup[action][2]} ${entity.settings.friendlyName} (${error})`);
// eslint-disable-next-line
logger.error(`See https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigremove for more info`);
this.mqtt.publish('bridge/log', JSON.stringify({type: `device_${lookup[action][0]}_failed`, message}));
}
if (action === 'ban') {
settings.banDevice(entity.settings.ID);
}
}
async onMQTTConnected() {
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/config/+`);
this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/config/+/+`);
await this.publish();
}
async onMQTTMessage(topic, message) {
if (!topic.match(configRegex)) {
return false;
}
const option = topic.match(configRegex)[1];
if (!this.supportedOptions.hasOwnProperty(option)) {
return false;
}
await this.supportedOptions[option](topic, message);
return true;
}
async publish() {
const info = await utils.getZigbee2mqttVersion();
const coordinator = await this.zigbee.getCoordinatorVersion();
const topic = `bridge/config`;
const payload = {
version: info.version,
commit: info.commitHash,
coordinator,
log_level: logger.getLevel(),
permit_join: await this.zigbee.getPermitJoin(),
};
await this.mqtt.publish(topic, JSON.stringify(payload), {retain: true, qos: 0});
}
onZigbeeEvent(type, data, resolvedEntity) {
if (type === 'deviceJoined' && resolvedEntity) {
this.lastJoinedDeviceName = resolvedEntity.name;
}
if (type === 'deviceJoined') {
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `device_connected`, message: {friendly_name: resolvedEntity.name}}),
);
} else if (type === 'deviceInterview') {
if (data.status === 'successful') {
if (resolvedEntity.definition) {
const {vendor, description, model} = resolvedEntity.definition;
const log = {friendly_name: resolvedEntity.name, model, vendor, description, supported: true};
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `pairing`, message: 'interview_successful', meta: log}),
);
} else {
const meta = {friendly_name: resolvedEntity.name, supported: false};
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `pairing`, message: 'interview_successful', meta}),
);
}
} else if (data.status === 'failed') {
const meta = {friendly_name: resolvedEntity.name};
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `pairing`, message: 'interview_failed', meta}),
);
} else {
/* istanbul ignore else */
if (data.status === 'started') {
const meta = {friendly_name: resolvedEntity.name};
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `pairing`, message: 'interview_started', meta}),
);
}
}
} else if (type === 'deviceAnnounce') {
const meta = {friendly_name: resolvedEntity.name};
this.mqtt.publish('bridge/log', JSON.stringify({type: `device_announced`, message: 'announce', meta}));
} else {
/* istanbul ignore else */
if (type === 'deviceLeave') {
const name = resolvedEntity ? resolvedEntity.name : data.ieeeAddr;
const meta = {friendly_name: name};
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `device_removed`, message: 'left_network', meta}),
);
}
}
}
async touchlinkFactoryReset() {
logger.info('Starting touchlink factory reset...');
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `touchlink`, message: 'reset_started', meta: {status: 'started'}}),
);
const result = await this.zigbee.touchlinkFactoryReset();
if (result) {
logger.info('Successfully factory reset device through Touchlink');
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `touchlink`, message: 'reset_success', meta: {status: 'success'}}),
);
} else {
logger.warn('Failed to factory reset device through Touchlink');
this.mqtt.publish(
'bridge/log',
JSON.stringify({type: `touchlink`, message: 'reset_failed', meta: {status: 'failed'}}),
);
}
}
}
module.exports = BridgeLegacy;
+215
View File
@@ -0,0 +1,215 @@
const logger = require('../util/logger');
const settings = require('../util/settings');
const utils = require('../util/utils');
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
const BaseExtension = require('./baseExtension');
// Some EndDevices should be pinged
// e.g. E11-G13 https://github.com/Koenkk/zigbee2mqtt/issues/775#issuecomment-453683846
const pingableModels = [
'E11-G13',
'53170161',
];
const forcedPingable =
zigbeeHerdsmanConverters.devices.filter((d) => pingableModels.includes(d.model));
const toZigbeeCandidates = ['state', 'brightness', 'color', 'color_temp'];
const Hours25 = 1000 * 60 * 60 * 25;
/**
* This extensions pings devices to check if they are online.
*/
class DeviceAvailability extends BaseExtension {
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
super(zigbee, mqtt, state, publishEntityState, eventBus);
this.availability_timeout = settings.get().advanced.availability_timeout;
this.timers = {};
this.state = {};
// Initialize blacklist
this.blacklist = settings.get().advanced.availability_blacklist.map((e) => {
return settings.getEntity(e).ID;
});
// Initialize whitelist
this.whitelist = settings.get().advanced.availability_whitelist.map((e) => {
return settings.getEntity(e).ID;
});
}
isAllowed(device) {
const ieeeAddr = device.ieeeAddr;
const deviceSettings = settings.getDevice(ieeeAddr);
const name = deviceSettings.friendly_name;
// Whitelist is not empty and device is in it, enable availability
if (this.whitelist.length > 0) {
return this.whitelist.includes(ieeeAddr) || (name && this.whitelist.includes(name));
}
// Device is on blacklist, disable availability
if (this.blacklist.includes(ieeeAddr) || (name && this.blacklist.includes(name))) {
return false;
}
return true;
}
isPingable(device) {
// Device is on forcedPingable-list, enable availability
if (forcedPingable.find((d) => d.zigbeeModel.includes(device.modelID))) {
return true;
}
// Device is a mains powered router
const result = utils.isRouter(device) && !utils.isBatteryPowered(device);
return result;
}
onMQTTConnected() {
for (const device of this.zigbee.getClients()) {
// Mark all devices as online on start
this.publishAvailability(device, true);
if (this.isAllowed(device)) {
if (this.isPingable(device)) {
this.setTimerPingable(device);
} else {
this.timers[device.ieeeAddr] = setInterval(() => {
this.handleIntervalNotPingable(device);
}, utils.secondsToMilliseconds(300));
}
}
}
}
async handleIntervalPingable(device) {
// When a device is already unavailable, log the ping failed on 'debug' instead of 'error'.
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
if (!entity) {
logger.debug(`Stop pinging '${device.ieeeAddr}', device is not known anymore`);
return;
}
const ieeeAddr = device.ieeeAddr;
const level = this.state.hasOwnProperty(ieeeAddr) && !this.state[ieeeAddr] ? 'debug' : 'error';
try {
await device.ping();
this.publishAvailability(device, true);
logger.debug(`Successfully pinged '${entity.name}'`);
} catch (error) {
this.publishAvailability(device, false);
logger[level](`Failed to ping '${entity.name}'`);
} finally {
this.setTimerPingable(device);
}
}
async handleIntervalNotPingable(device) {
const ago = Date.now() - device.lastSeen;
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
if (!entity || !device.lastSeen) {
return;
}
logger.debug(`Non-pingable device '${entity.name}' was last seen '${ago / 1000}' seconds ago.`);
if (ago > Hours25) {
this.publishAvailability(device, false);
}
}
setTimerPingable(device) {
if (this.timers[device.ieeeAddr]) {
clearTimeout(this.timers[device.ieeeAddr]);
}
this.timers[device.ieeeAddr] = setTimeout(async () => {
await this.handleIntervalPingable(device);
}, utils.secondsToMilliseconds(this.availability_timeout));
}
async stop() {
for (const timer of Object.values(this.timers)) {
clearTimeout(timer);
}
this.zigbee.getClients().forEach((device) => this.publishAvailability(device, false));
}
async onReconnect(device) {
if (device && device.modelID) {
const definition = zigbeeHerdsmanConverters.findByZigbeeModel(device.modelID);
if (definition) {
const used = [];
try {
for (const key of toZigbeeCandidates) {
const converter = definition.toZigbee.find((tz) => tz.key.includes(key));
if (converter && !used.includes(converter)) {
await converter.convertGet(device.endpoints[0], key, {});
used.push(converter);
}
}
} catch (error) {
const entity = this.zigbee.resolveEntity(device.ieeeAddr);
logger.error(`Failed to read state of '${entity.name}' after reconnect`);
}
}
}
}
publishAvailability(device, available) {
const ieeeAddr = device.ieeeAddr;
if (this.state.hasOwnProperty(ieeeAddr) && !this.state[ieeeAddr] && available) {
this.onReconnect(device);
}
const deviceSettings = settings.getDevice(ieeeAddr);
const name = deviceSettings ? deviceSettings.friendly_name : ieeeAddr;
const topic = `${name}/availability`;
const payload = available ? 'online' : 'offline';
if (this.state[ieeeAddr] !== available) {
this.state[ieeeAddr] = available;
this.mqtt.publish(topic, payload, {retain: true, qos: 0});
}
}
onZigbeeEvent(type, data, resolvedEntity) {
const device = data.device;
if (!device) {
return;
}
if (this.isAllowed(device)) {
this.publishAvailability(data.device, true);
if (this.isPingable(device)) {
// When a zigbee message from a device is received we know the device is still alive.
// => reset the timer.
this.setTimerPingable(device);
const online = this.state.hasOwnProperty(device.ieeeAddr) && this.state[device.ieeeAddr];
if (online && type === 'deviceAnnounce' && !utils.isIkeaTradfriDevice(device)) {
/**
* In case the device is powered off AND on within the availability timeout,
* zigbee2qmtt does not detect the device as offline (device is still marked online).
* When a device is turned on again the state could be out of sync.
* https://github.com/Koenkk/zigbee2mqtt/issues/1383#issuecomment-489412168
* deviceAnnounce is typically send when a device comes online.
*
* This isn't needed for TRADFRI devices as they already send the state themself.
*/
this.onReconnect(device);
}
}
}
}
}
module.exports = DeviceAvailability;

Some files were not shown because too many files have changed in this diff Show More