Git Product home page Git Product logo

Comments (7)

danielwelch avatar danielwelch commented on August 23, 2024 1

Great, glad you got it working. @dzungpv I recommend reading the homeassistant dev docs on creating and add-on, particularly the first bit on local add-on testing and development in this case. Without knowing more details, it’s difficult to help. Logs are usually helpful; in the case above they pointed out the step in the Dockerfile that caused a problem.

from hassio-zigbee2mqtt.

danielwelch avatar danielwelch commented on August 23, 2024

If you’re using it as a local add-on, you’ll need to make changes to the config.json file as well. Without more info, I’d guess that the add-on isn’t actually building locally, but is using the image on docker hub published by me, consistent with the instructions of the configuration file.

from hassio-zigbee2mqtt.

mihalski avatar mihalski commented on August 23, 2024

Ahh.. I suspected something like that after I couldn't get it to work.
Originally I thought that the Docker file gets built locally and the git clone is done as part of the install. Seems that's not the case?
Literally the only change I wish to make is to one of the files in lib/homeassistant.js.
Is there a way to force the build of the docker container locally? I have not yet tried but I assume it's not as easy as removing the "image": "dwelch2101/zigbee2mqtt-edge-{arch}" in the config.json?

from hassio-zigbee2mqtt.

danielwelch avatar danielwelch commented on August 23, 2024

Yes, your understanding is partially correct. That is what happens, unless the add-on is specifies an image in the config. But the good news is, yes, it’s that easy. You should just have to remove that line and, assuming everything is setup in the right location for local add-ons, it should build locally. You can always check the logs for some hints on what’s going on during installation.

from hassio-zigbee2mqtt.

dzungpv avatar dzungpv commented on August 23, 2024

I want this too, try to build from your config but not work. Can you provide detail step by step to build the image @danielwelch ?
Due to this feature not complete Koenkk/zigbee2mqtt#232, pull request accept slow , i want to build my own image for testing hassio

from hassio-zigbee2mqtt.

mihalski avatar mihalski commented on August 23, 2024

I tried the suggested approach and after an extended wait the build/run failed with the following error:

18-09-11 07:57:37 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/local_zigbee2mqtt-edge
18-09-11 07:57:37 INFO (SyncWorker_0) [hassio.docker.addon] Start build local/armhf-addon-zigbee2mqtt-edge:test
18-09-11 08:05:54 ERROR (SyncWorker_0) [hassio.docker.addon] Can't build local/armhf-addon-zigbee2mqtt-edge:test: COPY failed: stat /var/lib/docker/tmp/docker-builder581565988/run.sh: no such file or directory

Here are the files I used: zigbee2mqtt-unique_id.zip

Any ideas what happened here?

from hassio-zigbee2mqtt.

mihalski avatar mihalski commented on August 23, 2024

And the solution.. Surely obvious if you know what you're doing...

Copy run.sh and set_config.py from the zigbee2mqtt directory to the zigbee2mqtt-edge directory (then the zigbee2mqtt-edge directory to the local addon directory).

Now when you build it will succeed, and use the repository specified in the Dockerfile.

from hassio-zigbee2mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.