Have come from RaspBMC over to OSMC RC as of today
All looks ok so far although I had to bring the arm_freq down otherwise it crashed with unhappy face all over the shop
Anyway to the question, I run Domoticz on the Pi and have configured it as I always would but it doesn’t seem to want to start automatically. If I just boot the Pi I get an offline message, If I then run it from the command line with sudo by stopping/starting or restarting it works fine, the user is specified as osmc and I’ve found other topics saying services don’t always run as osmc , is this related?
What log or what do I change to get to the bottom of this?
Obviously it’s not ideal to reboot and then manually start the daemon.
It starts from /etc/init.d/domoticz.sh
If it’s a proper LSB (Linux Standards Base) /etc/init.d service, or a systemd service you can do:
sudo systemctl enable servicename
Where servicename is the name of the service to set it to start on boot. The fact that it ends in a .sh extension makes me suspect that it is not a proper LSB service script however.
Please paste a copy of this script at http://paste.osmc.io/ so we can take a look at it.
If it’s not a proper LSB compliant service script and is just a few commands that need to be run at boot, add it to /etc/rc.local before the exit 0 line. /etc/rc.local gets run near the end of the boot process and can be used to run any commands that aren’t proper service scripts.
It’s not a proper service as I found examples of this in other threads but…
I think I’ve found the issue, the domoticz.db file had the owner as root not osmc.
I changed this and it seems to be working although I need to do some further testing…
I must of installed done this process loads of times and never had this issue, one to add to the install/check log I have
Nope I think I still may have issues…
Here the script…
On boot it doesn’t seem to work, If I stop/start or restart with sudo it seems to work.
This Preparing a Raspberry PI (Arch Linux) - Domoticz talks about running it as a service…
Going to try
That is a proper LSB compliant service, so you should be able to enable it with
sudo systemctl enable domoticz.service
I see a likely cause of your problem however - it looks like it is trying to start a web service on port 8080 - that is also the default web server port for Kodi so they will conflict.
You will need to go into Kodi and change kodi to use a different port for webserver or turn off the webserver.
After doing these two steps above if it is still not working after a reboot try running the following command to get more information on why it failed to load:
sudo systemctl status domoticz.service
Yeah by default it’s port 8080 but I normally run it on a different port but changed this so it wasn’t public
Just trying to work out in domoticz.service file how to specify a port
Sorted, you just add the option -www xxxx to the Execstart in the service file.