scripting
Posted: Sun Jan 26, 2014 6:10 pm
Hi,
I have the source webserver running and I have a powerfailure script which checks every minute if a plug comes online. If this happens the script turns off some of the scripts. This works perfect.
Now, I want to turn off/on some plugs based on sunrise /sunset times. I found a javascript which calculates these times and put the sunrise and sunset time in a javascript variable. Now it seems impossible for me to get these variables into the plugwise scripting environment.
So, is it possible to assign variables set in javascript to the plugwise scripting environment?
Some examples would help.
I have the source webserver running and I have a powerfailure script which checks every minute if a plug comes online. If this happens the script turns off some of the scripts. This works perfect.
Now, I want to turn off/on some plugs based on sunrise /sunset times. I found a javascript which calculates these times and put the sunrise and sunset time in a javascript variable. Now it seems impossible for me to get these variables into the plugwise scripting environment.
So, is it possible to assign variables set in javascript to the plugwise scripting environment?
Some examples would help.