Ok that all makes sense. I had a look in the log before, I see the capital commands, and the queuing. I have not seen the other data or read from node. If I can see that I could configure the log monitor so that it would stop the polling.
This is the full script I use to populate my TRV setpoint array
I am still not sure how I could get this to display the setpoints of the TRVs, rather than what is in the queue. But your explanations have helped me to understand the whole process a lot better, so I am slowly getting there.
Let's take this scenario. I am sending a new setpoint to a TRV. It changes immediately in the array display. It is only queued, so if I poll now to send it, it could actually change back to the current setpoint as the TRV should report the current setpoint, and then change again when it has accepted the setpoint ? If that is the case it might not do it as the event only runs the script when there is a change of setpoint in any of the TRVs.
This is the full script I use to populate my TRV setpoint array
Code:
dim array_trvs() as string = {"Heating","Guest Bed TRV","Study TRV","Lounge TRV","Kitchen TRV","Gym TRV"} dim trvsetpoint as integer = 0 dim trvs_name as string = "" dim trvstr as string = "" sub Main(ByVal Parms as Object) Try trvs_name = "" trvstr = "" for each devw as string in array_trvs trvs_name = devw trvsetpoint = hs.DeviceValueByName(devw) If trvsetpoint >20 trvstr = trvstr & trvs_name & " Setpoint " & " <span style='color:red'>" & trvsetpoint & " °C" & "</span>" & "<br>" Else trvstr = trvstr & trvs_name & " Setpoint " & " <span style='color:blue'>" & trvsetpoint & " °C" & "</span>" & "<br>" End If next hs.SetDeviceString(440, trvstr,true) 'hs.writelog("Array", "Window Count: " & windows_count) Catch ex As Exception hs.WriteLog ("Array", "Error: " & ex.Message) End Try End Sub
Let's take this scenario. I am sending a new setpoint to a TRV. It changes immediately in the array display. It is only queued, so if I poll now to send it, it could actually change back to the current setpoint as the TRV should report the current setpoint, and then change again when it has accepted the setpoint ? If that is the case it might not do it as the event only runs the script when there is a change of setpoint in any of the TRVs.
Comment