Issued Running Room-Assistant as Service #394
-
Hey there, I followed the documentation and have room-assistant running on three RPi 3B+'s. When starting the service by calling room-assistant from the /room-assistant directory, things seem to work fine. But, when started as a service, my devices come up as "Unavailable" or "Unknown" in homeassistant and room-assistant doesnt seem to be publishing anything to my MQTT broker. I think this may be because I didn't install is in the /home/pi/room-assistant directory as called for in the documentation, but rather in /data/room-assistant. This is just because that is where I have a bunch of other files for services that I run in docker are stored (could not get room-assistant installed via docker, since I can't get docker-compose working on my pi, even though PIP, so went for the basic install - but, would love to be able to get this running in docker...). I did change the room-assistant.service file so that my WorkingDirectory is /data/room-assistant. No other changes to the .service file were made. I'm guessing maybe I'm running into a permissions issue or something? Any other changes that are required? Other options for starting on boot, like using init.d or rc.local ? Thanks in advance? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Setting the working directory in the services (don't forget to reload the services and restart if you change something) should be enough to make that work in theory. The working directly should point to a dir that contains a |
Beta Was this translation helpful? Give feedback.
Setting the working directory in the services (don't forget to reload the services and restart if you change something) should be enough to make that work in theory. The working directly should point to a dir that contains a
config
folder, which in turn contains the YAML config files. If that doesn't work out you can also try supply the full path via the CLI option. So make your ExecStart something like this:/opt/nodejs/bin/room-assistant -c /data/room-assistant/config
(this points to the actual config folder!).