Reply To: Homeseer and EZIO8SA 2017-12-21T12:26:59+00:00

HOME Forums Input/Output EZIOxx Homeseer and EZIO8SA Reply To: Homeseer and EZIO8SA

Anonymous
Post count: 35

And, finally, the last part:



'
'
helper routine: logs so-called "sensor reports"
'

Private Sub EZIOSensorReport(ByVal Sensor As Byte, ByVal Value As Byte)
Try
hs.WriteLog(g_szScriptName,"EZIOSensorReport: Unit=" & Sensor.ToString & ", State=" & Value.ToString)

Catch ex As Exception
hs.WriteLog(g_szScriptName,"Error in EZIOSensorReport: " & ex.ToString)
End Try
End Sub

'
'
helper routine: processes EZIO device broadcasts
'

Private Sub EZIOProcessBroadcast(ByVal GroupNum As Byte, ByVal CmdNum As Byte)
Dim dc As String

Try
If g_bDebug Then hs.WriteLog(g_szScriptName,"EZIOProcessBroadcast(): " & Hex$(GroupNum) & ", " & Hex$(CmdNum))
If GroupNum >= 1 AND GroupNum <= 4 Then ' makes SILLY assumption that sensor 1 is sending group 1, 2 sends 2, and so forth!
dc = ( (g_dwEZIO_FirstDeviceCode + 2 + GroupNum) - 1).ToString
Select Case CmdNum
Case &H11:
EZIOSetIfChanged(g_szEZIO_HouseCode,dc,2)
Case &H13:
EZIOSetIfChanged(g_szEZIO_HouseCode,dc,3)
End Select
End If

Catch ex As Exception
hs.WriteLog(g_szScriptName,"Error in EZIOProcessBroadcast: " & ex.ToString)
End Try
End Sub