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

Getting KNX status
 Moderated by: admin
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Tuesday Sep 3rd, 2013 10:38 pm
   PM  Quote  Reply 
1st Post
andrew@bohnet.co.uk
Member
 

Joined: Tuesday Jul 5th, 2011
Location:  
Posts: 4
Status: 
Offline

  back to top

I recently put in some logic that would turn on the landing light after 8pm if movement was detected and then turn itself off again after 3 minutes.

The issue is that with young kids, when they see the light come on, they wake up and start to cry. So is there anyway to have the follwoing

after 8pm, the light will turn on using the PIR
a user can turn the light off
If PIR then detects movement immediately after, it will check the status of the knx switch to see if the switch had been turned off in the last 5 minutes. If it had then it does not turn on, if it had not then it turns on for 3 minutes.

So is there anyway of knowing what the status of a knx location is at any one time (on off) and whether comfort can know if a light switch was pressed in a certain period of time via the knx bus?



 Posted: Wednesday Sep 4th, 2013 05:48 am
   PM  Quote  Reply 
2nd Post
ident
Administrator


Joined: Wednesday Aug 9th, 2006
Location: Singapore
Posts: 3493
Status: 
Offline

  back to top

KNX group addresses are mapped to counters  in Comfort (in KNX to Comfort page)
ie if the state of the kNX group address changes, the state is sent to the counter, 0 for off, 255 for on and 1 to 254 for dim level

At the same time this triggers a counter Response associated with that counter

The response can start a timer for 5 minutes when the group address value has changed to 0 (off)
You can test the state of the timer - if it is ON that means the timer is still running, if Off that means the timer is expired

You can use this to write your logic. I hope this gives you an idea how to do it



 Posted: Wednesday Sep 4th, 2013 07:49 am
   PM  Quote  Reply 
3rd Post
andrew@bohnet.co.uk
Member
 

Joined: Tuesday Jul 5th, 2011
Location:  
Posts: 4
Status: 
Offline

  back to top

thanks for this - do you have a sample code that I can use as a template/guide?



 Posted: Wednesday Sep 4th, 2013 01:01 pm
   PM  Quote  Reply 
4th Post
ident
Administrator


Joined: Wednesday Aug 9th, 2006
Location: Singapore
Posts: 3493
Status: 
Offline

  back to top

KNX Light Counter Response
If last  counter value = 0 then Do Response Null (0) using  Timer X  for 3 minutes

This means that if the light switch turned off (value 0) then start a timer for 3 minutes

PIR Zone Response
If Timer X =0 then Turn on Light for 5 minutes
  
This means when the PIR is activated check the timer, if not running, then turn on light

I hope this helps



 Current time is 01:24 am
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems