If this dir does not exist, Python install/compilation must have failed in the first place. As a common failure reason I recognised that it requires quite much space in /tmp. 1 GB worked reliable, which is default on DietPi with 50% of 2 GB RAM+swap.
However e.g. on my testing VMs I have disabled swapfile and 1 GB RAM enabled by default, which then leads to 512 MB /tmp and in ~50% of the cases this made Python build fail with "no space left on device".
Would be good to add this as a check, so if /tmp is below 1 GB, ask to change this on-the-fly and if RAM+swap is below 2 GB then, ask to increase swapfile so that 2 GB is reached.
And we should also error handle all pyenv and pip3 commands, to prompt with failure if anything fails instead of going on and running into harder to debug follow-up issues.
home assistant 404 error
Re: home assistant 404 error
Hello Experts, I am using Raspberry pi-2 & not much linux knowledge, please give me the workable simple guidelines how i can run Home Assistant on my Raspberry Pi-2. if there is any big issue in your side & you need time please give me approximate time line when it will be fixed on it. i do not want to use any other operating system as dietpi is working perfectly since more then two years on my setup. i have not use home Assistant before so that thing is also learning curve for me. so i want make solid dietpi foundation for it. please give me simple guideline to install Home Assistant on Raspberry PI-2
Re: home assistant 404 error
I too am having problems with 6.27. I honestly have no idea what I am doing but somehow get things working but this time around it is not working. The rest of the stuff running are fine.
I only went tontry HA due to Dollarama selling Incipio devices for cheap and I have no Apple products. I was hoping to get a friend with an iPhone over to get the devices connected to the wifi and go from there.
Fore getting a status readout of HA shows it is running but what seems odd to me is that the time to create for the webui is 0.0 seconds and that seems fast for a pi b3+ even if it is running of a 60gb 2.5inch HD.
What I am thinking I may have done is trying commands people posted without backing up first and without underatanding them. I know for a fact that I tried commands without going into the python enviroment.
OP have you tried a fresh install? That is my next goto step when I can get a time slot when the household is not going to use the pihole for a bit and I am homw from work+awake.
I only went tontry HA due to Dollarama selling Incipio devices for cheap and I have no Apple products. I was hoping to get a friend with an iPhone over to get the devices connected to the wifi and go from there.
Fore getting a status readout of HA shows it is running but what seems odd to me is that the time to create for the webui is 0.0 seconds and that seems fast for a pi b3+ even if it is running of a 60gb 2.5inch HD.
What I am thinking I may have done is trying commands people posted without backing up first and without underatanding them. I know for a fact that I tried commands without going into the python enviroment.
OP have you tried a fresh install? That is my next goto step when I can get a time slot when the household is not going to use the pihole for a bit and I am homw from work+awake.
Re: home assistant 404 error
I just fixed two bugs and ran a test install which works fine now.
Access to http://<local_IP>:8123 now works fine.
Code: Select all
dietpi-update -1 # When you are already on v6.27 to update to current dev code, else: https://github.com/MichaIng/DietPi/blob/dev/BRANCH_SYSTEM.md
dietpi-software reinstall 157
htop # Wait until CPU usage of HA process goes down
systemctl restart home-assistant # Required currently since first start fails to pull some Python module, no idea why...
htop # Wait until CPU usage of HA process goes down
Re: home assistant 404 error
thanks,
now its starts & working fine, thanks for all your help
now its starts & working fine, thanks for all your help
Re: home assistant 404 error
This ended up working for me. I had to run dietpi-software uninstall 157 and then clean up some things and then run through your steps a few times but it ended up working.MichaIng wrote: ↑Sat Nov 23, 2019 9:46 pm I just fixed two bugs and ran a test install which works fine now.Access to http://<local_IP>:8123 now works fine.Code: Select all
dietpi-update -1 # When you are already on v6.27 to update to current dev code, else: https://github.com/MichaIng/DietPi/blob/dev/BRANCH_SYSTEM.md dietpi-software reinstall 157 htop # Wait until CPU usage of HA process goes down systemctl restart home-assistant # Required currently since first start fails to pull some Python module, no idea why... htop # Wait until CPU usage of HA process goes down
Thank you for taking the time and effort to get this working.
Re: home assistant 404 error
I can confirm it works!
What is the best way to update HA, since the update script with this line doesn't work anymore:
su --shell /bin/bash --command "cd /srv/homeassistant; export PATH=\"/home/homeassistant/.pyenv/bin:\$PATH\"; eval \"\$(pyenv init -)\"; eval \"\$(pyenv virtualenv-init -)\"; pip3 install --upgrade --default-timeout=100 homeassistant" homeassistant
it reports:
bash: line 0: cd: /srv/homeassistant: No such file or directory
pyenv: no such command `virtualenv-init'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting homeassistant
Downloading https://www.piwheels.org/simple/homeass ... ne-any.whl (5.8MB)
ERROR: Package 'homeassistant' requires a different Python: 3.5.3 not in '>=3.6.1'
What is the best way to update HA, since the update script with this line doesn't work anymore:
su --shell /bin/bash --command "cd /srv/homeassistant; export PATH=\"/home/homeassistant/.pyenv/bin:\$PATH\"; eval \"\$(pyenv init -)\"; eval \"\$(pyenv virtualenv-init -)\"; pip3 install --upgrade --default-timeout=100 homeassistant" homeassistant
it reports:
bash: line 0: cd: /srv/homeassistant: No such file or directory
pyenv: no such command `virtualenv-init'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting homeassistant
Downloading https://www.piwheels.org/simple/homeass ... ne-any.whl (5.8MB)
ERROR: Package 'homeassistant' requires a different Python: 3.5.3 not in '>=3.6.1'
Last edited by novitibo on Sun Nov 24, 2019 4:08 pm, edited 1 time in total.
Re: home assistant 404 error
What can happen if we decided to go back from dev to master dev_gitbranch after successful HA/system python upgrade (and instalation of TasmoAdmin). Will dietpi-update 1 erase the work done under dev session (TasmoAdmin etc.)?MichaIng wrote: ↑Wed Nov 20, 2019 8:44 pm @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: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
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 something does not work as expected, please report, so I'll assist quickly, or you might want to restore the backup:Code: Select all
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /DietPi/dietpi.txt
Code: Select all
dietpi-backup -1
Re: home assistant 404 error
What is the best way to update HA within this new environment?
dietpi-software reinstall 157 or some other command?
using this script is ok? please test&reply
dietpi-software reinstall 157 or some other command?
using this script is ok? please test&reply
Code: Select all
#!/bin/bash
echo "Stopping Home Assistant..."
systemctl stop home-assistant
echo "Updating Home Assistant"
su --shell /bin/bash --command "cd /home/homeassistant; source /home/homeassistant/pyenv-activate.sh; pip3 install --upgrade --default-timeout=100 homeassistant" homeassistant
echo "Starting Home Assistant..."
systemctl restart home-assistant
echo "Home Assistant is ready!"
Re: home assistant 404 error
Exactly that should do it. I'll add a script like this with release which in case calls sudo to source the env activation and does the update. HA has no web based updater, has it?