Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation as HA Addon failed. #146

Open
imatzel opened this issue Jun 1, 2024 · 13 comments
Open

Installation as HA Addon failed. #146

imatzel opened this issue Jun 1, 2024 · 13 comments

Comments

@imatzel
Copy link

imatzel commented Jun 1, 2024

The problem

I have installed Home Assistant in an VM via Proxmox. When I tried to install HA-encoceanmqtt via HA Addons it fails:
"The command '/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip git && python3 -m venv /app/venv && . /app/venv/bin/activate && python3 -m pip install --upgrade pip && pip3 install pyyaml && pip3 install tinydb && pip3 install paho-mqtt==1.6.1 && pip3 install git+https://github.com/mak-gitdev/enocean.git && git clone -b master --single-branch --depth 1 https://github.com/embyt/enocean-mqtt.git && cd enocean-mqtt && python3 setup.py develop && cd .. && if [ "${BUILD_VERSION}" = "head" ]; then echo "Installing from repository head" && git clone -b develop --single-branch --depth 1 https://github.com/mak-gitdev/HA_enoceanmqtt.git ; else if [ -z "${BUILD_VERSION##..}" ]; then echo "Installing development version ${BUILD_VERSION%-}" ; else echo "Installing stable version ${BUILD_VERSION%-}" ; fi; wget -nv -O "/app.tar.gz" "https://github.com/mak-gitdev/HA_enoceanmqtt/archive/refs/tags/${BUILD_VERSION%-*}.tar.gz" && echo "Extracting /app.tar.gz" && tar xzf "/app.tar.gz" && rm "/app.tar.gz" && mv -v "HA_enoceanmqtt-${BUILD_VERSION%-}" HA_enoceanmqtt ; fi; cp -rf HA_enoceanmqtt/enoceanmqtt enocean-mqtt && rm -rf HA_enoceanmqtt' returned a non-zero code: 1"

What type of installation are you running?

Addon

What version of HA_enoceanmqtt has the issue?

0.1.28-2

What was the last working version of HA_enoceanmqtt?

none

What type of Home Assitant installation are you running?

Home Assistant OS

Anything in the logs that might be useful to solve the issue? (Strongly recommended if applicable)

No response

Additional information

No response

@Loudramin
Copy link

Same problem, i come from a fresh install

@Kijimuna
Copy link

Kijimuna commented Jun 2, 2024

Same here. When I do the commands mentioned in the error message manually, I fail in the step python3 setup.py develop as follows:

(venv) ➜  enocean-mqtt git:(master) python3 setup.py develop
Traceback (most recent call last):
  File "enocean-mqtt/setup.py", line 5, in <module>
    import setuptools
ModuleNotFoundError: No module named 'setuptools'

When I do pip3 install setuptools first, the command succeeds. So I guess the issue is a missing setuptools dependency.

@tomknocke
Copy link

Hi, can confirm the problem. Tried to install the Addon in a VM based Homeassistant OS running on Proxmox.
Error is the same as mentioned by imatzel.
In the moment i running the addon in another VM on same server without problem, but that addon was prevously installed on a physical pc 1 year ago. The VM is based on a full backup. Means i never tried to install the addon within the VM before.

Now i like to move that addon into another VM instance to build High Availbility based on my core instance in Proxmox. USB Passtrough is not possible anymore due that fact.

Any chance to overcome that problem? I'am not even sure if the problem is related to VM or not.

@Kijimuna
Copy link

Kijimuna commented Jun 6, 2024

I still think it is the missing dependency, but I rather think the root cause lies in https://github.com/embyt/enocean-mqtt and not in https://github.com/mak-gitdev/HA_enoceanmqtt.
Nevertheless, I tried out to install setuptools first and was able to install the addon on my Proxmox VM. Not sure if this is the correct way to solve the problem, but I created a Pull Request (to the addon), just in case you want to go that route: mak-gitdev/HA_enoceanmqtt-addon#1

@Genesis57
Copy link

Same problem with virtualbox :

Enregistreur: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:135
intégration: Home Assistant Supervisor (documentation, problèmes)
S'est produit pour la première fois: 08:45:17 (1 occurrences)
Dernier enregistrement: 08:45:17

Failed to to call /addons/57410c70_ha_enoceanmqtt_dev/install - The command '/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip git && python3 -m venv /app/venv && . /app/venv/bin/activate && python3 -m pip install --upgrade pip && pip3 install pyyaml && pip3 install tinydb && pip3 install paho-mqtt==1.6.1 && pip3 install git+https://github.com/mak-gitdev/enocean.git && git clone -b master --single-branch --depth 1 https://github.com/embyt/enocean-mqtt.git && cd enocean-mqtt && python3 setup.py develop && cd .. && if [ "${BUILD_VERSION}" = "head" ]; then echo "Installing from repository head" && git clone -b develop --single-branch --depth 1 https://github.com/mak-gitdev/HA_enoceanmqtt.git ; else if [ -z "${BUILD_VERSION##..}" ]; then echo "Installing development version ${BUILD_VERSION%-}" ; else echo "Installing stable version ${BUILD_VERSION%-}" ; fi; wget -nv -O "/app.tar.gz" "https://github.com/mak-gitdev/HA_enoceanmqtt/archive/refs/tags/${BUILD_VERSION%-*}.tar.gz" && echo "Extracting /app.tar.gz" && tar xzf "/app.tar.gz" && rm "/app.tar.gz" && mv -v "HA_enoceanmqtt-${BUILD_VERSION%-}" HA_enoceanmqtt ; fi; cp -rf HA_enoceanmqtt/enoceanmqtt enocean-mqtt && rm -rf HA_enoceanmqtt' returned a non-zero code: 1

Regards

@tomknocke
Copy link

I solved my problem in different way. I used a Homeassistant Backup just for the Addon created in Orginal(old) System. Afterwards i tried to restore that partial backup within the new VM. I have also added the repo before restore, to have same reference. In the first moment it caused error message, but after reboot the Addon was available and working. Hopefully next update will be also no problem. Lets wait and see.
Anyhow that bug should be fixed soon, because it prevents potential new users from using this great Addon.

@kibeki
Copy link

kibeki commented Jun 13, 2024

Anyhow that bug should be fixed soon, because it prevents potential new users from using this great Addon.

I am a new user for this addon and tried to install the addon on my HA raspi installation with same message from above.

@chi28170
Copy link

Same issue here, i have HAOS on virtual box updated and every time i try to install i get the same error. Off topic but im an Application Engineer in the Building automation line of work an would love a real bacnet integration. I program bacnet controllers inside the Tridium Niagara environment, and the GUI program blocks make life much easier.

@medicus07
Copy link

I still think it is the missing dependency, but I rather think the root cause lies in https://github.com/embyt/enocean-mqtt and not in https://github.com/mak-gitdev/HA_enoceanmqtt. Nevertheless, I tried out to install setuptools first and was able to install the addon on my Proxmox VM. Not sure if this is the correct way to solve the problem, but I created a Pull Request (to the addon), just in case you want to go that route: mak-gitdev/HA_enoceanmqtt-addon#1

Thanks for your advice... how to import the modified addon to Home Assistant?

@Scentyoo
Copy link

Scentyoo commented Jul 2, 2024

I have a very similar error when trying to install it. Using Home Assistant OS 12.4 and tried to install the Add-on EnOcean MQTT (dev) 0.1.28-2. Please help, how I can install the Addon?

The command '/bin/ash -o pipefail -c apk add --no-cache python3 py3-pip git && python3 -m venv /app/venv && . /app/venv/bin/activate && python3 -m pip install --upgrade pip && pip3 install pyyaml && pip3 install tinydb && pip3 install paho-mqtt==1.6.1 && pip3 install git+https://github.com/mak-gitdev/enocean.git && git clone -b master --single-branch --depth 1 https://github.com/embyt/enocean-mqtt.git && cd enocean-mqtt && python3 setup.py develop && cd .. && if [ "${BUILD_VERSION}" = "head" ]; then echo "Installing from repository head" && git clone -b develop --single-branch --depth 1 https://github.com/mak-gitdev/HA_enoceanmqtt.git ; else if [ -z "${BUILD_VERSION##*.*.*}" ]; then echo "Installing development version ${BUILD_VERSION%-*}" ; else echo "Installing stable version ${BUILD_VERSION%-*}" ; fi; wget -nv -O "/app.tar.gz" "https://github.com/mak-gitdev/HA_enoceanmqtt/archive/refs/tags/${BUILD_VERSION%-*}.tar.gz" && echo "Extracting /app.tar.gz" && tar xzf "/app.tar.gz" && rm "/app.tar.gz" && mv -v "HA_enoceanmqtt-${BUILD_VERSION%-*}" HA_enoceanmqtt ; fi; cp -rf HA_enoceanmqtt/enoceanmqtt enocean-mqtt && rm -rf HA_enoceanmqtt' returned a non-zero code: 1

Also the deprecated EnOcean MQTT throws an error when installing it. Other Add-ons install normally.

@Genesis57
Copy link

I temporary resolved the problem like this

With ssl terminal, clone the git project under addons directory, then modify Dockerfile in order to add the "pip install setuptools" command before launching setup.py.

Restart ha. The addon should be present in local addons. Then just install it by clicking install button.

Regards

@Verbatim589
Copy link

I'm a novice, so I don't know how to use linux and even less how to make a git clone. The ssl terminal can be found on home assistant or other tools.

Best regards

@Kijimuna
Copy link

Kijimuna commented Jul 8, 2024

@Verbatim589 In case you really don't want to tinker around with the terminal and git and the dockerfile, you could also install the addon from my fork (which includes the import of setuptools). I.e. in the Add-on registry configure https://github.com/kijimuna/HA_enoceanmqtt-addon instead of https://github.com/mak-gitdev/HA_enoceanmqtt-addon) when you install the AddOn.

That's how I've installed it on my Proxmox VM, but I would not really advice it, because the fork is just there while I am waiting for a proper-solution™ to pop up 😉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants