Monitor and then Restart Domoticz Automatically if it stops
Moderators: leecollings, remb0
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Monitor and then Restart Domoticz Automatically if it stops
Hi all,
I've tried searching the forum but I cant quite see this anywhere.
Every so often (i.e. again today when my wife tried to use the heating!!) Domoticz doesn't display anything through the browser and I have just restarted my pi. Finally today I'g going to attempt to resolve the issue so I was thinking I could monitor domoticz to make sure I am still getting a reply and if not then restart using
sudo service domoticz.sh stop
sudo service domoticz.sh start
Any ideas how I can do this?
Thanks!!
I've tried searching the forum but I cant quite see this anywhere.
Every so often (i.e. again today when my wife tried to use the heating!!) Domoticz doesn't display anything through the browser and I have just restarted my pi. Finally today I'g going to attempt to resolve the issue so I was thinking I could monitor domoticz to make sure I am still getting a reply and if not then restart using
sudo service domoticz.sh stop
sudo service domoticz.sh start
Any ideas how I can do this?
Thanks!!
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
- cyberclwn
- Posts: 103
- Joined: Thursday 20 August 2015 22:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
I can underscribe the Monit-solution to keep Domoticz up and running.
But check to be sure that it is domoticz which is failing.
Happened to me just a few times with the stable version. Enable logging to file, seems to be disabled by default! And write to a remote location (using nfs-export on NAS myself). And see that it ia definedly domoticz stopping.
When it happened to me most of the time mobile/wifi device disconnected earlier. Refresh returned with no devices.
Now using Monit to keep Domoticz up and running. Webinterface comes handy in the case that Domoticz isnt available so restart service/restart pi. And mobile android-devices configured with a home-screen shortcut that makes the Domoticz dashboard a WepApp.
Running two weeks now without probs for now.
Sent from my D6503 using Tapatalk
But check to be sure that it is domoticz which is failing.
Happened to me just a few times with the stable version. Enable logging to file, seems to be disabled by default! And write to a remote location (using nfs-export on NAS myself). And see that it ia definedly domoticz stopping.
When it happened to me most of the time mobile/wifi device disconnected earlier. Refresh returned with no devices.
Now using Monit to keep Domoticz up and running. Webinterface comes handy in the case that Domoticz isnt available so restart service/restart pi. And mobile android-devices configured with a home-screen shortcut that makes the Domoticz dashboard a WepApp.
Running two weeks now without probs for now.
Sent from my D6503 using Tapatalk
-
- Posts: 157
- Joined: Thursday 27 August 2015 18:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.6028
- Location: Greece
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
Well I have issues with wifi and raspberry and some "unknown" crashed of domoticz itself.
First solved from this link -> http://iqjar.com/jar/raspberry-pi-reboo ... -networks/
I have also a second domoticz slave server and they inter-control each other!
Second solved by this post -> http://www.domoticz.com/forum/viewtopic ... 016#p46752
First solved from this link -> http://iqjar.com/jar/raspberry-pi-reboo ... -networks/
I have also a second domoticz slave server and they inter-control each other!
Second solved by this post -> http://www.domoticz.com/forum/viewtopic ... 016#p46752
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
-
- Posts: 58
- Joined: Friday 29 May 2015 7:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
Monit is the way to go.
I am using the latest beta of Domoticz and it is very stable - at least in my environment. I do not upgrade to the latest beta as soon as it becomes available, but wait for a couple of days, checking this forum for problem reports. In my experience it is relatively safe to upgrade after a week or so when it is quiet in the forum.
I am using the latest beta of Domoticz and it is very stable - at least in my environment. I do not upgrade to the latest beta as soon as it becomes available, but wait for a couple of days, checking this forum for problem reports. In my experience it is relatively safe to upgrade after a week or so when it is quiet in the forum.
Re: Monitor and then Restart Domoticz Automatically if it st
I use a simple bash-script wich is run every minute by crontab:
If i don't want to auto-start Domoticz, i place a dummy-file named 'stopdomo' in /tmp
Code: Select all
#!/bin/bash
if [[ ! "$(sudo service domoticz.sh status)" =~ "domoticz is running" ]]
then
if [ ! -f /tmp/stopdomo ]; then
echo "`date`: Domoticz not running - restarting..."
sudo service domoticz.sh start
echo "`date`: Domoticz restarted!"
fi
else
if [ -f /tmp/stopdomo ]; then
echo "`date`: Domoticz is running - stopping..."
sudo service domoticz.sh stop
echo "`date`: Domoticz stopped!"
fi
fi
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
Wow thanks everyone. I'll try some of these tonight!!
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 16
- Joined: Saturday 01 March 2014 18:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
It's not very normal that domoticz stops, but it can happens . See if you did expand your sd card and use the full size. Mostly (for me) the sd card was causing the trouble. Setting up a fresh domoticz may also help. Use monit, there is nu better solution:-) if you need help to setup, please let us know. Good luck !
Verzonden vanaf mijn iPhone met Tapatalk
Verzonden vanaf mijn iPhone met Tapatalk
-
- Posts: 1602
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
How is this script acting when you update Domoticz?
Is there no problem ?
Is there no problem ?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
Still trying to work out what's stopping. its not the SD card as I expanded as soon as I setup over a year ago.Robert wrote:It's not very normal that domoticz stops, but it can happens . See if you did expand your sd card and use the full size. Mostly (for me) the sd card was causing the trouble. Setting up a fresh domoticz may also help. Use monit, there is nu better solution:-) if you need help to setup, please let us know. Good luck !
Verzonden vanaf mijn iPhone met Tapatalk
Strangely one of my friends who also has Domiticz has the same periodic issues as me. The web gui appears to stop working.
How do I enable logging on domotics to check for errors?
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
No problem here but not sure how this would impact anythingDerik wrote:How is this script acting when you update Domoticz?
Is there no problem ?
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
P.s. I still need to investigate more. I have been side tracked with a lua script that sends me a notification me a message each time a spend a £1 on electricity. all done now so back to this 

My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
-
- Posts: 744
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
When 2rpi's are checking each other, both will reboot when 1 fails: the one failing won't leave the trace behind on the second rpi, which will think that it has a problem itselfkorniza wrote:Well I have issues with wifi and raspberry and some "unknown" crashed of domoticz itself.
First solved from this link -> http://iqjar.com/jar/raspberry-pi-reboo ... -networks/
I have also a second domoticz slave server and they inter-control each other!
Second solved by this post -> http://www.domoticz.com/forum/viewtopic ... 016#p46752
Or do I miss something?
-
- Posts: 370
- Joined: Monday 05 October 2015 10:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
@jake, don't think your missing something.
If one fails it can't leave an error on second.
@thebeetleuk
Anyway: enable logging to /var/log/ etcetera. Basic raspian does some itself!
Domoticz enable in /etc/init.d/domoticz.sh
Also look into daemon en message logfiles.
Try do get some lines from those with the errors/crashes including some before and after.
Makes it easier for us to understand where its failing.
Sent from my D6503 using Tapatalk
If one fails it can't leave an error on second.
@thebeetleuk
Anyway: enable logging to /var/log/ etcetera. Basic raspian does some itself!
Domoticz enable in /etc/init.d/domoticz.sh
Also look into daemon en message logfiles.
Try do get some lines from those with the errors/crashes including some before and after.
Makes it easier for us to understand where its failing.
Sent from my D6503 using Tapatalk
-
- Posts: 115
- Joined: Saturday 21 December 2013 23:50
- Target OS: Linux
- Domoticz version:
- Location: Scotland
- Contact:
Re: Monitor and then Restart Domoticz Automatically if it st
I have something to restart. A slight modification to what is on the wiki but it seems to work. I'll need to add a line to notify me when it restarts and then I can investigate the logs.
My Setup: Pi, RFXtrx433, HomeEasy: 13 Dimmers & 4 Sockets, 2 motion-sensors, 3 magnetic switches, 1 OWL Electricity Sensor, 3 Oregon Temp Sensor.
Who is online
Users browsing this forum: No registered users and 1 guest