Page 1 of 1

Status Door Contact

Posted: Monday 29 April 2019 20:26
by peerkersezuuker
Hi All,
I have multiple z-wave door contacts.
I use LUA to check on some of them how long they are open, and take action on that.
First I look at the status of the contact, and if it is Open then do something.
In general that works fine, but for two contacts the status queried by LUA gives me the battery level instead of the OPn/Close status.
The affected sensors are from Fibaro, the type is FIBARO System FGK101 Door Opening Sensor.

So for the Fibaro "StatusPoortSensor = otherdevices['Poort Sensor']" gives me the BatteryLevel.
And for the Vision Security Unknown: type=2001, id=0103 "StatusGarageSensor = otherdevices['Garage Sensor 01 Door Contact']" gives me the Open/Close status.

While writing and testing this I noticed for a Philio Technology Corp PST02-C Door/Window 3 in 1 sensor+ it reports also the battery level.

Hope someone can shed a light on this.

With Regards
Peer

Re: Status Door Contact

Posted: Saturday 04 May 2019 8:23
by peerkersezuuker
So after some trouble shooting, and converting LUA to python I see it is not a LUA problem.
In my python script I load the json data into a variabele and select the 'Poort Sensor' data.
It returns the same value as the LUA script (the battery percentage), while in my debug windows it shows clear the 'Closed' status.

Image

So what you see is not what you get...…

Image

In the browser when i query the api is see the same values as i see in the python debug.

Image


So the story continues, will trouble shoot more but if someone can set me on the right track that would be much appreciated.

gr. Peer

Re: Status Door Contact

Posted: Saturday 04 May 2019 8:33
by peerkersezuuker
Ok a little more info,
When I query domoicz json straight to the idx of the sensor, the data is correct ??

Image

So I am going to use this in my python scritpt, but I don't understand why this gives me the correct values.
Regards
Peer