Commit graph

370 commits

Author SHA1 Message Date
Victor Hagelbäck
ca7a5cdd57 Clean up events and subscriptions 2021-02-28 10:20:05 +01:00
Victor Hagelbäck
4d7de61e42 Move BLE states to DeviceRegistry and improve logging
- Make deviceRegistry states/lists immutable
2021-02-28 10:20:05 +01:00
Victor Hagelbäck
8d259a768b Fix turn off and dim commands 2021-02-28 10:20:05 +01:00
Victor Hagelbäck
fb48b1fd1f Split device communication and BLE handling into separate files 2021-02-28 10:18:32 +01:00
Victor Hagelbäck
b3adf221e2 Break out and structure creation of BLE command payloads 2021-02-28 10:18:32 +01:00
Victor Hagelbäck
e986c8b85a Bump version to 0.6.2 2021-02-27 16:41:20 +01:00
Victor Hagelbäck
55f0f60be9 Fix setting state for created Plejd room devices
- when using includeRoomsAsLights setting
2021-02-27 16:41:05 +01:00
Victor Hagelbäck
6855e03e68 Invoke power cycling of the BLE adapter every 10th reconnect attempt 2021-02-27 13:46:41 +01:00
Victor
3804c63991
Merge pull request #166 from icanos/develop
Release v0.6.0
2021-02-27 10:43:15 +01:00
Victor Hagelbäck
925ccba647 Stop recreating the dbus.systemBus on retries (old instances are not disposed correctly by underlying code) 2021-02-27 09:57:29 +01:00
Victor Hagelbäck
4d5a4ddbe3 Stop write queue when BLE is not connected to avoid loosing commands
- Set max retry count to 10 since BLE loop will set channel to disconnected after 5 retries (or known unrecoverable errors)
2021-02-22 09:50:06 +01:00
Victor Hagelbäck
e8ab13aed3 Remove redundant log row 2021-02-20 19:48:08 +01:00
Victor Hagelbäck
50d664c933 Clean up events and subscriptions 2021-02-20 15:33:06 +01:00
Victor Hagelbäck
0dbe0bb95f Move BLE states to DeviceRegistry and improve logging
- Make deviceRegistry states/lists immutable
2021-02-20 12:34:30 +01:00
Victor Hagelbäck
e528e2be1f Fix turn off and dim commands 2021-02-20 10:49:00 +01:00
Victor Hagelbäck
70059da094 Merge branch 'feature/restructure-ble' of https://github.com/SweVictor/hassio-plejd into feature/restructure-ble 2021-02-20 08:33:53 +01:00
Victor Hagelbäck
436ed6b759 Split device communication and BLE handling into separate files 2021-02-20 08:33:42 +01:00
Victor Hagelbäck
53e67fb487 Break out and structure creation of BLE command payloads 2021-02-20 08:33:31 +01:00
Victor
99b70a1d6d
Update CHANGELOG.md 2021-02-20 08:23:02 +01:00
Victor Hagelbäck
2702365a95 Prepeare 0.6.1 release 2021-02-20 08:18:40 +01:00
Victor
4ba534e229
Merge pull request #165 from icanos/feature/time
Set Plejd devices' clock hourly
2021-02-20 08:06:58 +01:00
Victor Hagelbäck
3fdb9bad2a Split device communication and BLE handling into separate files 2021-02-20 07:55:26 +01:00
Victor Hagelbäck
2694c67808 Break out and structure creation of BLE command payloads 2021-02-18 22:24:20 +01:00
Victor
99f073ba84
Fix error subtracting time zone diff to time set command 2021-02-18 21:38:11 +01:00
Victor Hagelbäck
fa0ba6be31 Config setting to opt-in to setting Plejd clock time 2021-02-18 21:17:29 +01:00
Victor Hagelbäck
74716557c8 Set Plejd time only hourly when explicityly requesting 2021-02-18 20:21:57 +01:00
Victor Hagelbäck
12ec9a1b7c Implement time parsing and periodic time updating
- Relates to #130
2021-02-18 10:47:33 +01:00
Victor Hagelbäck
062bfca11a Changelog lint fix 2021-02-18 10:35:24 +01:00
Victor Hagelbäck
245fe6f487 Update changelog 2021-02-16 21:38:15 +01:00
Victor Hagelbäck
017858e3a7 Update version to 0.6.0 2021-02-16 21:15:04 +01:00
Victor
05f7aa6906
Merge pull request #164 from SweVictor/features/code-architecture
Features/code architecture
2021-02-16 20:50:41 +01:00
Victor Hagelbäck
a3244cd6fc Read version info from config instead of hard-coded string 2021-02-13 12:58:18 +01:00
Victor Hagelbäck
d133efe228 Fix type-o in writeFailed error handling 2021-02-11 22:45:13 +01:00
Victor Hagelbäck
853511a755 Clarify login 403 error message 2021-02-10 10:23:27 +01:00
Victor Hagelbäck
ef7a5086a1 Handle when scene and device have the same Id
- Catch emitted errors in Mqtt
2021-02-10 10:10:28 +01:00
Victor Hagelbäck
dca491bf00 Lifecycle improvement including catching dbus-next error events
- Avoid UnhandledPromiseRejectionWarnings from dbus-next
- Improve retry logic
2021-02-09 19:20:09 +01:00
Victor Hagelbäck
be86f08bec Implement caching of API responses including setting to prefer cache to avoid api requests 2021-02-08 22:23:54 +01:00
Victor Hagelbäck
7c0fc24bc6 Slight restructure of inspectDevicesDiscovered method to avoid scattered returns 2021-02-08 20:08:40 +01:00
Victor Hagelbäck
c6d7bc2e3e Minor updates and fixes 2021-02-08 19:55:18 +01:00
Victor Hagelbäck
f93d3854d0 Improve BLE resilience 2021-02-08 19:54:24 +01:00
Victor Hagelbäck
40f79df37e Rename PlejdBLE to PlejdBLEHandler 2021-02-08 07:39:53 +01:00
Victor Hagelbäck
7436c56c25 First async/await rewrite of PlejdBLE 2021-02-08 07:38:31 +01:00
Victor
2653119b85
Merge pull request #160 from SweVictor/feature/fix-ble-data-parsing
Fix BLE data parsing and move from toString-based Buffer parsing to int-based
2021-02-07 13:37:34 +01:00
Victor Hagelbäck
898a9d822f Lint and style fixes 2021-02-04 08:08:28 +01:00
Victor Hagelbäck
4e7ec6a1da Update DOCKERFILE with new file names 2021-02-04 08:08:28 +01:00
Victor Hagelbäck
5ac7d9893d Break out main program flow to PlejdAddon class and add catching of init errors with slow retry 2021-02-04 08:08:28 +01:00
Victor Hagelbäck
62a6359544 Restructure PlejdBLE slightly to async/await and clarify flow by logging 2021-02-04 08:08:23 +01:00
Victor Hagelbäck
c5ee71d503 Improve SceneManager structure and use central DeviceRegistry 2021-02-04 08:06:23 +01:00
Victor Hagelbäck
377c6a75db Rewrite PlejdAPI to async/await, set data in central DeviceRegistry 2021-02-04 08:06:23 +01:00
Victor Hagelbäck
75b9a1a8d7 Clarify MqttClient structure, logging, and start using DeviceRegistry 2021-02-04 08:06:23 +01:00