Commit Graph

188 Commits

Author SHA1 Message Date
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
ed75c85b69 Implement Home Assistant MQTT device trigger. #3033 2020-02-29 18:07:15 +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
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
4926fb85ae Await permit join before continuing with startup. https://github.com/Koenkk/zigbee2mqtt/issues/2617 2020-01-31 22:52:39 +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
d0e9889f7d Fix race condition when Zigbee starts. #2591 2020-01-03 23:43:04 +01:00
Koen Kanters
6b7bd9da37 Re-add model to device information. #2497 2019-12-11 20:15:42 +01:00
Wilmar den Ouden
694c45fd96 Make logging transports configurable (#2231)
* feat: Make logging optional

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

* feat: be more verbose about what logging is enabled

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

* feat: adds tests

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

* Updates.

* Updates

* fix tests.

* Remove onlythis.

* Remove another onlythis

* Improve test stability

* Remove another onlythis
2019-11-29 23:36:57 +01:00
Koen Kanters
af770acd2d Make retain a optional option and default it to false. 2019-11-06 20:30:33 +01:00
Koen Kanters
cb3ec45294 Fix lint. 2019-10-26 18:25:51 +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
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
c8eb503ae7 Simplify group optimistic mode. https://github.com/Koenkk/zigbee2mqtt/issues/764 2019-09-29 14:35:05 +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
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
cfefaeb73c Validate settings on startup with JSON schema. 2019-09-25 12:08:39 +02:00
Koen Kanters
41e68c8ffe Update zigbee-herdsman to 0.7.0. 2019-09-23 22:21:27 +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
d4f01e6893 Replace Livolo extension with DeviceEvent. https://github.com/Koenkk/zigbee2mqtt/issues/592 2019-09-19 20:36:05 +02:00
Koenkk
1f1c771075 Make logging consistent. https://github.com/Koenkk/zigbee2mqtt/issues/1965 2019-09-15 09:13:02 +02:00
Koen Kanters
9c5b3bf4d1 Use lastSeen from zigbee-herdsman. 2019-09-12 22:48:23 +02:00
Koen Kanters
8b4e0fd865 Log stack on zigbee start error. 2019-09-10 22:07:31 +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
didiht
c9ec198c1f correct log of groupid #1785 (#1787) 2019-08-11 14:13:44 +02:00
Koen Kanters
304b2efa48 Don’t publish emtpy messages. #1599 2019-06-19 18:11:35 +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
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
c6617fb7d9 Always keep state. https://github.com/Koenkk/zigbee2mqtt/issues/1489 2019-05-02 20:14:44 +02:00
Koen Kanters
0d587f304e Respond to time requests. https://github.com/Koenkk/zigbee2mqtt/issues/1214 2019-04-26 21:33:29 +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
7015741a08 Add dateCode to getDeviceInfoForMqtt. #1213 2019-03-28 19:58:21 +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
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
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