Announcement

Collapse
No announcement yet.

PalmPad to control ANY and ALL devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PalmPad to control ANY and ALL devices

    This is probably elemetary scripting, but I was quite happy with the results.
    You can use a basic palmpad remote to control any housecode and devicecode and even run scripts from it. (apologies if this has been gone over before)
    The only thing that doesn't work is dimming...
    In the example below the Palmpad housecode is set to "P". You can see below how the Event was setup to act on any "P" code received.
    Code:
     Sub Main
     Dim JDevice, JAction
     JDevice = mid(hs.LastX10,3,3)
     JAction = mid(hs.LastX10,6,1)
     
     If JDevice = "P1;" then JDevice = "L1" ' Living Room Fireplace
     if JDevice = "P2;" then JDevice = "D3" ' Living Room Lamps
     if JDevice = "P3;" then JDevice = "D1" ' Outside Garage Lights
     if JDevice = "P4;" then JDevice = "D2" ' Outside Walkway Lights
     if JDevice = "P5;" then JDevice = "F1" ' Family Room Fireplace
     if JDevice = "P6;" then JDevice = "F2" ' Curio Cabinet
     if JDevice = "P7;" then JDevice = "F3" ' China Hutch
     if JDevice = "P8;" then JDevice = "P8" ' Special - Speak Time/or/Temperture
     if JDevice = "P9;" then JDevice = "XX" ' Nothing
     if JDevice = "P10" then JDevice = "XX" ' Nothing
     if JDevice = "P11" then JDevice = "XX" ' Nothing
     if JDevice = "P12" then JDevice = "XX" ' Nothing
     if JDevice = "P13" then JDevice = "XX" ' Nothing
     if JDevice = "P14" then JDevice = "XX" ' Nothing
     if JDevice = "P15" then JDevice = "XX" ' Nothing
     if JDevice = "P16" then JDevice = "XX" ' Nothing
     if JDevice = "XX" then Exit Sub
     'hs.writelog "Debug", "JDevice=" & JDevice & " - JAction=" & JAction
     '===Check for Special action keys here===
     if JDevice = "P8" and JAction = "2" then 
     	hs.Run "pRemoteSpeakTime.txt"
     	hs.writelog "Palm", "pRemoteSpeakTime script activation"
     	exit sub
     end if
     if JDevice = "P8" and JAction = "3" then 
     	hs.Run "pRemoteSpeakTemp.txt"
     	hs.writelog "Palm", "pRemoteSpeakTemp script activation"
     	exit sub
     end if
     '===End check for Special action Keys===
     If JAction = "2" then JAction = "on"
     if JAction = "3" then JAction = "off"
     hs.ExecX10 JDevice, JAction, 0, 0
     hs.writelog "Palm", JDevice & " " & JAction
     End Sub
    Why am I posting this? Well two reasons... one to share and two to get some other ideas on what this can be used for.
    Thanks,
    Jay
    Attached Files
Working...
X