From b29513ea1402d6f54b9b0c640188c28b32d3234b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 19:27:20 +0100 Subject: [PATCH 1/9] Move changelog to separate file --- CHANGELOG.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 82 ---------------------------------------------------- 2 files changed, 81 insertions(+), 82 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6ebf66b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,81 @@ +# Hass.io Plejd add-on + +_v 0.4.5_: + +- FIX: Resolved a Docker build error + +_v 0.4.4_: + +- FIX: Disabled AppArmor Policy since there's been a lot of issues with that. + +_v 0.4.3_: + +- FIX: Updated add-on to work with the API changes made by Plejd. + +_v 0.4.0_: + +- NEW: Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. +- NEW: _WPH-01_ is supported and generates two switches (left and right button). +- NEW: Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. + +_v 0.3.4_: + +- NEW: `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. +- FIX: Reworked some logging to get better understanding of what happens. + +_v 0.3.0_: + +- NEW: New BLE manager, DBus instead of noble +- FIX: Adding entities as devices now as well +- FIX: Bug fixes + +_v 0.2.8_: + +- FIX: Reset characteristic state on disconnect + +_v 0.2.7_: + +- FIX: Added exception handling to unsubscribing lastData characteristic if already disconnected + +_v 0.2.6_: + +- FIX: Added null check to remove listeners for characteristics + +_v 0.2.5_: + +- FIX: Invalid scene id in events/scene message + +_v 0.2.4_: + +- Stability improvements + +_v 0.2.3_: + +- FIX: Container build error fix + +_v 0.2.2_: + +- Stability improvements + +_v 0.2.1_: + +- Stability improvements + +_v 0.2.0_: + +- Stability improvements +- Bugfixes + +_v 0.1.1_: + +- FIX: Fixed missing reference on startup, preventing add-on from starting + +_v 0.1.0_: + +- NEW: Rewrote the BLE integration for more stability +- FIX: discovery wasn't always sent + +_previous_: + +- FIX: bug preventing add-on from building +- NEW: Added support for Plejd devices with multiple outputs (such as DIM-02) diff --git a/README.md b/README.md index 01ff80f..ce0dac0 100644 --- a/README.md +++ b/README.md @@ -212,88 +212,6 @@ Out of the box you can for example view elapsed time by selecting multiple lines } ``` -## Changelog - -_v 0.4.5_: - -- FIX: Resolved a Docker build error - -_v 0.4.4_: - -- FIX: Disabled AppArmor Policy since there's been a lot of issues with that. - -_v 0.4.3_: - -- FIX: Updated add-on to work with the API changes made by Plejd. - -_v 0.4.0_: - -- NEW: Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. -- NEW: _WPH-01_ is supported and generates two switches (left and right button). -- NEW: Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. - -_v 0.3.4_: - -- NEW: `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. -- FIX: Reworked some logging to get better understanding of what happens. - -_v 0.3.0_: - -- NEW: New BLE manager, DBus instead of noble -- FIX: Adding entities as devices now as well -- FIX: Bug fixes - -_v 0.2.8_: - -- FIX: Reset characteristic state on disconnect - -_v 0.2.7_: - -- FIX: Added exception handling to unsubscribing lastData characteristic if already disconnected - -_v 0.2.6_: - -- FIX: Added null check to remove listeners for characteristics - -_v 0.2.5_: - -- FIX: Invalid scene id in events/scene message - -_v 0.2.4_: - -- Stability improvements - -_v 0.2.3_: - -- FIX: Container build error fix - -_v 0.2.2_: - -- Stability improvements - -_v 0.2.1_: - -- Stability improvements - -_v 0.2.0_: - -- Stability improvements -- Bugfixes - -_v 0.1.1_: - -- FIX: Fixed missing reference on startup, preventing add-on from starting - -_v 0.1.0_: - -- NEW: Rewrote the BLE integration for more stability -- FIX: discovery wasn't always sent - -_previous_: - -- FIX: bug preventing add-on from building -- NEW: Added support for Plejd devices with multiple outputs (such as DIM-02) - ## License ``` From 95952818132d3e8cea7d6c08de4181ffe3c5f4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 20:28:48 +0100 Subject: [PATCH 2/9] Make changelog more complete and rewrite to clearer format with links --- CHANGELOG.md | 359 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 316 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ebf66b..0c49bb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,81 +1,354 @@ -# Hass.io Plejd add-on +# Changelog hassio-plejd Home Assistant Plejd addon -_v 0.4.5_: +## 0.5.0 -- FIX: Resolved a Docker build error +**New features:** -_v 0.4.4_: +- Improved transitions due to new per-device queue of commands +- Completely rewritten and improved logging for js to improve code structure and user experience -- FIX: Disabled AppArmor Policy since there's been a lot of issues with that. +**Implemented enhancements:** -_v 0.4.3_: +- Adjust code to airbnb style guid, including eslint rules and prettier config. +- Updated dependencies -- FIX: Updated add-on to work with the API changes made by Plejd. +**Fixed bugs:** -_v 0.4.0_: +- Fix wrong initial brightness when transitioning turned-off lights +- Fix includeRoomsAsLights setting -- NEW: Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. -- NEW: _WPH-01_ is supported and generates two switches (left and right button). -- NEW: Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. +**Closed issues:** -_v 0.3.4_: +- Cannot read property 'length' of undefined - when turning of the light [\#134](https://github.com/icanos/hassio-plejd/issues/134) +- Idea: Add device id and shouldRetry to writeQueue [\#128](https://github.com/icanos/hassio-plejd/issues/128) +- light.turn_off turns the lights on [\#124](https://github.com/icanos/hassio-plejd/issues/124) +- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) -- NEW: `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. -- FIX: Reworked some logging to get better understanding of what happens. +**Merged pull requests:** -_v 0.3.0_: +- Feature/code style [\#150](https://github.com/icanos/hassio-plejd/pull/150) ([SweVictor](https://github.com/SweVictor)) +- Improved logging [\#149](https://github.com/icanos/hassio-plejd/pull/149) ([SweVictor](https://github.com/SweVictor)) +- Feature/per device write queue [\#144](https://github.com/icanos/hassio-plejd/pull/144) ([SweVictor](https://github.com/SweVictor)) +- Fix wrong initial brightness when transitioning turned-off lights [\#142](https://github.com/icanos/hassio-plejd/pull/142) ([SweVictor](https://github.com/SweVictor)) +- Fix includeRoomsAsLights and improve logging [\#141](https://github.com/icanos/hassio-plejd/pull/141) ([SweVictor](https://github.com/SweVictor)) +- Update README.md [\#140](https://github.com/icanos/hassio-plejd/pull/140) ([buffedelic](https://github.com/buffedelic)) +- multiple fixes for improved lifecycle and errors [\#137](https://github.com/icanos/hassio-plejd/pull/137) ([JohnPhoto](https://github.com/JohnPhoto)) +- Bump axios from 0.19.0 to 0.21.1 in /plejd [\#133](https://github.com/icanos/hassio-plejd/pull/133) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Improve transitioning of brightness [\#127](https://github.com/icanos/hassio-plejd/pull/127) ([SweVictor](https://github.com/SweVictor)) +- Bump ini from 1.3.5 to 1.3.8 in /plejd [\#116](https://github.com/icanos/hassio-plejd/pull/116) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Remove dead code [\#113](https://github.com/icanos/hassio-plejd/pull/113) ([thomasloven](https://github.com/thomasloven)) +- Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) -- NEW: New BLE manager, DBus instead of noble -- FIX: Adding entities as devices now as well -- FIX: Bug fixes +## 0.4.6 (2020-11-24) -_v 0.2.8_: +**Closed issues:** + +- Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) +- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) + +**Merged pull requests:** + +- transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) + +## 0.4.5 (2020-05-06) + +**Closed issues:** + +- Installation issue [\#83](https://github.com/icanos/hassio-plejd/issues/83) +- Cant install v 0.4.4 [\#77](https://github.com/icanos/hassio-plejd/issues/77) + +**Merged pull requests:** + +- fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) +- fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) + +## 0.4.4 (2020-03-19) + +**Implemented enhancements:** + +- Disabled AppArmor Policy since there's been a lot of issues with that. + +**Closed issues:** + +- Apparmor in latest version [\#74](https://github.com/icanos/hassio-plejd/issues/74) +- No devices added [\#70](https://github.com/icanos/hassio-plejd/issues/70) + +**Merged pull requests:** + +- disabled apparmor since lots of issues with that [\#76](https://github.com/icanos/hassio-plejd/pull/76) ([icanos](https://github.com/icanos)) + +## 0.4.3 (2020-03-13) + +**Fixed bugs:** + +- Updated add-on to work with the API changes made by Plejd. + +**Closed issues:** + +- Error: unable to retrieve the crypto key. error: Error: Request failed with status code 400 [\#72](https://github.com/icanos/hassio-plejd/issues/72) +- plejd-ble: warning: wasn't able to connect to Plejd, will retry. [\#69](https://github.com/icanos/hassio-plejd/issues/69) + +**Merged pull requests:** + +- updated to comply with new api version [\#73](https://github.com/icanos/hassio-plejd/pull/73) ([icanos](https://github.com/icanos)) + +## 0.4.2 (2020-03-03) + +**Closed issues:** + +- Error: Cannot find module './scene.manager' in 0.4.0 [\#65](https://github.com/icanos/hassio-plejd/issues/65) + +**Merged pull requests:** + +- reworked write queue and added configurable wait time [\#67](https://github.com/icanos/hassio-plejd/pull/67) ([icanos](https://github.com/icanos)) + +## 0.4.1 (2020-02-29) + +**Merged pull requests:** + +- added missing file to dockerfile [\#66](https://github.com/icanos/hassio-plejd/pull/66) ([icanos](https://github.com/icanos)) + +## 0.4.0 (2020-02-29) + +**New features:** + +- Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. +- _WPH-01_ is supported and generates two switches (left and right button). +- Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. + +**Closed issues:** + +- voluptuous.error.MultipleInvalid: extra keys not allowed @ data\['schema'\] [\#61](https://github.com/icanos/hassio-plejd/issues/61) +- Can't install R pi3+ [\#62](https://github.com/icanos/hassio-plejd/issues/62) +- Plejd plugin installation fail [\#60](https://github.com/icanos/hassio-plejd/issues/60) +- dBus Error? [\#59](https://github.com/icanos/hassio-plejd/issues/59) +- Connection problem with 3.4 [\#56](https://github.com/icanos/hassio-plejd/issues/56) +- Scene triggering via MQTT [\#43](https://github.com/icanos/hassio-plejd/issues/43) +- Reverse transition: [\#26](https://github.com/icanos/hassio-plejd/issues/26) +- light transition: not supported? [\#15](https://github.com/icanos/hassio-plejd/issues/15) + +**Merged pull requests:** + +- scene support, wph-01 and write queues [\#64](https://github.com/icanos/hassio-plejd/pull/64) ([icanos](https://github.com/icanos)) + +## 0.3.4 (2020-01-27) + +**New features:** + +- `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. + +**Implemented enhancements:** + +- Reworked some logging to get better understanding of what happens. + +**Merged pull requests:** + +- new config parameter [\#55](https://github.com/icanos/hassio-plejd/pull/55) ([icanos](https://github.com/icanos)) + +## 0.3.3 (2020-01-24) + +**Merged pull requests:** + +- resolved missing device bug and new version [\#52](https://github.com/icanos/hassio-plejd/pull/52) ([icanos](https://github.com/icanos)) + +**Closed issues:** + +- v0.3.1, DBusError: Software caused connection abort [\#50](https://github.com/icanos/hassio-plejd/issues/50) + +## 0.3.2 (2020-01-24) + +**Merged pull requests:** + +- potential bug fixed and new version [\#51](https://github.com/icanos/hassio-plejd/pull/51) ([icanos](https://github.com/icanos)) + +## 0.3.1 (2020-01-24) + +**Merged pull requests:** + +- added missing dbus access [\#49](https://github.com/icanos/hassio-plejd/pull/49) ([icanos](https://github.com/icanos)) + +## 0.3.0 (2020-01-24) + +**New features:** + +- New BLE manager, DBus instead of noble + +**Closed issues:** + +- Entities without devices [\#28](https://github.com/icanos/hassio-plejd/issues/28) +- noble warning: unknown peripheral in ver 0.2.0 [\#24](https://github.com/icanos/hassio-plejd/issues/24) +- \(node:291\) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. [\#19](https://github.com/icanos/hassio-plejd/issues/19) + +**Merged pull requests:** + +- new ble manager [\#48](https://github.com/icanos/hassio-plejd/pull/48) ([icanos](https://github.com/icanos)) + +## 0.2.10 (2020-01-18) + +**Merged pull requests:** + +- upped version to fix issue [\#47](https://github.com/icanos/hassio-plejd/pull/47) ([icanos](https://github.com/icanos)) +- fix [\#46](https://github.com/icanos/hassio-plejd/pull/46) ([icanos](https://github.com/icanos)) +- bug fix [\#45](https://github.com/icanos/hassio-plejd/pull/45) ([icanos](https://github.com/icanos)) + +## 0.2.9 (2020-01-18) + +**Merged pull requests:** + +- added sorted list of devices discovered [\#44](https://github.com/icanos/hassio-plejd/pull/44) ([icanos](https://github.com/icanos)) + +## 0.2.8 (2020-01-16) + +**Fixed bugs:** - FIX: Reset characteristic state on disconnect -_v 0.2.7_: +**Merged pull requests:** -- FIX: Added exception handling to unsubscribing lastData characteristic if already disconnected +- Update README.md [\#42](https://github.com/icanos/hassio-plejd/pull/42) ([icanos](https://github.com/icanos)) +- reset characteristic state and new version [\#41](https://github.com/icanos/hassio-plejd/pull/41) ([icanos](https://github.com/icanos)) -_v 0.2.6_: +## 0.2.7 (2020-01-16) -- FIX: Added null check to remove listeners for characteristics +**Fixed bugs:** -_v 0.2.5_: +- Added exception handling to unsubscribing lastData characteristic if already disconnected -- FIX: Invalid scene id in events/scene message +**Merged pull requests:** -_v 0.2.4_: +- more error handling and version upgrade [\#39](https://github.com/icanos/hassio-plejd/pull/39) ([icanos](https://github.com/icanos)) +- Update README.md [\#40](https://github.com/icanos/hassio-plejd/pull/40) ([icanos](https://github.com/icanos)) + +## 0.2.6 (2020-01-15) + +**Merged pull requests:** + +- resolved null usage exception [\#38](https://github.com/icanos/hassio-plejd/pull/38) ([icanos](https://github.com/icanos)) + +## 0.2.5 (2020-01-14) + +**Closed issues:** + +- Scene ID always 0 [\#35](https://github.com/icanos/hassio-plejd/issues/35) + +**Merged pull requests:** + +- Update README.md [\#37](https://github.com/icanos/hassio-plejd/pull/37) ([icanos](https://github.com/icanos)) +- resolved bug with scenes [\#36](https://github.com/icanos/hassio-plejd/pull/36) ([icanos](https://github.com/icanos)) + +## 0.2.4 (2020-01-14) + +**Merged pull requests:** + +- added error handling for writing to Plejd [\#34](https://github.com/icanos/hassio-plejd/pull/34) ([icanos](https://github.com/icanos)) + +## 0.2.3 (2020-01-14) + +**Closed issues:** + +- parse error: Expected string key before ':' at line 1, column 4 [\#17](https://github.com/icanos/hassio-plejd/issues/17) +- Raspberry Pi4 Hassos - Installation exited [\#32](https://github.com/icanos/hassio-plejd/issues/32) + +**Merged pull requests:** + +- resolved container build error [\#33](https://github.com/icanos/hassio-plejd/pull/33) ([icanos](https://github.com/icanos)) + +## 0.2.2 + +**Implemented enhancements:** - Stability improvements -_v 0.2.3_: +## [0.2.1](https://github.com/icanos/hassio-plejd/tree/0.2.1) (2020-01-08) -- FIX: Container build error fix +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.2.0...0.2.1) -_v 0.2.2_: +**Implemented enhancements:** -- Stability improvements +- stability improvements -_v 0.2.1_: +**Merged pull requests:** -- Stability improvements +- 0.2.1 extended logging [\#25](https://github.com/icanos/hassio-plejd/pull/25) ([icanos](https://github.com/icanos)) -_v 0.2.0_: +## [0.2.0](https://github.com/icanos/hassio-plejd/tree/0.2.0) (2019-12-31) -- Stability improvements -- Bugfixes +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.4...0.2.0) -_v 0.1.1_: +**New features** -- FIX: Fixed missing reference on startup, preventing add-on from starting +- Include rooms as lights -_v 0.1.0_: +**Implemented enhancements:** -- NEW: Rewrote the BLE integration for more stability -- FIX: discovery wasn't always sent +- stability improvements -_previous_: +**Fixed bugs:** -- FIX: bug preventing add-on from building -- NEW: Added support for Plejd devices with multiple outputs (such as DIM-02) +- noble warning: unknown peripheral [\#1](https://github.com/icanos/hassio-plejd/issues/1) + +**Closed issues:** + +- parse error: Expected string key before ':' at line 1, column 4/code 404 [\#18](https://github.com/icanos/hassio-plejd/issues/18) +- Cannot find module './plejd' [\#13](https://github.com/icanos/hassio-plejd/issues/13) +- Cannot add repo [\#11](https://github.com/icanos/hassio-plejd/issues/11) +- REL-02 [\#8](https://github.com/icanos/hassio-plejd/issues/8) +- Http error on line 1 [\#7](https://github.com/icanos/hassio-plejd/issues/7) +- DIM-2 and MQTT auto discover issue? [\#6](https://github.com/icanos/hassio-plejd/issues/6) +- Switch / Light [\#5](https://github.com/icanos/hassio-plejd/issues/5) +- Devices not loading after restart of HA [\#4](https://github.com/icanos/hassio-plejd/issues/4) +- Error building [\#3](https://github.com/icanos/hassio-plejd/issues/3) + +**Merged pull requests:** + +- merge to 0.2.0 [\#23](https://github.com/icanos/hassio-plejd/pull/23) ([icanos](https://github.com/icanos)) +- Remove old reference to plejd.js [\#14](https://github.com/icanos/hassio-plejd/pull/14) ([treet](https://github.com/treet)) +- rewritten the ble communication layer [\#12](https://github.com/icanos/hassio-plejd/pull/12) ([icanos](https://github.com/icanos)) +- more stability improvements [\#9](https://github.com/icanos/hassio-plejd/pull/9) ([icanos](https://github.com/icanos)) + +## [0.1.4](https://github.com/icanos/hassio-plejd/tree/v0.1.4) (2019-12-11) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.3...v0.1.4) + +## [0.1.3](https://github.com/icanos/hassio-plejd/tree/v0.1.3) (2019-12-11) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/942be4c54317abd768fb7470f0b2d49fd58f06db...v0.1.3) + +**Closed issues:** + +- DIM-02 only one entity per device detected [\#2](https://github.com/icanos/hassio-plejd/issues/2) + +## 0.1.1 + +**Fixed bugs:** + +- Fixed missing reference on startup, preventing add-on from starting + +## 0.1.0 + +**New features:** + +- Rewrote the BLE integration for more stability + +**Fixed bugs:** + +- discovery wasn't always sent + +## 0.0.9: + +**New features:** + +- Added support for Plejd devices with multiple outputs (such as DIM-02) + +**Fixed bugs:** + +- bug preventing add-on from building + +## Initial (2019-12-04) + +**New features:** + +- Initial version of the addon created! + +\* _This Changelog was partially generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ From 851edbe139c7d7944761f0ba2f7f870fa1626043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 20:31:04 +0100 Subject: [PATCH 3/9] Remove outdated plejd/README.md --- plejd/README.md | 201 ------------------------------------------------ 1 file changed, 201 deletions(-) delete mode 100644 plejd/README.md diff --git a/plejd/README.md b/plejd/README.md deleted file mode 100644 index d50b4aa..0000000 --- a/plejd/README.md +++ /dev/null @@ -1,201 +0,0 @@ -# Hass.io Plejd add-on - -Hass.io add-on for Plejd home automation devices. Gives you the ability to control the Plejd home automation devices through Home Assistant. -It uses MQTT to communicate with Home Assistant and supports auto discovery of the devices in range. - -It also supports notifications so that changed made in the Plejd app are propagated to Home Assistant. - -Thanks to [ha-plejd](https://github.com/klali/ha-plejd) for inspiration. - -Disclaimer: -I am in no way affiliated with Plejd and am solely doing this as a hobby project. - -**Did you like this? Consider helping me continue the development:** -[Buy me a coffee](https://www.buymeacoffee.com/w1ANTUb) - -[![Gitter](https://badges.gitter.im/hassio-plejd/community.svg)](https://gitter.im/hassio-plejd/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -## Getting started - -To get started, make sure that the following requirements are met: - -### Requirements - -- A Bluetooth device (BLE), for eg. the built-in device in Raspberry Pi 4. -- An MQTT broker (the Mosquitto Hass.io add-on works perfectly well). - -### Tested on - -The add-on has been tested on the following platforms: - -- Mac OS Catalina 10.15.1 with Node v. 13.2.0 -- Raspberry Pi 4 with Hass.io - -#### Tested Plejd devices - -- DIM-01 -- DIM-02 -- LED-10 -- CTR-01 -- REL-01 -- REL-02 - -### Easy Installation - -Browse to your Home Assistant installation in a web browser and click on `Hass.io` in the navigation bar to the left. - -- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. -- Click on `Add-on Store` in the top navigation bar of that page. -- Paste the URL to this repo https://github.com/icanos/hassio-plejd.git in the `Add new repository by URL` field and hit `Add`. -- Scroll down and you should find a Plejd add-on that can be installed. Open that and install. -- Enjoy! - -### Manual Installation - -Browse your Hass.io installation using a tool that allows you to manage files, for eg. SMB or an SFTP client etc. - -- Open the `/addon` directory -- Create a new folder named `hassio-plejd` -- Copy all files from this repository into that newly created one. -- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. -- Click on `Add-on Store` in the top navigation bar of that page. -- Click on the refresh button in the upper right corner. -- A new Local Add-on should appear named Plejd. Open that and install. -- Enjoy! - -### NOTE - -When starting the add-on, the log displays this message: - -``` -parse error: Expected string key before ':' at line 1, column 4 -[08:56:24] ERROR: Unknown HTTP error occured -``` - -However, the add-on still works as expected and this is something I'm looking into, but not with that much effort yet though. - -### Configuration - -You need to add the following to your `configuration.yaml` file: - -``` -mqtt: - broker: [point to your broker IP eg. 'mqtt://localhost'] - username: [username of mqtt broker] - password: !secret mqtt_password - discovery: true - discovery_prefix: homeassistant - birth_message: - topic: 'hass/status' - payload: 'online' - will_message: - topic: 'hass/status' - payload: 'offline' -``` - -The above is used to notify the add-on when Home Assistant has started successfully and let the add-on send the discovery response (containing all devices). - -The plugin needs you to configure some settings before working. You find these on the Add-on page after you've installed it. - -| Parameter | Value | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| site | Name of your Plejd site, the name is displayed in the Plejd app (top bar). | -| username | Username of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | -| password | Password of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | -| mqttBroker | URL of the MQTT Broker, eg. mqtt://localhost | -| mqttUsername | Username of the MQTT broker | -| mqttPassword | Password of the MQTT broker | -| includeRoomsAsLights | Adds all rooms as lights, making it possible to turn on/off lights by room instead. Setting this to false will ignore all rooms. _Added in v. 5_. | -| connectionTimeout | Number of seconds to wait when scanning and connecting. Might need to be tweaked on platforms other than RPi 4. Defaults to: 2 seconds. | - -## I want voice control! - -With the Google Home integration in Home Assistant, you can get voice control for your Plejd lights right away, check this out for more information: -https://www.home-assistant.io/integrations/google_assistant/ - -### I don't want voice, I want HomeKit! - -Check this out for more information on how you can get your Plejd lights controlled using HomeKit: -https://www.home-assistant.io/integrations/homekit/ - -## Changelog - -_v 0.3.4_: - -- NEW: `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. -- FIX: Reworked some logging to get better understanding of what happens. - -_v 0.3.0_: - -- NEW: New BLE manager, DBus instead of noble -- FIX: Adding entities as devices now as well -- FIX: Bug fixes - -_v 0.2.8_: - -- FIX: Reset characteristic state on disconnect - -_v 0.2.7_: - -- FIX: Added exception handling to unsubscribing lastData characteristic if already disconnected - -_v 0.2.6_: - -- FIX: Added null check to remove listeners for characteristics - -_v 0.2.5_: - -- FIX: Invalid scene id in events/scene message - -_v 0.2.4_: - -- Stability improvements - -_v 0.2.3_: - -- FIX: Container build error fix - -_v 0.2.2_: - -- Stability improvements - -_v 0.2.1_: - -- Stability improvements - -_v 0.2.0_: - -- Stability improvements -- Bugfixes - -_v 0.1.1_: - -- FIX: Fixed missing reference on startup, preventing add-on from starting - -_v 0.1.0_: - -- NEW: Rewrote the BLE integration for more stability -- FIX: discovery wasn't always sent - -_previous_: - -- FIX: bug preventing add-on from building -- NEW: Added support for Plejd devices with multiple outputs (such as DIM-02) - -## License - -``` -Copyright 2019 Marcus Westin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -``` From b5a385f7665fbeb872f420b66be6164d3fd97a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 21:08:01 +0100 Subject: [PATCH 4/9] Update readme with info on how to get the addon working --- README.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce0dac0..763e720 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,15 @@ parse error: Expected string key before ':' at line 1, column 4 However, the add-on still works as expected and this is something I'm looking into, but not with that much effort yet though. +#### Running the Plejd add-on in VirtualBox on Windows + +If on Windows + VirtualBox or similar setup + +- Install VirtualBox extensions to get USB 2/3 +- Redirect correct USB device +- Potentially try to replace BT drivers with WinUSB using Zadig +- (Re)start VirtualBox HA machine + #### Running the Plejd add-on outside of HassOS If you're planning on running this add-on outside of HassOS, you might need to turn off AppArmor in the `config.json` file. This is due to missing AppArmor configuration that is performed in HassOS (if you've manually done it, ignore this). @@ -122,11 +131,31 @@ The plugin needs you to configure some settings before working. You find these o | mqttBroker | URL of the MQTT Broker, eg. mqtt://localhost | | mqttUsername | Username of the MQTT broker | | mqttPassword | Password of the MQTT broker | -| includeRoomsAsLights | Adds all rooms as lights, making it possible to turn on/off lights by room instead. Setting this to false will ignore all rooms. _Added in v. 5_. | +| includeRoomsAsLights | Adds all rooms as lights, making it possible to turn on/off lights by room instead. Setting this to false will ignore all rooms. | | logLevel | Minimim log level. Supported values are `error`, `warn`, `info`, `debug`, `verbose`, `silly` with increasing amount of logging. Do not log more than `info` for production purposes. | | connectionTimeout | Number of seconds to wait when scanning and connecting. Might need to be tweaked on platforms other than RPi 4. Defaults to: 2 seconds. | | writeQueueWaitTime | Wait time between message sent to Plejd over BLE, defaults to 400. If that doesn't work, try changing the value higher in steps of 50. | +## Having issues to get the addon working? + +If you're having issues to get the addon working, there are a few things you can look into: + +- Increase log level of plugin to debug, verbose or silly in configuration and restart addon. Refer to the "Logs" section below for information on how to get the full logs. +- Make sure MQTT is correctly configured. If using the HomeAssistant Supervisor (HassIO) Addon mosquitto, changing from `broker: "mqtt://localhost"` to `broker: "core-mosquitto"` can sometimes help (username and password as before) +- Make sure that the MQTT integration works! Config => Integrations => MQTT => Configure => Listen to "#" (everything), then publish to topic `home-assistant/switch/1/power` and make sure you see the message below when listening +- Make sure BT is working + - Go to HA console (login as "root", write `login` to access normal terminal (or SSH or similar) + - Start `bluetoothctl` interactive command + - Write `list` and make sure it finds the Bluetooth device. If no device is found you need to fix this first! + - Look in Plejd addon log and make sure there is no `unable to find a bluetooth adapter` line +- Listen to `#` in the MQTT integration and watch Plejd mqtt messages come in + - Initial device discovery messages originate from the Plejd API, so if you set up that correctly you should get new devices in HA + - Plejd log will show something like `discovered light (DIM-01) named ....` + - State change messages originate from the Plejd Bluetooth connection, so if you get those you should be able to listen to Plejd state changes as well as being able to set states! + - Initial sync may take many minutes until all devices have the correct on/off/brightness states in HA +- One Plejd device means max one BLE connection, meaning using the Plejd app over BT will disconnect the addon BLE connection + - It seems you can kick yourself out (by connecting using the app) even when you have multiple devices if the app happens to connect to the same device as the addon is using + ## Transitions Transitions from Home Assistant are supported (for dimmable devices) when transition is longer than 1 second. Plejd will do a bit of internal transitioning (default soft start is 0.1 seconds). @@ -158,6 +187,8 @@ The code in this project follows the [Airbnb JavaScript guide](https://github.co For a nice developer experience it is very convenient to have `eslint` and `prettier` installed in your favorite editor (such as VS Code) and use the "format on save" option (or invoke formatting by Alt+Shift+F in VS Code). Any code issues should appear in the problems window inside the editor, as well as when running the command above. +When contributing, please do so by forking the repo and then using pull requests towards the dev branch. + ### Logs Logs are color coded and can be accessed on the Log tab of the addon. If you set log level to debug, verbose or silly you will generate a lot of log output @@ -175,7 +206,8 @@ Out of the box you can for example view elapsed time by selecting multiple lines ```JSON { - ... other settings, + // other settings + // ... "logFileHighlighter.customPatterns": [ { "pattern": "ERR", From 69a9e9899c05780ab57b03ef197de9015dc5b7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 21:08:41 +0100 Subject: [PATCH 5/9] Update changelog and config.json to prepare for 0.5.0 release --- CHANGELOG.md | 18 +++++++++++++++--- plejd/config.json | 2 +- plejd/main.js | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c49bb4..7e3234b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,9 @@ **Implemented enhancements:** -- Adjust code to airbnb style guid, including eslint rules and prettier config. +- Adjust code to airbnb style guid, including eslint rules and prettier config - Updated dependencies +- Improved readme with info about installation, debugging, and logging **Fixed bugs:** @@ -21,6 +22,7 @@ - Cannot read property 'length' of undefined - when turning of the light [\#134](https://github.com/icanos/hassio-plejd/issues/134) - Idea: Add device id and shouldRetry to writeQueue [\#128](https://github.com/icanos/hassio-plejd/issues/128) +- Request: Clarify versions/readme [\#126](https://github.com/icanos/hassio-plejd/issues/126) - light.turn_off turns the lights on [\#124](https://github.com/icanos/hassio-plejd/issues/124) - Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) @@ -40,18 +42,23 @@ - Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) -## 0.4.6 (2020-11-24) +## 0.4.8 (2020-11-24) **Closed issues:** - Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) + +## 0.4.7 (2020-05-12) + +**Closed issues:** + - Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) **Merged pull requests:** - transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) -## 0.4.5 (2020-05-06) +## 0.4.6 (2020-05-06) **Closed issues:** @@ -61,6 +68,11 @@ **Merged pull requests:** - fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) + +## 0.4.5 (2020-03-26) + +**Merged pull requests:** + - fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) ## 0.4.4 (2020-03-19) diff --git a/plejd/config.json b/plejd/config.json index 5cd9309..ff4b460 100644 --- a/plejd/config.json +++ b/plejd/config.json @@ -1,6 +1,6 @@ { "name": "Plejd", - "version": "0.4.8", + "version": "0.5.0", "slug": "plejd", "description": "Adds support for the Swedish home automation devices from Plejd.", "url": "https://github.com/icanos/hassio-plejd/", diff --git a/plejd/main.js b/plejd/main.js index ae77952..60e17fd 100644 --- a/plejd/main.js +++ b/plejd/main.js @@ -8,7 +8,7 @@ const Configuration = require('./Configuration'); const logger = Logger.getLogger('plejd-main'); -const version = '0.4.8'; +const version = '0.5.0'; async function main() { logger.info(`Starting Plejd add-on v. ${version}`); From be2fbf34e8e294728f65e0690a8bf1aa667fe408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Tue, 26 Jan 2021 21:09:20 +0100 Subject: [PATCH 6/9] Copied README and CHANGELOG to /plejd directory to get them picked up by addon --- plejd/CHANGELOG.md | 366 +++++++++++++++++++++++++++++++++++++++++++++ plejd/README.md | 263 ++++++++++++++++++++++++++++++++ 2 files changed, 629 insertions(+) create mode 100644 plejd/CHANGELOG.md create mode 100644 plejd/README.md diff --git a/plejd/CHANGELOG.md b/plejd/CHANGELOG.md new file mode 100644 index 0000000..7e3234b --- /dev/null +++ b/plejd/CHANGELOG.md @@ -0,0 +1,366 @@ +# Changelog hassio-plejd Home Assistant Plejd addon + +## 0.5.0 + +**New features:** + +- Improved transitions due to new per-device queue of commands +- Completely rewritten and improved logging for js to improve code structure and user experience + +**Implemented enhancements:** + +- Adjust code to airbnb style guid, including eslint rules and prettier config +- Updated dependencies +- Improved readme with info about installation, debugging, and logging + +**Fixed bugs:** + +- Fix wrong initial brightness when transitioning turned-off lights +- Fix includeRoomsAsLights setting + +**Closed issues:** + +- Cannot read property 'length' of undefined - when turning of the light [\#134](https://github.com/icanos/hassio-plejd/issues/134) +- Idea: Add device id and shouldRetry to writeQueue [\#128](https://github.com/icanos/hassio-plejd/issues/128) +- Request: Clarify versions/readme [\#126](https://github.com/icanos/hassio-plejd/issues/126) +- light.turn_off turns the lights on [\#124](https://github.com/icanos/hassio-plejd/issues/124) +- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) + +**Merged pull requests:** + +- Feature/code style [\#150](https://github.com/icanos/hassio-plejd/pull/150) ([SweVictor](https://github.com/SweVictor)) +- Improved logging [\#149](https://github.com/icanos/hassio-plejd/pull/149) ([SweVictor](https://github.com/SweVictor)) +- Feature/per device write queue [\#144](https://github.com/icanos/hassio-plejd/pull/144) ([SweVictor](https://github.com/SweVictor)) +- Fix wrong initial brightness when transitioning turned-off lights [\#142](https://github.com/icanos/hassio-plejd/pull/142) ([SweVictor](https://github.com/SweVictor)) +- Fix includeRoomsAsLights and improve logging [\#141](https://github.com/icanos/hassio-plejd/pull/141) ([SweVictor](https://github.com/SweVictor)) +- Update README.md [\#140](https://github.com/icanos/hassio-plejd/pull/140) ([buffedelic](https://github.com/buffedelic)) +- multiple fixes for improved lifecycle and errors [\#137](https://github.com/icanos/hassio-plejd/pull/137) ([JohnPhoto](https://github.com/JohnPhoto)) +- Bump axios from 0.19.0 to 0.21.1 in /plejd [\#133](https://github.com/icanos/hassio-plejd/pull/133) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Improve transitioning of brightness [\#127](https://github.com/icanos/hassio-plejd/pull/127) ([SweVictor](https://github.com/SweVictor)) +- Bump ini from 1.3.5 to 1.3.8 in /plejd [\#116](https://github.com/icanos/hassio-plejd/pull/116) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Remove dead code [\#113](https://github.com/icanos/hassio-plejd/pull/113) ([thomasloven](https://github.com/thomasloven)) +- Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## 0.4.8 (2020-11-24) + +**Closed issues:** + +- Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) + +## 0.4.7 (2020-05-12) + +**Closed issues:** + +- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) + +**Merged pull requests:** + +- transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) + +## 0.4.6 (2020-05-06) + +**Closed issues:** + +- Installation issue [\#83](https://github.com/icanos/hassio-plejd/issues/83) +- Cant install v 0.4.4 [\#77](https://github.com/icanos/hassio-plejd/issues/77) + +**Merged pull requests:** + +- fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) + +## 0.4.5 (2020-03-26) + +**Merged pull requests:** + +- fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) + +## 0.4.4 (2020-03-19) + +**Implemented enhancements:** + +- Disabled AppArmor Policy since there's been a lot of issues with that. + +**Closed issues:** + +- Apparmor in latest version [\#74](https://github.com/icanos/hassio-plejd/issues/74) +- No devices added [\#70](https://github.com/icanos/hassio-plejd/issues/70) + +**Merged pull requests:** + +- disabled apparmor since lots of issues with that [\#76](https://github.com/icanos/hassio-plejd/pull/76) ([icanos](https://github.com/icanos)) + +## 0.4.3 (2020-03-13) + +**Fixed bugs:** + +- Updated add-on to work with the API changes made by Plejd. + +**Closed issues:** + +- Error: unable to retrieve the crypto key. error: Error: Request failed with status code 400 [\#72](https://github.com/icanos/hassio-plejd/issues/72) +- plejd-ble: warning: wasn't able to connect to Plejd, will retry. [\#69](https://github.com/icanos/hassio-plejd/issues/69) + +**Merged pull requests:** + +- updated to comply with new api version [\#73](https://github.com/icanos/hassio-plejd/pull/73) ([icanos](https://github.com/icanos)) + +## 0.4.2 (2020-03-03) + +**Closed issues:** + +- Error: Cannot find module './scene.manager' in 0.4.0 [\#65](https://github.com/icanos/hassio-plejd/issues/65) + +**Merged pull requests:** + +- reworked write queue and added configurable wait time [\#67](https://github.com/icanos/hassio-plejd/pull/67) ([icanos](https://github.com/icanos)) + +## 0.4.1 (2020-02-29) + +**Merged pull requests:** + +- added missing file to dockerfile [\#66](https://github.com/icanos/hassio-plejd/pull/66) ([icanos](https://github.com/icanos)) + +## 0.4.0 (2020-02-29) + +**New features:** + +- Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. +- _WPH-01_ is supported and generates two switches (left and right button). +- Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. + +**Closed issues:** + +- voluptuous.error.MultipleInvalid: extra keys not allowed @ data\['schema'\] [\#61](https://github.com/icanos/hassio-plejd/issues/61) +- Can't install R pi3+ [\#62](https://github.com/icanos/hassio-plejd/issues/62) +- Plejd plugin installation fail [\#60](https://github.com/icanos/hassio-plejd/issues/60) +- dBus Error? [\#59](https://github.com/icanos/hassio-plejd/issues/59) +- Connection problem with 3.4 [\#56](https://github.com/icanos/hassio-plejd/issues/56) +- Scene triggering via MQTT [\#43](https://github.com/icanos/hassio-plejd/issues/43) +- Reverse transition: [\#26](https://github.com/icanos/hassio-plejd/issues/26) +- light transition: not supported? [\#15](https://github.com/icanos/hassio-plejd/issues/15) + +**Merged pull requests:** + +- scene support, wph-01 and write queues [\#64](https://github.com/icanos/hassio-plejd/pull/64) ([icanos](https://github.com/icanos)) + +## 0.3.4 (2020-01-27) + +**New features:** + +- `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. + +**Implemented enhancements:** + +- Reworked some logging to get better understanding of what happens. + +**Merged pull requests:** + +- new config parameter [\#55](https://github.com/icanos/hassio-plejd/pull/55) ([icanos](https://github.com/icanos)) + +## 0.3.3 (2020-01-24) + +**Merged pull requests:** + +- resolved missing device bug and new version [\#52](https://github.com/icanos/hassio-plejd/pull/52) ([icanos](https://github.com/icanos)) + +**Closed issues:** + +- v0.3.1, DBusError: Software caused connection abort [\#50](https://github.com/icanos/hassio-plejd/issues/50) + +## 0.3.2 (2020-01-24) + +**Merged pull requests:** + +- potential bug fixed and new version [\#51](https://github.com/icanos/hassio-plejd/pull/51) ([icanos](https://github.com/icanos)) + +## 0.3.1 (2020-01-24) + +**Merged pull requests:** + +- added missing dbus access [\#49](https://github.com/icanos/hassio-plejd/pull/49) ([icanos](https://github.com/icanos)) + +## 0.3.0 (2020-01-24) + +**New features:** + +- New BLE manager, DBus instead of noble + +**Closed issues:** + +- Entities without devices [\#28](https://github.com/icanos/hassio-plejd/issues/28) +- noble warning: unknown peripheral in ver 0.2.0 [\#24](https://github.com/icanos/hassio-plejd/issues/24) +- \(node:291\) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. [\#19](https://github.com/icanos/hassio-plejd/issues/19) + +**Merged pull requests:** + +- new ble manager [\#48](https://github.com/icanos/hassio-plejd/pull/48) ([icanos](https://github.com/icanos)) + +## 0.2.10 (2020-01-18) + +**Merged pull requests:** + +- upped version to fix issue [\#47](https://github.com/icanos/hassio-plejd/pull/47) ([icanos](https://github.com/icanos)) +- fix [\#46](https://github.com/icanos/hassio-plejd/pull/46) ([icanos](https://github.com/icanos)) +- bug fix [\#45](https://github.com/icanos/hassio-plejd/pull/45) ([icanos](https://github.com/icanos)) + +## 0.2.9 (2020-01-18) + +**Merged pull requests:** + +- added sorted list of devices discovered [\#44](https://github.com/icanos/hassio-plejd/pull/44) ([icanos](https://github.com/icanos)) + +## 0.2.8 (2020-01-16) + +**Fixed bugs:** + +- FIX: Reset characteristic state on disconnect + +**Merged pull requests:** + +- Update README.md [\#42](https://github.com/icanos/hassio-plejd/pull/42) ([icanos](https://github.com/icanos)) +- reset characteristic state and new version [\#41](https://github.com/icanos/hassio-plejd/pull/41) ([icanos](https://github.com/icanos)) + +## 0.2.7 (2020-01-16) + +**Fixed bugs:** + +- Added exception handling to unsubscribing lastData characteristic if already disconnected + +**Merged pull requests:** + +- more error handling and version upgrade [\#39](https://github.com/icanos/hassio-plejd/pull/39) ([icanos](https://github.com/icanos)) +- Update README.md [\#40](https://github.com/icanos/hassio-plejd/pull/40) ([icanos](https://github.com/icanos)) + +## 0.2.6 (2020-01-15) + +**Merged pull requests:** + +- resolved null usage exception [\#38](https://github.com/icanos/hassio-plejd/pull/38) ([icanos](https://github.com/icanos)) + +## 0.2.5 (2020-01-14) + +**Closed issues:** + +- Scene ID always 0 [\#35](https://github.com/icanos/hassio-plejd/issues/35) + +**Merged pull requests:** + +- Update README.md [\#37](https://github.com/icanos/hassio-plejd/pull/37) ([icanos](https://github.com/icanos)) +- resolved bug with scenes [\#36](https://github.com/icanos/hassio-plejd/pull/36) ([icanos](https://github.com/icanos)) + +## 0.2.4 (2020-01-14) + +**Merged pull requests:** + +- added error handling for writing to Plejd [\#34](https://github.com/icanos/hassio-plejd/pull/34) ([icanos](https://github.com/icanos)) + +## 0.2.3 (2020-01-14) + +**Closed issues:** + +- parse error: Expected string key before ':' at line 1, column 4 [\#17](https://github.com/icanos/hassio-plejd/issues/17) +- Raspberry Pi4 Hassos - Installation exited [\#32](https://github.com/icanos/hassio-plejd/issues/32) + +**Merged pull requests:** + +- resolved container build error [\#33](https://github.com/icanos/hassio-plejd/pull/33) ([icanos](https://github.com/icanos)) + +## 0.2.2 + +**Implemented enhancements:** + +- Stability improvements + +## [0.2.1](https://github.com/icanos/hassio-plejd/tree/0.2.1) (2020-01-08) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.2.0...0.2.1) + +**Implemented enhancements:** + +- stability improvements + +**Merged pull requests:** + +- 0.2.1 extended logging [\#25](https://github.com/icanos/hassio-plejd/pull/25) ([icanos](https://github.com/icanos)) + +## [0.2.0](https://github.com/icanos/hassio-plejd/tree/0.2.0) (2019-12-31) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.4...0.2.0) + +**New features** + +- Include rooms as lights + +**Implemented enhancements:** + +- stability improvements + +**Fixed bugs:** + +- noble warning: unknown peripheral [\#1](https://github.com/icanos/hassio-plejd/issues/1) + +**Closed issues:** + +- parse error: Expected string key before ':' at line 1, column 4/code 404 [\#18](https://github.com/icanos/hassio-plejd/issues/18) +- Cannot find module './plejd' [\#13](https://github.com/icanos/hassio-plejd/issues/13) +- Cannot add repo [\#11](https://github.com/icanos/hassio-plejd/issues/11) +- REL-02 [\#8](https://github.com/icanos/hassio-plejd/issues/8) +- Http error on line 1 [\#7](https://github.com/icanos/hassio-plejd/issues/7) +- DIM-2 and MQTT auto discover issue? [\#6](https://github.com/icanos/hassio-plejd/issues/6) +- Switch / Light [\#5](https://github.com/icanos/hassio-plejd/issues/5) +- Devices not loading after restart of HA [\#4](https://github.com/icanos/hassio-plejd/issues/4) +- Error building [\#3](https://github.com/icanos/hassio-plejd/issues/3) + +**Merged pull requests:** + +- merge to 0.2.0 [\#23](https://github.com/icanos/hassio-plejd/pull/23) ([icanos](https://github.com/icanos)) +- Remove old reference to plejd.js [\#14](https://github.com/icanos/hassio-plejd/pull/14) ([treet](https://github.com/treet)) +- rewritten the ble communication layer [\#12](https://github.com/icanos/hassio-plejd/pull/12) ([icanos](https://github.com/icanos)) +- more stability improvements [\#9](https://github.com/icanos/hassio-plejd/pull/9) ([icanos](https://github.com/icanos)) + +## [0.1.4](https://github.com/icanos/hassio-plejd/tree/v0.1.4) (2019-12-11) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.3...v0.1.4) + +## [0.1.3](https://github.com/icanos/hassio-plejd/tree/v0.1.3) (2019-12-11) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/942be4c54317abd768fb7470f0b2d49fd58f06db...v0.1.3) + +**Closed issues:** + +- DIM-02 only one entity per device detected [\#2](https://github.com/icanos/hassio-plejd/issues/2) + +## 0.1.1 + +**Fixed bugs:** + +- Fixed missing reference on startup, preventing add-on from starting + +## 0.1.0 + +**New features:** + +- Rewrote the BLE integration for more stability + +**Fixed bugs:** + +- discovery wasn't always sent + +## 0.0.9: + +**New features:** + +- Added support for Plejd devices with multiple outputs (such as DIM-02) + +**Fixed bugs:** + +- bug preventing add-on from building + +## Initial (2019-12-04) + +**New features:** + +- Initial version of the addon created! + +\* _This Changelog was partially generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ diff --git a/plejd/README.md b/plejd/README.md new file mode 100644 index 0000000..763e720 --- /dev/null +++ b/plejd/README.md @@ -0,0 +1,263 @@ +# Hass.io Plejd add-on + +Hass.io add-on for Plejd home automation devices. Gives you the ability to control the Plejd home automation devices through Home Assistant. +It uses MQTT to communicate with Home Assistant and supports auto discovery of the devices in range. + +It also supports notifications so that changed made in the Plejd app are propagated to Home Assistant. + +Thanks to [ha-plejd](https://github.com/klali/ha-plejd) for inspiration. + +Disclaimer: +I am in no way affiliated with Plejd and am solely doing this as a hobby project. + +**Did you like this? Consider helping me continue the development:** +[Buy me a coffee](https://www.buymeacoffee.com/w1ANTUb) + +[![Gitter](https://badges.gitter.im/hassio-plejd/community.svg)](https://gitter.im/hassio-plejd/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + +## Getting started + +To get started, make sure that the following requirements are met: + +### Requirements + +- A Bluetooth device (BLE), for eg. the built-in device in Raspberry Pi 4. +- An MQTT broker (the Mosquitto Hass.io add-on works perfectly well). + +### Tested on + +The add-on has been tested on the following platforms: + +- Mac OS Catalina 10.15.1 with Node v. 13.2.0 +- Raspberry Pi 4 with Hass.io +- Raspberry Pi 4 with Hass.io/aarch64 + +#### Tested Plejd devices + +- DIM-01 +- DIM-02 +- LED-10 +- CTR-01 +- REL-01 +- REL-02 +- WPH-01 + +### Easy Installation + +Browse to your Home Assistant installation in a web browser and click on `Hass.io` in the navigation bar to the left. + +- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. +- Click on `Add-on Store` in the top navigation bar of that page. +- Paste the URL to this repo https://github.com/icanos/hassio-plejd.git in the `Add new repository by URL` field and hit `Add`. +- Scroll down and you should find a Plejd add-on that can be installed. Open that and install. +- Enjoy! + +### Manual Installation + +Browse your Hass.io installation using a tool that allows you to manage files, for eg. SMB or an SFTP client etc. + +- Open the `/addon` directory +- Create a new folder named `hassio-plejd` +- Copy all files from this repository into that newly created one. +- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. +- Click on `Add-on Store` in the top navigation bar of that page. +- Click on the refresh button in the upper right corner. +- A new Local Add-on should appear named Plejd. Open that and install. +- Enjoy! + +### IMPORTANT INFORMATION + +#### Startup error message + +When starting the add-on, the log displays this message: + +``` +parse error: Expected string key before ':' at line 1, column 4 +[08:56:24] ERROR: Unknown HTTP error occured +``` + +However, the add-on still works as expected and this is something I'm looking into, but not with that much effort yet though. + +#### Running the Plejd add-on in VirtualBox on Windows + +If on Windows + VirtualBox or similar setup + +- Install VirtualBox extensions to get USB 2/3 +- Redirect correct USB device +- Potentially try to replace BT drivers with WinUSB using Zadig +- (Re)start VirtualBox HA machine + +#### Running the Plejd add-on outside of HassOS + +If you're planning on running this add-on outside of HassOS, you might need to turn off AppArmor in the `config.json` file. This is due to missing AppArmor configuration that is performed in HassOS (if you've manually done it, ignore this). + +Open the `config.json` file and locate `host_dbus`, after that line, insert: `"apparmor": "no",` and then restart the add-on. + +More information about available parameters can be found here: +https://developers.home-assistant.io/docs/en/hassio_addon_config.html + +#### Migration from 32bit to 64 bit + +If you restore a backup from a 32bit system to a new 64bit system, use the Rebuild option in the Add-on + +### Configuration + +You need to add the following to your `configuration.yaml` file: + +``` +mqtt: + broker: [point to your broker IP eg. 'mqtt://localhost'] + username: [username of mqtt broker] + password: !secret mqtt_password + discovery: true + discovery_prefix: homeassistant + birth_message: + topic: 'hass/status' + payload: 'online' + will_message: + topic: 'hass/status' + payload: 'offline' +``` + +The above is used to notify the add-on when Home Assistant has started successfully and let the add-on send the discovery response (containing all devices). + +The plugin needs you to configure some settings before working. You find these on the Add-on page after you've installed it. + +| Parameter | Value | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| site | Name of your Plejd site, the name is displayed in the Plejd app (top bar). | +| username | Username of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | +| password | Password of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | +| mqttBroker | URL of the MQTT Broker, eg. mqtt://localhost | +| mqttUsername | Username of the MQTT broker | +| mqttPassword | Password of the MQTT broker | +| includeRoomsAsLights | Adds all rooms as lights, making it possible to turn on/off lights by room instead. Setting this to false will ignore all rooms. | +| logLevel | Minimim log level. Supported values are `error`, `warn`, `info`, `debug`, `verbose`, `silly` with increasing amount of logging. Do not log more than `info` for production purposes. | +| connectionTimeout | Number of seconds to wait when scanning and connecting. Might need to be tweaked on platforms other than RPi 4. Defaults to: 2 seconds. | +| writeQueueWaitTime | Wait time between message sent to Plejd over BLE, defaults to 400. If that doesn't work, try changing the value higher in steps of 50. | + +## Having issues to get the addon working? + +If you're having issues to get the addon working, there are a few things you can look into: + +- Increase log level of plugin to debug, verbose or silly in configuration and restart addon. Refer to the "Logs" section below for information on how to get the full logs. +- Make sure MQTT is correctly configured. If using the HomeAssistant Supervisor (HassIO) Addon mosquitto, changing from `broker: "mqtt://localhost"` to `broker: "core-mosquitto"` can sometimes help (username and password as before) +- Make sure that the MQTT integration works! Config => Integrations => MQTT => Configure => Listen to "#" (everything), then publish to topic `home-assistant/switch/1/power` and make sure you see the message below when listening +- Make sure BT is working + - Go to HA console (login as "root", write `login` to access normal terminal (or SSH or similar) + - Start `bluetoothctl` interactive command + - Write `list` and make sure it finds the Bluetooth device. If no device is found you need to fix this first! + - Look in Plejd addon log and make sure there is no `unable to find a bluetooth adapter` line +- Listen to `#` in the MQTT integration and watch Plejd mqtt messages come in + - Initial device discovery messages originate from the Plejd API, so if you set up that correctly you should get new devices in HA + - Plejd log will show something like `discovered light (DIM-01) named ....` + - State change messages originate from the Plejd Bluetooth connection, so if you get those you should be able to listen to Plejd state changes as well as being able to set states! + - Initial sync may take many minutes until all devices have the correct on/off/brightness states in HA +- One Plejd device means max one BLE connection, meaning using the Plejd app over BT will disconnect the addon BLE connection + - It seems you can kick yourself out (by connecting using the app) even when you have multiple devices if the app happens to connect to the same device as the addon is using + +## Transitions + +Transitions from Home Assistant are supported (for dimmable devices) when transition is longer than 1 second. Plejd will do a bit of internal transitioning (default soft start is 0.1 seconds). + +This implementation will transition each device independently, meaning that brightness change might be choppy if transitioning many devices at once or a changing brightness a lot in a limited time. Hassio-plejd's communication channel seems to handle a few updates per second, this is the combined value for all devices. + +Transition points will be skipped if the queue of messages to be sent is over a certain threshold, by default equal to the number of devices in the system. Total transition time is prioritized rather than smoothness. + +Recommendations + +- Only transition a few devices at a time when possible +- Expect 5-10 brightness changes per second, meaning 5 devices => 1-2 updates per device per second +- ... meaning that SLOW transitions will work well (wake-up light, gradually fade over a minute, ...), but quick ones will only work well for few devices or small relative changes in brightness +- When experiencing choppy quick transitions, turn transitioning off and let the Plejd hardware do the work instead + +## I want voice control! + +With the Google Home integration in Home Assistant, you can get voice control for your Plejd lights right away, check this out for more information: +https://www.home-assistant.io/integrations/google_assistant/ + +### I don't want voice, I want HomeKit! + +Check this out for more information on how you can get your Plejd lights controlled using HomeKit: +https://www.home-assistant.io/integrations/homekit/ + +## Developing + +The code in this project follows the [Airbnb JavaScript guide](https://github.com/airbnb/javascript) with a few exceptions. Do run the `npm run lint:fix` command in the `plejd` folder (after running `npm install`) and fix any remaining issues before committing. If copying the plugin locally to your Home Assistant instance _do not include the node_modules directory_, strange errors will happen during build! + +For a nice developer experience it is very convenient to have `eslint` and `prettier` installed in your favorite editor (such as VS Code) and use the "format on save" option (or invoke formatting by Alt+Shift+F in VS Code). Any code issues should appear in the problems window inside the editor, as well as when running the command above. + +When contributing, please do so by forking the repo and then using pull requests towards the dev branch. + +### Logs + +Logs are color coded and can be accessed on the Log tab of the addon. If you set log level to debug, verbose or silly you will generate a lot of log output +that will quickly scroll out of view. Logs can be exported through Docker that hosts all Home Assistant addons. To do that: + +- SSH or console access the HA installation +- Identify the docker container name using `docker container ls` (NAMES column). Example name used `addon_local_plejd` +- tail logs: `tail -f addon_local_plejd` +- tail logs, strip color coding and save to file `docker logs -f addon_local_plejd | sed 's/\x1b\[[0-9;]*m//g' > /config/plejd.log` (output file might need to be adjusted) + +### View logs in VS Code addon + +Logs extracted as above can easily be viewed in the VS Code Home Assistant addon, which will default to using the excellent `Log File Highlighter` extension to parse the file. +Out of the box you can for example view elapsed time by selecting multiple lines and keeping an eye in the status bar. If you're feeling fancy you can get back the removed color information by adding something like below to the the `settings.json` configuration of VS Code. + +```JSON +{ + // other settings + // ... + "logFileHighlighter.customPatterns": [ + { + "pattern": "ERR", + "foreground": "#af1f1f", + "fontStyle": "bold", + }, + { + "pattern": "WRN", + "foreground": "#af6f00", + "fontStyle": "bold", + }, + { + "pattern": "INF", + "foreground": "#44d", + "fontStyle": "bold" + }, + { + "pattern": "VRB", + "foreground": "#4a4", + }, + { + "pattern": "DBG", + "foreground": "#4a4", + }, + { + "pattern": "SIL", + "foreground": "#999" + }, + { + "pattern": "\\[.*\\]", + "foreground": "#666" + } + ] +} +``` + +## License + +``` +Copyright 2019 Marcus Westin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` From 0e70c188515c8ec45b9f10db29026518c0085c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Wed, 27 Jan 2021 16:48:53 +0100 Subject: [PATCH 7/9] Updated changelog with links after creating tags/releases in git --- CHANGELOG.md | 73 ++++++++++++++++++++++++++++++++++++---------- plejd/CHANGELOG.md | 73 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 116 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e3234b..ff4d57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,42 +40,69 @@ - Bump ini from 1.3.5 to 1.3.8 in /plejd [\#116](https://github.com/icanos/hassio-plejd/pull/116) ([dependabot[bot]](https://github.com/apps/dependabot)) - Remove dead code [\#113](https://github.com/icanos/hassio-plejd/pull/113) ([thomasloven](https://github.com/thomasloven)) - Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) -## 0.4.8 (2020-11-24) +## [0.4.8](https://github.com/icanos/hassio-plejd/tree/0.4.8) (2020-11-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.7...0.4.8) **Closed issues:** - Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) +- No state change on scene [\#109](https://github.com/icanos/hassio-plejd/issues/109) +- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#108](https://github.com/icanos/hassio-plejd/issues/108) +- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#107](https://github.com/icanos/hassio-plejd/issues/107) +- UnhandledPromiseRejectionWarning: DBusError: Operation already in progress [\#106](https://github.com/icanos/hassio-plejd/issues/106) +- failed to start discovery. Make sure no other add-on is currently scanning [\#103](https://github.com/icanos/hassio-plejd/issues/103) +- \(node:294\) UnhandledPromiseRejectionWarning: DBusError: Does Not Exist [\#95](https://github.com/icanos/hassio-plejd/issues/95) +- Error after RPI 3 B+ setup [\#94](https://github.com/icanos/hassio-plejd/issues/94) +- Installation instruction needs to be changed [\#90](https://github.com/icanos/hassio-plejd/issues/90) +- Losing connection [\#80](https://github.com/icanos/hassio-plejd/issues/80) +- Looks like it detects my divices but i still get some errors [\#75](https://github.com/icanos/hassio-plejd/issues/75) +- Support for Accesories [\#71](https://github.com/icanos/hassio-plejd/issues/71) -## 0.4.7 (2020-05-12) +**Merged pull requests:** + +- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [0.4.7](https://github.com/icanos/hassio-plejd/tree/0.4.7) (2020-06-12) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.6...0.4.7) **Closed issues:** +- Plejd app cant find devices after hassio.plejd connected [\#87](https://github.com/icanos/hassio-plejd/issues/87) +- plejd-ble: disconnecting / what do i do wrong:\( [\#82](https://github.com/icanos/hassio-plejd/issues/82) - Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) **Merged pull requests:** - transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) -## 0.4.6 (2020-05-06) +## [0.4.6](https://github.com/icanos/hassio-plejd/tree/0.4.6) (2020-05-06) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.5...0.4.6) **Closed issues:** - Installation issue [\#83](https://github.com/icanos/hassio-plejd/issues/83) +- Addon needs to manually be restarted [\#79](https://github.com/icanos/hassio-plejd/issues/79) - Cant install v 0.4.4 [\#77](https://github.com/icanos/hassio-plejd/issues/77) **Merged pull requests:** - fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) -## 0.4.5 (2020-03-26) +## [0.4.5](https://github.com/icanos/hassio-plejd/tree/0.4.5) (2020-03-26) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.4...0.4.5) **Merged pull requests:** - fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) -## 0.4.4 (2020-03-19) +## [0.4.4](https://github.com/icanos/hassio-plejd/tree/0.4.4) (2020-03-19) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.3...0.4.4) **Implemented enhancements:** @@ -90,7 +117,9 @@ - disabled apparmor since lots of issues with that [\#76](https://github.com/icanos/hassio-plejd/pull/76) ([icanos](https://github.com/icanos)) -## 0.4.3 (2020-03-13) +## [0.4.3](https://github.com/icanos/hassio-plejd/tree/0.4.3) (2020-03-13) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.2...0.4.3) **Fixed bugs:** @@ -105,7 +134,9 @@ - updated to comply with new api version [\#73](https://github.com/icanos/hassio-plejd/pull/73) ([icanos](https://github.com/icanos)) -## 0.4.2 (2020-03-03) +## [0.4.2](https://github.com/icanos/hassio-plejd/tree/0.4.2) (2020-03-03) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.1...0.4.2) **Closed issues:** @@ -115,13 +146,17 @@ - reworked write queue and added configurable wait time [\#67](https://github.com/icanos/hassio-plejd/pull/67) ([icanos](https://github.com/icanos)) -## 0.4.1 (2020-02-29) +## [0.4.1](https://github.com/icanos/hassio-plejd/tree/0.4.1) (2020-02-29) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.0...0.4.1) **Merged pull requests:** - added missing file to dockerfile [\#66](https://github.com/icanos/hassio-plejd/pull/66) ([icanos](https://github.com/icanos)) -## 0.4.0 (2020-02-29) +## [0.4.0](https://github.com/icanos/hassio-plejd/tree/0.4.0) (2020-02-29) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.4...0.4.0) **New features:** @@ -144,7 +179,9 @@ - scene support, wph-01 and write queues [\#64](https://github.com/icanos/hassio-plejd/pull/64) ([icanos](https://github.com/icanos)) -## 0.3.4 (2020-01-27) +## [0.3.4](https://github.com/icanos/hassio-plejd/tree/0.3.4) (2020-01-27) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.3...0.3.4) **New features:** @@ -158,7 +195,9 @@ - new config parameter [\#55](https://github.com/icanos/hassio-plejd/pull/55) ([icanos](https://github.com/icanos)) -## 0.3.3 (2020-01-24) +## [0.3.3](https://github.com/icanos/hassio-plejd/tree/0.3.3) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.2...0.3.3) **Merged pull requests:** @@ -168,19 +207,23 @@ - v0.3.1, DBusError: Software caused connection abort [\#50](https://github.com/icanos/hassio-plejd/issues/50) -## 0.3.2 (2020-01-24) +## [0.3.2](https://github.com/icanos/hassio-plejd/tree/0.3.2) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.1...0.3.2) **Merged pull requests:** - potential bug fixed and new version [\#51](https://github.com/icanos/hassio-plejd/pull/51) ([icanos](https://github.com/icanos)) -## 0.3.1 (2020-01-24) +## [0.3.1](https://github.com/icanos/hassio-plejd/tree/0.3.1) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.0...0.3.1) **Merged pull requests:** - added missing dbus access [\#49](https://github.com/icanos/hassio-plejd/pull/49) ([icanos](https://github.com/icanos)) -## 0.3.0 (2020-01-24) +## [0.3.0](https://github.com/icanos/hassio-plejd/tree/0.3.0) (2020-01-24) **New features:** diff --git a/plejd/CHANGELOG.md b/plejd/CHANGELOG.md index 7e3234b..ff4d57f 100644 --- a/plejd/CHANGELOG.md +++ b/plejd/CHANGELOG.md @@ -40,42 +40,69 @@ - Bump ini from 1.3.5 to 1.3.8 in /plejd [\#116](https://github.com/icanos/hassio-plejd/pull/116) ([dependabot[bot]](https://github.com/apps/dependabot)) - Remove dead code [\#113](https://github.com/icanos/hassio-plejd/pull/113) ([thomasloven](https://github.com/thomasloven)) - Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) -## 0.4.8 (2020-11-24) +## [0.4.8](https://github.com/icanos/hassio-plejd/tree/0.4.8) (2020-11-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.7...0.4.8) **Closed issues:** - Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) +- No state change on scene [\#109](https://github.com/icanos/hassio-plejd/issues/109) +- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#108](https://github.com/icanos/hassio-plejd/issues/108) +- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#107](https://github.com/icanos/hassio-plejd/issues/107) +- UnhandledPromiseRejectionWarning: DBusError: Operation already in progress [\#106](https://github.com/icanos/hassio-plejd/issues/106) +- failed to start discovery. Make sure no other add-on is currently scanning [\#103](https://github.com/icanos/hassio-plejd/issues/103) +- \(node:294\) UnhandledPromiseRejectionWarning: DBusError: Does Not Exist [\#95](https://github.com/icanos/hassio-plejd/issues/95) +- Error after RPI 3 B+ setup [\#94](https://github.com/icanos/hassio-plejd/issues/94) +- Installation instruction needs to be changed [\#90](https://github.com/icanos/hassio-plejd/issues/90) +- Losing connection [\#80](https://github.com/icanos/hassio-plejd/issues/80) +- Looks like it detects my divices but i still get some errors [\#75](https://github.com/icanos/hassio-plejd/issues/75) +- Support for Accesories [\#71](https://github.com/icanos/hassio-plejd/issues/71) -## 0.4.7 (2020-05-12) +**Merged pull requests:** + +- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [0.4.7](https://github.com/icanos/hassio-plejd/tree/0.4.7) (2020-06-12) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.6...0.4.7) **Closed issues:** +- Plejd app cant find devices after hassio.plejd connected [\#87](https://github.com/icanos/hassio-plejd/issues/87) +- plejd-ble: disconnecting / what do i do wrong:\( [\#82](https://github.com/icanos/hassio-plejd/issues/82) - Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) **Merged pull requests:** - transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) -## 0.4.6 (2020-05-06) +## [0.4.6](https://github.com/icanos/hassio-plejd/tree/0.4.6) (2020-05-06) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.5...0.4.6) **Closed issues:** - Installation issue [\#83](https://github.com/icanos/hassio-plejd/issues/83) +- Addon needs to manually be restarted [\#79](https://github.com/icanos/hassio-plejd/issues/79) - Cant install v 0.4.4 [\#77](https://github.com/icanos/hassio-plejd/issues/77) **Merged pull requests:** - fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) -## 0.4.5 (2020-03-26) +## [0.4.5](https://github.com/icanos/hassio-plejd/tree/0.4.5) (2020-03-26) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.4...0.4.5) **Merged pull requests:** - fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) -## 0.4.4 (2020-03-19) +## [0.4.4](https://github.com/icanos/hassio-plejd/tree/0.4.4) (2020-03-19) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.3...0.4.4) **Implemented enhancements:** @@ -90,7 +117,9 @@ - disabled apparmor since lots of issues with that [\#76](https://github.com/icanos/hassio-plejd/pull/76) ([icanos](https://github.com/icanos)) -## 0.4.3 (2020-03-13) +## [0.4.3](https://github.com/icanos/hassio-plejd/tree/0.4.3) (2020-03-13) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.2...0.4.3) **Fixed bugs:** @@ -105,7 +134,9 @@ - updated to comply with new api version [\#73](https://github.com/icanos/hassio-plejd/pull/73) ([icanos](https://github.com/icanos)) -## 0.4.2 (2020-03-03) +## [0.4.2](https://github.com/icanos/hassio-plejd/tree/0.4.2) (2020-03-03) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.1...0.4.2) **Closed issues:** @@ -115,13 +146,17 @@ - reworked write queue and added configurable wait time [\#67](https://github.com/icanos/hassio-plejd/pull/67) ([icanos](https://github.com/icanos)) -## 0.4.1 (2020-02-29) +## [0.4.1](https://github.com/icanos/hassio-plejd/tree/0.4.1) (2020-02-29) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.0...0.4.1) **Merged pull requests:** - added missing file to dockerfile [\#66](https://github.com/icanos/hassio-plejd/pull/66) ([icanos](https://github.com/icanos)) -## 0.4.0 (2020-02-29) +## [0.4.0](https://github.com/icanos/hassio-plejd/tree/0.4.0) (2020-02-29) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.4...0.4.0) **New features:** @@ -144,7 +179,9 @@ - scene support, wph-01 and write queues [\#64](https://github.com/icanos/hassio-plejd/pull/64) ([icanos](https://github.com/icanos)) -## 0.3.4 (2020-01-27) +## [0.3.4](https://github.com/icanos/hassio-plejd/tree/0.3.4) (2020-01-27) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.3...0.3.4) **New features:** @@ -158,7 +195,9 @@ - new config parameter [\#55](https://github.com/icanos/hassio-plejd/pull/55) ([icanos](https://github.com/icanos)) -## 0.3.3 (2020-01-24) +## [0.3.3](https://github.com/icanos/hassio-plejd/tree/0.3.3) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.2...0.3.3) **Merged pull requests:** @@ -168,19 +207,23 @@ - v0.3.1, DBusError: Software caused connection abort [\#50](https://github.com/icanos/hassio-plejd/issues/50) -## 0.3.2 (2020-01-24) +## [0.3.2](https://github.com/icanos/hassio-plejd/tree/0.3.2) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.1...0.3.2) **Merged pull requests:** - potential bug fixed and new version [\#51](https://github.com/icanos/hassio-plejd/pull/51) ([icanos](https://github.com/icanos)) -## 0.3.1 (2020-01-24) +## [0.3.1](https://github.com/icanos/hassio-plejd/tree/0.3.1) (2020-01-24) + +[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.0...0.3.1) **Merged pull requests:** - added missing dbus access [\#49](https://github.com/icanos/hassio-plejd/pull/49) ([icanos](https://github.com/icanos)) -## 0.3.0 (2020-01-24) +## [0.3.0](https://github.com/icanos/hassio-plejd/tree/0.3.0) (2020-01-24) **New features:** From 4cf0246f1fc9d3a8ee58aa24b311379c7e207a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Thu, 28 Jan 2021 14:04:59 +0100 Subject: [PATCH 8/9] Remove addon info and changelog from root readme that pertains to the addon repository --- CHANGELOG.md | 409 --------------------------------------------------- README.md | 231 +---------------------------- 2 files changed, 3 insertions(+), 637 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index ff4d57f..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,409 +0,0 @@ -# Changelog hassio-plejd Home Assistant Plejd addon - -## 0.5.0 - -**New features:** - -- Improved transitions due to new per-device queue of commands -- Completely rewritten and improved logging for js to improve code structure and user experience - -**Implemented enhancements:** - -- Adjust code to airbnb style guid, including eslint rules and prettier config -- Updated dependencies -- Improved readme with info about installation, debugging, and logging - -**Fixed bugs:** - -- Fix wrong initial brightness when transitioning turned-off lights -- Fix includeRoomsAsLights setting - -**Closed issues:** - -- Cannot read property 'length' of undefined - when turning of the light [\#134](https://github.com/icanos/hassio-plejd/issues/134) -- Idea: Add device id and shouldRetry to writeQueue [\#128](https://github.com/icanos/hassio-plejd/issues/128) -- Request: Clarify versions/readme [\#126](https://github.com/icanos/hassio-plejd/issues/126) -- light.turn_off turns the lights on [\#124](https://github.com/icanos/hassio-plejd/issues/124) -- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) - -**Merged pull requests:** - -- Feature/code style [\#150](https://github.com/icanos/hassio-plejd/pull/150) ([SweVictor](https://github.com/SweVictor)) -- Improved logging [\#149](https://github.com/icanos/hassio-plejd/pull/149) ([SweVictor](https://github.com/SweVictor)) -- Feature/per device write queue [\#144](https://github.com/icanos/hassio-plejd/pull/144) ([SweVictor](https://github.com/SweVictor)) -- Fix wrong initial brightness when transitioning turned-off lights [\#142](https://github.com/icanos/hassio-plejd/pull/142) ([SweVictor](https://github.com/SweVictor)) -- Fix includeRoomsAsLights and improve logging [\#141](https://github.com/icanos/hassio-plejd/pull/141) ([SweVictor](https://github.com/SweVictor)) -- Update README.md [\#140](https://github.com/icanos/hassio-plejd/pull/140) ([buffedelic](https://github.com/buffedelic)) -- multiple fixes for improved lifecycle and errors [\#137](https://github.com/icanos/hassio-plejd/pull/137) ([JohnPhoto](https://github.com/JohnPhoto)) -- Bump axios from 0.19.0 to 0.21.1 in /plejd [\#133](https://github.com/icanos/hassio-plejd/pull/133) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Improve transitioning of brightness [\#127](https://github.com/icanos/hassio-plejd/pull/127) ([SweVictor](https://github.com/SweVictor)) -- Bump ini from 1.3.5 to 1.3.8 in /plejd [\#116](https://github.com/icanos/hassio-plejd/pull/116) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Remove dead code [\#113](https://github.com/icanos/hassio-plejd/pull/113) ([thomasloven](https://github.com/thomasloven)) -- Bump bl from 1.2.2 to 1.2.3 in /plejd [\#112](https://github.com/icanos/hassio-plejd/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [0.4.8](https://github.com/icanos/hassio-plejd/tree/0.4.8) (2020-11-24) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.7...0.4.8) - -**Closed issues:** - -- Unable to install [\#111](https://github.com/icanos/hassio-plejd/issues/111) -- No state change on scene [\#109](https://github.com/icanos/hassio-plejd/issues/109) -- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#108](https://github.com/icanos/hassio-plejd/issues/108) -- UnhandledPromiseRejectionWarning: DBusError: Failed to activate service 'org.bluez': timed out [\#107](https://github.com/icanos/hassio-plejd/issues/107) -- UnhandledPromiseRejectionWarning: DBusError: Operation already in progress [\#106](https://github.com/icanos/hassio-plejd/issues/106) -- failed to start discovery. Make sure no other add-on is currently scanning [\#103](https://github.com/icanos/hassio-plejd/issues/103) -- \(node:294\) UnhandledPromiseRejectionWarning: DBusError: Does Not Exist [\#95](https://github.com/icanos/hassio-plejd/issues/95) -- Error after RPI 3 B+ setup [\#94](https://github.com/icanos/hassio-plejd/issues/94) -- Installation instruction needs to be changed [\#90](https://github.com/icanos/hassio-plejd/issues/90) -- Losing connection [\#80](https://github.com/icanos/hassio-plejd/issues/80) -- Looks like it detects my divices but i still get some errors [\#75](https://github.com/icanos/hassio-plejd/issues/75) -- Support for Accesories [\#71](https://github.com/icanos/hassio-plejd/issues/71) - -**Merged pull requests:** - -- Bump lodash from 4.17.15 to 4.17.19 in /plejd [\#93](https://github.com/icanos/hassio-plejd/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [0.4.7](https://github.com/icanos/hassio-plejd/tree/0.4.7) (2020-06-12) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.6...0.4.7) - -**Closed issues:** - -- Plejd app cant find devices after hassio.plejd connected [\#87](https://github.com/icanos/hassio-plejd/issues/87) -- plejd-ble: disconnecting / what do i do wrong:\( [\#82](https://github.com/icanos/hassio-plejd/issues/82) -- Reverse transition: revisit [\#68](https://github.com/icanos/hassio-plejd/issues/68) - -**Merged pull requests:** - -- transitions work [\#89](https://github.com/icanos/hassio-plejd/pull/89) ([icanos](https://github.com/icanos)) - -## [0.4.6](https://github.com/icanos/hassio-plejd/tree/0.4.6) (2020-05-06) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.5...0.4.6) - -**Closed issues:** - -- Installation issue [\#83](https://github.com/icanos/hassio-plejd/issues/83) -- Addon needs to manually be restarted [\#79](https://github.com/icanos/hassio-plejd/issues/79) -- Cant install v 0.4.4 [\#77](https://github.com/icanos/hassio-plejd/issues/77) - -**Merged pull requests:** - -- fixed build error [\#84](https://github.com/icanos/hassio-plejd/pull/84) ([icanos](https://github.com/icanos)) - -## [0.4.5](https://github.com/icanos/hassio-plejd/tree/0.4.5) (2020-03-26) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.4...0.4.5) - -**Merged pull requests:** - -- fixed build error and upped version [\#81](https://github.com/icanos/hassio-plejd/pull/81) ([icanos](https://github.com/icanos)) - -## [0.4.4](https://github.com/icanos/hassio-plejd/tree/0.4.4) (2020-03-19) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.3...0.4.4) - -**Implemented enhancements:** - -- Disabled AppArmor Policy since there's been a lot of issues with that. - -**Closed issues:** - -- Apparmor in latest version [\#74](https://github.com/icanos/hassio-plejd/issues/74) -- No devices added [\#70](https://github.com/icanos/hassio-plejd/issues/70) - -**Merged pull requests:** - -- disabled apparmor since lots of issues with that [\#76](https://github.com/icanos/hassio-plejd/pull/76) ([icanos](https://github.com/icanos)) - -## [0.4.3](https://github.com/icanos/hassio-plejd/tree/0.4.3) (2020-03-13) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.2...0.4.3) - -**Fixed bugs:** - -- Updated add-on to work with the API changes made by Plejd. - -**Closed issues:** - -- Error: unable to retrieve the crypto key. error: Error: Request failed with status code 400 [\#72](https://github.com/icanos/hassio-plejd/issues/72) -- plejd-ble: warning: wasn't able to connect to Plejd, will retry. [\#69](https://github.com/icanos/hassio-plejd/issues/69) - -**Merged pull requests:** - -- updated to comply with new api version [\#73](https://github.com/icanos/hassio-plejd/pull/73) ([icanos](https://github.com/icanos)) - -## [0.4.2](https://github.com/icanos/hassio-plejd/tree/0.4.2) (2020-03-03) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.1...0.4.2) - -**Closed issues:** - -- Error: Cannot find module './scene.manager' in 0.4.0 [\#65](https://github.com/icanos/hassio-plejd/issues/65) - -**Merged pull requests:** - -- reworked write queue and added configurable wait time [\#67](https://github.com/icanos/hassio-plejd/pull/67) ([icanos](https://github.com/icanos)) - -## [0.4.1](https://github.com/icanos/hassio-plejd/tree/0.4.1) (2020-02-29) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.4.0...0.4.1) - -**Merged pull requests:** - -- added missing file to dockerfile [\#66](https://github.com/icanos/hassio-plejd/pull/66) ([icanos](https://github.com/icanos)) - -## [0.4.0](https://github.com/icanos/hassio-plejd/tree/0.4.0) (2020-02-29) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.4...0.4.0) - -**New features:** - -- Implemented support for Plejd scenes, each scene appears as a switch in Home Assistant. -- _WPH-01_ is supported and generates two switches (left and right button). -- Write queues, finally able to incorporate Plejd devices in HA automations/scenes etc. - -**Closed issues:** - -- voluptuous.error.MultipleInvalid: extra keys not allowed @ data\['schema'\] [\#61](https://github.com/icanos/hassio-plejd/issues/61) -- Can't install R pi3+ [\#62](https://github.com/icanos/hassio-plejd/issues/62) -- Plejd plugin installation fail [\#60](https://github.com/icanos/hassio-plejd/issues/60) -- dBus Error? [\#59](https://github.com/icanos/hassio-plejd/issues/59) -- Connection problem with 3.4 [\#56](https://github.com/icanos/hassio-plejd/issues/56) -- Scene triggering via MQTT [\#43](https://github.com/icanos/hassio-plejd/issues/43) -- Reverse transition: [\#26](https://github.com/icanos/hassio-plejd/issues/26) -- light transition: not supported? [\#15](https://github.com/icanos/hassio-plejd/issues/15) - -**Merged pull requests:** - -- scene support, wph-01 and write queues [\#64](https://github.com/icanos/hassio-plejd/pull/64) ([icanos](https://github.com/icanos)) - -## [0.3.4](https://github.com/icanos/hassio-plejd/tree/0.3.4) (2020-01-27) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.3...0.3.4) - -**New features:** - -- `connectionTimeout` configuration parameter to enable tweaking of wait time on connection, usable for RPi 3B+. - -**Implemented enhancements:** - -- Reworked some logging to get better understanding of what happens. - -**Merged pull requests:** - -- new config parameter [\#55](https://github.com/icanos/hassio-plejd/pull/55) ([icanos](https://github.com/icanos)) - -## [0.3.3](https://github.com/icanos/hassio-plejd/tree/0.3.3) (2020-01-24) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.2...0.3.3) - -**Merged pull requests:** - -- resolved missing device bug and new version [\#52](https://github.com/icanos/hassio-plejd/pull/52) ([icanos](https://github.com/icanos)) - -**Closed issues:** - -- v0.3.1, DBusError: Software caused connection abort [\#50](https://github.com/icanos/hassio-plejd/issues/50) - -## [0.3.2](https://github.com/icanos/hassio-plejd/tree/0.3.2) (2020-01-24) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.1...0.3.2) - -**Merged pull requests:** - -- potential bug fixed and new version [\#51](https://github.com/icanos/hassio-plejd/pull/51) ([icanos](https://github.com/icanos)) - -## [0.3.1](https://github.com/icanos/hassio-plejd/tree/0.3.1) (2020-01-24) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.3.0...0.3.1) - -**Merged pull requests:** - -- added missing dbus access [\#49](https://github.com/icanos/hassio-plejd/pull/49) ([icanos](https://github.com/icanos)) - -## [0.3.0](https://github.com/icanos/hassio-plejd/tree/0.3.0) (2020-01-24) - -**New features:** - -- New BLE manager, DBus instead of noble - -**Closed issues:** - -- Entities without devices [\#28](https://github.com/icanos/hassio-plejd/issues/28) -- noble warning: unknown peripheral in ver 0.2.0 [\#24](https://github.com/icanos/hassio-plejd/issues/24) -- \(node:291\) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. [\#19](https://github.com/icanos/hassio-plejd/issues/19) - -**Merged pull requests:** - -- new ble manager [\#48](https://github.com/icanos/hassio-plejd/pull/48) ([icanos](https://github.com/icanos)) - -## 0.2.10 (2020-01-18) - -**Merged pull requests:** - -- upped version to fix issue [\#47](https://github.com/icanos/hassio-plejd/pull/47) ([icanos](https://github.com/icanos)) -- fix [\#46](https://github.com/icanos/hassio-plejd/pull/46) ([icanos](https://github.com/icanos)) -- bug fix [\#45](https://github.com/icanos/hassio-plejd/pull/45) ([icanos](https://github.com/icanos)) - -## 0.2.9 (2020-01-18) - -**Merged pull requests:** - -- added sorted list of devices discovered [\#44](https://github.com/icanos/hassio-plejd/pull/44) ([icanos](https://github.com/icanos)) - -## 0.2.8 (2020-01-16) - -**Fixed bugs:** - -- FIX: Reset characteristic state on disconnect - -**Merged pull requests:** - -- Update README.md [\#42](https://github.com/icanos/hassio-plejd/pull/42) ([icanos](https://github.com/icanos)) -- reset characteristic state and new version [\#41](https://github.com/icanos/hassio-plejd/pull/41) ([icanos](https://github.com/icanos)) - -## 0.2.7 (2020-01-16) - -**Fixed bugs:** - -- Added exception handling to unsubscribing lastData characteristic if already disconnected - -**Merged pull requests:** - -- more error handling and version upgrade [\#39](https://github.com/icanos/hassio-plejd/pull/39) ([icanos](https://github.com/icanos)) -- Update README.md [\#40](https://github.com/icanos/hassio-plejd/pull/40) ([icanos](https://github.com/icanos)) - -## 0.2.6 (2020-01-15) - -**Merged pull requests:** - -- resolved null usage exception [\#38](https://github.com/icanos/hassio-plejd/pull/38) ([icanos](https://github.com/icanos)) - -## 0.2.5 (2020-01-14) - -**Closed issues:** - -- Scene ID always 0 [\#35](https://github.com/icanos/hassio-plejd/issues/35) - -**Merged pull requests:** - -- Update README.md [\#37](https://github.com/icanos/hassio-plejd/pull/37) ([icanos](https://github.com/icanos)) -- resolved bug with scenes [\#36](https://github.com/icanos/hassio-plejd/pull/36) ([icanos](https://github.com/icanos)) - -## 0.2.4 (2020-01-14) - -**Merged pull requests:** - -- added error handling for writing to Plejd [\#34](https://github.com/icanos/hassio-plejd/pull/34) ([icanos](https://github.com/icanos)) - -## 0.2.3 (2020-01-14) - -**Closed issues:** - -- parse error: Expected string key before ':' at line 1, column 4 [\#17](https://github.com/icanos/hassio-plejd/issues/17) -- Raspberry Pi4 Hassos - Installation exited [\#32](https://github.com/icanos/hassio-plejd/issues/32) - -**Merged pull requests:** - -- resolved container build error [\#33](https://github.com/icanos/hassio-plejd/pull/33) ([icanos](https://github.com/icanos)) - -## 0.2.2 - -**Implemented enhancements:** - -- Stability improvements - -## [0.2.1](https://github.com/icanos/hassio-plejd/tree/0.2.1) (2020-01-08) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/0.2.0...0.2.1) - -**Implemented enhancements:** - -- stability improvements - -**Merged pull requests:** - -- 0.2.1 extended logging [\#25](https://github.com/icanos/hassio-plejd/pull/25) ([icanos](https://github.com/icanos)) - -## [0.2.0](https://github.com/icanos/hassio-plejd/tree/0.2.0) (2019-12-31) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.4...0.2.0) - -**New features** - -- Include rooms as lights - -**Implemented enhancements:** - -- stability improvements - -**Fixed bugs:** - -- noble warning: unknown peripheral [\#1](https://github.com/icanos/hassio-plejd/issues/1) - -**Closed issues:** - -- parse error: Expected string key before ':' at line 1, column 4/code 404 [\#18](https://github.com/icanos/hassio-plejd/issues/18) -- Cannot find module './plejd' [\#13](https://github.com/icanos/hassio-plejd/issues/13) -- Cannot add repo [\#11](https://github.com/icanos/hassio-plejd/issues/11) -- REL-02 [\#8](https://github.com/icanos/hassio-plejd/issues/8) -- Http error on line 1 [\#7](https://github.com/icanos/hassio-plejd/issues/7) -- DIM-2 and MQTT auto discover issue? [\#6](https://github.com/icanos/hassio-plejd/issues/6) -- Switch / Light [\#5](https://github.com/icanos/hassio-plejd/issues/5) -- Devices not loading after restart of HA [\#4](https://github.com/icanos/hassio-plejd/issues/4) -- Error building [\#3](https://github.com/icanos/hassio-plejd/issues/3) - -**Merged pull requests:** - -- merge to 0.2.0 [\#23](https://github.com/icanos/hassio-plejd/pull/23) ([icanos](https://github.com/icanos)) -- Remove old reference to plejd.js [\#14](https://github.com/icanos/hassio-plejd/pull/14) ([treet](https://github.com/treet)) -- rewritten the ble communication layer [\#12](https://github.com/icanos/hassio-plejd/pull/12) ([icanos](https://github.com/icanos)) -- more stability improvements [\#9](https://github.com/icanos/hassio-plejd/pull/9) ([icanos](https://github.com/icanos)) - -## [0.1.4](https://github.com/icanos/hassio-plejd/tree/v0.1.4) (2019-12-11) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/v0.1.3...v0.1.4) - -## [0.1.3](https://github.com/icanos/hassio-plejd/tree/v0.1.3) (2019-12-11) - -[Full Changelog](https://github.com/icanos/hassio-plejd/compare/942be4c54317abd768fb7470f0b2d49fd58f06db...v0.1.3) - -**Closed issues:** - -- DIM-02 only one entity per device detected [\#2](https://github.com/icanos/hassio-plejd/issues/2) - -## 0.1.1 - -**Fixed bugs:** - -- Fixed missing reference on startup, preventing add-on from starting - -## 0.1.0 - -**New features:** - -- Rewrote the BLE integration for more stability - -**Fixed bugs:** - -- discovery wasn't always sent - -## 0.0.9: - -**New features:** - -- Added support for Plejd devices with multiple outputs (such as DIM-02) - -**Fixed bugs:** - -- bug preventing add-on from building - -## Initial (2019-12-04) - -**New features:** - -- Initial version of the addon created! - -\* _This Changelog was partially generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ diff --git a/README.md b/README.md index 763e720..0463064 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Hass.io Plejd add-on +# Hass.io Plejd add-on repository Hass.io add-on for Plejd home automation devices. Gives you the ability to control the Plejd home automation devices through Home Assistant. It uses MQTT to communicate with Home Assistant and supports auto discovery of the devices in range. @@ -15,234 +15,9 @@ I am in no way affiliated with Plejd and am solely doing this as a hobby project [![Gitter](https://badges.gitter.im/hassio-plejd/community.svg)](https://gitter.im/hassio-plejd/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -## Getting started +## Addons -To get started, make sure that the following requirements are met: - -### Requirements - -- A Bluetooth device (BLE), for eg. the built-in device in Raspberry Pi 4. -- An MQTT broker (the Mosquitto Hass.io add-on works perfectly well). - -### Tested on - -The add-on has been tested on the following platforms: - -- Mac OS Catalina 10.15.1 with Node v. 13.2.0 -- Raspberry Pi 4 with Hass.io -- Raspberry Pi 4 with Hass.io/aarch64 - -#### Tested Plejd devices - -- DIM-01 -- DIM-02 -- LED-10 -- CTR-01 -- REL-01 -- REL-02 -- WPH-01 - -### Easy Installation - -Browse to your Home Assistant installation in a web browser and click on `Hass.io` in the navigation bar to the left. - -- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. -- Click on `Add-on Store` in the top navigation bar of that page. -- Paste the URL to this repo https://github.com/icanos/hassio-plejd.git in the `Add new repository by URL` field and hit `Add`. -- Scroll down and you should find a Plejd add-on that can be installed. Open that and install. -- Enjoy! - -### Manual Installation - -Browse your Hass.io installation using a tool that allows you to manage files, for eg. SMB or an SFTP client etc. - -- Open the `/addon` directory -- Create a new folder named `hassio-plejd` -- Copy all files from this repository into that newly created one. -- Open the Home Assistant web console and click `Hass.io` in the menu on the left side. -- Click on `Add-on Store` in the top navigation bar of that page. -- Click on the refresh button in the upper right corner. -- A new Local Add-on should appear named Plejd. Open that and install. -- Enjoy! - -### IMPORTANT INFORMATION - -#### Startup error message - -When starting the add-on, the log displays this message: - -``` -parse error: Expected string key before ':' at line 1, column 4 -[08:56:24] ERROR: Unknown HTTP error occured -``` - -However, the add-on still works as expected and this is something I'm looking into, but not with that much effort yet though. - -#### Running the Plejd add-on in VirtualBox on Windows - -If on Windows + VirtualBox or similar setup - -- Install VirtualBox extensions to get USB 2/3 -- Redirect correct USB device -- Potentially try to replace BT drivers with WinUSB using Zadig -- (Re)start VirtualBox HA machine - -#### Running the Plejd add-on outside of HassOS - -If you're planning on running this add-on outside of HassOS, you might need to turn off AppArmor in the `config.json` file. This is due to missing AppArmor configuration that is performed in HassOS (if you've manually done it, ignore this). - -Open the `config.json` file and locate `host_dbus`, after that line, insert: `"apparmor": "no",` and then restart the add-on. - -More information about available parameters can be found here: -https://developers.home-assistant.io/docs/en/hassio_addon_config.html - -#### Migration from 32bit to 64 bit - -If you restore a backup from a 32bit system to a new 64bit system, use the Rebuild option in the Add-on - -### Configuration - -You need to add the following to your `configuration.yaml` file: - -``` -mqtt: - broker: [point to your broker IP eg. 'mqtt://localhost'] - username: [username of mqtt broker] - password: !secret mqtt_password - discovery: true - discovery_prefix: homeassistant - birth_message: - topic: 'hass/status' - payload: 'online' - will_message: - topic: 'hass/status' - payload: 'offline' -``` - -The above is used to notify the add-on when Home Assistant has started successfully and let the add-on send the discovery response (containing all devices). - -The plugin needs you to configure some settings before working. You find these on the Add-on page after you've installed it. - -| Parameter | Value | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| site | Name of your Plejd site, the name is displayed in the Plejd app (top bar). | -| username | Username of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | -| password | Password of your Plejd account, this is used to fetch the crypto key and devices from the Plejd API. | -| mqttBroker | URL of the MQTT Broker, eg. mqtt://localhost | -| mqttUsername | Username of the MQTT broker | -| mqttPassword | Password of the MQTT broker | -| includeRoomsAsLights | Adds all rooms as lights, making it possible to turn on/off lights by room instead. Setting this to false will ignore all rooms. | -| logLevel | Minimim log level. Supported values are `error`, `warn`, `info`, `debug`, `verbose`, `silly` with increasing amount of logging. Do not log more than `info` for production purposes. | -| connectionTimeout | Number of seconds to wait when scanning and connecting. Might need to be tweaked on platforms other than RPi 4. Defaults to: 2 seconds. | -| writeQueueWaitTime | Wait time between message sent to Plejd over BLE, defaults to 400. If that doesn't work, try changing the value higher in steps of 50. | - -## Having issues to get the addon working? - -If you're having issues to get the addon working, there are a few things you can look into: - -- Increase log level of plugin to debug, verbose or silly in configuration and restart addon. Refer to the "Logs" section below for information on how to get the full logs. -- Make sure MQTT is correctly configured. If using the HomeAssistant Supervisor (HassIO) Addon mosquitto, changing from `broker: "mqtt://localhost"` to `broker: "core-mosquitto"` can sometimes help (username and password as before) -- Make sure that the MQTT integration works! Config => Integrations => MQTT => Configure => Listen to "#" (everything), then publish to topic `home-assistant/switch/1/power` and make sure you see the message below when listening -- Make sure BT is working - - Go to HA console (login as "root", write `login` to access normal terminal (or SSH or similar) - - Start `bluetoothctl` interactive command - - Write `list` and make sure it finds the Bluetooth device. If no device is found you need to fix this first! - - Look in Plejd addon log and make sure there is no `unable to find a bluetooth adapter` line -- Listen to `#` in the MQTT integration and watch Plejd mqtt messages come in - - Initial device discovery messages originate from the Plejd API, so if you set up that correctly you should get new devices in HA - - Plejd log will show something like `discovered light (DIM-01) named ....` - - State change messages originate from the Plejd Bluetooth connection, so if you get those you should be able to listen to Plejd state changes as well as being able to set states! - - Initial sync may take many minutes until all devices have the correct on/off/brightness states in HA -- One Plejd device means max one BLE connection, meaning using the Plejd app over BT will disconnect the addon BLE connection - - It seems you can kick yourself out (by connecting using the app) even when you have multiple devices if the app happens to connect to the same device as the addon is using - -## Transitions - -Transitions from Home Assistant are supported (for dimmable devices) when transition is longer than 1 second. Plejd will do a bit of internal transitioning (default soft start is 0.1 seconds). - -This implementation will transition each device independently, meaning that brightness change might be choppy if transitioning many devices at once or a changing brightness a lot in a limited time. Hassio-plejd's communication channel seems to handle a few updates per second, this is the combined value for all devices. - -Transition points will be skipped if the queue of messages to be sent is over a certain threshold, by default equal to the number of devices in the system. Total transition time is prioritized rather than smoothness. - -Recommendations - -- Only transition a few devices at a time when possible -- Expect 5-10 brightness changes per second, meaning 5 devices => 1-2 updates per device per second -- ... meaning that SLOW transitions will work well (wake-up light, gradually fade over a minute, ...), but quick ones will only work well for few devices or small relative changes in brightness -- When experiencing choppy quick transitions, turn transitioning off and let the Plejd hardware do the work instead - -## I want voice control! - -With the Google Home integration in Home Assistant, you can get voice control for your Plejd lights right away, check this out for more information: -https://www.home-assistant.io/integrations/google_assistant/ - -### I don't want voice, I want HomeKit! - -Check this out for more information on how you can get your Plejd lights controlled using HomeKit: -https://www.home-assistant.io/integrations/homekit/ - -## Developing - -The code in this project follows the [Airbnb JavaScript guide](https://github.com/airbnb/javascript) with a few exceptions. Do run the `npm run lint:fix` command in the `plejd` folder (after running `npm install`) and fix any remaining issues before committing. If copying the plugin locally to your Home Assistant instance _do not include the node_modules directory_, strange errors will happen during build! - -For a nice developer experience it is very convenient to have `eslint` and `prettier` installed in your favorite editor (such as VS Code) and use the "format on save" option (or invoke formatting by Alt+Shift+F in VS Code). Any code issues should appear in the problems window inside the editor, as well as when running the command above. - -When contributing, please do so by forking the repo and then using pull requests towards the dev branch. - -### Logs - -Logs are color coded and can be accessed on the Log tab of the addon. If you set log level to debug, verbose or silly you will generate a lot of log output -that will quickly scroll out of view. Logs can be exported through Docker that hosts all Home Assistant addons. To do that: - -- SSH or console access the HA installation -- Identify the docker container name using `docker container ls` (NAMES column). Example name used `addon_local_plejd` -- tail logs: `tail -f addon_local_plejd` -- tail logs, strip color coding and save to file `docker logs -f addon_local_plejd | sed 's/\x1b\[[0-9;]*m//g' > /config/plejd.log` (output file might need to be adjusted) - -### View logs in VS Code addon - -Logs extracted as above can easily be viewed in the VS Code Home Assistant addon, which will default to using the excellent `Log File Highlighter` extension to parse the file. -Out of the box you can for example view elapsed time by selecting multiple lines and keeping an eye in the status bar. If you're feeling fancy you can get back the removed color information by adding something like below to the the `settings.json` configuration of VS Code. - -```JSON -{ - // other settings - // ... - "logFileHighlighter.customPatterns": [ - { - "pattern": "ERR", - "foreground": "#af1f1f", - "fontStyle": "bold", - }, - { - "pattern": "WRN", - "foreground": "#af6f00", - "fontStyle": "bold", - }, - { - "pattern": "INF", - "foreground": "#44d", - "fontStyle": "bold" - }, - { - "pattern": "VRB", - "foreground": "#4a4", - }, - { - "pattern": "DBG", - "foreground": "#4a4", - }, - { - "pattern": "SIL", - "foreground": "#999" - }, - { - "pattern": "\\[.*\\]", - "foreground": "#666" - } - ] -} -``` +The repository contains only one addon, [Plejd](plejd/). Please see [Plejd addon readme](plejd/README.md) and [Plejd addon changelog](plejd/CHANGELOG.md) for details. ## License From 711168f5aaac9e4390e53cbf0de36ca91c38c989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Hagelb=C3=A4ck?= Date: Thu, 28 Jan 2021 14:05:18 +0100 Subject: [PATCH 9/9] Add readme section on how to install older/dev releases --- plejd/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plejd/README.md b/plejd/README.md index 763e720..fb4d597 100644 --- a/plejd/README.md +++ b/plejd/README.md @@ -65,6 +65,10 @@ Browse your Hass.io installation using a tool that allows you to manage files, f - A new Local Add-on should appear named Plejd. Open that and install. - Enjoy! +### Install older versions or developemnt version + +To install older versions, follow the "Manual Installation" instructions above, but copy the code from [one of the releases](https://github.com/icanos/hassio-plejd/releases). To test new functionality you can download the development version, available in the [develop branch](https://github.com/icanos/hassio-plejd/tree/feature/develop). + ### IMPORTANT INFORMATION #### Startup error message