Sub Process_Globals
Dim bridge As jHueBridge
End Sub
Sub AppStart (Args() As String)
bridge.initialize(Me,"Bridge",80)
bridge.addDevice("MyDevice",True) 'You can call this as many as you like with different names
bridge.startPairing 'Pairing is active for 2 minutes
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub Bridge_StateChanged(DeviceName As String,State As Boolean)
Log("Client switch device " & DeviceName & " to " & State)
End Sub
Sub Bridge_BrightnessChanged(DeviceName As String,Brightness As Int)
Log("Client sets the brightness of device " & DeviceName & " to " & Brightness)
End Sub
Sub Bridge_ColorChanged(DeviceName As String, Color() As Int)
Log("Client sets the color of device " & DeviceName & " to " & "R="&Color(0)& " G="&Color(1)& " B="&Color(2))
End Sub