MyELK v2.4 VBScript - Area Status Support

Threadhead

Member
I have attached a .zip file with my modification to my.elk to support area status changes. Included is a readme on how to set it up. I've had it running for about a week with no errors.

Let me know if you have any questions.

@electron - all changes I made should be clearly noted so that you can incorporate them with your latest version.
 

Attachments

  • myElk.zip
    13.3 KB · Views: 89
I finally got around to merging this "new" code (Thanks Karl!) with my version and I think I found a bug/typo.

Code:
Sub output_processor(iOutput,iState)
  sDevice = hs.GetINISetting("my.elk.outputs","output" & iOutput,"",sINIfile)
  If sDevice <> "" Then
' \/\/ Change by: Karl Smith \/\/
'	If iState = 1 Then hs.ExecX10 sDevice, "ON"
	If iState = 1 Then hs.SetDeviceStatus sDevice,3
'	If iState = 0 Then hs.ExecX10 sDevice, "OFF"
	If iState = 0 Then hs.SetDeviceStatus sDevice,2
	' /\/\	  End Change	  /\/\
	d "output_processor(): Output=" & iOutput & " State=" & iState
  Else
	e "output " & iOutput & ": output has not been defined, ignoring update (State=" & iState & ")"
  End If

I think the 2 & 3 are reversed as other places in the script 3 = off. the current code gets some of my rules into infinite loops. If I swap the 2 & 3, everything seems OK.
 
Back
Top