This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Status read
#1
Hi,

I need to check the current status of a data object, as a condition in an if-then-elseif.
Having the correct and current (at the exact moment of the request) status is an absolute requirement.


I use grp.read() but since this function returns immediately, the script does not await the response of the bus and continues. Any checks on the status are therefore not usable.

I read a post (I believe from admin), stating to put a os.sleep(2) after the read request in order to give the knx bus the time to put the answer to the request on the bus.

However, I can imagine something can go wrong and the status gets lost or takes longer then 2 seconds to get to the requesting script, meaning this is not a 100% reliable and slow method

Waiting longer then 2 seconds is not really an option (2 seconds is actually already pretty long) since actions to be taken would take too long to activate and possibly, the status of the object has changed in the meantime due some other bus command.

So, my question : is there a way to get the current status of a knx object and be able to use it immediately in a condition check, without delay?

Thanks for your advice.

Hendrik.
Reply


Messages In This Thread
Status read - by Monolithos - 04.04.2017, 07:35
RE: Status read - by admin - 04.04.2017, 08:14
RE: Status read - by Monolithos - 04.04.2017, 23:24
RE: Status read - by admin - 05.04.2017, 06:10

Forum Jump: