domoticz in synology as package! Available now.

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

Moderator: leecollings

pilgou60
Posts: 4
Joined: Tuesday 14 April 2015 10:39
Target OS: NAS (Synology & others)
Domoticz version: 2.0.2362
Location: France
Contact:

Re: domoticz in synology as package! Available now.

Post by pilgou60 »

Hello everybody.
I'm a new french and i would like to say thanks to everybody whose help us to setup our NAS. As you can see, i don't speak very well english but i would try to be clear.
I have a Synology ds214play with dsm 5.1.5022.

I installed on it domoticz v2258 and USB Serial Drivers v3.0.2 downloaded on your website http://jadahl.dscloud.me/sspks/?arch=evansport .

My usb receptor is SIGMA z-WAVE USB PLUS. (http://www.domotique-store.fr/domotique ... signs.html)

apparently, this dongle is not recognize. this is resutlt from dmesg command.

[323446.835258] usb 1-1: new full-speed USB device number 3 using ehci_hcd
[323447.380698] usbcore: registered new interface driver cdc_acm

Could you help me to setup my ds214play to work with this USB dongle or advise me to buy a new USB dongle that work with z-wave ZG8101.

Thanks a lot for your help.
Bruno
jhsim
Posts: 6
Joined: Saturday 11 April 2015 17:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by jhsim »

Doume wrote:You can only do that if your telnet session is 'root' itself....
OK, Doume, now I'm out of my depth.
kaivalagi
Posts: 21
Joined: Tuesday 25 November 2014 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Norwich, United Kingdom
Contact:

Re: domoticz in synology as package! Available now.

Post by kaivalagi »

jhsim wrote:
Doume wrote:You can only do that if your telnet session is 'root' itself....
OK, Doume, now I'm out of my depth.
Login to the command line with username "root" and password the same as your administrator account then try doing the chmod
jhsim
Posts: 6
Joined: Saturday 11 April 2015 17:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by jhsim »

kaivalagi wrote:
jhsim wrote:
Doume wrote:You can only do that if your telnet session is 'root' itself....
OK, Doume, now I'm out of my depth.
Login to the command line with username "root" and password the same as your administrator account then try doing the chmod
That's it! RFXCOM and Z-wave both working now!

Thank you so much :-)
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 »

pilgou60 wrote:Hello everybody.
I'm a new french and i would like to say thanks to everybody whose help us to setup our NAS. As you can see, i don't speak very well english but i would try to be clear.
I have a Synology ds214play with dsm 5.1.5022.

I installed on it domoticz v2258 and USB Serial Drivers v3.0.2 downloaded on your website http://jadahl.dscloud.me/sspks/?arch=evansport .

My usb receptor is SIGMA z-WAVE USB PLUS. (http://www.domotique-store.fr/domotique ... signs.html)

apparently, this dongle is not recognize. this is resutlt from dmesg command.

[323446.835258] usb 1-1: new full-speed USB device number 3 using ehci_hcd
[323447.380698] usbcore: registered new interface driver cdc_acm

Could you help me to setup my ds214play to work with this USB dongle or advise me to buy a new USB dongle that work with z-wave ZG8101.

Thanks a lot for your help.
Bruno

Try the new Domoticz v2.0.2362-6 version with support for Z-wave. Download here: http://jadahl.dscloud.me/sspks/?arch=evansport
Regards
Jumbotroll
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
pilgou60
Posts: 4
Joined: Tuesday 14 April 2015 10:39
Target OS: NAS (Synology & others)
Domoticz version: 2.0.2362
Location: France
Contact:

Re: domoticz in synology as package! Available now.

Post by pilgou60 »

hello everybody
I installed new version od domoticz (v2.2362)
when i want to set USB ZWave usb dongle i have a message driver failed.
Could you help me please.

2015-04-16 18:08:02.785 OpenZWave: Closed
2015-04-16 18:08:12.088 EventSystem stopped...
2015-04-16 18:08:12.113 OpenZWave: Starting...
2015-04-16 18:08:12.113 OpenZWave: using config in: /usr/local/domoticz/Config/
2015-04-16 18:08:30.614 Hardware Monitor: Fetching data (System sensors)
2015-04-16 18:08:32.142 Error: OpenZWave: Driver Failed!!
pilgou60
Posts: 4
Joined: Tuesday 14 April 2015 10:39
Target OS: NAS (Synology & others)
Domoticz version: 2.0.2362
Location: France
Contact:

Re: domoticz in synology as package! Available now.

Post by pilgou60 »

for jhsim :
I use z-wave usb plus dongle. It's not the same as z-wave usb dongle. The chipset is different.

Are you sure this device is included in the driver package 3.0.2 ?
pilgou60
Posts: 4
Joined: Tuesday 14 April 2015 10:39
Target OS: NAS (Synology & others)
Domoticz version: 2.0.2362
Location: France
Contact:

Re: domoticz in synology as package! Available now.

Post by pilgou60 »

Sorry.
thanks for you help.
raxor
Posts: 8
Joined: Friday 17 April 2015 10:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by raxor »

Hi all

After a hard and funny work i have mi XPENology DSM 5.1 (HP 54NL) working with Domoticz. I'm sysadmin and have some skill in development.

Material i use: kankunit smartplugs wifi (x4 relay.cgi hacked), 3x FIBARO x2 1.5 relay and Controller Aeon Labs Z-Stick S2

Version: domoticz_bromolow-5.1_2.0.2276-6.spk (openzw and usb drivers included) from this post https://dl.dropboxusercontent.com/u/180 ... 2276-6.spk
Debian-Chroot from Synocommunity for sh scripting and cron tasks

I want to give back to the community the knowledge I have gained researching on the internet

Codes are not mine, i only repair and debug code to make it work on synologys

Install debian-chroot

- In DSM 5.1
- Add synocommunity source in packages center
- Setup --> Packages source, add
Synocommunity -- http://packages.synocommunity.com/
In General TAB enable "Any editor"
- Apply
- Go to community packages and install debian-chroot
- Enable Debian-chroot

SSHd synology NAS and enter in CHROOT session

Code: Select all

/var/packages/debian-chroot/scripts/start-stop-status chroot
Error code is normal.

Code: Select all

aptitude update

Code: Select all

aptitude upgrade

Code: Select all

aptitude install locales
(select en_US.UTF-8)

Code: Select all

pkg-reconfigure locales

Code: Select all

dpkg-reconfigure tzdata

Code: Select all

locale-gen en_US.UTF-8
this repair error code

Install packages: I need in the next example

Code: Select all

aptitude install snmpd

Code: Select all

aptitude install snmp

Code: Select all

aptitude install curl

Enable crontab from debian-chroot- AND cron job to retrieve snmp info from QNAP NAS every 5 minutes (you can put any .sh you want, and install any package you can need with "aptitude install")

Exit CHROOT session. CTRL + D or exit

In synology, create shell script in /usr/local/rc.d (when synology starts always execute scripts in this dir with start parameter).

nano /usr/local/rc.d/crontabchroot.sh

Code: Select all

#!/bin/sh
# starts the chroot cron service on startup and stops it
# on reboot/shutdown

case "$1" in
start)
 chroot /volume1/@appstore/debian-chroot/var/chroottarget /etc/init.d/cron start
 ;;
stop)
 chroot /volume1/@appstore/debian-chroot/var/chroottarget /etc/init.d/cron stop
 ;;
*)
 echo "Usage: $0 [start|stop]"
 ;;
esac

Code: Select all

chmod +x /usr/local/rc.d/crontabchroot.sh

Code: Select all

nano /volume1/@appstore/debian-chroot/var/chroottarget/etc/crontab
Add

Check every 5 minutes

Code: Select all

*/5 *   * * *   root    /usr/bin/qnap.sh

Code: Select all

nano /volume1/@appstore/debian-chroot/var/chroottarget/usr/bin/qnap.sh

Code: Select all

#!/bin/bash
 
 # Settings
 
 NASIP="192.168.1.xxx"		        # NAS IP Address
 PASSWORD="public"			# SNMP Password
 DOMO_IP="192.168.1.xxx"		        # Domoticz IP Address
 DOMO_PORT="8084"			# Domoticz Port
 NAS_IDX="23"				# Virtual switch NAS STATUS
 CPU_TEMP_IDX="24"			# Virtual temerature sensor IDX NAS CPU
 HD1_TEMP_IDX="25"			# Virtual temerature sensor IDX HD1
 
 # Check if NAS in online 
 
 PINGTIME=`ping -c 1 -q $NASIP | awk -F"/" '{print $5}' | xargs`
 
 echo $PINGTIME
 if expr "$PINGTIME" '>' 0
 then
 		curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "On" > /dev/null
 
         if [ $? -eq 0 ] ; then
         	        # NAS already ON
        					echo "NAS already ON"
 
           	        # Temprature CPU
             			               CPUtemp=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.24681.1.2.6.0 | cut -c 2-3`
                        	               # Send data
                                               curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$CPU_TEMP_IDX&nvalue=0&svalue=$CPUtemp"
 
          	        # Temperature HD1
 						HDtemp1=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.24681.1.2.11.1.3.1 | cut -c 2-3`
 						# Send data
 						curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$HD1_TEMP_IDX&nvalue=0&svalue=$HDtemp1"
 
 		else
 			# NAS ON
        					echo "NAS ON"
        					# Send data
           				       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=On"
 
           	        # Temprature CPU
             			              CPUtemp=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.24681.1.2.6.0 | cut -c 2-3`
                        	              # Send data
                                              curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$CPU_TEMP_IDX&nvalue=0&svalue=$CPUtemp"
 
          	        # Temperature HD1
 						HDtemp1=`snmpget -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.24681.1.2.11.1.3.1 | cut -c 2-3`
 						# Send data
 						curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$HD1_TEMP_IDX&nvalue=0&svalue=$HDtemp1"
 
 	fi
 
 else
        	curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "Off" > /dev/null
        		# NAS uitgeschakeld
         if [ $? -eq 0 ] ; then
         			echo "NAS already OFF"
         			exit
         else
        				echo "NAS OFF"
        				# Send data
           				curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=Off"
         fi
 
 fi

Code: Select all

chmod +x /volume1/@appstore/debian-chroot/var/chroottarget/usr/bin/qnap.sh
Enable qnap SNMP explained here: http://www.domoticz.com/wiki/NAS_Monitoring.

- And create dummy switch and sensors

My qnap have only one HD. If you want to monitoring any other HD or remaining HD size go to http://www.domoticz.com/wiki/NAS_Monitoring and view code

I Notice Remaining HD size code from wiki has bugged:

This part.....

Code: Select all

curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$HD_REMAIN_IDX&nvalue=0&svalue=$size"
Returns: "1.68 TB" in my case, space betwen "8" and "T" makes url returns 404 response. TRim variable after pull data to Domoticz server solve problem. (i dont know how to).

Above info is valid to any sh cron job you want to launch

----------------------------------------------------------------------------------

Another objective achieved
Shutdown Windows computer (windows 7) from domoticz: chroot not needed

- SSHd Synology NAS

Code: Select all

nano /volume1/@appstore/domoticz/scripts/shutdown_PC.sh

Code: Select all

#!/bin/sh
#Shutdown Computer
# IP of computer and admin user needed
net rpc -S 192.168.1.xx -U USER%PWD shutdown -t 1 -f
(-f parameter force shutdown)

Code: Select all

chmod +x /volume1/@appstore/domoticz/scripts/shutdown_PC.sh
To no disable windows UAC you can insert reg info to accept RPC commands

In windows create reg file. enablerpcshutdown.reg

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system]
"LocalAccountTokenFilterPolicy"=dword:00000001
- Execute to add to registry,

Enable remote registry service

- Execute CMD witch admin rights (search cmd in start button, right button in cmd.exe execute with admin rights)

Code: Select all

sc config RemoteRegistry start= auto
sc start RemoteRegistry
- reboot windows

In Domoticz create virtual switch
Switch type: push off button
Assign to off action:
"script://volume1/@appstore/domoticz/scripts/shutdown_PC.sh"
Save

Profit

I hope this can be useful to others and for me to remembers the steps to reproduce :D

Im noob on Domoticz (4 days) but, i'm very satisffied with my advances: blockly events to auto off some lights after time, Floorplan with image, Scenes (to lights off). I use OpenVPN to manage Domoticz from outside :D. hahaha My Wife hate's me, 4 days with no time for her. But now i sure my children do not left any light on when we leave our house.

Next target LUA scripting.

Thanks to community and developers
fwehrle
Posts: 41
Joined: Tuesday 11 February 2014 18:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by fwehrle »

Thnak you vert much for sharing. I copy-paste it in a note reminder. :)
If you need help in lua scripting , tell me. :)
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 »

See later post.
Last edited by jumbotroll on Wednesday 24 June 2015 23:17, edited 1 time in total.
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
ab1976
Posts: 3
Joined: Friday 13 February 2015 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by ab1976 »

Which version should I use on my DS211j? Thanks in advanced

ps I'm using RFXCOMe
+++++++++++++++++++++++++++++
Raspberry Pi B+
RFXCOMe
Kaku switches
x10 Security System
My system also act as XBMC
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 »

ab1976 wrote:Which version should I use on my DS211j? Thanks in advanced

ps I'm using RFXCOMe
What kind of CPU does my NAS have?
Check here:
http://forum.synology.com/wiki/index.ph ... y_NAS_have

DS211j have: Marvell Kirkwood mv6281 1.2Ghz ARM 16-bit@DDR2, 128MB of RAM.

http://jadahl.dscloud.me/sspks/?arch=88f6281

Regards
Jumbotroll
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
Nicogluck
Posts: 4
Joined: Friday 24 April 2015 17:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by Nicogluck »

Hi everyone,

My Domoticz (installed on my DS415play) gives frequently the following error message in the log :
Error: Error accessing automatic backup directories

I saw in different opened topics that Domoticz under Windows needs to be launched as administrator.
Is it the same here ?
Is there any solution ?

Thanks to all.
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: domoticz in synology as package! Available now.

Post by G3rard »

Nicogluck wrote:Hi everyone,

My Domoticz (installed on my DS415play) gives frequently the following error message in the log :
Error: Error accessing automatic backup directories

I saw in different opened topics that Domoticz under Windows needs to be launched as administrator.
Is it the same here ?
Is there any solution ?

Thanks to all.
You have to give the right permissions to the backup folder and the subfolders with chmod and chown (add user Domoticz to group root).
I use Midnight Commander (http://packages.synocommunity.com) to do this.
Not using Domoticz anymore
Pvhpsb
Posts: 15
Joined: Tuesday 20 January 2015 13:38
Target OS: NAS (Synology & others)
Domoticz version:
Location: Prinsenbeek
Contact:

Re: domoticz in synology as package! Available now.

Post by Pvhpsb »

Hello,
I try to work a lua script (script_time_ping.lua).
The message in the log file is LUA ping fail.
The message in the domoticz.log (ping: permission denied (are you root)?).
Can anyone help me out?
Regards,
Patrick
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: domoticz in synology as package! Available now.

Post by G3rard »

Pvhpsb wrote:Hello,
I try to work a lua script (script_time_ping.lua).
The message in the log file is LUA ping fail.
The message in the domoticz.log (ping: permission denied (are you root)?).
Can anyone help me out?
Regards,
Patrick
User domoticz has no rights to use ping. I think i used the following, but I am not sure anymore because I have tried several things.

Code: Select all

chmod u+s /bin/ping
Let us know if this fixed the problem.
Not using Domoticz anymore
JesseKlaasse
Posts: 2
Joined: Tuesday 28 April 2015 13:29
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: domoticz in synology as package! Available now.

Post by JesseKlaasse »

jumbotroll wrote:Domoticz v2.0.2383-7 with openzwave and usbserial driver included.
DSM-5.1 5022.
Hi! First of all, thank you very much for this excellent package. It's working perfectly fine!
I have a question. By default, Domoticz is installed on the Synology as a http web site. Would it be possible to include the option to run it as https? I don't like the idea of a password transported plain text over http.
Pvhpsb
Posts: 15
Joined: Tuesday 20 January 2015 13:38
Target OS: NAS (Synology & others)
Domoticz version:
Location: Prinsenbeek
Contact:

Re: domoticz in synology as package! Available now.

Post by Pvhpsb »

G3rard wrote:
Pvhpsb wrote:Hello,
I try to work a lua script (script_time_ping.lua).
The message in the log file is LUA ping fail.
The message in the domoticz.log (ping: permission denied (are you root)?).
Can anyone help me out?
Regards,
Patrick
User domoticz has no rights to use ping. I think i used the following, but I am not sure anymore because I have tried several things.

Code: Select all

chmod u+s /bin/ping
Let us know if this fixed the problem.
It,s works for me, thanks.
Regards
User avatar
mvveelen
Posts: 678
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 »

Kudo's for jumbotroll and his effort to make regular updates for the packages so far. I've updated my Domoticz twice today without any problems. Thanks for your effort and (please) keep up the good work !
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