home assistant 404 error

Having issues with your DietPi installation, or, found a bug? Post it here.
mail2rst
Posts: 48
Joined: Fri Apr 13, 2018 4:53 pm

home assistant 404 error

Post by mail2rst »

Hi,
I am using dietpi since more then two years on my Raspberry pi-2. I am running following things on it headless,
# plex server
# pihole
# Pro FTP server

I have installed home automation software form dietpi-software last week
in HTOP command i am able to see some home assistant applications working but dietpi_IP_URL:8123 page show me
404 error
so in end i am not able to access home assistant page. please help me to fine tune this error so that i can access home assistant also on my raspberry pi.
thanks

mail2rst
Posts: 48
Joined: Fri Apr 13, 2018 4:53 pm

Re: home assistant 404 error

Post by mail2rst »

according to home assistant website this software need to run on same machine. so is dietipi-software is broken for installing homeassistant software? please guide me . is i have to install all these software individually

DEBIAN/UBUNTU

apparmor-utils
apt-transport-https
avahi-daemon
ca-certificates
curl
dbus
jq
socat
software-properties-common
Optional:

network-manager

mail2rst
Posts: 48
Joined: Fri Apr 13, 2018 4:53 pm

Re: home assistant 404 error

Post by mail2rst »

no success, i think there is a compatibility issue between diet pi & home assistant software, it should be better if dietpi administrator look in to matter & check where the issue. also worth for them to give some general guidelines if we need to fine tune our side like missing package or update something, thanks

User avatar
MichaIng
Site Admin
Posts: 2199
Joined: Sat Nov 18, 2017 6:21 pm

Re: home assistant 404 error

Post by MichaIng »

@mail2rst
There is a bug on Home Assistant side currently, see: https://github.com/MichaIng/DietPi/issu ... -550532477

You can test our workaround and some other enhancements:

Code: Select all

dietpi-backup # Please update/create a backup first
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=dev' /DietPi/dietpi.txt
dietpi-update 1
dietpi-software reinstall 157
If everything works well, you might want to leave it but have the next stable DietPi release installed over the development version:

Code: Select all

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /DietPi/dietpi.txt
If something does not work as expected, please report, so I'll assist quickly, or you might want to restore the backup:

Code: Select all

dietpi-backup -1

mail2rst
Posts: 48
Joined: Fri Apr 13, 2018 4:53 pm

Re: home assistant 404 error

Post by mail2rst »

No, even i made these changes system not want to run home assistant. the opening of home assistant software failed now, upto yesterday in htop i am able to see homeassistant software running. but now it is failed in stating, screen shots attached
Attachments
dietpi3.jpg
dietpi2.jpg
dietpi1.jpg

novitibo
Posts: 51
Joined: Mon Feb 29, 2016 5:11 pm

Re: home assistant 404 error

Post by novitibo »

My test shows now:

DietPi-Services
─────────────────────────────────────────────────────
Mode: status home-assistant

[FAILED] DietPi-Services | ● home-assistant.service - Home Assistant (DietPi)
Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-11-21 14:19:52 CET; 12min ago
Process: 1317 ExecStart=/home/homeassistant/homeassistant-start.sh (code=exited, status=2)
Main PID: 1317 (code=exited, status=2)

Nov 21 14:19:52 DietPi systemd[1]: Started Home Assistant (DietPi).
Nov 21 14:19:52 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 21 14:19:52 DietPi systemd[1]: home-assistant.service: Unit entered failed state.
Nov 21 14:19:52 DietPi systemd[1]: home-assistant.service: Failed with result 'exit-code'.

and HA wont start even after service restart or system reboot

even HA uninstall/install doesn't help - HA service won't start

novitibo
Posts: 51
Joined: Mon Feb 29, 2016 5:11 pm

Re: home assistant 404 error

Post by novitibo »

just found out - folder /home/homeassistant/.pyenv/versions wasn't created with HA reinstall (instalation runs too fast :))

tried also:
[email protected]:/home/tibo$ pip3 install home-assistant-frontend==20191025.1
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20191025.1
Downloading https://www.piwheels.org/simple/home-as ... ne-any.whl (29.8MB)
|████████████████████████████████| 29.8MB 22kB/s
Installing collected packages: home-assistant-frontend
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/home_assistant_frontend-20191025.1.dist-info'
Consider using the `--user` option or check the permissions.

and

[email protected]:/home/tibo$ pip3 install home-assistant-frontend==20191119.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting home-assistant-frontend==20191119.2
Downloading https://www.piwheels.org/simple/home-as ... ne-any.whl (30.4MB)
|████████████████████████████████| 30.4MB 23kB/s
Installing collected packages: home-assistant-frontend
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/home_assistant_frontend-20191119.2.dist-info'
Consider using the `--user` option or check the permissions.
Last edited by novitibo on Thu Nov 21, 2019 5:11 pm, edited 3 times in total.

mail2rst
Posts: 48
Joined: Fri Apr 13, 2018 4:53 pm

Re: home assistant 404 error

Post by mail2rst »

if you find the solution & system works for you, please help me what things i have to change to make system workable for home assistant

User avatar
MichaIng
Site Admin
Posts: 2199
Joined: Sat Nov 18, 2017 6:21 pm

Re: home assistant 404 error

Post by MichaIng »

Guys, all pip3 installs need to be done as homeassistant user within the activated pyenv.
The frontend version as well need to match, which is 20191029 AFAIK.
However all fixes should be included in the DietPi dev branch, which you can apply via below described steps.

novitibo
Posts: 51
Joined: Mon Feb 29, 2016 5:11 pm

Re: home assistant 404 error

Post by novitibo »

how can we activate pyenv with command:
source /home/homeassistant/.pyenv/versions/3.8.0/envs/homeassistant-3.8.0/bin/activate
since there's no folder /home/homeassistant/.pyenv/versions?

Post Reply