diff --git a/ioBroker/CHANGELOG.md b/ioBroker/CHANGELOG.md index 64cfa6a..73783c4 100644 --- a/ioBroker/CHANGELOG.md +++ b/ioBroker/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [0.8.0] - 2021-02-26 +- Introduce `eval` configuration option (see *Documentation* for more) + ## [0.7.0] - 2021-02-13 - Added some more ports to be possibly exposed @@ -22,4 +25,4 @@ - Fix permission bug in dockerfile ## [0.1.0] - 2020-12-30 -- Initial release \ No newline at end of file +- Initial release diff --git a/ioBroker/DOCS.md b/ioBroker/DOCS.md new file mode 100644 index 0000000..5e91e09 --- /dev/null +++ b/ioBroker/DOCS.md @@ -0,0 +1,51 @@ +# Home Assistant Add-on: ioBroker + +## Installation +After installation, and successful startup, the ioBroker instance should be available at port `8081`. +If your HA instance is running with SSL support, the `OPEN WEB UI` button might not work correctly. + +**Note:** As this image is not based on the official home assistant add-on images the Supervisor has some delay on the add-on state (i guess this is the reason). +It might be up and running while the `Info` tab is not aware of this right now. Page reload might help. + +## Updating `js-controller` +The bundled `js-controller` is not (always) the most recent version. (Thanks to *tintim* [#21](1)). + +Updating can be archived manually via `portainer` or by using the [`eval` setting](#eval-(string)). + +Manually: +Jump into the container via `portainer` and run line by line: +```bash +maintenance on +iobroker update +iobroker upgrade self +curl -sL https://iobroker.net/fix.sh | bash +``` + + +## Configuration +### `eval` (string) +Allows to pass some bash commands to run every time before the start of ioBroker. + +This can be used e.g. to upgrade the `js-controller`. + +Example: +```yaml +eval: "iobroker update && iobroker upgrade self" +``` + +You might want to disable this after a run. + +*Only use when you know what you are doing!* + +## TODO +* Get the panel integration working (if this is possible) +* Use some official base image (maybe running the buanet dockerfile onto office image work) + +## Technical notes +The `buanet` docker image contains some pretty useful startup script. + +To ensure data stays persistent across restarts I simply softlink `/data` to `/opt/iobroker`. +I removed some check that was not compatible with the symlink and not needed in our case. +I added the unmodified version as a reference. + +[1]: https://github.com/MaxWinterstein/homeassistant-addons/issues/21 \ No newline at end of file diff --git a/ioBroker/README.md b/ioBroker/README.md index 7362f03..f3af939 100644 --- a/ioBroker/README.md +++ b/ioBroker/README.md @@ -1,14 +1,20 @@ ---- -# 🚨 !!Important Update Notice!! 🚨 -This addon recently switched to pre-build images. The Update progress might fail when the installed version is <0.6.0. -Copy your *Configuration* to your clipboard and Uninstall/Install manually. + +### 🚨 Important Inforation 🚨 +* This addon recently switched to pre-build images. The Update progress might fail when the installed version is <0.6.0. + Copy your *Configuration* to your clipboard and Uninstall/Install manually. +* I do not guarantee that your ioBroker configuration will not get deleted! This is some experimental release! --- # Home Assistant Add-on: ioBroker ---- -## 🚨 I do not guarantee that your ioBroker configuration will not get deleted! This is some experimental release! 🚨 ---- +![Supports aarch64 Architecture][aarch64-shield] +![Supports amd64 Architecture][amd64-shield] +![Supports armv7 Architecture][armv7-shield] +![Supports armhf Architecture][armhf-shield] +![Supports i386 Architecture][i386-shield] + +Buy Me A Coffee + This is a pretty basic implementation of ioBroker as Home Assistant Add-on. It is meant to provide some playground. @@ -16,23 +22,12 @@ It is meant to provide some playground. Mostly created as playfield for: https://blog.fuzzymistborn.com/controlling-eufy-security-devices-with-iobroker/ and https://community.home-assistant.io/t/eufy-camera-integration/121758 +See the Documentation (DOCS.md) for more info. **This is no official add-on, neither from Home Assisant, nor from ioBroker.** -## Installation -After installation, and successful startup, the ioBroker instance should be available at port `8081`. -If your HA instance is running with SSL support, the `OPEN WEB UI` button might not work correctly. - -**Note:** As this image is not based on the official home assistant add-on images the Supervisor has some delay on the add-on state (i guess this is the reason). -It might be up and running while the `Info` tab is not aware of this right now. Page reload might help. - -## TODO -* Get the panel integration working (if this is possible) -* Use some official base image (maybe running the buanet dockerfile onto office image work) - -## Technical notes -The `buanet` docker image contains some pretty useful startup script. - -To ensure data stays persistent across restarts I simply softlink `/data` to `/opt/iobroker`. -I removed some check that was not compatible with the symlink and not needed in our case. -I added the unmodified version as a reference. \ No newline at end of file +[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg +[i386-shield]: https://img.shields.io/badge/i386-no-red.svg diff --git a/ioBroker/config.json b/ioBroker/config.json index a7e9ce5..6fc3f9e 100644 --- a/ioBroker/config.json +++ b/ioBroker/config.json @@ -1,6 +1,6 @@ { "name": "ioBroker", - "version": "0.7.0", + "version": "0.8.0", "image": "maxwinterstein/homeassistant-addon-iobroker-{arch}", "webui": "http://[HOST]:[PORT:8081]/", "slug": "iobroker", @@ -11,8 +11,12 @@ "arch": ["armv7", "aarch64", "amd64"], "startup": "application", "boot": "auto", - "options": {}, - "schema": {}, + "options": { + "eval" : "" + }, + "schema": { + "eval" : "str?" + }, "ports": { "8081/tcp": 8081, "8082/tcp": null, diff --git a/ioBroker/iobroker_startup.sh b/ioBroker/iobroker_startup.sh index ac092fb..808fe66 100644 --- a/ioBroker/iobroker_startup.sh +++ b/ioBroker/iobroker_startup.sh @@ -10,13 +10,7 @@ if find /data/iobroker -maxdepth 0 -empty | read v; then cp -r -v /opt/iobroker_ori/* /opt/iobroker/ chown -R $SETUID:$SETGID /data/iobroker/ fi -## some debugging stuff -#echo --- -#ls -liah /opt/ -#echo --- -#ls -liah /data/iobroker -#echo --- -#ls -liah /opt/iobroker/ + # end hass addon custom mount block # Setting healthcheck status to "starting" @@ -497,6 +491,9 @@ echo ' ' echo "Starting ioBroker..." echo ' ' +echo "Running 'eval' commands" +eval $(jq -r .eval /data/options.json) + # Setting healthcheck status to "running" echo "running" > /opt/scripts/.docker_config/.healthcheck