Finish integrating the OWON PIR313-E detector

Hello,

As mentioned in the thread Configuration/Multi-sensor device I tested the OWON PIR313-E detector.
Motion, humidity, temperature and brightness are reported correctly in Gladys. The battery charge level and the tamper value are missing.
Is it possible to integrate these two parameters?
Thank you in advance.

Hi @bab85,

I looked and yes, the 2 functions you’re asking for are not implemented in Gladys.

Ci dessous les 2 exposes manquant.

As for the charge level, however, it’s not really the level but just whether the battery is low or not.

As soon as I can I’ll look into integrating these 2 exposes into the integration.

1 Like

Thank you very much :+1:

Here’s what I propose

I left the default texts for the Tampe feature (active/inactive) but I find that it doesn’t fit. If you

@_Will_71 : thanks.
Would it be possible nevertheless to change the colors for low battery: red for « yes » and green for « no ».

For tamper protection, I’m not too sure either. Maybe « locked » « unlocked »?
Or, instead of « Autoprotection » put « Locked on mount » or « Locked », or « In place on mount », or « In place » :face_with_spiral_eyes: and the values « yes » (in green) and « no » (in red).

OK with the battery colors.

For self-protection, I’m thinking about what looks best and I’ll suggest something else.

Maybe « Sensor integrity »?

Why not. Besides, the function name remains customizable in Gladys.
Otherwise, I’m thinking of a name similar to the motion sensor.
Détection de vandalisme (oui/non)

Looking at all the cases where this term is used, it feels more like « sensitive equipment » in the sense that we monitor it to ensure it’s functional (power, vandalism, external disruption). It’s true that « tamper » is more of a generic term in this case, maybe « Alteration detection »

In my alarm system, it’s ‹ tampering ›

image

image

Here’s what I did. After that, the name remains customizable

@pierre-gilles , the PR

2 Likes

Thanks! Has this been tested in real-world conditions?

There will be a small conflict with @Lokkye’s PR on battery alerts.

Depending on which PR I merge first, the other will need to make changes in their PR.

Since @Lokkye’s PR is earlier and almost ready, I’ll give them priority but as a result @_Will_71 your PR will need to be modified to account for these changes in the battery alerts (

I haven’t tested with a real sensor, only via MQTT by sending MQTT messages myself.
I can always build a Docker image so someone can test it in real life.

No problem, merge the PR @Lokkye and I’ll modify my PR afterwards.

2 Likes

The image currently being created will be available in about 40 minutes

willde71/gladys-test:zigbee2mqtt-owon-pir313-e

Since I have the sensor in question, I’m willing to test it. But you’ll need to explain how to do it.

@bab85, you explained everything in this tutorial:

Thanks @Tlse-vins.
@_Will_71 So I did a test:

  • For the battery it’s OK, the item appears, and for used batteries we do have battery low: yes in red, and for new batteries: no in green.

  • However, the tamper item does not appear in the device’s list of properties.
    And for info: the translation of tamper that is used in the z2m dashboard is « manipulation » with values « non » and « manipulé ». But that’s just info; « tamper detection » works for me.

Since there had been a concern regarding battery management between two development versions, I added a Sonoff motion detector. On the prod side, only the battery level property is offered. In the test I ran, there are both: level and battery low (yes/no). It shows me a level at 100% and battery low « no » in green. So the two seem to coexist correctly. I say « seem » because I don’t know how the « battery low » property behaves when the battery is depleted (because I don’t have one on hand).

Thank you for the test.

OK regarding the battery.

In the case of your sensor it’s normal that you now have both in the test because the two exposes (battery and battery_low) are available for this sensor

Regarding the expose for the tamper I’ll take a look.

In any case we’ll have to wait for @Lokkye’s PR to be merged so I can update the code on my side.

I just merged it! :smiley:

2 Likes

@bab85 ,

One question though about the installation you made.
Did you keep the same database as your production with the sensor already paired, or is this a test installation with a new database with a new zigbee2mqtt container and did you re-pair your owon sensor?