View Full Version : Passing Prontonic trigger as parameter
pbosgraaf
December 22nd, 2008, 12:20
Hi,
Thanks for making prontonic for homeseer, it has been extremely useful to me for many months now!
I have one question about the software:
I'd like to use one homeseer script to control all my X10 lichting, i feed the X10 adressed as a parameter to the script. I was wondering if there is a way to pass the prontonic RS232 trigger command as a parameter to the action-script.
This would allow me to defined a button with trigger "X10-A1" on the pronto, when it is passed to my action script as a parameter i could extract the address (A1) from the string and perform actions.
Any suggestions/help would be greatly appreciated.
Cheers,
Peter
Joakim Eriksson
December 22nd, 2008, 20:25
The way I have set it up using scripting is for example to control the scene lighting "Watch movie", "Normal", "Soft" is by creating a script like so
Sub Main(parm as object)
if (parm = "soft") then
hs.ExecX10("q1","dim",5)
hs.WaitSecs(1)
hs.ExecX10("q2","off")
hs.WaitSecs(1)
hs.ExecX10ByName("Hall FloorLamp","dim",5)
hs.WaitSecs(1)
hs.ExecX10ByName("Office WindowLamp","dim",5)
else if (parm = "sunlight") then
hs.ExecX10ByName("Office WindowLamp","dim",100)
hs.WaitSecs(1)
hs.ExecX10ByName("Hall FloorLamp","dim",100)
hs.WaitSecs(1)
hs.ExecX10("q4","dim",100)
hs.WaitSecs(1)
hs.ExecX10("q5","dim",100)
else if (parm = "movie") then
hs.ExecX10("q1","dim",0)
hs.WaitSecs(1)
hs.ExecX10("q2","off")
hs.WaitSecs(1)
End If
End Sub
Then in homeseer I map the sent in commands to an event like "movie" and set it run the script like
lights.vb
("Main","movie")
I don't think or know about any way to skip the mapping in homeseer. Even though it would certainly help if we could feed the trigger value directly to a script.
Chak
December 22nd, 2008, 21:47
One of the most used functions for me is the toggle from the pronto
I have created events for every device that I want to control.
all have the same code
only the parameter is different
toggle.vb
("Main","C7")
Public Sub Main(ByVal Parms As String)
Dim i As Integer
i = hs.DeviceStatus(Parms)
Select Case i
Case 2
'' Device ON, turn it OFF
hs.ExecX10(Parms, "Off")
Case 3
'' Device OFF, turn it ON
hs.ExecX10(Parms, "On")
Case 4
'' Device DIM, turn it OFF
hs.ExecX10(Parms, "Off")
End Select
End Sub
pbosgraaf
December 29th, 2008, 20:25
Hi All,
Thanks for the quick reply's!
I use similar scripts, but as Joakim Eriksson pointed out i was hoping there was a way to skip the Homeseer trigger/action-parameter mapping.
Is there anyone out here that got that working? :)
Cheers,
P
Powered by vBulletin™ Version 4.0.2 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.