Run_Z-Agent.sh in cron

Discussions about Z-Way software and Z-Wave technology in general
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

This works for me on DS212+

Post by pz1 »

On my DS212+ I have as last line in rc.local
sh /volume1/public/zwave/Z-Connector/Unix/Run_Z-Agent.sh

The script itself is:
#!/bin/ash

cd /volume1/public/zwave/Z-Connector/Unix


while [ 1 ]
do
LD_LIBRARY_PATH=/opt/lib:/usr/local/lib ./z-agent -s z-cloud.z-wave.me --cacert ../Certificates/cacert.pem --cert ../Certificates/cert.pem --key ../Certificates/cert.key -d /dev/ttyUSB0
# substitute /dev/ttyUSB0 by /dev/ttyACM0 or another device depending on the hardware you have

sleep 1 # spare the CPU
done

NOTE: The lines in the script do wrap here. Actually there are only three lines between do and done. The last character in 'ttyUSB0' is a ZERO!
Since 29-12-2016 I am no longer a moderator for this forum
Dvbit
Posts: 22
Joined: 05 Nov 2012 06:28

Tx it works

Post by Dvbit »

Also with 4.2 beta ;-)
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Thanks for this confirmation

Post by pz1 »

Thanks for this confirmation
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply