Commit Graph

15 Commits

Author SHA1 Message Date
Jorge Schrauwen
bcf79a7e34 Device Availability: Allow battery devices to report offline/online based on device.lastSeen (#2464)
* Remove execution bits for deviceReceive.js

* deviceAvailability.isPingable should return true if 'availability_lastseen_timeout' is set for device

* deviceAvailability.handleInterval should know how to handle lastseen_timeout setting

* Allow availability_lastseen_timeout for all devices

* Use a default lastseen timeout of 24h

* Updates

* Updates

* Updates

* 25 hours instead of 24.
2019-12-09 18:12:13 +01:00
Koen Kanters
1459ffea7a Publish availabilty when non pinagable device joins. #2452 2019-12-04 20:21:14 +01:00
Koen Kanters
2a81a54609 Stop pinging device when removed. #2419 2019-11-27 18:14:39 +01:00
Kryzek
46d7176976 availability_whitelist (#2387)
* availability_whitelist

* Tests

* Cleanup

* Update deviceAvailability.js
2019-11-23 11:47:37 +01:00
Koen Kanters
d8512c73df Fail gracefully when state retrieval fails after device reconnects. #2318 2019-11-11 19:25:11 +01:00
Jorge Schrauwen
be1c81a778 #2296 only publish /availability if the state has changed (#2303) 2019-11-10 17:56:01 +01:00
Koen Kanters
4265fe05c6 Correctly log name. #2256 2019-11-03 14:29:43 +01:00
Koen Kanters
833769af0c Log name instead of ieeeAddr on ping. https://github.com/Koenkk/zigbee2mqtt/issues/2256 2019-11-03 14:17:57 +01: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
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
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
f171d54e4b Refactor extension names. 2019-02-13 21:03:23 +01:00
Koen Kanters
959e7458a4 Fix availability tests. 2019-02-02 18:15:03 +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