domoticz in synology as package! Available now.

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: domoticz in synology as package! Available now.

Post 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.
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
hinduh
Posts: 5
Joined: Thursday 07 April 2016 18:16
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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.
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: domoticz in synology as package! Available now.

Post 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.
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
hinduh
Posts: 5
Joined: Thursday 07 April 2016 18:16
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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
User avatar
jumbotroll
Posts: 793
Joined: Tuesday 13 January 2015 14:36
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Oslo,Norway
Contact:

Re: domoticz in synology as package! Available now.

Post by jumbotroll »

@hinduh
Very strange!
Have you tested that your RFXcom device work with another devices?
If you like the work I do for synology and domoticz, I appreciate a donation.
https://paypal.me/Jumbotroll
Regards
Jumbotroll
http://www.jadahl.com
hinduh
Posts: 5
Joined: Thursday 07 April 2016 18:16
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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.
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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 :-)
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post 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).
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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)
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post by Egregius »

On Syno it's easy with config panel > Scheduled tasks.

Well, my Zwave network takes 24 minutes to start...
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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...?
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post 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.
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by Eternity »

@Egregius,

Seems we have the same problem. Hopefully someone will respond. Thanks for the post.
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post by Egregius »

You also see the 'MutexImpl::Unlock error 0 (1)' error in the logfile?
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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 :-)
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post 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
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post 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?
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: domoticz in synology as package! Available now.

Post by Egregius »

Because I don't know the commands to restart a package.
Eternity
Posts: 63
Joined: Saturday 06 December 2014 16:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by Eternity »

That makes sense ;-)
Synology DS218+
Homey controller
Z-Wave stuff (Fibaro / Aeotec / NEO Coolcam)
Zigbee stuff (Aqara)
HUE lights
Logitech Harmony Ultimate + Hub
IP camera's
User avatar
mvveelen
Posts: 697
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: domoticz in synology as package! Available now.

Post 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 :) ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest