I was setting the BlueIris macros using the BI Plugin. Displaying the Status / Text of the HS door sensors and locks. I decided to put together a VB script that would create the 'banner text' and send it to BlueIris.
'The status text is coming from the door sensor Device Status [The Door is Open - The Door is Closed]
' In HS Event to run script
Run HS3/scripts/DoorMacro.vb("main","1236,1231,9")
'
' In HS scripts folder
Sub main(ByVal Parameters As object)
Dim Data() As String = Parameters.Split(",")
Dim theDoor As Integer = Cint(Data(0))
Dim theLock As Integer = Cint(Data(1))
Dim theMacro As String = Data(2)
Dim theDoorStatus as String = hs.DeviceVSP_GetStatus(theDoor,hs.DeviceValue(theDoor),ePair StatusControl.Status)
Dim theLockStatus as String = hs.DeviceVSP_GetStatus(theLock,hs.DeviceValue(theLock),ePair StatusControl.Status)
Dim totalStatus As String = theDoorStatus + " - " + theLockStatus
hs.getURL("localhost","/admin?macro="+theMacro+"&text="+totalStatus+"&user=xxxx&pw =xxxx",FALSE,9080)
hs.writelog ("Macro Control","Macro " + theMacro + " Status = " + totalStatus)
End Sub
'
' Event Running script and waiting ... (x86)/HomeSeer HS3/scripts/DoorMacro.vb("main","1236,1231,9")
'
' HS Log Output
May-20 1:05:56 PM Macro Control Macro 9 Status = The Kitchen Door is Closed - Locked
'The status text is coming from the door sensor Device Status [The Door is Open - The Door is Closed]
' In HS Event to run script
Run HS3/scripts/DoorMacro.vb("main","1236,1231,9")
'
' In HS scripts folder
Sub main(ByVal Parameters As object)
Dim Data() As String = Parameters.Split(",")
Dim theDoor As Integer = Cint(Data(0))
Dim theLock As Integer = Cint(Data(1))
Dim theMacro As String = Data(2)
Dim theDoorStatus as String = hs.DeviceVSP_GetStatus(theDoor,hs.DeviceValue(theDoor),ePair StatusControl.Status)
Dim theLockStatus as String = hs.DeviceVSP_GetStatus(theLock,hs.DeviceValue(theLock),ePair StatusControl.Status)
Dim totalStatus As String = theDoorStatus + " - " + theLockStatus
hs.getURL("localhost","/admin?macro="+theMacro+"&text="+totalStatus+"&user=xxxx&pw =xxxx",FALSE,9080)
hs.writelog ("Macro Control","Macro " + theMacro + " Status = " + totalStatus)
End Sub
'
' Event Running script and waiting ... (x86)/HomeSeer HS3/scripts/DoorMacro.vb("main","1236,1231,9")
'
' HS Log Output
May-20 1:05:56 PM Macro Control Macro 9 Status = The Kitchen Door is Closed - Locked
Comment