Commit Graph

198 Commits

Author SHA1 Message Date
Koen Kanters
5c9b31b2fc Don’t create state when cache_state is set to false. #1287 2019-03-19 20:02:17 +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
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
8b4b9bea19 Refactor property cache responsibility to state. 2019-03-15 23:18:19 +01:00
Koen Kanters
d4d85633d2 Log groupID. #1238 2019-03-15 19:07:26 +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
6427da244f Implement attribute output. https://github.com/Koenkk/zigbee2mqtt/issues/493 2019-03-04 18:13:36 +01:00
Koen Kanters
cd2fb54615 Changes to report/bind functionallity. 2019-02-26 20:46:34 +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
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
Koen Kanters
259a3417e2 Coordinator group is not needed anymore. #102 2019-02-18 17:42:50 +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
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
Koen Kanters
2302240897 Fix linting. 2019-02-03 14:39:35 +01:00
Koen Kanters
35f0def29f Comment out Livolo switch code. #592 #1005 2019-02-03 14:25:01 +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
054892641b Check availability for new devices. #775 2019-02-02 17:58:38 +01:00
Koen Kanters
b8744ce890 Add reporting feature. #966 2019-02-01 19:04:49 +01:00
Koen Kanters
17874cfdc1 Make availability_timeout non experimental. #775 2019-01-29 20:17:56 +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
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
5453c082c4 Fix typo availablility -> availability. #777 #775 2018-12-30 20:08:31 +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
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
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
6df4e39f18 Refactor! 2018-12-06 21:27:36 +01:00
Koenkk
9119e54c2c Prepare for read commands. https://github.com/Koenkk/zigbee2mqtt/issues/518 2018-11-05 21:55:30 +01:00
Koenkk
ddb83cc6e4 Handle zigbee commands sequentially (and refactor it). #529 2018-10-23 20:39:48 +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
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
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
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
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
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
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
Koenkk
8433571b1e Refactor multiple foundation. 2018-09-11 21:28:30 +02: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
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
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
Koenkk
2a520b0e81 Raw implementation of network map. #252 2018-08-28 21:55:00 +02:00
tb-killa
4fa1a4c57a Extend configureDevice with friendlyName Output 2018-08-13 19:21:55 +02:00
Koenkk
04b2f24d6b Persist devices state across restarts. #249 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
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
tb-killa
aab18de88d
ADD Rename Function via MQTT Command 2018-07-21 18:19:11 +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
f03ade2775 Don't log 'Connecting with device' when device is already known. 2018-06-25 20:18:50 +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
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
df99c7edf5 Log zigbee message data on one line. 2018-06-16 01:04:32 +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
Marius Ciotlos
b6aabcca64 Add support for version numbers and hash 2018-06-15 14:02:40 +03:00
Marius Ciotlos
4cb98b6257 Added debug for mqtt message as well 2018-06-14 20:11:08 +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
3196c0a974 Send all cached status on hass/status:online. #105 2018-06-13 19:51:40 +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
884e3aa475 Refactor remove device & remove from home assistant 2018-06-09 12:33:40 +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
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
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