Teken Posted July 30, 2014 Author Posted July 30, 2014 Your welcome. More sensors will require more variables. You might consider renaming the ones we have used already to reflect the sensor to which they belong and name additional ones according to their sensor as well. May I suggest: s.Secure_RoomTemp i.Secure_RoomAlertTmp i.Secure_RoomDelta i.SecureRoomSuspend You can rename the existing variables on the variables page and they will be updated throughout your programs automagically. I would also recommend creating folders for each sensor's set of programs to keep things organized and give you an easy way to enable/disable the programs for individual sensors. -Xathros Xathros, I will let you know how this all shakes out once I can get the ISY in a good working state. I am currently working with UDI to determine why my system seems to freeze and stop operating. This makes it extremely hard to work on programs and test the logic for the environment in question. Because I never know if what I have done has been accepted by the system and then translated into the task at hand! As far as I can tell 99% of this program is there, the last percent is on my end to validate and confirm it works in my own personal environment. Once again, I thank you so very much for taking the time to craft, explain, and detail out a program that has so many use cases!
Xathros Posted July 30, 2014 Posted July 30, 2014 Xathros, I will let you know how this all shakes out once I can get the ISY in a good working state. I am currently working with UDI to determine why my system seems to freeze and stop operating. This makes it extremely hard to work on programs and test the logic for the environment in question. Because I never know if what I have done has been accepted by the system and then translated into the task at hand! As far as I can tell 99% of this program is there, the last percent is on my end to validate and confirm it works in my own personal environment. Once again, I thank you so very much for taking the time to craft, explain, and detail out a program that has so many use cases! My pleasure. As always, Happy to help. Good luck with your troubleshooting! -Xathros
Teken Posted August 1, 2014 Author Posted August 1, 2014 I think I found one problem in my code which I hope will reduce any data bombardment. I had initially asked you if the value of 20 was two degrees opposed to twenty degrees. The Autelis bridge sends the data for example 19.0 or equals to 190 in the ISY. My program was set for 10 which I thought was one degree. That is actually for example if the room was 19 / 190, and based on my program of 10. It would come into the ISY as 191, or 19.10 in the Autelis Bridge. I have modified the program to 50, which is half a degree gradient instead of .10 which is great for fine monitoring but might cause lots of data to flow into the ISY. This is simply a guess right now to fine tune the program and time will tell.
Xathros Posted August 1, 2014 Posted August 1, 2014 I believe that the Autelis data is temp x 10 so your 20 is actually 2 deg and 50 should be 5 deg. 5 would be .5 deg. My concern in the other thread is the frequency with which the Autelis updates the ISY state variables. I would expect updates to be at 1 per second or less frequent. -Xathros
Teken Posted August 1, 2014 Author Posted August 1, 2014 I believe that the Autelis data is temp x 10 so your 20 is actually 2 deg and 50 should be 5 deg. 5 would be .5 deg. My concern in the other thread is the frequency with which the Autelis updates the ISY state variables. I would expect updates to be at 1 per second or less frequent. -Xathros That is what I thought! But, I am seeing a email and change of state when the sensor / room changes in .10 increments. That is very fine measurements at, at least 12 bits resolution. Could you post up what your 1 wire temperature looks like in the variable page for me. If I understand you correctly: Your system is programmed for example for 20 = 2 degrees? Not 200 to = 2 degrees?
Xathros Posted August 1, 2014 Posted August 1, 2014 (edited) That is what I thought! But, I am seeing a email and change of state when the sensor / room changes in .10 increments. That is very fine measurements at, at least 12 bits resolution. Could you post up what your 1 wire temperature looks like in the variable page for me. If I understand you correctly: Your system is programmed for example for 20 = 2 degrees? Not 200 to = 2 degrees? Here are mine: 779 = 77.9F = Outside Temp 185 = 18.5F = Failed Sensor that I haven't had a chance to replace yet. 1234 = 123.4F = Output side of hot water tank -Xathros Edited August 1, 2014 by Xathros
Teken Posted August 1, 2014 Author Posted August 1, 2014 I don't really know based on the screen capture you have provided. This is just a WAG, but could there be a difference because I am reporting in Celsius?
Xathros Posted August 1, 2014 Posted August 1, 2014 (edited) I don't think so. Values would obviously be different but math is math and best as I can tell, your values are 10X actual to account for the inability of the ISY to do floating point. If they were 100X then the values would make no sense though as I recall, you are up north in Canada so maybe it really is that cold... -Xathros Edited August 1, 2014 by Xathros
Teken Posted August 11, 2014 Author Posted August 11, 2014 (edited) OK, so I finally got around to create this program as indicated above. As soon as I finished the last program the entire ISY freaked out and the strobing started in the three programs as you saw in the video. It literally took me an hour to regain access to the system as I was unable to disable the folders / programs. All of the error codes and java error. socket failed, etc were all over the place. The system clock actually stopped working during this entire process. My Dash Box was completely off line and not accessible as the ISY was obviously in a tizzy during this infinite loop. I believe this program needs a toggle watch dog program as you crafted for the other energy thread. Please let me know what you come up with. The bright side is the problem has been determined. Edited August 11, 2014 by Teken
Xathros Posted August 11, 2014 Posted August 11, 2014 Hi Teken- I just reviewed the code again and still see no obvious reason for this to happen unless one of the integer variables was defined as a state variable instead. -Xathros
Xathros Posted August 12, 2014 Posted August 12, 2014 I have been working with Teken over the last week or two to develop and test some programs for monitoring household temperatures and generating notifications if values go out of range. Teken is using a network of OneWire temperature probes tied to an Autelis OneWire Bridge. The Autelis bridge periodically updated state variables in the ISY with the probe temperatures with .1 degree resolution. Since the ISY only supports whole numbers at the moment, the Autelis multiplies the value by 10 before posting to the ISY. I am posting these at Teken's request. The programs and variables below are used to monitor the kitchen temp probe and provide for the following requirements: Send an alert once every 30 minutes if/while the Kitchen temperature exceeds 23 Deg C (230 Autelis Units) If the kitchen temperature continues to rise by 2 or more Deg C (20 Autelis Units) - Alert Again without waiting for the 30 minute delay and do so each time the last alerted temperature is exceeded by 2 or more Deg C. Reset once kitchen temperature drops below 23Deg C threshold. Support up to 32 temperature sensors. This set of programs and variables serves as a model for the remaining 31 programs and variable sets. Variables: s.Autelis_Kitchen_Temp - State variable - Set by Autelis bridge (or other sensor input source) i.Autelis_Kitchen_Suspend - Integer Variable - Used to throttle notifications - 1= Suspended, 0=Normal i.Autelis_Kitchen_Alert_Temp - Integer Variable- To record the temp at last alert send. i.Autelis_Kitchen_Delta - Integer Variable- Used to calculate the change in temp since last alert sent. Kitchen_Temp_Monitor If $s.Autelis_Kitchen_Temp > 230 And $i.Autelis_Kitchen_Suspend is 0 Then Wait 0 secon ds Send Notification to 'GMX' content 'Autelis - Kitchen Temp Alert' Wait 3 seconds $i.Autelis_Kitchen_Suspend = 1 $i.Autelis_Kitchen_Alert_Temp = $s.Autelis_Kitchen_Temp Run Program 'Kitchen_Notification_Suspend' (Then Path) Else Wait 0 seconds $i.Autelis_Kitchen_Delta = $s.Autelis_Kitchen_Temp $i.Autelis_Kitchen_Delta -= $i.Autelis_Kitchen_Alert_Temp Wait 6 seconds Run Program 'Kitchen Override Suspend' (If) Send a notification if the Autelis probe reads higher than the threshold defined in line 1. Threshold is set in Autelis units which equal 10 units per 1 Deg C. We record the temp at notification so that we can monitor and alert again if temp continues to rise. NOTE: If you need to change the threshold, you also need to set the same value in Kitchen_Temp_Reset line 1 The First Wait in the Then and Else sections are to insert a delay for multiples of these programs to offset the runs and reduce ISY load when the Autelis updates all temp values at once. Stagger groups of these programs by 1 second. Kitchen_Notification_Suspend If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 30 minutes $i.Autelis_Kitchen_Suspend = 0 Else - No Actions - (To add one, press 'Action') Notify every 30 minutes while the temperature remains above the threshold set in the Kitchen_Temp_Monitor program. Kitchen_Override_Suspend If $i.Autelis_Kitchen_Delta >= 20 And $i.Autelis_Kitchen_Suspend is 1 Then Run Program 'Kitchen Temp Monitor' (Then Path) Else - No Actions - (To add one, press 'Action') The delta setting in the IF section controls the override if the temp continues to rise beyond this value since last notification was sent. This value is in Autelis units of 1 deg = 10 units. ie 20 = 2Deg C Kitchen_Temp_Reset If $s.Autelis_Kitchen_Temp < 230 And $i.Autelis_Kitchen_Suspend is 1 Then Wait 10 seconds $i.Autelis_Kitchen_Suspend = 0 Stop program 'Kitchen Notification Suspend' Else - No Actions - (To add one, press 'Action') Reset the override and stop the override timer when the temp drops below the threshold. NOTE: If you need to change the threshold, you also need to set the same value in Kitchen_Temp_Monitor line 1 In the coming weks, I plan on reworking this model to work for both high and low temperature limits. I will follow up with the updates once completed and throughly tested. -Xathros
Recommended Posts