Posted: Tuesday Nov 15th, 2011 06:15 am |
|
1st Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
Hi All,
I am setting up different times for lamps to come on and off during the evening and just wanted to check that day 1 = Monday day 2 = Tyesday etc
I basically want to have a different times depending on the day for the lights to come on each night. At the moment I am using timers but have realised I can just build a response using Do command. This will remove the need to take up timers.
Cheers
Lee
|
Posted: Tuesday Nov 15th, 2011 06:46 am |
|
2nd Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
Yes, Day 1 is monday
|
Posted: Tuesday Nov 15th, 2011 11:11 am |
|
3rd Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
Sorry which DAY are you refering to ?
if you mean the statement
If Day .. it means day of month
there is another condition
If Day of Week which starts with Monday = 1
|
Posted: Tuesday Nov 15th, 2011 03:36 pm |
|
4th Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
Hi Ident
This is what I have done and triggered under misc events sunset.
Just adding to this as my lights don't seem to be working after the change.
Previously I was using a response triggered by sunset to turn my lights on at night, I then set a few timed events to turn the lights off, different times for different days. This seems a bit messy so thought I could do a resonate to cover both the on and off in one go, again started by the sunset mics event.
This has been active for a couple of days using the response detailed below, but none of my light have come on. I need to check the timing but I think in principle this should be working can you spot anything I have done wrong.
Cheers
Lee
Cheers
Lee
[code][/code]Attachment: lampsOnOff.JPG (Downloaded 65 times) Last edited on Thursday Nov 17th, 2011 11:54 am by lwillerton
|
Posted: Saturday Nov 19th, 2011 10:03 am |
|
5th Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
Hi Ident,
I have put my lights on off back to the previous way I did it, but this does not seem efficiant.
Can you advice on the best way?
All I want to do is have lights coming on and off after sunset (might add a lux sensor later) so that it gives the impression someone is in. Guess a bit similar to vacation mode. I might change this long term and only trigger this if in away mode as I do find it a bit of a problem at night if I have gone to bed early and the bedside light comes on.
The problem I have is we do a lot of caring for our parents and we don't have a set routeen so the house can sometimes be in darkness for days....this is one of the main reasons for buying the system. I had a program called e-Homeautomation doing it before but if I can achieve this (which I am sure I can) using comfort alone it makes sense.
Also if I am using the sunset trigger and we the time changes for daylight saving how does the system manage that? atomically or do I have to program something? This happened whilst I was away and I never checked the time to see what it was set at before I uploaded a change. Sorry not checked the fourm for the answer.
Cheers
Lee
|
Posted: Saturday Nov 19th, 2011 12:28 pm |
|
6th Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
Your error is a classic one with the use of Timers
When you do a Timer action, you start a Timer with a value and set a Response to activate when the timer expires.
You can consider a timer as an object with a time register and a Response. This timer register decrements every second and runs the Respone at the end
In your Response, you have an action
Do KitchenLampOn after 180 seconds using KitSunsetLamp timer
Later in the same Response you have
Do KitchenLampOFF after 240 seconds using KitSunsetLamp timer
You have used the SAME timer after starting the timer in an earlier action. This means that the 2nd action will load the timer with a new value and a new Response
Hence the 1st timer and Response does not get a chance to finish
Fix this in one of two ways
Use 2 different timers for the ON and OFF light actions
or use the following
Do KitchenLampTemp after 180 seconds using KitSunsetLamp timer
In KitchenLampTemp Response =
Do KitchenLampOFF after 60 seconds using KitSunsetLamp timer
This second option conserves timers.
You can use the same timer again if the timer has ended
There is a tutorial on Timers at http://www.comfortforums.com/forum83/1680.html
When Daylight Saving changes, the time automatically changes. The Sunset and Sunrise times are adjusted accordingly. Hence there is no need to do any additional programming to handle daylight saving. Comfort takes care of it for you
See Tutorial on how sunset and sunrise times work with Daylight saving http://www.comfortforums.com/forum92/1004.html
|
Posted: Monday Nov 21st, 2011 11:41 pm |
|
7th Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
Hi Ident,
Got this now and have changed all the time. I basically thought that each do after time response followed on from the next one and not that they where running in parallel.
Anyway to expand on this I have set the timers to work between 4pm and 11:30ish which is fine for now, however I would like to run this response for my lights all year round.
The problem is if I do a response now it could be 7 or 8 hours after sunset (sunset 3:50pm bedtime 11:30), however in the summer it might only be 1 or 2 hours (sunset 8:30 bedtime 11:30). Therefore I was thinking that this might work
month = 1 or 12 and if day = 2 or 4 do z-wave on after 7200 seconds
month = 2 or 11 and if day = 2 or 4 do z-wave on after 300 seconds
In my mind it would be better if I could drive this down to week of the year as the daylight increases steeply in the summer months. In the case I would substitute the month = to iweek = ...could not find that option though.
I know this is a lot of programming in the first place but once done it will give a complete security solution all year round without having to keep going on the the box to reduce / increase response delays.
Also Is it possible to do a copy of a group of code in a response as this would help build a large set of response code that only changes in one or two places eg
A
If night <> 0
Do x after x seconds
Do y after y seconds
Do z after z seconds
Copy of A
If night = 0
Do x after x seconds
Do y after y seconds
Do z after z seconds
Fundamentally iin my mind f a light is on in a house when it's dark that is one big security deterrent, unfortunately that reduces if the light comes on at the same time every day. You only have to watch home alone to see what I mean.
Any other ideas welcome.
Cheers
Lee
|
Posted: Tuesday Nov 22nd, 2011 01:56 am |
|
8th Post |
Posted: Tuesday Nov 22nd, 2011 04:50 am |
|
9th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 562 |
Status: |
Offline
|
back to top
|
Can't you use the 'Sunset' variable? This will change the ON time every day but not by much.
What I do on Cbus is to use 'Sunset' time and then add a random number from 1-15 so that every day the time is different. I don't know if that's possible with Comfort. I also have different scenarios when Armed or Disarmed.
Ingo
|
Posted: Tuesday Nov 22nd, 2011 03:26 pm |
|
10th Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
Hi Ingo,
Thanks for the response it has made me think a little more about what I am trying to do and basically the only was is to use the sunset trigger to start the process. However, I have no real option other than to use set times to turn things off.
I agree that I should treat differently if the system is armed / disarmed so will put my efforts in to that.
Thanks
Lee
|
Posted: Saturday Dec 3rd, 2011 09:30 am |
|
11th Post |
lwillerton
Member
Joined: | Sunday Oct 2nd, 2011 |
Location: | |
Posts: | 221 |
Status: |
Offline
|
back to top
|
hi,
I have looked at the link in your post and I am not sure how it helps me.
So what i have done is a sunset trigger with responses shown in the pic below. I have changed the code so that the same timer is not running multiple times at the same time.
i have done a similar response based on day of the week to turn the lights off. So this week Sunday / Monday the lights came on but noting since.
basically all i want to do is have lights come on as it goes dark so the sunset trigger seems right and as we go to bed between 23 - midnight depending on which day of the week it is i.e Friday, Saturday and Sunday we go to bed a lot later than Mon - Thur. We don't want lights to come on at the same time each day as this is very obviously to anyone watching the house. Therefore the sunset timer moves the start time by a few minutes each day and by having a different sequence this also gives a more random appearance bit more like real life.
Why is my response not working?
Cheers
Lee
Attachment: sunset lights.JPG (Downloaded 32 times)
|
Posted: Wednesday Dec 7th, 2011 03:13 am |
|
12th Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
I dont see anything wrong
Can you send the cclx file to support@cytech.biz for testing
|
|