Hi,
I've installed Domoticz via the repositories, but it looks like i'm missing the start file domoticz in /etc/init.d
When i'm looking in the original install files from the domoticz website, then this file (domoticz.sh) is available in the .tgz package.
By putting this file manually in /etc/init.d, i can start domoticz but it fails to execute.
I've used the information from this website (Title)
Does anybody has experience with installing Domotics on Clearos ?
I've installed Domoticz via the repositories, but it looks like i'm missing the start file domoticz in /etc/init.d
When i'm looking in the original install files from the domoticz website, then this file (domoticz.sh) is available in the .tgz package.
By putting this file manually in /etc/init.d, i can start domoticz but it fails to execute.
I've used the information from this website (Title)
Does anybody has experience with installing Domotics on Clearos ?
Share this post:
Responses (10)
-
Accepted Answer
-
Accepted Answer
Patrick,
I am truly sorry for not being able to give you a clear answer on when app-domoticz will be available. Everything (I think) is prepared and ready from a technical point of view. It is just a matter of "flipping the switch". But in order for the ClearOS team to do so, a few administrative things needs to be in place first and that is totally outside my control.
I have been pushing for this since November 14th 2016, but it is still on the "to do list". Tuesday last week the response was that it would be taken care of this week. Today is Sunday, so that means it should happen today which I think is unlikely. But I promise that I will continue to push for it.
/Fred -
Accepted Answer
-
Accepted Answer
Hi,
Important message: Within a day or so, a new version of domoticz will be released in repo clearos-contribs. It is already available in clearos-contribs-testing if anyone want to update already now. This new version of domoticz has changed a lot, including a changed directory structure (result of a quality audit by ClearOS team). This means that any daemon script that you may have WILL stop working, and needs adjustments to work with the new version of domoticz.
In the new domoticz package, you will most likely find the readme.txt located in /usr/share/domoticz very helpful
If you want to run the new domoticz to try it out, you can as root, execute the following script:./usr/share/domoticz/run-domoticz
DO NOT try to run /usr/share/domoticz/domoticz directly as root, as that will do bad things to file ownerships. /usr/share/domoticz/domoticz shall only be executed as user domoticz (using all the needed parameters).
The Marketplace app for domoticz is now in testing phase. Please give it a couple of weeks before it hopefully can be released to the public.
/Fred -
Accepted Answer
-
Accepted Answer
Fredrik Fornstad wrote:
Patrick,
The timeplan is slipping... Not sure when I can launch, but certainly hope it is going to be in January. The plan is to have the app setting up domoticz so it will play along nicely with ClearOS, including integration with for instance the app "Attack Detector" for security, log-rotation etc. I also would like to have it integrated with the ClearOS LDAP for user access and authentication, but I am not sure I can get that part to work. I recently got some feedback from the ClearOS team on my first beta, and I will spend some time next week to adjust where it is possible.
The app will not replace the domoticz native mgmt interface. So the management of switches, sensors, LUA scripts will be done in domoticz mgmt interface. Some parts of the domoticz management interface are disabled (like software updates) as it is taken care of by ClearOS.
NOTE: The ClearOS feedback described above may mean that the package domoticz that you downloaded may need to be redesigned, and you may loose your settings you have made in domoticz at the next update. This should be a "one time" thing, and I am sorry for any inconvenience it may cause if it becomes neccessary. A suggestion for you is to make a configuration backup (in the domoticz management "settings" menu) so you can do a restore later on if neccessary.
A comment around the domoticz.sh daemon script: Please remember that ClearOS 7 is using Systemd (not SysVinit). If you want to use a daemon you should create a "domoticz.service" script instead of a domoticz.sh script even though both versions will work if constructed correctly. IMPORTANT: If you create a daemon, make sure it is named "domoticz" as any future update of the domoticz.rpm will then automatically trigger a restart of the service.
/Fred
Hi Fred,
No problem. Domoticz is running good currently, so no hurry ;-)
For the startup scruipt i'm using the following script
#! /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
# Source function library.
. /etc/rc.d/init.d/functions
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=domoticz
DAEMON=/usr/share/domoticz/$NAME
#DAEMON_ARGS="-daemon -www 8080 -log /tmp/domoticz.txt"
#DAEMON_ARGS="-daemon -www 8080 -syslog"
DAEMON_ARGS="-daemon -www 9200 -log /var/log/domoticz.log"
STOP_TIMEOUT=10
pidfile=/var/run/$NAME.pid
lockfile=/var/lock/subsys/$NAME}
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
#
# Function that starts the daemon/service
#
do_start()
{
echo -n $"Starting $NAME : "
daemon --pidfile=$pidfile $DAEMON $DAEMON_ARGS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
#
# Function that stops the daemon/service
#
do_stop()
{
echo -n $"Stopping $NAME : "
killproc -p ${pidfile} -d ${STOP_TIMEOUT} $DAEMON
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
status)
status -p ${pidfile} DAEMON
RETVAL=$?
;;
restart)
do_stop
do_start
;;
*)
echo "Usage: service domoticz {start|stop|status|restart}" >&2
exit 3
;;
esac
:
-
Accepted Answer
Patrick,
The timeplan is slipping... Not sure when I can launch, but certainly hope it is going to be in January. The plan is to have the app setting up domoticz so it will play along nicely with ClearOS, including integration with for instance the app "Attack Detector" for security, log-rotation etc. I also would like to have it integrated with the ClearOS LDAP for user access and authentication, but I am not sure I can get that part to work. I recently got some feedback from the ClearOS team on my first beta, and I will spend some time next week to adjust where it is possible.
The app will not replace the domoticz native mgmt interface. So the management of switches, sensors, LUA scripts will be done in domoticz mgmt interface. Some parts of the domoticz management interface are disabled (like software updates) as it is taken care of by ClearOS.
NOTE: The ClearOS feedback described above may mean that the package domoticz that you downloaded may need to be redesigned, and you may loose your settings you have made in domoticz at the next update. This should be a "one time" thing, and I am sorry for any inconvenience it may cause if it becomes neccessary. A suggestion for you is to make a configuration backup (in the domoticz management "settings" menu) so you can do a restore later on if neccessary.
A comment around the domoticz.sh daemon script: Please remember that ClearOS 7 is using Systemd (not SysVinit). If you want to use a daemon you should create a "domoticz.service" script instead of a domoticz.sh script even though both versions will work if constructed correctly. IMPORTANT: If you create a daemon, make sure it is named "domoticz" as any future update of the domoticz.rpm will then automatically trigger a restart of the service.
/Fred -
Accepted Answer
Fredrik Fornstad wrote:
Patrick,
I am working on a paid Home Automation app that will be available in the Market Place soon (I hope before Christmas). It will be using Domoticz as the engine. You have downloaded "just the engine" without the ClearOS integration. But you can start domoticz this way. Just execute "domoticz" in /usr/share/domoticz. My recommendation however, is to wait for the app in the market place so you will have everything integrated with ClearOS.
/Fred
Hi Frederik,
I did found out to start Domoticz, but now i just need to create a script for automatic service start and stop.
What will the app offer ? just integration with ClearOS or also functions for the controls -
Accepted Answer
Patrick,
I am working on a paid Home Automation app that will be available in the Market Place soon (I hope before Christmas). It will be using Domoticz as the engine. You have downloaded "just the engine" without the ClearOS integration. But you can start domoticz this way. Just execute "domoticz" in /usr/share/domoticz. My recommendation however, is to wait for the app in the market place so you will have everything integrated with ClearOS.
/Fred -
Accepted Answer
Any error messages? No experience with Domotics - but in my experience rpms often place program files in different directories to that of a " .tgz" install.
So go through the extracted init file file from the .tgz carefully and verify that each file referenced exists as stated. Correct those that are incorrect.
If you run "updatedb" before you start (can take a minute or two and makes sure the db is current", then you can easily find a file(s) using "locate xxxx"
e.g. "locate grep"
Other than that can only suggest the usual diagnostic procedures such as checking logs etc.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »