qm3ster
f26ddd93ff
Replace "problematic" depenencies
...
Also one comment typo lol
`node-static` was abandoned and vulnerable, which might matter since
it's used in production usage and not development.
replaced with popular `serve-static` + `finalhandler`
`json-stable-stringify` depended on an unneeded and unlicensed
polyfill for JSON builtin.
2020-09-25 15:58:45 +02:00
Koen Kanters
b79fb2b6f5
Don't try to setup reporting for Philips devices that do not support it. https://github.com/Koenkk/zigbee-herdsman/issues/110
2020-09-22 17:42:03 +02:00
Koen Kanters
7fe3167e97
Fix crash when saving state.json fails. #4388
2020-09-19 10:59:12 +02:00
Koen Kanters
9774031169
Sort logged and published JSON objects alphabetically. #4091
2020-08-13 20:00:35 +02:00
Koen Kanters
81db31b784
Fix attribute output not publishing all values. https://github.com/Koenkk/zigbee2mqtt/issues/4054
2020-08-08 16:36:58 +02:00
Koen Kanters
b9ba635bea
Fix crash when attribute value is undefined of null (publish empty payload in this case). #3980
2020-07-27 22:07:03 +02:00
Koen Kanters
ad13564687
Improve error messages when configuration is invalid. #3943
2020-07-23 19:17:26 +02:00
Koen Kanters
67f02adbd0
Prefer blocklist/passlist over blacklist/whitelist
2020-07-15 23:22:32 +02:00
Koen Kanters
b1a4926a30
Add cache_state_persistent and cache_state_send_on_startup options. #3496
2020-07-10 22:09:16 +02:00
Koen Kanters
22387fd637
Don't provide defaults for rtscts and baudrate ( #3854 )
...
* Don't provide defaults for rtscts and baudrate
* Update herdsman
2020-07-06 21:37:58 +02:00
Koen Kanters
48705c9a9e
Fix not connecting to MQTT when permit join fails on startup. #3756
2020-06-21 16:36:36 +02:00
Koen Kanters
d22e73ebb4
#3271 Allow to randomize network_key by settings 'network_key: GENERATE'
2020-04-21 21:58:43 +02:00
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
1d9d63062a
Add missing devices to configuration. #3263
2020-04-04 19:15:24 +02:00
Koen Kanters
d6fccbd83e
Fix tests.
2020-03-31 18:18:15 +02: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
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
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
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
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
99fd93f9a7
Allow setting transmit power. https://github.com/Koenkk/zigbee2mqtt/issues/2253
2019-11-27 22:02:49 +01:00
Koen Kanters
af770acd2d
Make retain a optional option and default it to false.
2019-11-06 20:30:33 +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
Koen Kanters
7e9dfd4f41
Accept device without log when no ban or whitelist set.
2019-10-26 18:05:40 +02:00
Koen Kanters
f64285703c
Implement acceptJoiningDeviceHandler.
2019-10-17 22:01:39 +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
6a8abd8ff4
Fix tests.
2019-10-01 20:58:08 +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
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
9d4705fc1c
Remove onlyThis.
2019-09-23 23:59:01 +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
Koenkk
1f1c771075
Make logging consistent. https://github.com/Koenkk/zigbee2mqtt/issues/1965
2019-09-15 09:13:02 +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
304b2efa48
Don’t publish emtpy messages. #1599
2019-06-19 18:11:35 +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
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
50986591c1
Fix tests.
2019-03-28 21:08:18 +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
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
84a5277d45
Replace sinon
with jest
builtins
2019-03-10 13:32:36 +01:00