Page 1 of 1
Service 8080 does not start
Posted: Tuesday 22 June 2021 15:21
by peterbos
Hi,
When I restart my Raspberry Pi it doesn't restart Domoticz. Apparently the web server (:8080) doesn't start as I found out at the internet. When I start the webserver manually by SSH with the command "sudo systemctl restart domoticz.service" it seems to be stable until I restart the Pi again... Why does the web server not run at startup and how can I repair this so it starts automatically?
Peter
Re: Service 8080 does not start
Posted: Thursday 24 June 2021 15:32
by AllesVanZelf
See this post:
link.
This is to be done on commandline:
and add:
Code: Select all
reboot sleep 60 ; sudo /etc/init.d/domoticz.sh restart
ctrl-X om op te slaan en verlaten.
Re: Service 8080 does not start
Posted: Thursday 24 June 2021 18:59
by EddyG
A beter way is to use the domoticz internal delay.
When domoticz is installed in /home/pi/domoticz just do
You will see all the command line options, one of them is " -startupdelay seconds (default=0) "
if you put in " /etc/init.d/domoticz.sh "at the end of the option lines with nano, or other editor.
Code: Select all
DAEMON_ARGS="$DAEMON_ARGS -startupdelay 30"
30 seconds should be more then enough and do after that
Re: Service 8080 does not start
Posted: Friday 25 June 2021 0:10
by waltervl
Just for the record, these command line parameters are also available on the wiki page
https://www.domoticz.com/wiki/Command_line_parameters
Re: Service 8080 does not start
Posted: Friday 25 June 2021 9:06
by EddyG
For the record, those are just a copy/paste of the cmdline output. A Wiki should explain those parameters a little bit more.
If you want to be flexible, go for the " -f config_file (for example /etc/domoticz.conf)(Unix Only) " parameter.
And change your the rest of the parameters in the "config_file", its handy for those debug parameters.
Re: Service 8080 does not start
Posted: Friday 25 June 2021 9:54
by AllesVanZelf
EddyG, and others,
I like the idea of this config file. I've never found that before.
I start domoticz as a systemd service with all the parameters in the ExecStart commandline.
If I understand this well, I could replace these parameters by: -f config_file /home/pi/domoticz/domoticz.conf ?
And what about the format of this conf file? Is it used like:
Code: Select all
DAEMON_ARGS="-daemon"
DAEMON_ARGS= etc.
?
That would be nice.
Edit:
I tried:
Code: Select all
/home/pi/domoticz/domoticz -f config_file /home/pi/domoticz/domoticz.conf
With different content in the conf file. But then I get this:
Code: Select all
2021-06-25 11:29:44.856 Error: Please specify the configuration file.
Re: Service 8080 does not start
Posted: Friday 25 June 2021 11:46
by EddyG
If you installed Domoticz the "normal" way there should be a file domoticz.conf, otherwise you can fetch it here:
https://raw.githubusercontent.com/domot ... oticz.conf
This should be in the scripts dir. The text "config_file" is a placeholder, should have been written as <config_file>
To start domoticz, it should be
Code: Select all
/home/pi/domoticz/domoticz -f /home/pi/domoticz/scripts/domoticz.conf
or debian default
Code: Select all
/home/pi/domoticz/domoticz -f /etc/domoticz.conf
Re: Service 8080 does not start
Posted: Friday 25 June 2021 12:19
by AllesVanZelf
Yes Top. Thank you EddyG. This is working. Never seen this conf file before.
Re: Service 8080 does not start
Posted: Friday 25 June 2021 13:27
by waltervl
Please feel free to modify that wiki page, it is also your page

. I also never heard of that config file and was wondering what it could do.
Re: Service 8080 does not start
Posted: Thursday 15 July 2021 0:07
by peterbos
Hi all,
I can write programs in Pascal, in dzVents, in Arduino C/C++ and even Scratch

but Linux commands are like abracadabra to me. Can anyone give me a "How to (re)boot Domotiz 30 seconds after startup" for Dummies explanation please?
Thanks,
Peter
Re: Service 8080 does not start
Posted: Sunday 18 July 2021 11:30
by Toulon7559
Would
this 'feature' not be a candidate to include nested in a next update of Domoticz?
Argument: probably most users when restarting the computer have the aim to get Domoticz operational asap.
Proposed place for inclusion: make it part of 'Restart computer' in submenu 'Other options' of 'Setup'
[Unfortunately not myself capable to make such adaptation, because

not knowing enough about the 'internals' of Domoticz]]
Re: Service 8080 does not start
Posted: Sunday 18 July 2021 11:57
by waltervl
How difficult it is to do (as mentioned before by EddyG):
if you put in " /etc/init.d/domoticz.sh "at the end of the option lines with nano, or other editor.
Code: Select all
DAEMON_ARGS="$DAEMON_ARGS -startupdelay 30"
Edit: text editor nano instructions
https://www.raspberrypi-spy.co.uk/2013/ ... pberry-pi/
Re: Service 8080 does not start
Posted: Sunday 18 July 2021 14:54
by Toulon7559
Sure the change to domoticz.sh is not difficult, but my suggestion was referring to EddyG's 'better' advice in
viewtopic.php?p=276688#p276688
In that message he offers 2 versions
dependent on configuration:

then I am starting to be cautious .....
Also aspect to be considered that the adaptation should preferably remain resident when a next upgrade of Domoticz is implemented.
[To make it clearer, now the url included for reference in my previous message]