Virtual devices question

  • 90 Views
  • Last Post 29 January 2014
n0vtn posted this 27 January 2014

I have added a feature request.
Since there is no guarantee it will ever be implemented, my original question still stands.
How can I call a windows script from within InControl?
Or how can I read the value of an InControl virtual device from a windows script?
I need some kind of a workaround.
Please, this is a real show stopper for me.

Thanks,
N0VTN

Order By: Standard | Newest | Votes
Ryan-Scott posted this 27 January 2014

I would like to find an easy way to make virtual devices non-volatile. For example; it seems to defeat the purpose of having a smart home if my “Away” virtual device resets to off, if my system is rebooted for some reason while I am gone. The consequences are things like the heat coming on or the alarm being deactivated etc.
I tried saving the value to an environment variable in a windows script, and tried to call the script from within InControl, but I get compiler errors. I am not sure where to turn to get that straightened out.
I have also tried using spare physical devices which are not volatile, but they don’t always poll accurately and sometimes lead to surprises.

Would anyone be willing to share a known working solution?

Thanks,
N0VTN


Your easiest bet is to probably get a feature request added and vote it up.

n0vtn posted this 27 January 2014

I have added a feature request.
Since there is no guarantee it will ever be implemented, my original question still stands.
How can I call a windows script from within InControl?
Or how can I read the value of an InControl virtual device from a windows script?
I need some kind of a workaround.
Please, this is a real show stopper for me.

Thanks,
N0VTN

jonfrance posted this 28 January 2014

In essence you need 2 rules and scripts setting up.
1 – Create a rule which is triggered when the virtual device state changes.
2 – In this rule write out the new device state to a flat file.
3 – Create a second rule to run periodically which reads in the flat file value and sets the virtual device to that value if not already set.

It's a work-around!

n0vtn posted this 28 January 2014

Thanks for the response!

Yes, I agree with your assessment. It is your step #2 that is giving me trouble. I was trying to use the “setx” command to set an environment variable which is automatically written to the registry and therefore non-volatile. The problem I have is “setx” doesn’t work from within an InControl script. I was advised in another thread to use “setx” in a windows script and call that from an InControl script. So my only issue is how exactly to call the windows script from within InControl. It doesn’t compile for me, I get an error.

I am willing to try it your way.
Do you have any example code which will write the value of a virtual device to a file?

Thanks Again!
N0VTN

Ryan-Scott posted this 29 January 2014

Here's an update that will preserve the virtual device settings through a reboot. Note that it's an alpha version which has a brand new z-wave engine, so you might experience some oddness. Though if you do, please let us know so we can get this build out of alpha and into production.

Grab the latest from our downloads page.

P.S. If you run this version, please let us know so that we can get a tally of who is using it.

monkey-magic posted this 29 January 2014

Here's an update that will preserve the virtual device settings through a reboot. Note that it's an alpha version which has a brand new z-wave engine, so you might experience some oddness. Though if you do, please let us know so we can get this build out of alpha and into production.

Grab the latest from our downloads page.

P.S. If you run this version, please let us know so that we can get a tally of who is using it.


Where did you want us to note that? Did you want to start a post in the announcements?
I don't think you can have a signature like vBulletin forums can we?

Josh

Ryan-Scott posted this 29 January 2014

If you use the new version (3.88 Alpha), please post your experience on our announcement thread: http://store.incontrolzwave.com/boards/topic/420/version-388-alpha-multi-channel-and-preserved-virtual-device-state

Close