[Answered] home assistant

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
pakikje
Posts: 73
Joined: Fri Nov 11, 2016 2:04 pm

[Answered] home assistant

Post by pakikje » Wed Dec 05, 2018 9:39 am

Hello,

I installed Homeasssistant via dietpi-software (runs great). I also updated it several times (v 0.83.1) . I was wondering how homeassistant starts at boot-time/reboot?

In htop i see this: /usr/bin/python3 /usr/local/bin/hass -v -config /opt/homeassistant --pidfile /var/run/hass.pid --daemon

Basically i want to stop/start homeassistant from the command line...

Thnx!

User avatar
k-plan
Posts: 412
Joined: Sun Feb 28, 2016 4:28 pm

Re: home assistant

Post by k-plan » Wed Dec 05, 2018 1:34 pm

Hi,
pakikje wrote:
Wed Dec 05, 2018 9:39 am
Basically i want to stop/start homeassistant from the command line...
Use dietpi-services

Code: Select all

:~# dietpi-services
[  OK  ] DietPi-Services | Root access verified.

 DietPi-Services
─────────────────────────────────────────────────────
 Mode:

[ INFO ] DietPi-Services | Invalid command
Available options:

 - start/stop/restart/status            (all services, known to DietPi)
 - start/stop/restart <servicename>     (single service, systemd)
 - systemd_controlled/dietpi_controlled (all services, known to DietPi)
 - enable/disable all                   (all services, known to DietPi)
 - enable/disable <servicename>         (single service, systemd)
 - mask/unmask all                      (all services, known to DietPi)
 - mask/unmask <servicename>            (single service, systemd)

 - You can include/exclude custom services by editing the following file: /DietPi/dietpi/.dietpi-services_include_exclude

Code: Select all

:~# dietpi-services status

Code: Select all

:~# dietpi-services stop home-assistant
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.

pakikje
Posts: 73
Joined: Fri Nov 11, 2016 2:04 pm

Re: home assistant

Post by pakikje » Thu Dec 06, 2018 11:09 am

thnx man!

User avatar
MichaIng
Legend
Posts: 536
Joined: Sat Nov 18, 2017 5:21 pm

Re: home assistant

Post by MichaIng » Fri Dec 07, 2018 1:44 am

Jep, it's basically a systemd service, so systemctl start|stop|restart home-assistant can be used.
dietpi-services start|stop|restart <service_name> is our error handled front-end for this.

The services are started at the end of boot stage from: /DietPi/dietpi/postboot
Sadly you cannot natively disable/mask it, since it is already located at /etc/systemd/system/home-assistant.service, where masking would create a symlink to /dev/null usually to prevent the service from being started.
However you could move it to /lib/systemd/system/home-assistant.service, the place which is used by APT packages:
mv /etc/systemd/system/home-assistant.service /lib/systemd/system/home-assistant.service
Then use:
systemctl mask home-assistant or
dietpi-services mask home-assistant

Post Reply