hoopty
Members-
Posts
53 -
Joined
-
Last visited
Profile Information
-
Location
OK
hoopty's Achievements
New (2/6)
0
Reputation
-
Same here. Lightning took out my setup and I really had no option except to start over with something else. It really wasn't that difficult and if you take care laying it out, it can be done up to look pretty nice when it's done. I'd even consider making some for anyone who isn't handy w/ a soldering iron. Hit me up.
-
The SMS standard limits the character count to 160, it's not by carrier. (Twitter has 140 limit)
-
Well, those numbers don't look right do they... I'm not sure why you wouldn't have any heating cycles, unless there's something wrong w/ the program. Have you seen the variable increment when a call for heat is initiated? Also, if the report is showing zero, but the variable actually has a different value, maybe your custom notification is calling the wrong variable. Just some thoughts. As for the math, here is how it breaks down. The counter itself increments by one every five seconds that the HVAC is running. So one minute would equate to a count of 12 (or 60/5). The way I calculate for the report is like this: Lets say our count for the day ended up being 3197 1. Make the xxx_Hr variable equal the total count for the day. xxx_Hr = xxx_5sec = 3197 2. Divide xxx_Hr variable by 720 to get the number of hours it ran. (720 = 12 counts per minute * 60 minutes/hr) xxx_Hr/720 = 3197/720 = 4.4402777777 - The variables always round down so xxx_Hr ends up equaling 4. 3. Make the xxx_Min equal the total count for the day. xxx_Min = xxx_5sec = 3197 4. Divide xxx_Min by 12 to get the number of minutes it ran. (again, 60/5 based on the 5 second count interval) xxx_Min = 3197/12 = 266.4166666 - Again, the variable rounds down to 266. 5. Then I set the temp variable to equal xxx_Hr. temp = xxx_Hr = 4 6. Multiply temp by 60 to get the number of minutes in the hours it ran. temp*60 = 4*60 = 240 7. Subtract temp from xxx_Min to obtain the remainder of minutes after the hours are calculated. xxx_Min - temp = 266 - 240 = 26 So you get a run time of xxx_Hr and xxx_Min or 4 Hr and 26 Min(s). And if you change the counter interval, you will have to re-calculate the numbers for 12 and 720. I hope this helps.
-
I ran a few more tests and it was no more than a second off over a 3 minute period. And that could be attributed to several things such as lag in the interface or difference in start time of prog and timer.
-
Teken, did you ever get this to work for your setup?
-
After reading that thread, I don't see how. This program doesn't repeat the wait statement. The wait occurs first and is only there to allow for the first five seconds to pass before the variable is incremented. After that, the variable +1 is will repeat every 5 seconds.
-
I wonder if you change the wait time to more than 1 second, if that would have any affect on it. Maybe you wouldn't see the one second going on behind the scenes, if the wait time were longer than the propagation time... just a thought.
-
Yes. For 2 of the 3 anyway. You would need to change /= 12 to /=10 and /= 720 to /= 600. Leave *= 60 alone.
-
Well, that's a bit more complicated isn't it? I think you can attack it a couple of different ways. First, you could just duplicate all the variables and programs 5 times and label them such that you can tell them apart. i.e. heat1_cycles_daily, heat2_cycles_daily, etc... This method is the easiest to pull off and understand, but I don’t think that is the most efficient way of doing things. But depending upon the resource drain, it might not be a bad idea, as you can set each end of day to run independently at different times. The second option would be more complicated. You'd still need quite a few more variables and you'd have to modify the calc and the send/reset program pretty significantly. Without knowing your complete setup and expected outcome for this, here’s how I would start out: Define variables (non-state): $Cool1_Cycles_Daily $Cool2_Cycles_Daily $Cool3_Cycles_Daily $Cool4_Cycles_Daily $Cool5_Cycles_Daily $Heat1_Cycles_Daily $Heat2_Cycles_Daily $Heat3_Cycles_Daily $Heat4_Cycles_Daily $Heat5_Cycles_Daily $Cool1_Cycle_Time_Daily_5Sec $Cool2_Cycle_Time_Daily_5Sec $Cool3_Cycle_Time_Daily_5Sec $Cool4_Cycle_Time_Daily_5Sec $Cool5_Cycle_Time_Daily_5Sec $Heat1_Cycle_Time_Daily_5Sec $Heat2_Cycle_Time_Daily_5Sec $Heat3_Cycle_Time_Daily_5Sec $Heat4_Cycle_Time_Daily_5Sec $Heat5_Cycle_Time_Daily_5Sec $temp $Cool1_Cycle_Time_Hr $Cool2_Cycle_Time_Hr $Cool3_Cycle_Time_Hr $Cool4_Cycle_Time_Hr $Cool5_Cycle_Time_Hr $Heat1_Cycle_Time_Hr $Heat2_Cycle_Time_Hr $Heat3_Cycle_Time_Hr $Heat4_Cycle_Time_Hr $Heat5_Cycle_Time_Hr $Cool1_Cycle_Time_Min $Cool2_Cycle_Time_ Min $Cool3_Cycle_Time_ Min $Cool4_Cycle_Time_ Min $Cool5_Cycle_Time_ Min $Heat1_Cycle_Time_ Min $Heat2_Cycle_Time_ Min $Heat3_Cycle_Time_ Min $Heat4_Cycle_Time_ Min $Heat5_Cycle_Time_ Min Programs: Cool1_Cycles/Run_Time If Status 'T-Stat / T-Stat_1' is Calling for Cool Then $Cool1_Cycles_Daily += 1 $Cool1_Cycles_Daily Init To $Cool1_Cycles_Daily Wait 5 seconds Repeat Every 5 seconds $Cool1_Cycle_Time_Daily_5Sec += 1 Else $Cool1_Cycle_Time_Daily_5Sec Init To $Cool1_Cycle_Time_Daily_5Sec Copy Cool1_Cycles/Run_Time program 4 more times change all instances of Cool1 to Cool2, Cool3, etc… and reference the appropriate TSTAT. Same goes for the Heat_Cycles/Run_Time. Create 5 separate programs utilizing Heat1, Heat2, etc… Daily_Cycle_Times_Calc If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $Heat1_Cycle_Time_Hr = $Heat1_Cycle_Time_Daily_5Sec $Heat1_Cycle_Time_Hr /= 720 $Heat1_Cycle_Time_Min = $Heat1_Cycle_Time_Daily_5Sec $Heat1_Cycle_Time_Min /= 12 $temp = $Heat1_Cycle_Time_Hr $temp *= 60 $Heat1_Cycle_Time_Min -= $temp $Cool1_Cycle_Time_Hr = $Cool1_Cycle_Time_Daily_5Sec $Cool1_Cycle_Time_Hr /= 720 $Cool1_Cycle_Time_Min = $Cool1_Cycle_Time_Daily_5Sec $Cool1_Cycle_Time_Min /= 12 $temp = $Cool1_Cycle_Time_Hr $temp *= 60 $Cool1_Cycle_Time_Min -= $temp $temp = 0 $Heat2_Cycle_Time_Hr = $Heat2_Cycle_Time_Daily_5Sec $Heat2_Cycle_Time_Hr /= 720 $Heat2_Cycle_Time_Min = $Heat2_Cycle_Time_Daily_5Sec $Heat2_Cycle_Time_Min /= 12 $temp = $Heat2_Cycle_Time_Hr $temp *= 60 $Heat2_Cycle_Time_Min -= $temp $Cool2_Cycle_Time_Hr = $Cool2_Cycle_Time_Daily_5Sec $Cool2_Cycle_Time_Hr /= 720 $Cool2_Cycle_Time_Min = $Cool2_Cycle_Time_Daily_5Sec $Cool2_Cycle_Time_Min /= 12 $temp = $Cool2_Cycle_Time_Hr $temp *= 60 $Cool2_Cycle_Time_Min -= $temp $temp = 0 ****REPEAT 3 MORE TIMES FOR REMAINING TSTATS**** Else - No Actions - (To add one, press 'Action') Send_Daily_Status_And_Reset If Time is 11:59:30PM Then Set 'T-Stat / T-Stat1' Query Set 'T-Stat / T-Stat2' Query Set 'T-Stat / T-Stat3' Query Set 'T-Stat / T-Stat4' Query Set 'T-Stat / T-Stat5' Query Wait 3 seconds Run Program 'Daily_Cycle_Times_Calc' (Then Path) Wait 3 seconds Send Notification to 'E-mail' content 'Daily_Climate_Status' Wait 3 seconds $Heat1_Cycles_Daily = 0 $Heat1_Cycles_Daily Init To 0 $Cool1_Cycles_Daily = 0 $Cool1_Cycles_Daily Init To 0 $Heat1_Cycle_Time_Daily_5Sec = 0 $Heat1_Cycle_Time_Daily_5Sec Init To 0 $Cool1_Cycle_Time_Daily_5Sec = 0 $Cool1_Cycle_Time_Daily_5Sec Init To 0 $Heat2_Cycles_Daily = 0 $Heat2_Cycles_Daily Init To 0 $Cool2_Cycles_Daily = 0 $Cool2_Cycles_Daily Init To 0 $Heat2_Cycle_Time_Daily_5Sec = 0 $Heat2_Cycle_Time_Daily_5Sec Init To 0 $Cool2_Cycle_Time_Daily_5Sec = 0 $Cool2_Cycle_Time_Daily_5Sec Init To 0 ****REPEAT 3 MORE TIMES FOR REMAINING TSTATS**** Else - No Actions - (To add one, press 'Action') You might need some waits between the TSTAT query lines, I’m not sure. You may have to play around with some of this timing wise as there is a lot going on. I put this together assuming that you'd have all your stats in one single report. You'll have to modify your notification(s) to meet your desired format. Note: I’ve removed the monthly stats for the sake of cutting down on code and variables. If that’s a must have, it can be done. I just didn’t feel that the benefit of having that stat outweighed the complexity that leaving it in would create. One last thing. I have NO idea how this is going to affect your ISY’s resources if multiple programs are running and counting, let alone the amount of calculating it is going to be doing when you run that program. I don’t have that much stuff going on at any given time, so that is something to think about also. Good luck! Let me know how it turns out.
-
Gotcha. That's what I was thinking. Cut the error in half on both ends and it should average out in the long run. I should change it to a # divisible by two, whatever I decide to go with.
-
I don't understand. I have the counter starting after 5 seconds of run-time using the 'Wait 5 seconds' command. Watching it work, by starting it manually and monitoring the variables, it works like you'd expect. Only after 5 seconds have elapsed, does it add the first count. Wait 5 seconds Repeat Every 5 seconds $Cool_Cycle_Time_Daily_5Sec += 1 The only problem I see with this particular logic, is when the unit shuts off between counts, and you miss counting the last 1-5 seconds. Hence why I chose a small 5 second counting window. I suppose you could shorten the count time to as small as 1 second, but I assumed that that would use too much resources and might cause problems if another program tried to run at the same time. The way I see it is, if I miss a complete 5 seconds every cycle (not likely), my count is off (low) a max of 1 minute every 12 cycles. When the math is calculated, the variables get rounded down as well. From that, I could be as much as 59 seconds low per report also. I wonder if that wait statement shouldn't be removed as a way of compensating for the rounding down. Anyway, I do want things to be as accurate as possible, and if there is a quick and easy way to do it, I'm all for it. But at the end of the day, a couple of minutes either way isn't that big of a deal to me. When it's running for 8 or 10 hrs in the summer, 2-3 minutes is minor.
-
Is this because there will be one last count after the cooling stops (program goes false)? Meaning once the last repeat starts, the count will always increment one more time?
-
-
-
I originally posted this in the thread that about counting the cycles, but felt it was kind of buried there and may never get seen. So I decided to make it a how to post. I really liked the idea of counting the number of cycles I saw in another thread, as one of the main things I like about the ISY and the Venstar adapter, is that I can export the logs and examine how my HVAC system is running. So as I was implementing it, I remembered another thread in the forum about a counter to report accumulated on time for a particular light. I figured it would be a natural fit for this set of programs, so I merged the two and below is what I've got running. All credit goes to the original posters of these programs, I just molded them to fit my needs. The following programs will count the heating and cooling cycles as well as accumulate the run time of each cycle. At the end of the day (or whenever you choose), it will send out a notification letting you know how many cycles of each ran, and the accumulated time, in hours and minutes, for each as well. The counter runs on a 5 sec clock, therefore you have to divide by 12 to get minutes (you have to divide by (12*60) or 720 to get hrs). I chose 5 seconds as it gives a bit more accuracy. You can set it for whatever you want, but remember to change the calc program, so your end of day numbers come out right. I have the calc program disabled as it is only called by the end of day routine. I put in the monthly variable, but don't have it set up yet, other than to dump each of the daily figures into it. I plan on setting up variables to calculate the dates and such, then I can run a monthly report and reset the numbers at that time. An example of the notification I put together looks like this: Cooling ran for a total of 18 cycles today. Total cooling run time was 5 hour(s) and 23 minute(s). Heating ran for a total of 4 cycles today. Total heating run time was 1 hour(s) and 49 minute(s). Define variables (non-state): $temp $Cool_Cycles_Daily $Heat_Cycles_Daily $Heat_Cycle_Time_Daily_5Sec $Cool_Cycle_Time_Daily_5Sec $Heat_Cycle_Time_Hr $Cool_Cycle_Time_Hr $Heat_Cycle_Time_Min $Cool_Cycle_Time_Min $Heat_Cycle_Time_Monthly $Cool_Cycle_Time_Monthly $Heat_Cycles_Monthly $Cool_Cycles_Monthly Define Custom Notification: Daily_Climate_Status Programs: Cool_Cycles/Run_Time If Status 'T-Stat / T-Stat' is Calling for Cool Then $Cool_Cycles_Daily += 1 $Cool_Cycles_Daily Init To $Cool_Cycles_Daily Wait 5 seconds Repeat Every 5 seconds $Cool_Cycle_Time_Daily_5Sec += 1 Else $Cool_Cycle_Time_Daily_5Sec Init To $Cool_Cycle_Time_Daily_5Sec ----- Heat_Cycles/Run_Time If Status 'T-Stat / T-Stat' is Calling for Heat Then $Heat_Cycles_Daily += 1 $Heat_Cycles_Daily Init To $Heat_Cycles_Daily Wait 5 seconds Repeat Every 5 seconds $Heat_Cycle_Time_Daily_5Sec += 1 Else $Heat_Cycle_Time_Daily_5Sec Init To $Heat_Cycle_Time_Daily_5Sec ----- Daily_Cycle_Times_Calc If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $Heat_Cycle_Time_Hr = $Heat_Cycle_Time_Daily_5Sec $Heat_Cycle_Time_Hr /= 720 $Heat_Cycle_Time_Min = $Heat_Cycle_Time_Daily_5Sec $Heat_Cycle_Time_Min /= 12 $temp = $Heat_Cycle_Time_Hr $temp *= 60 $Heat_Cycle_Time_Min -= $temp $Cool_Cycle_Time_Hr = $Cool_Cycle_Time_Daily_5Sec $Cool_Cycle_Time_Hr /= 720 $Cool_Cycle_Time_Min = $Cool_Cycle_Time_Daily_5Sec $Cool_Cycle_Time_Min /= 12 $temp = $Cool_Cycle_Time_Hr $temp *= 60 $Cool_Cycle_Time_Min -= $temp $temp = 0 Else - No Actions - (To add one, press 'Action') ----- Send_Daily_Status_And_Reset If Time is 11:59:30PM Then Set 'T-Stat / T-Stat' Query Wait 3 seconds Run Program 'Daily_Cycle_Times_Calc' (Then Path) Wait 3 seconds Send Notification to 'E-mail' content 'Daily_Climate_Status' Wait 3 seconds $Heat_Cycle_Time_Monthly += $Heat_Cycle_Time_Daily_5Sec $Heat_Cycle_Time_Monthly Init To $Heat_Cycle_Time_Monthly $Cool_Cycle_Time_Monthly += $Cool_Cycle_Time_Daily_5Sec $Cool_Cycle_Time_Monthly Init To $Cool_Cycle_Time_Monthly $Heat_Cycles_Monthly += $Heat_Cycles_Daily $Heat_Cycles_Monthly Init To $Heat_Cycles_Monthly $Cool_Cycles_Monthly += $Cool_Cycles_Daily $Cool_Cycles_Monthly Init To $Cool_Cycles_Monthly $Heat_Cycles_Daily = 0 $Heat_Cycles_Daily Init To 0 $Cool_Cycles_Daily = 0 $Cool_Cycles_Daily Init To 0 $Heat_Cycle_Time_Daily_5Sec = 0 $Heat_Cycle_Time_Daily_5Sec Init To 0 $Cool_Cycle_Time_Daily_5Sec = 0 $Cool_Cycle_Time_Daily_5Sec Init To 0 Else - No Actions - (To add one, press 'Action') Let me know if you have any questions. Also, always looking for ways to streamline, so let me know if you see those opportunities as well. Thanks.