Posts: 64
Threads: 16
Joined: May 2008
Reputation:
0
At what point during the responses Security Off, Away Mode etc does the attribute Security Mode change its value? At the beginning or at the end or perhaps it\'s not defined? I suppose my real question is can I tell which mode I\'m coming from during these responses, in particular Security Off?
Posts: 3,493
Threads: 476
Joined: Aug 2006
Reputation:
0
The security mode is changed before the security mode responses so you would not be able to check the previous mode
You can save the security mode in a counter in each mode eg off = 0, away = 1, night=2, day=3 in the security mode response. You can check the old security mode in the same security mode response before you change the counter
Posts: 64
Threads: 16
Joined: May 2008
Reputation:
0
Thank you for your response. I think it\'s a shame that the Security Mode attribute is not changed at the end of these responses. It must be quite common to want to know which mode you are coming from, especially in the Security Off response, and although using a counter as you suggest is a work around, it is not as easy and the meaning of the code is less obvious as you have to remember the mapping between the Security Mode and the integer value of the counter. Would it be possible to change the way it works, or perhaps better introduce a new attribute that behaves in this way?
Posts: 247
Threads: 55
Joined: Jul 2007
Reputation:
0
Hmmm...
If security will be changed after responses, all my logic will fail miserably!
:-)
Posts: 64
Threads: 16
Joined: May 2008
Reputation:
0
That\'s why I suggested a new attribute rather than changing the existing.
So do you have one response that is called for several different changes of security mode?
Posts: 247
Threads: 55
Joined: Jul 2007
Reputation:
0
In this case, i use a Counter, as suggested by ident. This Counter also updates my Gira Homeserver via KNX group address.
Posts: 107
Threads: 17
Joined: Jun 2006
Reputation:
0
Hi Chiu,
Does the LastSecurityMode attribute in the If statement now address this requirement? I used to use coumters to achieve this, but the LastSecurityMode would be more elegant and if it addresses the same requirement I would rather use that.
As a matter od interest, when did this become available?
Regards,
Clinton.
Posts: 5,952
Threads: 871
Joined: Apr 2006
Reputation:
2
Yes, the Last Security Mode can be used for this purpose
Last Security Mode is set the the security mode after the security mode response.
Hence when you arm or disarm again, this will give you the previous security mode
This was added in 2013 so it may have been done in response to the request in this forum but it was not known!