![]() |
|
Automate Light Off - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Third Party (interfacing to Comfort) (https://www.comfortforums.com/forum-5.html) +--- Forum: Zwave (https://www.comfortforums.com/forum-62.html) +--- Thread: Automate Light Off (/thread-2119.html) Pages:
1
2
|
- juwi_uk - 01-02-2011 Hi I\'m sure its been asked many times but having spent many hours in a \"cave\" writing ComfortClient code I thought maybe my system needed a little TLC time too over the holidays and realised not as simple in my brain as first thought. I have Zwave working with my lights. I want to turn the hall lights off automatically after 5 mins if switched on (as most people do in my house do) using the light switch. Save the planet and more importantly my electricty bill! Possible? If so can you point me in the right direction. I can see writing a response would work but how can that response be triggered by the physical switch being pressed? Happy New Year. Julian - slychiu - 01-03-2011 Happy New Year Julian The UCM/Zwave is a one way interface, ie it can control Zwave devices and get its status by polling the device, but commands from Zwave switches cannot trigger Responses. This is a limitation of the Zwave protocol, as it was designed foro simple control by a remote controller. Perhaps you can turn off your lights using a PIR, base on logic and time, eg if motion is not detected for 10 minutes and etc.. then switch off the lights - slychiu - 01-03-2011 I was wrong, there is another way you can turn off the lights on Zwave after you have used the Zwave switch to turn on the lights The light should be mapped to a counter in Comfort during the learning process. Hence use a timer to check the counter value. If it is ON, ie FF, start another timer to turn off the same light. You can combine with other logic conditions like PIR motion - juwi_uk - 01-03-2011 Thanks Chiu. - juwi_uk - 01-03-2011 OK what am I doing wrong? Created response called \"HallDownTimerOff\" as follows: If Counter ZWHallDown = 255 Then Do ZWHallDownOff After 60 Seconds Using Timer20 ! Hall Down Timer End If Attached this response to counter \"ZWHallDown\" response. Uploaded to Comfort but doesnt work. Have tested \"ZWHallDownOff\" seperately and that works fine. Tried \"execute response\" in Comfigurator on \"HallDownTimerOff\" and nothing happens. In IO Monitor I get this when test in comfigurator: > LI**** > DA51359206FFC214003C5E00FF > LI < LU01 < LR0111 < RA00 < LU00 What am I missing? Regards Julian - slychiu - 01-03-2011 The Counter Response is not activated for Zwave This is because Comfort is polling the mapped zwave module for its value and saving it in the counter. It is not that the Zwave device sends the counter value to Comfort Comfort polling and updating the counter does not activate the Counter response You will have to use a separate timer which times out every 10 or 20 seconds and runs the response Halldowntimeroff and starts again - juwi_uk - 01-03-2011 Hi Chiu, You\'ve lost me. Are there any examples on the forum on how to do this? Regards Julian - juwi_uk - 01-03-2011 I understand now. That said IMHO this is wrong. Surely if you are going to have an event-driven response on a counter then it should fire every time the counter value changes, irrespective of what method changed the counter value. Regards Julian - slychiu - 01-03-2011 I understand the confusion The principle operating is the same as the KNX and Cbus interfaces which are two way, ie Cbus and KNX can control Comfort via Counter Responses, but in this case Zwave cannot do so Lets consider the case of Cbus. When a Cbus button is pressed, it sends a value to the mapped counter and triggers a Counter Response However when Comfort sends a message to Cbus, say to turn on the light, it also changes the counter value to FF. However in this case, it does not trigger the counter response again because that may cause a duplicate action, ie cause something which you may not want to happen in the other direction. eg a Cbus switch causes Comfort to switch on a number of devices. If the command goes the other way from Comfort to Cbus, should this cause the same thing to occur? That is the historical reason for this behaviour, that counter responses are activated by incoming counter changes only. However it may be that this may not be the correct or the best way to handle it, and that the Counter response should be activated in both ways. I am not sure also that if such a change were made that it may affect existing programs and cause different behaviour. It is certainly something to consider - juwi_uk - 01-03-2011 Chiu, Do you have an example of how I can get to work right now? If I\'m understanding correctly I need some sort of perpetual timer running. So I run ResponseA which at the end of countdown starts ResponseB which does the payload and then starts ResponseA again. Is this the way it works? I guess I need to hook the ResponseA to something then to start it the first time. Any help appreciated. Regards Julian |