![]() |
|
Miscellaneous Events - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Products (https://www.comfortforums.com/forum-3.html) +--- Forum: Questions on Using Comfort (https://www.comfortforums.com/forum-159.html) +--- Thread: Miscellaneous Events (/thread-1354.html) |
- juwi_uk - 02-14-2009 There are 2 events in the \"Miscellaneous Events\" section that can fire responses. At the time the Sunrise event fires can you confirm the value in the NightTime flag; I would have thought it should be 0 (zero) as it\'s now daytime but when I checked I\'m sure it\'s still 1 (ie NightTime); surely this if confirmed isn\'t correct? J - slychiu - 02-15-2009 The Sunrise Event should make NightTime flag=0 and Sunset should set NightTime Flag=1 Didnt you make use of NightTime successfully to announce temperature when not at night previously? - juwi_uk - 02-15-2009 Hi Chiu Yes I have nighttime test working in other responses OK. What I had was this test repsonse though. If NightTime = 0 Then Set NightTimeCtr = 0 Else Set NightTimeCtr = 1 End If I set this response to fire as both the SUNRISE and SUNSET responses under Miscellaneous Responses with the idea that I\'d have a saved counter value. It\'s not an easy one to test for obvious reasons but I\'m sure when it hit sunrise the counter value was set to 1 instead of 0. This to me suggests the nighttime flag is still at the old value at the moment the responses fire. Regards J ps I\'ve setup the test to fire tonight at sunset (and sunrise tomorrow) to see if I\'m going mad! I\'ve currently set the counter to 5 and if I\'m right it\'ll go to 0 at sunset and 1 at sunrise....or I\'ll book myself into an asylum first thing in the morning ![]() - slychiu - 02-15-2009 The reason why the night time flag is not in the correct state is because the Sunrise or Sunset Response happens before the Night Time flag is changed The correct way to do this is Sunrise Response Set NightCtr=0 Sunset Response Set NightCtr=1 I wonder why you need to use a counter in this case. I think you should be able to use the NightTime Flag instead of the Counter for any purpose, in which case the Sunrise and Sunset Responses are not necessary at all - juwi_uk - 02-15-2009 OK, thanks for confirming. Yes I do use Nighttime flag in my responses, and as you say it can be used anywhere, but I\'d suggest this is a bug that the nighttime flag is incorrect if used in sunrise/sunset responses as you would assume that at either of these events the flag should reflect the actual state. At Sunrise response event it should be readable as 0 and at sunset it should be 1 surely. I only came across this as I was firing a response that had these in an IF statement that included nighttime tests and whilst I agree the test should be implicit at the time these reponses fire (ie by virtue of it being sunrise or sunset respectively) I was trying not to have too many variants of a common response to maintain. J - slychiu - 02-16-2009 The next release (after ULT 5.166) will allow the value of night time flag to be tested in the sunrise or sunset response, ie it will be changed before the response is called See full explanation of Sunrise and Sunset Times, Daylight saving automatic time changes, testing for Night time has been introduced in Firmware 5.121 and Comfigurator 3, see http://www.comfortforums.com/forum20/1004.html |