I just tried it and this new feature is in. See my sample script here:
http://board.homeseer.com/showthread.php?t=166257
Announcement
Collapse
No announcement yet.
Assigning a Script to a Device Button - Single Instance Option is the default
Collapse
X
-
Hi all,
Can someone confirm that this function has been implmented in the .68 release of homeseer?
thanks in advance
bart
Leave a comment:
-
It has not been announced but I would assume it will be available with the next version of HS3.
Leave a comment:
-
Jon00,
Do you know if the devicebutton_add function already works? I have difficulties implementing this in my script.
get these errors;
target of an invocation.Public member 'DeviceScriptButton_Add' on type 'hsapplication' not found.
Also tried the the Deviceclass, no luck Im still on v.54
regards
Bart
Leave a comment:
-
Does anyone know if this issue is resolved? I have the same issue. Created devices that call a script and I have to delay the changes to these devices to prevent more than one instance of the script.
Leave a comment:
-
There have been a few developments behind the scene. HST are now going to add control button functionality directly to run scripts (much like hs.devicebuttonadd in HS2) so hopefully the single instance issue will be resolved.
Leave a comment:
-
Thanks! I will enter a "bug" and will give your suggestion a shot.
Scott
Leave a comment:
-
I doubt this will get resolved unless you submit this to Bugzilla.
You could fudge this by changing the script name & function to:
dv.ScriptName(hs) = "WPSControlrun.vb"
dv.ScriptFunc(hs) = "Main"
Then have a script called WPSControlrun.vb with the following code:
PHP Code:Sub Main(ByVal Parm As Object)
RunScriptFunc("WPSControl.vb","DeviceFunction", Parm, "False", "False")
End sub
Leave a comment:
-
Assigning a Script to a Device Button - Single Instance Option is the default
I have a script which creates a Homeseer Device that has buttons assigned to the execution of a script. In other words, if you hit the "On" button, it executes a script; you hit the "Off" button, it executes the script, etc.
There are multiple devices that execute the same script, so you could hit the "On" button on multiple devices in quick succession.
Everything works well EXCEPT if I hit the buttons too quickly, the HS event log throws an error saying:
Not running script since its already running: WPSControl.vb Single instance option enabled in event properties
I can't find any Device Creation properties that would allow this to be set.
Does anybody have a way to do this?
Here is the code snippet for creation of the device:
Code:DT.Device_API = DeviceTypeInfo.eDeviceAPI.Script 'Sets DeviceType to Script DT.Device_Type = 3 dv.ScriptName(hs) = "WPSControl.vb" dv.ScriptFunc(hs) = DeviceFunction dv.Status_Support(hs) = True dv.Can_Dim(hs) = False dv.MISC_Set(hs, Enums.dvMISC.SHOW_VALUES)
ScottTags: None
Leave a comment: