Page 1 of 1

Best way to run Perl script whitin dzVents

Posted: Saturday 10 February 2018 14:42
by McMelloW
At this moment I run a Perl script within dzVents on the following way.

Code: Select all

os.execute('perl /home/pi/Public/perl-script > /tmp/output.txt')
The script runs every minute between 15 minutes before sunrise and 15 minutes after sunset. The ouput is piped to /tmp/output.txt.
Is there a better and/or faster way to run this perl script within dzVents. Or perhaps as a crontab job and pickup the contents of output.txt within dzVents.
Smart ideas are welcome

Re: Best way to run Perl script whitin dzVents

Posted: Saturday 10 February 2018 23:12
by triton
I don't know what your perl script does? Don't get me wrong. Depening on what the script does it may be worthwhile getting the data with lua so you can do it all from dzvents. Perhaps it possible to save the hassle working with a temp file that way.

Re: Best way to run Perl script whitin dzVents

Posted: Saturday 10 February 2018 23:58
by McMelloW
That is point, I can not without the perl script (yet) It gets information from a Solarpanel Inverter using modbus protocol and transforms the data to a file. That is way I use this script. Handling the file to devices is no big deal