Page 39 of 94

Re: domoticz in synology as package! Available now.

Posted: Thursday 07 April 2016 20:57
by jumbotroll
hinduh wrote:Yes, I downloaded the one for DSM6:
Domoticz v3.0.5042-7
Minimum DSM verison: 6.0-7274

My DSM is on DSM 6.0-7321
You maybe have a driver conflict if you have installed the UsbSerial driver package.
My domoticz build include drivers!
Try to uninstall UsbSerial driver package and reboot the NAS.

Re: domoticz in synology as package! Available now.

Posted: Thursday 07 April 2016 21:25
by hinduh
I was unable to install the USBSerialDriver package so I removed the following:
/volume1/@appstore/UsbSerialDrivers
/var/packages/UsbSerialDrivers
After that I gave a reboot but still no luck.
I don't know if everything of the USBSerialDriver package is removed now.
Is there a way to check if the USB RFXCOM is connected to the NAS ?

My Philips Hue Bridge with some lights work properly.

Re: domoticz in synology as package! Available now.

Posted: Thursday 07 April 2016 21:32
by jumbotroll
You can log in with Telnet or ssh and type: dmesg
RFXCOM use FTDI and dmesg will show:
[ 109.517441] usb 7-2: FTDI USB Serial Device converter now attached to ttyUSB0

You also will see the device in the control panel --> Info center like this: USB device FT232 USB-Serial (UART) IC - Future Technology Devices International, Ltd

After you have removed:
/volume1/@appstore/UsbSerialDrivers
/var/packages/UsbSerialDrivers

Try to reinstall domoticz and reboot NAS and then connect RFXcom.

Re: domoticz in synology as package! Available now.

Posted: Friday 08 April 2016 15:37
by hinduh
I can see the following using the dmesg command.
[12667.658968] usbcore: registered new interface driver ftdi_sio
[12667.664817] usbserial: USB Serial support registered for FTDI USB Serial Device
But there is nothing like FTDI USB Serial Device converter now attached to ttyUSB0
Also not in the control panel --> Info center

Re: domoticz in synology as package! Available now.

Posted: Friday 08 April 2016 16:52
by jumbotroll
@hinduh
Very strange!
Have you tested that your RFXcom device work with another devices?

Re: domoticz in synology as package! Available now.

Posted: Friday 08 April 2016 17:57
by hinduh
I tried to connect it to laptop today with drivers from rfxcom.com but also no luck :(
In device manager it says error "A request for the USB device descriptor failed".
Also trying to connect with the RFXCOM manager and flash application no connection possible.
Seems like the RFXCOM is broken so I will get Replacement first and try again.
Thanks for the help so far.

Re: domoticz in synology as package! Available now.

Posted: Saturday 09 April 2016 10:23
by Eternity
Domoticz stops after a while.

Running DSM 6 - but had the same issue with DSM 5 - and the beta package from Jumbotroll for my Syno DS214plus. Domoticz randomly stops working. Very annoying..

Sometimes after a new version it seems stable for a couple of days, sometimes after a new version Domoticz stops several times a day.
I have set up task in DSM to restart Domoticz every hour; that solves the result of the problem (Domoticz now runs most of the time) but is no cure for the actual problem.

This week I discovered that disabling Synology Download Station seems to have solved my issues; Domoticz keeps running!

Perhaps other might benefit from my discovery :-)

Re: domoticz in synology as package! Available now.

Posted: Saturday 09 April 2016 11:00
by Egregius
It's better to find out why it stops than to restart every hour. Guess you don't have Zwave, otherwise you wouldn't restart it so often.
I use a cronjob that check Domoticz every minute:

Code: Select all

DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
	echo $DOMOTICZ
	STATUS=`echo $DOMOTICZ | jq -r '.status'`
	if [ "$STATUS" == "OK" ] ; then
		echo status OK
		exit
	else
		curl -s --connect-timeout 2 --max-time 5 --data-urlencode "text=Domoticz Bad" https://127.0.0.1/secure/telegram.php
		sleep 15
		DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
		STATUS2=`echo $DOMOTICZ | jq -r '.status'`
		if [ "$STATUS2" == "OK" ] ; then
			echo status OK
			curl -s --connect-timeout 2 --max-time 5 --data-urlencode "text=Domoticz Status2 OK" https://127.0.0.1/secure/telegram.php
			exit
		else
			curl -s --connect-timeout 2 --max-time 5 --data-urlencode "text=Domoticz Very Bad" https://127.0.0.1/secure/telegram.php
			sleep 15
			DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
			STATUS3=`echo $DOMOTICZ | jq -r '.status'`
			if [ "$STATUS3" == "OK" ] ; then
				echo status OK
				curl -s --connect-timeout 2 --max-time 5 --data-urlencode "text=Domoticz Status3 OK" https://127.0.0.1/secure/telegram.php
				exit
			else
				curl -s --connect-timeout 2 --max-time 5 --data-urlencode "text=Domoticz Extreme Bad - Rebooting NAS" https://127.0.0.1/secure/telegram.php
				NOW=$(date +"%Y-%m-%d_%H%M%S")
				cp /volume1/appstore/domoticz/var/domoticz.log /volume1/files/temp/domoticz-$NOW.txt
				sudo /usr/sbin/reboot
			fi
		fi
	fi
It checks the json reply of Domoticz. If it isn't good it sends me a telegram and checks again 15 seconds later. If it doesn't respond the 3th time it copies over the logfile (because it's erased during start) and reboots my Syno (need to find a way to just restart domoticz package from CLI).

Re: domoticz in synology as package! Available now.

Posted: Saturday 09 April 2016 13:04
by Eternity
@Egregius

I do use z-wave...

Thanks for the suggestion! I will look into that. I have no idea what a cronjob is (but my dirty mind did do some suggestions... haha)

Re: domoticz in synology as package! Available now.

Posted: Saturday 09 April 2016 13:41
by Egregius
On Syno it's easy with config panel > Scheduled tasks.

Well, my Zwave network takes 24 minutes to start...

Re: domoticz in synology as package! Available now.

Posted: Monday 11 April 2016 16:32
by Eternity
Unfortunately the random stops are back, albeit not as frequently as before. So, stopping other Syno packages 'might' have an influence but is not the root of the Domoticz crashes.

How do I find out what causes these program stops? The log in Synology is gone after a re-start. I bet the old log is stored elsewehere/somewhere...?

Re: domoticz in synology as package! Available now.

Posted: Tuesday 12 April 2016 13:34
by Egregius
Maybe same error as me?
www.domoticz.com/forum/viewtopic.php?f=28&t=11445

What is the cli command to stop and start the Domoticz package?

/var/packages/domoticz/scripts/start-stop-status status reports it's not running
/var/packages/domoticz/scripts/start-stop-status stop reports it's not running
/var/packages/domoticz/scripts/start-stop-status start drops some errors.

Re: domoticz in synology as package! Available now.

Posted: Tuesday 12 April 2016 15:18
by Eternity
@Egregius,

Seems we have the same problem. Hopefully someone will respond. Thanks for the post.

Re: domoticz in synology as package! Available now.

Posted: Tuesday 12 April 2016 18:47
by Egregius
You also see the 'MutexImpl::Unlock error 0 (1)' error in the logfile?

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 8:17
by Eternity

Code: Select all

You also see the 'MutexImpl::Unlock error 0 (1)' error in the logfile?
I don't know, but would like to find out! The log is cleared after a fresh start; how did you manage to copy it before the restart? Let me know how to set this up on my Syno and I will happily paste the log result here :-)

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 8:21
by Egregius
I use this script in a scheduled task that runs every minute.
It simply asks domoticz the status of 1 device. Of the reply isn't good, it tries again 2 times.
If 3 consicutive responses are bad it copies the logfile and reboots the nas.

Code: Select all

#!/bin/bash
	DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
	echo $DOMOTICZ
	STATUS=`echo $DOMOTICZ | jq -r '.status'`
	if [ "$STATUS" == "OK" ] ; then
		echo status OK
		exit
	else
		sleep 15
		DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
		STATUS2=`echo $DOMOTICZ | jq -r '.status'`
		if [ "$STATUS2" == "OK" ] ; then
			echo status OK
			exit
		else
			sleep 15
			DOMOTICZ=`curl -s --connect-timeout 2 --max-time 5 "http://127.0.0.1:8084/json.htm?type=devices&rid=1"`
			STATUS3=`echo $DOMOTICZ | jq -r '.status'`
			if [ "$STATUS3" == "OK" ] ; then
				echo status OK
				exit
			else
				NOW=$(date +"%Y-%m-%d_%H%M%S")
				cp /volume1/appstore/domoticz/var/domoticz.log /volume1/files/temp/domoticz-$NOW.txt
				sudo /usr/sbin/reboot
			fi
		fi
	fi

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 9:34
by Eternity
That is new to me....
I guess I have to edit the http://127.0.0.1:8084... What does that point at, in your setup?

I still have to test, but I scheduled a task in Syno's Taskmanager that starts Domoticz every hour. I have yet to see what happens if the command is given and Domoticz was actually still running.... If that does nothing, that would be a better and simpler script than yours ;-) as it avoids restarting the Syno (I have websites running on mine, this would cause downtime).

Why do you restart the Syno, and not the Domoticz package?

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 12:39
by Egregius
Because I don't know the commands to restart a package.

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 14:24
by Eternity
That makes sense ;-)

Re: domoticz in synology as package! Available now.

Posted: Wednesday 13 April 2016 19:23
by mvveelen
I just realized I haven't seen any update for a while. I'm running Domoticz V3.5019 from Jadahls package. Is the package source changed again, or is this the latest available :) ?