The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xpl-C Gate



Hi John

> Below is a script that I use to capture the state of all C-Bus loads
and
store them in globals

Is CBus_Hall a global ...??? or is this the cbus actual load name ???



>   Case 0
>     devName = "CBus_Hall"
>   Case 1
>     devName = "CBus_FB-LH-Table"
>   Case 2


do the cases refer to the cbus load address ??

Thanks
Frank


----- Original Message -----
From: "John B" <home-automation@xxxxxxx>
To: <ukha_xpl@xxxxxxx>
Sent: Saturday, June 19, 2004 7:07 PM
Subject: Re: [ukha_xpl] xpl-C Gate


> Hi Frank,
>
> Below is a script that I use to capture the state of all C-Bus loads
and
store them in globals.
>
> Look at the lines beginning with "case 0", "case
1" etc.
> These are where I map the group addresses into friendly names, like
"CBus_Hall" for my hall light.
> (I prefix all my C-Bus related globals with CBus so they all appear
together in the list)
>
> Also, remember to change the johnb_cgate_ws01 bit to whatever your
C-Gate
instance is called.
>
> Good luck,
>
> John
>
> '------------------------------
> ' Routine to capture C-Bus events
> ' and place them into global variables
> '
> ' NB: Please change the name of this sub routine to
> ' reflect the instance of xPL C-Gate that you are using.
> '------------------------------
> sub johnb_cgate_ws01_trigger(XplMsg)
>   dim devName, devLevel
>
>   ' Which group address?
>   ' NB: Modify the cases below to suit your own group addresses.
>   Select Case xpl.GetParam(XplMsg,"device",True)
>   Case 0
>     devName = "CBus_Hall"
>   Case 1
>     devName = "CBus_FB-LH-Table"
>   Case 2
>     devName = "CBus_Office"
>   Case 3
>     devName = "CBus_FB-Ceiling"
>   Case 5
>     devName = "CBus_FB-RH-Table"
>   Case Else
>     devName = "CBus_" &
xpl.GetParam(XplMsg,"device",True)
>   End Select
>
>   ' Determine the type of operation
>   Select Case ucase(xpl.GetParam(XplMsg,"current",True))
>   Case "ON"
>     devLevel = 255
>   Case "OFF"
>     devLevel = 0
>   Case "RAMP"
>     devLevel = xpl.GetParam(XplMsg,"ramplevel",True)
>   End Select
>
>   ' Set the global variable
>   sys.value(devName) = devLevel
> End Sub
>
>
>
>
>
> xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
http://www.xpl.myby.co.uk
> To Post a Message: ukha_xpl@xxxxxxx
> To Subscribe:  ukha_xpl-subscribe@xxxxxxx
> To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx
> Yahoo! Groups Links
>
>
>
>
>
>




xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.