Commit Graph

495 Commits

Author SHA1 Message Date
Koen Kanters
a8793ab60b Load extensions from data directory. https://github.com/Koenkk/zigbee2mqtt/issues/3297 2020-04-19 20:08:24 +02:00
Koen Kanters
11fd5ffde6 Refactor 2020-04-19 18:10:53 +02:00
Koen Kanters
07dc837b76 Refactor receive 2020-04-15 22:34:59 +02:00
Koen Kanters
67151fba04 Refactor bind 2020-04-15 20:36:40 +02:00
Koen Kanters
838cb6e702 Update converters. 2020-04-13 21:15:08 +02:00
Koen Kanters
eab9886402 Refactor. 2020-04-12 18:29:52 +02:00
Koen Kanters
a2d09b08ea Refactor DeviceConfigure 2020-04-11 20:58:22 +02:00
Koen Kanters
9da1a35bbd Refactor. 2020-04-11 20:34:50 +02:00
Koen Kanters
cc008db2ad Refactor 2020-04-11 18:31:57 +02:00
Koen Kanters
ba0d930ddd DeviceAvailability -> Availability 2020-04-11 18:14:40 +02:00
Koen Kanters
2ce2876f04 Refactor 2020-04-11 17:44:31 +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
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
f95eb4527a Only setup supported color capabilities. https://github.com/Koenkk/zigbee2mqtt/issues/3260 2020-04-01 20:33:04 +02:00
Koen Kanters
d6fccbd83e Fix tests. 2020-03-31 18:18:15 +02:00
Koen Kanters
545eca6708 Update converters. 2020-03-29 21:36:59 +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
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
Koen Kanters
a3b285d1ac Don't allow MQTT wildcard (# or +) in friendly_name. #3175 2020-03-23 19:59:49 +01:00
Koen Kanters
6cc2689593 Log error when there is nothing to bind. #3159 2020-03-20 19:00:00 +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
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
4d3bbce687 Implement lightWithPostfix Home Assistant configuration. #3003 2020-03-15 09:38:39 +01:00
Dustin Sallings
97a4b6b539
Add support for expiring retained messages. (#3082)
* Add support for expiring retained messages.

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

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

e.g.

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

* Also get from deviceOptions

* Update settings.js

* Update controller.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-12 20:25:37 +01:00
Koen Kanters
f1a685bea2 Reduce MQTT subscriptions in deviceBind. https://github.com/Koenkk/zigbee2mqtt/issues/3102 2020-03-11 21:30:01 +01:00
Koen Kanters
a17d96c14a Revert "Reduce MQTT subscriptions. #3102"
This reverts commit 82080e3d22.
2020-03-11 21:24:59 +01:00
Koen Kanters
82080e3d22 Reduce MQTT subscriptions. #3102 2020-03-11 19:02:24 +01:00
nightdeveloper
b59d761ca6
publish announces to log topic (#3101)
* publish announces to log topic

* publish announces to log topic #test fix

* Update controller.js

* Update controller.test.js

* Update deviceAvailability.test.js

Co-authored-by: Andrey Sergeew <avsergeev@neoflex.ru>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-03-11 18:21:06 +01:00
Koen Kanters
4d54e5038b Refuse to start when friendly_name ends with /DIGIT. #2645 2020-03-07 23:06:22 +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
Jorge Schrauwen
b17b9c76ef
#3009 filtered_attributes should also work in device_options (#3057) 2020-03-03 18:30:54 +01:00
Jorge Schrauwen
658cc21b4d
#3009 allow filtering of mqtt topics and payloads (#3037)
* Allow filtering of attributes in mqtt json payload or published attributes

* Add test for mqtt_attribute_filter

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

* Add test for mqtt_attribute_filter on group

* Rename mqtt_attribute_filter to filtered_attributes
2020-03-02 20:08:51 +01:00
Koen Kanters
68750fade0 Fix tests on node 12. https://github.com/Koenkk/zigbee2mqtt/issues/3031 2020-03-02 19:11:43 +01:00
Koen Kanters
9f1b8cf214 Allow to disable homeassistant legacy triggers. #3033 2020-03-01 15:55:20 +01:00
Koen Kanters
ed75c85b69 Implement Home Assistant MQTT device trigger. #3033 2020-02-29 18:07:15 +01:00
Koen Kanters
a16e3542c0 Update herdsman. #3019 2020-02-29 12:43:53 +01:00
Koen Kanters
dd3678f84b TEMP: disable OTA response. https://github.com/Koenkk/zigbee2mqtt/issues/3019 2020-02-28 23:52:30 +01:00
Koen Kanters
a40ad0c52f Respond with ABORT when device checks for OTA. https://github.com/Koenkk/zigbee2mqtt/issues/3019 2020-02-28 23:42:59 +01:00
Koen Kanters
f6aba5f64a Respond with image not available when OTA is requested but we don't support it. #3019 2020-02-28 23:30:33 +01:00
Koen Kanters
342d4c17b9 Fix debounce, debounce_ignore, retain and qos in device_options not honored. #3004 2020-02-27 21:06:27 +01:00
Christian Scheffler
69c477da7d
added mqtt log events group_added and group_removed (#3016) 2020-02-27 21:03:56 +01:00
Koen Kanters
a36f11a4fb Update converters. 2020-02-25 20:20:52 +01:00
Koen Kanters
9cc84feb67 Allow to rename groups through zigbee2mqtt/bridge/config/rename. https://github.com/Koenkk/zigbee2mqtt/issues/2991 2020-02-23 21:51:30 +01:00
Koen Kanters
dd82b29629 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2967 2020-02-23 20:47:38 +01:00
Koen Kanters
ad59ff57bc Also remove group from herdsman on remove. #2265 2020-02-22 15:53:05 +01:00
Koen Kanters
6b5b4ab433 Log when update is availabe. 58d987b523 (r37363068) 2020-02-20 20:01:26 +01:00
Koen Kanters
58d987b523 Implement update_available attribute and discover Home Assistant sensor. #2948 2020-02-16 16:00:15 +01:00
Koen Kanters
bbf432eae5 Update herdsman and herdsman-converters. 2020-02-13 21:35:37 +01:00
Koen Kanters
87faaa1817 Don't crash when devices doesn't respond to read modelID after update. https://github.com/Koenkk/zigbee2mqtt/issues/2921 2020-02-13 21:10:44 +01:00
Koen Kanters
984bad4cb3 Major OTA improvements. https://github.com/Koenkk/zigbee2mqtt/issues/2921 2020-02-09 20:44:37 +01:00
Koen 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
558153ebd6 Update converters. 2020-02-04 20:28:47 +01:00
Koen Kanters
0111681cb7 Update converters. https://github.com/Koenkk/zigbee2mqtt/issues/2850 2020-01-31 22:42:24 +01:00
Koen Kanters
5488504809 Update converters. 2020-01-29 21:38:37 +01:00
Koen Kanters
c87ccea9ba Update converters. 2020-01-29 18:34:40 +01:00
Koen Kanters
fe62ceb0f9 Add unbind for default_bind_group. https://github.com/Koenkk/zigbee2mqtt/issues/2772 2020-01-27 20:56:11 +01:00
Koen Kanters
61a3f0e839 Update converters and fix tests for real. 2020-01-26 21:38:04 +01:00
Koen Kanters
b58cbd4883 Fix tests. 2020-01-26 19:57:15 +01:00
Koen Kanters
93e96a2e5e Update converters. 2020-01-23 21:00:50 +01:00
Koen Kanters
145f8a577d Update converters. 2020-01-22 21:34:15 +01:00
Koen Kanters
dae52a22d7 Update converters. 2020-01-21 21:19:11 +01:00
Koen Kanters
ae5330d090 Update converters. 2020-01-17 22:51:37 +01:00
Twan Coenraad
dd0ca2a392 Add keepalive option for MQTT (#2767) 2020-01-17 21:38:46 +01:00
lukeIam
4a0059afcd Allow attribute and json in parallel (#2712)
* Allow attribute and json in parallel

* Fix tests

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
2020-01-12 15:07:06 +01:00
Koen Kanters
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
TilmanK
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
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
c041f0cddc Ignore setup reporting for closuresWindowCovering ZNLDP12LM. #2611 2020-01-07 19:59:43 +01:00
Koen Kanters
d3aba2689c Update converters. 2020-01-03 23:29:28 +01:00
Koen Kanters
e63d196966 Skip configure when device does not require it. https://github.com/Koenkk/zigbee2mqtt/issues/2588 2019-12-23 20:48:37 +01:00
Koen Kanters
af4184e3ff Always log 'No converter available...` to debug. #2543 2019-12-17 19:19:57 +01:00
Koen Kanters
6b7bd9da37 Re-add model to device information. #2497 2019-12-11 20:15:42 +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
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
1459ffea7a Publish availabilty when non pinagable device joins. #2452 2019-12-04 20:21:14 +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
2a81a54609 Stop pinging device when removed. #2419 2019-11-27 18:14:39 +01:00
Koen Kanters
d37d9ee859 Factory reset device through Touchlink. 2019-11-23 20:44:23 +01:00
Kryzek
46d7176976 availability_whitelist (#2387)
* availability_whitelist

* Tests

* Cleanup

* Update deviceAvailability.js
2019-11-23 11:47:37 +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
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
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
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
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
6c453738d4 Update herdsman and converters. 2019-11-07 18:28:17 +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
5cdf820bf6 Update herdsman and converters. 2019-11-05 21:14:19 +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
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
5f054862f0 Update zigbee-herdsman-converters. 2019-10-30 23:12:16 +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
7e9dfd4f41 Accept device without log when no ban or whitelist set. 2019-10-26 18:05:40 +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
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
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
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
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
d5925efca7 Only try to configure reporting once. https://github.com/Koenkk/zigbee2mqtt/issues/2123 2019-10-12 18:02:15 +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
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
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
6a8abd8ff4 Fix tests. 2019-10-01 20:58:08 +02:00
Koen Kanters
518232e15e Zigbee-herdsman 0.8.0 2019-10-01 20:22:47 +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
fc3a826f50 Bump zigbee-herdsman. https://github.com/Koenkk/zigbee2mqtt/issues/892 2019-09-30 21:16:00 +02:00
Koen Kanters
61e2087242 Bump zigbee-herdsman-converters. 2019-09-29 21:37:26 +02:00
Koen Kanters
c8eb503ae7 Simplify group optimistic mode. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-09-29 14:35:05 +02:00
Koen Kanters
42bc5f274b Fix logger test writing to configuration.yaml. 2019-09-28 13:49:27 +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
d444969151 Update zigbee-herdsman-converters. 2019-09-26 09:43:40 +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
bd93d09290 Update zigbee-herdsman-converters. 2019-09-25 23:51:38 +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
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
c5218bbd31 Update zigbee-herdsman. 2019-09-22 20:02:46 +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
c09f55873b Add group optimistic feature. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-09-17 19:01:57 +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
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
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
Koenkk
1f1c771075 Make logging consistent. https://github.com/Koenkk/zigbee2mqtt/issues/1965 2019-09-15 09:13:02 +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
d53e1330f5 Improve error message when reading invalid YAML file. 2019-09-11 21:42:44 +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
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
36e52ba4fb Update zigbee-shepherd-converters. 2019-08-11 14:13:44 +02:00
Koen Kanters
d3e97953c3 Update zigbee-shepherd-converters. 2019-07-11 20:22:43 +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
Koenkk
5a132ad34b Retrieve default ep from mapping. #1662 2019-06-25 19:13:59 +02:00
Dennis Keitzel
241b300f7b Allow custom home-assistant status topic (#1667) 2019-06-24 20:52:47 +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
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
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
Jevgeni Kiski
e9b5a588cc #1588 Openhab2 compatibility (#1589) 2019-06-15 16:55:33 +02:00
Koen Kanters
82dc8437a1 Get rid of logging during test cases. 2019-06-10 00:01:48 +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
Koen Kanters
c29bfe1455
Allow to specify endpoint when adding device to group. (#1515)
* uu

* Update
2019-05-29 20:11:40 +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
Andreas Brett
f93a3e1c07 Minor spelling correction (#1522)
* Update devicePublish.test.js

* Update devicePublish.js
2019-05-12 21:03:27 +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
a3d26ceeb2 Update zigbee-shepherd-converters to 9.0.0. 2019-05-01 21:50:01 +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
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
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
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
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
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
de4f9f44fd Fix bind by friendly name. #176 2019-03-29 19:10:13 +01:00
Koen Kanters
50986591c1 Fix tests. 2019-03-28 21:08:18 +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
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
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
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
4cb0c0bbb0 Update zigbee-shepherd-converters to 8.0.7. 2019-03-18 18:21:21 +01:00
Koenkk
bee722c9c4 Skip re-transmitted Xiaomi messages. #1238 2019-03-18 17:59:36 +01:00
Koen Kanters
e6044da604 Implemented device debounce option. #1264 2019-03-16 23:41:46 +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
fdcf2e8c3d Option to set Home Assistant discovery topic. #1019 2019-03-15 22:41:39 +01:00
Koen Kanters
969585c84e Allow to bind specific endpoint. #176 2019-03-15 21:19:42 +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
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
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
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
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
07765093be Fix all typos of separate 2019-03-09 21:09:39 +01:00
qm3ster
a93838be15 codemod: object-shorthand
Also fixed `new (` and `formatter` by hand.
2019-03-09 16:30:05 +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
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
6427da244f Implement attribute output. https://github.com/Koenkk/zigbee2mqtt/issues/493 2019-03-04 18:13:36 +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
Koen Kanters
61116ec670 Fix tests. 2019-02-26 21:06: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
Koen Kanters
147a130628 Update zigbee-shepherd-converters to 7.1.11 2019-02-23 16:02:45 +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
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
8703847337 Merge branch 'master' into dev 2019-02-12 21:26:37 +01:00
Koen Kanters
4592b00fe1 Move docs to zigbee2mqtt.io repo. #1072 2019-02-12 21:16:42 +01:00
Koen Kanters
3d151298ae Update zigbee-shepherd-converters to 7.1.7. 2019-02-10 20:35:26 +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