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

Feature request: Add ability to set the branch of diyHue repo #15

Closed
HepoH3 opened this issue Mar 24, 2021 · 9 comments
Closed

Feature request: Add ability to set the branch of diyHue repo #15

HepoH3 opened this issue Mar 24, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@HepoH3
Copy link
Contributor

HepoH3 commented Mar 24, 2021

There is an implementation of new API which I would like to test, but it's currently in flask branch of the repo. It would be great if I will have an ability to checkout this addon onto this branch.

@maxbec
Copy link
Owner

maxbec commented Mar 25, 2021

I will implement a diyhue-addon-beta package! :)

@maxbec maxbec self-assigned this Mar 25, 2021
@maxbec maxbec added the enhancement New feature or request label Mar 25, 2021
@maxbec
Copy link
Owner

maxbec commented Mar 25, 2021

Added it in b28d2f1.

Can you please check if it is working? :)

@HepoH3
Copy link
Contributor Author

HepoH3 commented Mar 27, 2021

Hi, thank you!
Actually, I can see this addon, but can't install it.
Supervisor gives this backlog (and, ofc I did removed previous addon).

21-03-27 10:56:32 ERROR (SyncWorker_4) [supervisor.docker.addon] Build log: 
Step 1/31 : ARG BUILD_FROM=hassioaddons/base-python:5.3.4
Step 2/31 : FROM ${BUILD_FROM}
 ---> 079b535a3150
Step 3/31 : SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 ---> Using cache
 ---> 15e6292f5526
Step 4/31 : ARG BUILD_ARCH=aarch64
 ---> Using cache
 ---> ff97626fcb8f
Step 5/31 : ENV BUILD_ARCHI = ${BUILD_ARCH}
 ---> Using cache
 ---> a0c2dc844efc
Step 6/31 : ENV LANG C.UTF-8
 ---> Using cache
 ---> 66428706c737
Step 7/31 : ENV DIYHUE_VERSION=master
 ---> Using cache
 ---> b755805d91a4
Step 8/31 : ENV WORKING_DIR=/opt/hue-emulator
 ---> Using cache
 ---> f9f2dfdfedc3
Step 9/31 : RUN mkdir diyhue config ${WORKING_DIR}
 ---> Using cache
 ---> f0175812e5e7
Step 10/31 : RUN apk add -q -u python3 openssl nmap psmisc iproute2 alpine-sdk build-base
 ---> Using cache
 ---> 1dd8c8634a9c
Step 11/31 : RUN curl -J -L -o $diyhue.tar.gz "https://github.com/diyhue/diyHue/archive/refs/heads/flask.tar.gz" 	&& tar xzvf $diyhue.tar.gz --strip-components=1 -C diyhue 	&& rm -rf $diyhue.tar.gz 	&& pip3 install -r /diyhue/requirements.txt --no-cache-dir
 ---> Using cache
 ---> 619f22bb9ecd
Step 12/31 : WORKDIR /opt/hue-emulator
 ---> Using cache
 ---> dc6407bc0f10
Step 13/31 : RUN mv /diyhue/BridgeEmulator/web-ui/ 											./web-ui/
 ---> Running in 0057bd07741c
mv: can't rename '/diyhue/BridgeEmulator/web-ui/': No such file or directory

@HepoH3
Copy link
Contributor Author

HepoH3 commented Mar 27, 2021

I really don't know what the problem. I checked diyhue vs diyhue-flask folders — they pretty same, I don't understand why installation so differ.
Here log when I tried to install flask and then installed dev

21-03-27 21:57:10 INFO (SyncWorker_5) [supervisor.docker.addon] Starting build for 201c4c89/amd64-addon-diyhue-beta-flask:1.4.0
21-03-27 21:57:13 ERROR (SyncWorker_5) [supervisor.docker.addon] Can't build 201c4c89/amd64-addon-diyhue-beta-flask:1.4.0: The command '/bin/bash -o pipefail -c mv /diyhue/BridgeEmulator/web-ui/ 											./web-ui/' returned a non-zero code: 1
21-03-27 21:57:13 ERROR (SyncWorker_5) [supervisor.docker.addon] Build log: 
Step 1/31 : ARG BUILD_FROM=hassioaddons/base-python:5.3.4
Step 2/31 : FROM ${BUILD_FROM}
 ---> 079b535a3150
Step 3/31 : SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 ---> Using cache
 ---> 15e6292f5526
Step 4/31 : ARG BUILD_ARCH=aarch64
 ---> Using cache
 ---> ff97626fcb8f
Step 5/31 : ENV BUILD_ARCHI = ${BUILD_ARCH}
 ---> Using cache
 ---> a0c2dc844efc
Step 6/31 : ENV LANG C.UTF-8
 ---> Using cache
 ---> 66428706c737
Step 7/31 : ENV DIYHUE_VERSION=master
 ---> Using cache
 ---> b755805d91a4
Step 8/31 : ENV WORKING_DIR=/opt/hue-emulator
 ---> Using cache
 ---> f9f2dfdfedc3
Step 9/31 : RUN mkdir diyhue config ${WORKING_DIR}
 ---> Using cache
 ---> f0175812e5e7
Step 10/31 : RUN apk add -q -u python3 openssl nmap psmisc iproute2 alpine-sdk build-base
 ---> Using cache
 ---> 1dd8c8634a9c
Step 11/31 : RUN curl -J -L -o $diyhue.tar.gz "https://github.com/diyhue/diyHue/archive/refs/heads/flask.tar.gz" 	&& tar xzvf $diyhue.tar.gz --strip-components=1 -C diyhue 	&& rm -rf $diyhue.tar.gz 	&& pip3 install -r /diyhue/requirements.txt --no-cache-dir
 ---> Using cache
 ---> 619f22bb9ecd
Step 12/31 : WORKDIR /opt/hue-emulator
 ---> Using cache
 ---> dc6407bc0f10
Step 13/31 : RUN mv /diyhue/BridgeEmulator/web-ui/ 											./web-ui/
 ---> Running in fc80e7eea141
mv: can't rename '/diyhue/BridgeEmulator/web-ui/': No such file or directory

Removing intermediate container fc80e7eea141

21-03-27 21:57:27 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/201c4c89_diyhue-beta
21-03-27 21:57:27 INFO (SyncWorker_5) [supervisor.docker.addon] Starting build for 201c4c89/amd64-addon-diyhue-beta:1.4.0
21-03-27 21:58:34 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'mqtt_user'
21-03-27 21:58:34 INFO (MainThread) [supervisor.auth] Successful login for 'mqtt_user'
21-03-27 21:59:21 INFO (SyncWorker_5) [supervisor.docker.addon] Build 201c4c89/amd64-addon-diyhue-beta:1.4.0 done
21-03-27 21:59:21 INFO (MainThread) [supervisor.addons] Add-on '201c4c89_diyhue-beta' successfully installed

One could see that actually start of installation log of dev slightly different from flask — it has a line:
21-03-27 21:57:27 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons
I don't know why there is no such line for flask intallation, but maybe that the problem.

@maxbec
Copy link
Owner

maxbec commented Mar 29, 2021

Thank you @HepoH3, i will check that.

@maxbec
Copy link
Owner

maxbec commented Apr 5, 2021

Hey @HepoH3,

I just checked the flask repo from diyhue. It differs to the diyhue master repo a lot. The error is that there is no more web-ui folgder in BridgeEmulator... But flaskUI. I changed that but i don't know if there are other things to change.

maxbec added a commit that referenced this issue Apr 5, 2021
Signed-off-by: Max Beckenbauer <max.bec92@gmail.com>
@maxbec maxbec closed this as completed Apr 5, 2021
@HepoH3
Copy link
Contributor Author

HepoH3 commented Apr 5, 2021

Hi @maxbec, thank you for reply and fix!
Yep, now when I get how it's work, that step is passed, but there is another problem: there is no protocols folder in flask branch. Dir structure is actually a lot different, so I don't now is it possible to make it all work without much pain.
But when Flask branch will eventually merged into the master this problem will still remain, but in the master addon instead.

@HepoH3
Copy link
Contributor Author

HepoH3 commented Apr 5, 2021

One more little thing (don't want to open issue for this): in the config tab, placeholder for the mac addres five hexademical numbers has been used instead of six — XX:XX:XX:XX:XX instead of XX:XX:XX:XX:XX:XX. If someone replaced x with numbers, the addons will not work and they will don't really know what's going on untill looking in the logs.

@maxbec
Copy link
Owner

maxbec commented Apr 5, 2021

Oh thank you very much for the hint!!!

HepoH3 added a commit to HepoH3/hassio-diyHue that referenced this issue Jun 24, 2021
HepoH3 added a commit to HepoH3/hassio-diyHue that referenced this issue Jun 24, 2021
HepoH3 added a commit to HepoH3/hassio-diyHue that referenced this issue Jun 24, 2021
maxbec pushed a commit that referenced this issue Aug 16, 2021
* Update config.json

* Update repository.json

* Update config.json

* Switch flask branch to beta and fix it's dir structure

See:
#21
#15

* Revert host_network:true for beta branch

See: #18

* Fix mac placeholders

Number of 'XX' in the placeholder was incorrect. It should be 6 instead
of 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants