diyhue / diyHue

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

Diyhue did not start after installing on a fresh system #928

Open D3ltorohd opened 10 months ago

D3ltorohd commented 10 months ago

Issue does not already exist?

No, I did not search

Select Environment

Install Script

Home Assistant related?

No

Description

I have create an LXC on my proxmox system. So after fresh creating i install diyhue with the script.

after that it will not start. The install seems to be done with no errors. I have installed both, master and dev. Always on a new created lxc container.

Greet's D3

Errorlog:

Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.3 WTForms-3.0.1 Werkzeug-2.0.3 aniso8601-9.0.1 anyio-1.3.1 astral-2.2 async-generator-1.10 async-timeout-4.0.3 asyncclick-8.1.3.4 bleak-0.14.3 chardet-3.0.4 click-8.1.7 dbus-next-0.2.3 dnspython-2.4.2 email-validator-1.1.3 flask-2.0.3 flask-cors-3.0.10 flask-login-0.5.0 flask-restful-0.3.9 flask-wtf-1.0.0 future-0.18.3 idna-2.7 ifaddr-0.2.0 importlib-metadata-6.8.0 itsdangerous-2.1.2 jsonify-0.5 paho-mqtt-1.6.1 python-kasa-0.4.1 pytz-2023.3 pyyaml-6.0 requests-2.20.0 rgbxy-0.5 sniffio-1.3.0 urllib3-1.24.3 ws4py-0.5.1 yeelight-0.7.13 zeroconf-0.38.3 zipp-3.16.2
bonding_masters
WARNING!  2 network interfaces detected. A certificate will be generated based on the interface MAC address you select.
If you don't know what to choose then you can try the default interface eth0.
1) bonding_masters
2) eth0
Please choose the interface that will communicate with the Hue apps: 2
eth0
Generating certificat for MAC 76:26:75:75:dd:bd
If this is a diyhue reinstallation process then you will need to reinstall official Hue apps from PC and phone in order to wipe old certificate.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   671  100   671    0     0   2077      0 --:--:-- --:--:-- --:--:--  2077
Generating an EC private key
writing new private key to 'private.key'
-----
Created symlink /etc/systemd/system/multi-user.target.wants/hue-emulator.service -> /lib/systemd/system/hue-emulator.service.
 Installation completed. Open Hue app and search for bridges.
smarthome@diyhue:~$ sudo systemctl status hue-emulator.service
* hue-emulator.service - Hue Emulator Service
     Loaded: loaded (/lib/systemd/system/hue-emulator.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2023-08-21 17:58:48 UTC; 17s ago
    Process: 14987 ExecStart=/opt/hue-emulator/HueEmulator3.py (code=exited, status=1/FAILURE)
   Main PID: 14987 (code=exited, status=1/FAILURE)
        CPU: 515ms

Aug 21 17:58:48 diyhue systemd[1]: hue-emulator.service: Main process exited, code=exited, status=1/FAILURE
Aug 21 17:58:48 diyhue systemd[1]: hue-emulator.service: Failed with result 'exit-code'.

Steps to reproduce

install -> lock with status and see the error.

Please enter your operating system details here

Debian 11

What DiyHue version(branch) are you using?

dev

mariusmotea commented 10 months ago

Hi,

Can you execute sudo /opt/hue-emulator/HueEmulator3.py to see what error you get?

D3ltorohd commented 10 months ago

I hope thats right. Sorry for the late answer.

smarthome@iobroker:~$ sudo /opt/hue-emulator/HueEmulator3.py Traceback (most recent call last): File "/opt/hue-emulator/HueEmulator3.py", line 2, in <module> from flask import Flask ModuleNotFoundError: No module named 'flask'

mariusmotea commented 10 months ago

If you manually run pip3 install flask what messages you get?

saxesn commented 8 months ago

i get username@raspberrypi:~ $ pip install flask==2.0.3 error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override y passing --break-system-packages. hint: See PEP 668 for the detailed specification.

if i add "--break-system-packages" to the install script the packages will be installed