Commit Graph
87 Commits
Author SHA1 Message Date
Justin HornostyandKoen Kanters 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
OliandKoen Kanters 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 HelffandKoen Kanters 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
qm3sterandKoen Kanters 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
qm3sterandKoen Kanters df1825d65e Use mockReturnValue instead of mockImplementation where possible 2019-03-10 13:32:36 +01:00
qm3sterandKoen Kanters 532b3b2484 Use toHaveBeenNthCalledWith in some cases 2019-03-10 13:32:36 +01:00
qm3sterandKoen Kanters 84a5277d45 Replace sinon with jest builtins 2019-03-10 13:32:36 +01:00
qm3sterandKoen Kanters acbab01b7e Apply jest-codemods
`chai` ELIMINATED
2019-03-10 13:32:36 +01:00
qm3sterandKoen Kanters 6a4073b305 Use jest instead of mocha
Oh nice, coverage works now
2019-03-10 13:32:36 +01:00
qm3sterandKoen Kanters 3b1fae1452 Remove whitespace 2019-03-09 21:09:39 +01:00
qm3sterandKoen Kanters cf2f10394a Mock fs in settings test 2019-03-09 21:09:39 +01:00
qm3sterandKoen Kanters 07765093be Fix all typos of separate 2019-03-09 21:09:39 +01:00
qm3sterandKoen Kanters a93838be15 codemod: object-shorthand
Also fixed `new (` and `formatter` by hand.
2019-03-09 16:30:05 +01:00
Mihal MalostanidisandKoen Kanters 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 BrettandKoen Kanters 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
timstanley1985andKoen Kanters 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 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 63c88cba5b Revert "Fix tests."
This reverts commit b6fda868ed.
2019-02-09 00:28:59 +01:00
Koen Kanters b6fda868ed Fix tests. 2019-02-06 20:52:44 +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 c9c599b60b Refactor publishDeviceState to publishEntityState (for future group support). 2019-02-04 18:36:49 +01:00
GielandKoen Kanters 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 959e7458a4 Fix availability tests. 2019-02-02 18:15:03 +01:00
Koen Kanters ff02e54f25 1.1.1 2019-02-01 23:36:20 +01:00