Announcement

Collapse
No announcement yet.

HowTo: Display Text on Keypad via Scripting

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HowTo: Display Text on Keypad via Scripting

    On my system, this script would display "This is line 1" and "Sunny" on my Area 1 keypads.

    Note: "$$DSA:Station1-todays-short-prediction-day:" is a replacement variable. Station1-todays-short-prediction-day is available via UltraWeatherBug3 HSPI.

    Code:
    sub Main(parm as object)
    
        Try
    
          Dim KeypadArea as Byte = 1  ' 1 though 8
          Dim KeypadAction as Byte = 1  ' 0=clear message, 1=clear message with * key, 2=display message until time-out
          Dim BeepKeypad as Byte = 0  ' 1=beep, 0=no beep
          Dim DisplayTimeout as Integer = 0  ' 0-65535 in seconds
          Dim Line1 as String = "This is line 1"
          Dim Line2 as String = "$$DSA:Station1-todays-short-prediction-day:"
    		  
          hs.PluginFunction("UltraM1G3", "", "DisplayTextOnLCD", New Object() {KeypadArea, KeypadAction, BeepKeypad, DisplayTimeout, Line1, Line2})
    
        Catch pEx As Exception
          '
          ' Process program exception
          '
        End Try
    
    End Sub
    Regards,
    Ultrajones
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR
Working...
X