Page 1 of 1

Script device - when is the VB Script called?

Posted: Sun Jan 08, 2006 4:51 am
by sukceso
I would like to integrate some hardware (T10 from EZControl.de) into Housebot. Because there is no hardware interface available, I thought to use a script device to do this (which is technically feasible from the VB Script side).



My assumption was that the script is called for each property change within the device (I added two simple properties to control on/off and dim level of a lamp). This seems not be to the case, instead I have to set the status to "running" to execute the script. Is this true? Is there a way that the script is called for each property change so that I can do the appropriate action in the script? If not, is there any other way other than writing a new hardware interface plugin (I'm not familiar with C++)?



Thank you very much



Stefan

Posted: Sun Jan 08, 2006 4:23 pm
by PT
Stefan



Are you trying to activate each script from a button ie

Turn light on (run script)

Turn light off(run Script?

If so you can achieve several ways either with task or multi property state buttons.

Posted: Mon Jan 09, 2006 8:52 am
by sukceso
Yes, this works when task buttons can be used. But I also want to be able to update a property e.g. with a slider (for dim value). To do this, I would have to add a button and I would have to move the slider first and then always press the button.



Another scenario that I want to have supported is to use HB_Connector to update a property from Meedio Essential.



Thanks for the first answer. Hopefully there is another way to support my scenario without having to write a hardware interface...



Many regards



Stefan

Posted: Mon Jan 09, 2006 1:25 pm
by PT
Stefan



You can add a slider button and have it change a property then have a task/script run if the value of that property = whatever

ie value of slider 0 to 4 0= off ,1 = 25% etc. A bit fiddly but it works

Posted: Mon Jan 09, 2006 2:50 pm
by sukceso
@PT



Thank you, this was actually a very good idea. I have setup an automatic task for "dim less than 101" (goes really from 0 to 100). This task is executed now with every value change and triggers the state of the script device to "running". It seems that this achieves what I wanted to do. Thanks again so much.



Many regards



Stefan