Hi All
I'm running Pro 2.5.0.52 and discovered yet another regression. The log view in the HSConsole that used to be about 6 lines is now 1 lone which is totally useless.
My bigger problem is that log entries from scripts no longer seem to work
I'm trying to write a script that changes the dim level of a device up or down. Given i have no log entries anymore I'm really struggling to debug. Is there any other way? Anyone see what's up with my script?
My event script parameter is: ("main","Q14|Down")
I'm running Pro 2.5.0.52 and discovered yet another regression. The log view in the HSConsole that used to be about 6 lines is now 1 lone which is totally useless.
My bigger problem is that log entries from scripts no longer seem to work
I'm trying to write a script that changes the dim level of a device up or down. Given i have no log entries anymore I'm really struggling to debug. Is there any other way? Anyone see what's up with my script?
My event script parameter is: ("main","Q14|Down")
Code:
sub main(ByVal Parms As Object) ' Example Q14|Up ' first param should be device ref ' second param should be up or down hs.writelog( "Dim", "In script " ) Dim DimValue as long Dim CurrentDeviceValue as long Dim ParmArray() As String ParmArray = Parms.ToString.Split("|") Dim DeviceRef As String DeviceRef = ParmArray(0) Dim Direction As String Direction = ParmArray(1) hs.writelog( "Dim", "Device Ref: " & chr(34) & DeviceRef & chr(34) & " Direction: " & chr(34) & Direction & chr(34)) Select Direction Case "Up" DimValue = 10 Else DimValue = -10 End Select If hs.DeviceExistsRef(DeviceRef) = True Then CurrentDeviceValue = hs.DeviceValue(DeviceRef) hs.writelog( "DIM", "Changing Dim level of device : " & DeviceRef & " from " & CurrentDeviceValue & " to " CurrentDeviceValue + DimLevel) If CurrentDeviceValue < 1 THEN hs.writelog( "DIM", "Dim: " & chr(34) & DeviceRef & chr(34) & " ignoring: device is off") Else ' Device exists ' Change dim level or upor down hs.SetDeviceValue DeviceRef, CurrentDeviceValue + Dim Level End if ' Dim Level Else ' Device does not exist hs.writelog( "DIM", "No DeviceRef Matching " & chr(34) & DeviceRef & chr(34) & " Exists") End If ' Device Exists end sub
Comment