Home assistant wont boot after loss of power

I hade a loss of power in my RP3 and after that my HA session wont boot although Rasbian starts normaly.
In the log i dont see any particular errors and when i check my configuration for errors with hass --script check_config
nothing special pops up.
I also did a backup of my sd card before that, but i dont see how this could affect this.
Any ideas what may have be the problem?

Possible SD card corruption. In this case you pretty much need to reinstall, raspbian booting is a good sign though!

So maybe try to find the problem first before jumping into a full rebuild.

If you rename your hass config file to something else (to back it up and hide it from hass) you can try and start HA and see if it starts up clean, it will make a new config. If it does boot up then you can reinstate your old config and go through and try to find the component stopping hass from starting.

To do this I tend to disable everything except the very basics by commenting out the lines as I have a split config and then enabling them one at a time and rebooting until Hass will not boot, then I can identify it. Last time I did this it was in media players and I resolved it to platform: cast , fortunately, for me it was not needed.

What does the following command show:

sudo systemctl status home-assistant

The key lines are the top 6 or so. In my case, with a running HA service, it shows:

â—Ź home-assistant.service - Home Assistant
   Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled)
   Active: active (running) since Sun 2017-01-08 09:42:37 UTC; 2h 10min ago
 Main PID: 8387 (hass)
   CGroup: /system.slice/home-assistant.service
           └─8387 /srv/homeassistant/homeassistant_venv/bin/python3 /srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant
1 Like

Last login: Sun Jan 8 10:26:46 2017 from 192.168.1.154

pi@raspberrypi:~ $ sudo systemctl status home-assistant
â—Ź home-assistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled)
Active: active (running) since Sun 2017-01-08 09:17:04 CET; 4h 38min ago
Main PID: 527 (hass)
CGroup: /system.slice/home-assistant.service
└─527 /srv/hass/hass_venv/bin/python3 /srv/hass/hass_venv/bin/hass…

I think this is ok i guess

That suggests it’s running. What do the following commands show (use the preformatted text option when including the output, to make it easier to read please):

sudo ps -efl | grep homea
sudo netstat -plnt | grep python
pi@raspberrypi:~ $ sudo ps -efl | grep homea
4 S hass       534     1  0  80   0 - 32262 SyS_ep 14:00 ?        00:00:07 /srv/                                                                       hass/hass_venv/bin/python3 /srv/hass/hass_venv/bin/hass -c /home/hass/.homeassis                                                                       tant
0 S pi        2360  2349  0  80   0 -  1070 pipe_w 14:12 pts/0    00:00:00 grep                                                                        --color=auto homea

THe second command doesnt do anything

So, regardless of what systemd thinks, it looks like HA isn’t running. Can you double check with:

ps -efl | grep " 527 "
pi@raspberrypi:~ $ ps -efl | grep " 527 "
0 S pi       12507 12488  0  80   0 -  1069 pipe_w 11:28 pts/0    00:00:00 grep                                                                        --color=auto  527

by elimination i have found that the harmony plugin was causing the trouble.

Now i need to find out why