Script device - when is the VB Script called?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
sukceso
Member
Posts: 4
Joined: Sun Jan 01, 2006 11:21 am

Script device - when is the VB Script called?

Post 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
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

Post 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.
Regards

PT

If it isn't broke,fix it till it is!
sukceso
Member
Posts: 4
Joined: Sun Jan 01, 2006 11:21 am

Post 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
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

Post 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
Last edited by PT on Mon Jan 09, 2006 3:42 pm, edited 1 time in total.
Regards

PT

If it isn't broke,fix it till it is!
sukceso
Member
Posts: 4
Joined: Sun Jan 01, 2006 11:21 am

Post 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
Post Reply