Cannot autostart domoticz on raspberry pi

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!
Post Reply
funky
Posts: 7
Joined: Saturday 06 May 2017 22:38
Target OS: -
Domoticz version:
Contact:

Cannot autostart domoticz on raspberry pi

Post by funky » Saturday 06 May 2017 22:41

Hi there

I have a raspberry pi. default installation of domoticz Standard username and i followed all the instructions on
https://www.domoticz.com/wiki/Installin ... spberry_PI

however domoticz is not auto start-up at reboot. Can somebody help me? Don't know where to start and find a solution.

when i run
sudo service domoticz.sh status

domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh)
Active: inactive (dead)

it is inactive dead. When i run manually sudo service domoticz.sh start it works.

rfvdboom
Posts: 22
Joined: Tuesday 20 September 2016 8:32
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by rfvdboom » Saturday 06 May 2017 22:55

Did you do:

sudo cp domoticz.sh /etc/init.d
sudo chmod +x /etc/init.d/domoticz.sh
sudo update-rc.d domoticz.sh defaults

funky
Posts: 7
Joined: Saturday 06 May 2017 22:38
Target OS: -
Domoticz version:
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by funky » Saturday 06 May 2017 23:23

yes i did, but did it again and now gets errors on:

sudo update-rc.d domoticz.sh defaults
insserv: warning: current start runlevel(s) (empty) of script `domoticz.sh' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0) of script `domoticz.sh' overrides LSB defaults (0 1 6

funky
Posts: 7
Joined: Saturday 06 May 2017 22:38
Target OS: -
Domoticz version:
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by funky » Sunday 07 May 2017 9:49

I found a solution. I removed the value in with updaters and add it again, now it works like a charm!

updaterc.d -f domoticz.sh remove
updaterc.d domoticz.sh defaults

manjh
Posts: 349
Joined: Saturday 27 February 2016 13:49
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: NL
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by manjh » Saturday 18 November 2017 21:00

I had the same problem after a fresh install. Domoticz will not start automatically after a reboot, but works fine on manual start.
So I did this:

Code: Select all

cd /etc/init.d
sudo update-rc.d -f domoticz.sh remove
sudo update-rc.d -f domoticz.sh defaults
This fixed it.
Remains the question: why did this problem exist?
Hans

salvacalatayud
Posts: 30
Joined: Monday 26 June 2017 21:16
Target OS: Raspberry Pi
Domoticz version: 3.8072
Location: Spain
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by salvacalatayud » Monday 29 January 2018 18:04

manjh wrote:
Saturday 18 November 2017 21:00
I had the same problem after a fresh install. Domoticz will not start automatically after a reboot, but works fine on manual start.
So I did this:

Code: Select all

cd /etc/init.d
sudo update-rc.d -f domoticz.sh remove
sudo update-rc.d -f domoticz.sh defaults
This fixed it.
Remains the question: why did this problem exist?
I have the problem that domoticz fails to start in a normal boot (plug power), but if I reboot I will start

Any idea?

kniazio
Posts: 77
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by kniazio » Monday 05 February 2018 10:55

salvacalatayud wrote:
Monday 29 January 2018 18:04
manjh wrote:
Saturday 18 November 2017 21:00
I had the same problem after a fresh install. Domoticz will not start automatically after a reboot, but works fine on manual start.
So I did this:

Code: Select all

cd /etc/init.d
sudo update-rc.d -f domoticz.sh remove
sudo update-rc.d -f domoticz.sh defaults
This fixed it.
Remains the question: why did this problem exist?
I have the problem that domoticz fails to start in a normal boot (plug power), but if I reboot I will start

Any idea?
Show what your entry is in line 21 /etc/init.d/domoticz.sh

salvacalatayud
Posts: 30
Joined: Monday 26 June 2017 21:16
Target OS: Raspberry Pi
Domoticz version: 3.8072
Location: Spain
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by salvacalatayud » Sunday 11 February 2018 16:46

kniazio wrote:
Monday 05 February 2018 10:55
salvacalatayud wrote:
Monday 29 January 2018 18:04
manjh wrote:
Saturday 18 November 2017 21:00
I had the same problem after a fresh install. Domoticz will not start automatically after a reboot, but works fine on manual start.
So I did this:

Code: Select all

cd /etc/init.d
sudo update-rc.d -f domoticz.sh remove
sudo update-rc.d -f domoticz.sh defaults
This fixed it.
Remains the question: why did this problem exist?
I have the problem that domoticz fails to start in a normal boot (plug power), but if I reboot I will start

Any idea?
Show what your entry is in line 21 /etc/init.d/domoticz.sh
If I'm not worng line 21 is DAEMON=/home/$USERNAME/domoticz/$NAME

kniazio
Posts: 77
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by kniazio » Sunday 11 February 2018 19:27

change
DAEMON=/home/domoticz/$NAME

salvacalatayud
Posts: 30
Joined: Monday 26 June 2017 21:16
Target OS: Raspberry Pi
Domoticz version: 3.8072
Location: Spain
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by salvacalatayud » Saturday 03 March 2018 19:16

kniazio wrote:change
DAEMON=/home/domoticz/$NAME
I have tried this but still doesn't work.

Now it doesn't even start after reboot.

Enviado desde mi Redmi 4X mediante Tapatalk



User avatar
waaren
Posts: 1070
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by waaren » Saturday 03 March 2018 20:12

What is location of your domoticz binary ?

and what is the result of the command ?

Code: Select all

head -28  /etc/init.d/domoticz.sh
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

salvacalatayud
Posts: 30
Joined: Monday 26 June 2017 21:16
Target OS: Raspberry Pi
Domoticz version: 3.8072
Location: Spain
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by salvacalatayud » Saturday 03 March 2018 20:23

Tried again and I found that it happens only if pi and router start at the same time.

If I do run
sudo service domoticz.sh status

Active: active (exited)

Enviado desde mi Redmi 4X mediante Tapatalk


salvacalatayud
Posts: 30
Joined: Monday 26 June 2017 21:16
Target OS: Raspberry Pi
Domoticz version: 3.8072
Location: Spain
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by salvacalatayud » Saturday 03 March 2018 20:37

waaren wrote:
Saturday 03 March 2018 20:12
What is location of your domoticz binary ?

and what is the result of the command ?

Code: Select all

head -28  /etc/init.d/domoticz.sh
domoticz was installed as default

Code: Select all

#! /bin/sh
### BEGIN INIT INFO
# Provides:          domoticz
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Home Automation System
# Description:       This daemon will start the Domoticz Home Automation System
### END INIT INFO

# Do NOT "set -e"

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/home/$USERNAME/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"

User avatar
thecosmicgate
Posts: 259
Joined: Monday 06 April 2015 14:37
Target OS: Linux
Domoticz version: newest
Location: The Netherlands / Hoeven
Contact:

Re: Cannot autostart domoticz on raspberry pi

Post by thecosmicgate » Saturday 10 March 2018 19:17

at the moment i'am having exactly the same issue with a clean beta installation.
It won't autostart, but even more strange (maybe) when i restart the service everything is working fine.

Code: Select all

head -28  /etc/init.d/domoticz.sh
shows:

Code: Select all

#! /bin/sh
### BEGIN INIT INFO
# Provides:          domoticz
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Home Automation System
# Description:       This daemon will start the Domoticz Home Automation System
### END INIT INFO

# Do NOT "set -e"

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/home/$USERNAME/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
at the production / stable installation everything is the same, but domo auto start is working fine
It's nice to be important, but it's more important to be nice
Scooter ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest