diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.55k stars 275 forks source link

OpenWRT install script updated. #852

Closed FerrumMaster closed 1 year ago

FerrumMaster commented 1 year ago

I am trying to install it on openwrt.

The install script totally doesn't match the current git. Zips archive not present, web-ui to flask migration.

Please remove it if you are not willing to maintain it anymore.

close-issue-app[bot] commented 1 year ago

This issue was automatically closed because the issue template was not filled out or because you have not confirmed you have read all parts of the checklist. To ensure we are able to properly support you, please make sure that you are posting in the right place and to fill out the issue template so that a bunch of standard questions don't need to be asked again each time. Thank you for taking the time to report a bug/feature/help request, hopefully it can be resolved soon. This issue will not be reviewed, so if you need further assistance, please create a new issue, following the template.

juanesf commented 1 year ago

The problem should be fixed, the instructions in the documentation point to the script "easy_openwrt.sh" so you should use: wget --no-check-certificate https://raw.githubusercontent.com/diyhue/diyHue/master/BridgeEmulator/install_openwrt.sh && sh install_openwrt.sh

FerrumMaster commented 1 year ago

Thanks Juan.

I managed to get it working.

My few suggestions.

It needs Python3 >= 3.8 otherwise pyyaml breaks on 3.7. My Router had that version. Okay. did a snapshot of the latest stable 22.0.3.0 from scratch, not the factory build.

I did the script manually step by step, as running it at once failed for me. The requirements.txt file should be installed manually according to your device, as it usually failed first, first of all some parts are in my opkg repo without any need to compile, then install the missing ones via pip command. Using python3 -m pip install -r caused me error(a simple error code -1 without any log or additional info) also using plain pip install xxx, worked fine. Could be platform specific.

The last step via nano edit(nano /etc/config/uhttpd). It should be done like that. More elegant.

uci -q delete uhttpd.main.listen_http uci add_list uhttpd.main.listen_http="0.0.0.0:8080" uci add_list uhttpd.main.listen_http="[::]:8080" uci -q delete uhttpd.main.listen_https uci add_list uhttpd.main.listen_https="0.0.0.0:8443" uci add_list uhttpd.main.listen_https="[::]:8443" uci commit uhttpd /etc/init.d/uhttpd restart

Also there is no /etc/lighttpd/lighttpd.conf file in latest OpenWRT builds to edit. Can be skipped.

Also I had to toggle many times the service enable, till it really was enabled after reboot. That's esoteric, I didn't find a clue why. I suspected nohup param before python3 in the service script, but I guess really not.

Next thing is minimum HW requirements. This install script cannot be installed on a 128MB RAM router. It will fail at installing bleak dependency. Enabling SWAP the most easy fix, but it is usually disabled. In the end with some HW mods it runs on a spartan gl-inet microuter-n300.

So the front page guide needs fixing also for any newcomers. Also some signs with dragons ahead.

juanesf commented 1 year ago

Hi @FerrumMaster. Thanks for the suggestions, I'll check it out...

If you want to continue helping and comment, I would be very grateful for your help. You could also enter the Slack group to keep in touch in case you need it.