Commit Graph

486 Commits

Author SHA1 Message Date
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
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
Giel
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
Koen Kanters
99a29293dd Mock homeassistant zigbee2mqtt version. 2019-01-30 18:07:44 +01:00
Koen Kanters
cf7e0d1aa9 1.1.0 2019-01-29 21:45:36 +01:00
Koen Kanters
dd6e34a152 Fix tests. 2019-01-22 20:44:40 +01:00
Koen Kanters
86f19affa1 Ensure that state and brightness are executed before other commands. #788 2019-01-21 17:38:06 +01:00
Laurent
7cd30a3a05 configurable last_seen (#874)
* configurable last_seen

* Refactor last_seen.
2019-01-18 20:31:55 +01:00
Ivan Salazar
34a3e3c00b add Sengled E11-G13 bulbs to deviceAvailability.js (#860)
* add Sengled E11-G13 bulbs to deviceAvailability.js

* Update deviceAvailability.js

* Refactor and add tests

* Fix linting issue
2019-01-16 20:41:41 +01:00
Koen Kanters
28e32884d9 Update zigbee-shepherd-converters to 7.0.20 2019-01-15 21:19:07 +01:00
Koenkk
6912f8108d Refactor json_attributes to json_attributes_topic. https://github.com/Koenkk/zigbee2mqtt/issues/840 2019-01-14 18:04:33 +01:00
Koen Kanters
dccdc5aafa Publish one MQTT message when a zigbee message is converted twice. #827 2019-01-11 22:38:16 +01:00
Koenkk
f6c01a02c9 Home Assistant: set precision in value_template. #787 2019-01-08 19:00:47 +01:00
Koen Kanters
3bb1f0f10b Update zigbee-shepherd-converters to 7.0.10. 2019-01-06 15:31:08 +01:00
Koen Kanters
faede151f3 Update zigbee-shepherd-converters to 7.0.7. #142 2018-12-27 22:51:16 +01:00
Koen Kanters
ac94b95bba Update zigbee-shepherd-converters to 7.0.6. 2018-12-27 22:23:57 +01:00
Koen Kanters
3bc2ec8c79 Simplify groups api. 2018-12-27 18:43:34 +01:00
Koen Kanters
c4804e574e Fix tests. 2018-12-27 18:21:48 +01:00
Gergely Markics
5d3461c4c6 Add the timestamp of last received zigbee message visible in HASS (#739)
* Add timestamp on receiving message from Zigbee

Add last_message to the payload

* 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

* Add option: add_timestamp in settings

* Add option: add_timestamp in settings

* typo

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update homeassistant.js

* Update settings.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update deviceReceive.js

* Update deviceReceive.js

* Fix tests

* Fix lint

* Fix lint
2018-12-26 17:33:39 +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
d6c2b536ee Introduce device_options. https://github.com/Koenkk/zigbee2mqtt/issues/708 2018-12-19 17:33:02 +01:00
Koen Kanters
75dddf462e Update zigbee-shepherd-converters to 7.0.3. https://github.com/Koenkk/zigbee2mqtt/issues/708 2018-12-15 22:02:23 +01:00
Koen Kanters
d9b418cdde Cleanup duplicate device images. 2018-12-14 19:29:43 +01:00
Koen Kanters
56ea61be3e Fix docs tests. 2018-12-13 21:40:47 +01:00
Koen Kanters
a13bd85ef3 Update zigbee-shepherd-converters to 7.0.1 2018-12-06 21:27:41 +01:00
Koenkk
60c2593669 Skip state when brightness is also published (reduces amount of useless zigbee commands). 2018-12-06 21:27:41 +01:00
Koenkk
db945c90be Update zigbee-shepherd-converters to 6.0.6. https://github.com/Koenkk/zigbee2mqtt/issues/627 2018-12-06 21:27:41 +01:00
Koenkk
9df1065634 Add test with brightness as number. 2018-12-06 21:27:41 +01:00
Koenkk
65f23171e6 Update zigbee-shepherd-converters to 6.0.4 2018-12-06 21:27:41 +01:00
Koenkk
698b40554e Improve tests. 2018-12-06 21:27:41 +01:00
Koenkk
d652856e90 Update zigbee-shepherd-converters 6.0.0. https://github.com/Koenkk/zigbee2mqtt/issues/608 2018-12-06 21:27:41 +01:00
Koenkk
7d09d065c5 Update zigbee-shepherd-converters to 5.0.3. https://github.com/Koenkk/zigbee2mqtt/issues/627 2018-12-06 21:27:41 +01:00
Koenkk
352fa2db50 More tests. 2018-12-06 21:27:41 +01:00
Koenkk
349ebad659 Move docs to repo 2018-12-06 21:27:41 +01:00
Koenkk
dcb75b19d3 Default postfix to empty string. https://github.com/Koenkk/zigbee2mqtt/issues/593 2018-12-06 21:27:41 +01:00
Koenkk
c213a96133 Add missing device images. 2018-12-06 21:27:41 +01:00
Koenkk
78984a65ab Add devices images to repository. 2018-12-06 21:27:41 +01:00
Koenkk
6df4e39f18 Refactor! 2018-12-06 21:27:36 +01:00
Koenkk
2cb27b14f9 Allow ‘/‘ in friendly_name. https://github.com/Koenkk/zigbee2mqtt/issues/470 2018-11-07 19:40:58 +01:00
Koenkk
9a70c95672 Start adding tests. 2018-08-15 22:19:54 +02:00