Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Recording max temp from scs
 Moderated by: admin
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Friday Jun 24th, 2011 11:15 pm
   PM  Quote  Reply 
1st Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Hi,

I am trying to get comfort to store in a counter, the highset recorded temp from an scs!! Here is what I have done

1) The SCS temp is converted to celsius and imported into counter kitchentemp.
2) I have a second counter, maxkitchemtemp, which is the counter that I aim to use to store the highest recorded kitchen temp.
3) I have a response activated by sensor8 response written as follows

Get Counter MaxTempKitch
Subtract Kitchentemp
If LastActionValue < 0 Then
Copy Counter Kitchentemp To MaxTempKitch
End If

So in theory, if maxkitchentemp is currently 15, and kitchentemp is 21, then

get maxkitchen temp = 15
subtract kithchen temp of 24 (15-24=-9)
lastaction value is now less than 0, so
copy kitchentemp counter (24) to maxkitchentemp counter.

In theory, after this, maxkitchentemp should be 24, buit it is not.

Any help would be appreciated.

Regards,
Eamon



 Posted: Wednesday Jun 29th, 2011 02:06 am
   PM  Quote  Reply 
2nd Post
leonchue
Cytech
 

Joined: Monday Aug 7th, 2006
Location: Singapore
Posts: 71
Status: 
Offline

  back to top

Try replacing your line

"If LastActionValue < 0 Then"

with this

"If LastActionValue >=128 Then"

It should work this time ;)



 Posted: Wednesday Jul 13th, 2011 01:25 pm
   PM  Quote  Reply 
3rd Post
wexfordman
UCM Pi Users
 

Joined: Monday Jan 1st, 2007
Location: Cork, Ireland
Posts: 546
Status: 
Offline

  back to top

Hi Leone,

At last, I finally got round to doing what you said... and it worked!! Not sure why, could you clarify ?


Also, the next thing I wanted to do was time stamp the event. So I have created counters for day, month and year and added it to the response as follows:-

Get Counter MaxTempKitch !
Subtract Kitchentemp
If LastActionValue >= 128 Then
Copy Counter Kitchentemp To MaxTempKitch
GetParameterValue Day
Set Kitchendate
GetParameterValue Month
Set kitchenmonth
GetParameterValue Year
Set kitchenyear
End If

Only thing is, my day, month and year counters remain empty!!



 Posted: Thursday Jul 14th, 2011 01:33 am
   PM  Quote  Reply 
4th Post
leonchue
Cytech
 

Joined: Monday Aug 7th, 2006
Location: Singapore
Posts: 71
Status: 
Offline

  back to top

GetParameterValue Day
Set Kitchendate
GetParameterValue Month
Set kitchenmonth
GetParameterValue Year
Set kitchenyear

This part should work, unless the max temp is not triggered. Maybe your modified program has not been downloaded into the system (ie. Comfort and CWM) or the wrong counters are referenced in CWM?

Just a suggestion, maybe you may want to have a "max temp reset to 0" button/response. Useful for debugging purposes as well ;)



 Current time is 10:49 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems