I'm using Raspbian Stretch with Mono 5.2 on a Raspberry Pi 3. I've created an event where if an alarm is triggered the event will run a vb.net script to send an email to advise what zone was triggered.
The trigger in the event is working fine but the log is advising that the script is running in the background every two minutes. It looks like the script is trying to send the email with no success. Below is a copy of the script. Is there anybody that can see anything obviously wrong with the script that is preventing the email from being sent.
Sending of emails in HS is working fine so credentials are not an issue.
Public Sub Main(ByVal Parm As Object)
Dim AlarmType, Parms() as String
Parms = split(Parm, ",")
' Change device string if it's been renamed'
Dim LZname as String = "System Last Zone Faulted"
Dim LZref as integer = hs.DeviceValueByName(LZname)
if (LZref > 0) then
Dim dv as Scheduler.Classes.DeviceClass
dv = hs.GetDeviceByRef(LZref)
Dim ZoneName as String = dv.Name(hs)
Dim emsg as string = Parms(0) & " received for " & ZoneName
hs.SendEmail("joebloggs@gmail.com","maryjane@gmail.com",""," ","Alarm Recieved",emsg,"")
end if
End Sub
The trigger in the event is working fine but the log is advising that the script is running in the background every two minutes. It looks like the script is trying to send the email with no success. Below is a copy of the script. Is there anybody that can see anything obviously wrong with the script that is preventing the email from being sent.
Sending of emails in HS is working fine so credentials are not an issue.
Public Sub Main(ByVal Parm As Object)
Dim AlarmType, Parms() as String
Parms = split(Parm, ",")
' Change device string if it's been renamed'
Dim LZname as String = "System Last Zone Faulted"
Dim LZref as integer = hs.DeviceValueByName(LZname)
if (LZref > 0) then
Dim dv as Scheduler.Classes.DeviceClass
dv = hs.GetDeviceByRef(LZref)
Dim ZoneName as String = dv.Name(hs)
Dim emsg as string = Parms(0) & " received for " & ZoneName
hs.SendEmail("joebloggs@gmail.com","maryjane@gmail.com",""," ","Alarm Recieved",emsg,"")
end if
End Sub
Comment