vanackej / risco-mqtt-local

Provide Risco alarm system integration to Home assistant using local TCP communication (no cloud required) and MQTT
MIT License
24 stars 11 forks source link

HA add-on won't start #27

Closed bugzke closed 2 years ago

bugzke commented 2 years ago

Describe the bug I'm stuck in getting the add-on to run in Home Assistant. Installation of the add-on works fine, and even got an update notification a few days ago, so that seems ok. However when I try to start the add-on, I immediately get errors that it fails to start. risco-mqtt.json is in place in the config folder, but whether or not it is there, same result. Any idea what I'm missing here? The logs don't tell much, except it fails to start.

Configuration

Logs In the add-on log;

[FATAL tini (8)] exec docker-entrypoint.sh failed: Exec format error

In the HA supervisor log:

22-03-02 19:31:20 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker add-on c774f33c/aarch64-addon-risco-mqtt-local-addon with version 0.4.1
22-03-02 19:31:21 ERROR (SyncWorker_7) [supervisor.docker.interface] Container addon_c774f33c_risco-mqtt-local-addon is not running
vanackej commented 2 years ago

@felipecrs I suppose this is related to HA Addon docker images packaging. Do you have any idea what could cause this ? @bugzke On what architecture/hardware is your HA system running ?

felipecrs commented 2 years ago

Architecture can be one possible issue indeed. I have only tested it on amd64.

felipecrs commented 2 years ago

From what I saw, the CI is only building amd64 anyway, so you have to either remove all the unsupported archs from the list:

https://github.com/vanackej/risco-mqtt-local/blob/7c29e6eb82e963edccb9d1ee7f9d639e26e63bd9/risco-mqtt-local-addon/config.yaml#L6-L11

Or to make the pipeline build them. Here is how:

https://github.com/home-assistant/addons-example/blob/main/.github/workflows/builder.yaml

bugzke commented 2 years ago

I run HA on a pi3b+ aarch64

teruggim commented 2 years ago

Good morning, also on my Raspberry Pi4 it gives me the same problem.

System Health

version core-2022.3.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.9
os_name Linux
os_version 5.10.92-v8
arch aarch64
timezone Europe/Rome
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4846 Installed Version | 1.23.0 Stage | running Available Repositories | 1069 Downloaded Repositories | 24
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 7.4 -- | -- update_channel | stable supervisor_version | supervisor-2022.01.1 docker_version | 20.10.9 disk_total | 146.0 GB disk_used | 49.6 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Check Home Assistant configuration (3.10.0), File editor (5.3.3), Grafana (7.4.1), Home Assistant Google Drive Backup (0.105.2), InfluxDB (4.3.0), Log Viewer (0.12.2), Mosquitto broker (6.0.1), Samba share (9.5.1), ESPHome (2022.2.6), DSS VoIP Notifier (3.5.9), SSH & Web Terminal (10.0.2), MariaDB (2.4.0), AppDaemon 4 (0.8.1), Studio Code Server (4.1.0), Risco local MQTT (0.4.1)
Lovelace dashboards | 11 -- | -- resources | 15 views | 18 mode | storage
teruggim commented 2 years ago

Good morning @vanackej If it helps you, I added the HA addon locally on Rpi4. I replaced the Dockerfile with the v0.3.4 by adding the line: ENV RISCO_MQTT_HA_CONFIG_FILE = "/config/risco-mqtt.json" I added the build.yaml and run.sh files from V0.3.4. And the addon seems to work. Dockerfile.txt run.sh.txt build.yaml.txt

Debug Log HA log.txt

2022-03-06 (11) 2022-03-06 (13) 2022-03-06 (14)

tetionet commented 2 years ago

Hello, same issue here. @teruggim what do you mean for replace docker file?

richardcastle commented 2 years ago

Yep. Same issue here on RPI 4. Not too familiar with the alternative setup proposed @teruggim, could you elaborate the steps for us folks itching to give this a go please?

teruggim commented 2 years ago

Good morning @richardcastle and @tetionet, unfortunately I don't know if it works with the latest versions because I don't use RPI4 anymore. Download repository risco-mqtt-local in zip format. Extract the risco-mqtt-local-main folder and save it via SambaShare in \IP_RPI4\addons

Download RPI4.zip Extract the Dockerfile run.sh build.yaml files inside \IP_RPI4\addons\risco-mqtt-local-main With Supervisor install as a local addon.

ekkesa commented 2 years ago

Good morning @richardcastle and @tetionet, unfortunately I don't know if it works with the latest versions because I don't use RPI4 anymore. Download repository risco-mqtt-local in zip format. Extract the risco-mqtt-local-main folder and save it via SambaShare in \IP_RPI4\addons

Download RPI4.zip Extract the Dockerfile run.sh build.yaml files inside \IP_RPI4\addons\risco-mqtt-local-main With Supervisor install as a local addon.

I followed this instructions, but it still fails to start on RPi4. I tried both the files from the Zip file and the individual downloads.

Any suggestions?

bugzke commented 2 years ago

Good morning @richardcastle and @tetionet, unfortunately I don't know if it works with the latest versions because I don't use RPI4 anymore. Download repository risco-mqtt-local in zip format. Extract the risco-mqtt-local-main folder and save it via SambaShare in \IP_RPI4\addons Download RPI4.zip Extract the Dockerfile run.sh build.yaml files inside \IP_RPI4\addons\risco-mqtt-local-main With Supervisor install as a local addon.

I followed this instructions, but it still fails to start on RPi4. I tried both the files from the Zip file and the individual downloads.

Any suggestions?

Unfortunately no success on RPI3B+ either

skank01 commented 2 years ago

Same issue here on rpi4 :( Pity its not straigt forward

vanackej commented 2 years ago

Multi architecture build is not yet in place. I don't have time currently to set it up, but pull requests are welcome 👍

Le dim. 3 juil. 2022 à 22:04, skank01 @.***> a écrit :

Same issue here on rpi4 :( Pity its not straigt forward

— Reply to this email directly, view it on GitHub https://github.com/vanackej/risco-mqtt-local/issues/27#issuecomment-1173162733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECPHIA722DZLCMUTW3UK3VSHW3RANCNFSM5P2Y2MKA . You are receiving this because you were mentioned.Message ID: @.***>

skank01 commented 2 years ago

@vanackej it seems that @teruggim has solved or found a fix for it, can you include it?

vanackej commented 2 years ago

The fix provided by @teruggim is more a workaround than a fix I can integrate in the addon itself. I just realeased v0.4.3 with an attempt to provide aarch64 compatibility. Can someone give it a try and let me know ?I don't have any raspberry setup to try by myself

bugzke commented 2 years ago

I think we have a winner! Add-on starting (I guess the error is as expected as I haven't set up the config file yet, will try to set it up further when I have some more time)

Loading config from: /config/risco-mqtt.json Startup error SyntaxError: /config/risco-mqtt.json: Unexpected token / in JSON at position 21 at parse () at Object.Module._extensions..json (node:internal/modules/cjs/loader:1173:22) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/app/dist/main.js:23:24) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32)

vanackej commented 2 years ago

Good to know. You should be able to add the conf file now

ekkesa commented 2 years ago

Excuse if it is a stupid question, but where is version 0.4.3? Under releases the newest option shows 0.4.2/

Thank you!

EDIT: Nevermind - found it I was using the local build of 0.4.2 for RPi.

ekkesa commented 2 years ago

I can confirm this now works on RPi4. Thank you!

vanackej commented 2 years ago

Ok, so I close this issue for now, please reopen specific issues if needed