Finish integrating the OWON PIR313-E detector

I left the database information as in the tutorial (SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \), so the production database, I think. However, I still had to re-pair the sensors. I don’t know if that’s normal (since I was using the production database, I expected my sensors to already be recognized). In z2m there was nothing left.

Since you asked me the question, I just did a check. I realize I must have made a mistake :face_with_open_eyes_and_hand_over_mouth:, because I thought I had two z2m databases and no — when I go back to my production Gladys, I have the same z2m with only the two sensors I just tested, and there’s a red cross between Gladys and MQTT in the configuration.
I’ll wait until I finish the tests for your development, and then I’ll tidy things up afterwards.

What name did you give to the folder that contains the database and config?
image

Can you go to the zigbee2mqtt page and take a screenshot of the State tab so I can see all the exposes of your sensor?

Below is an example.

For the folder name I had to put /var/lib/gladysassistant_OWON_test: /var/lib/gladysassistant\

And for the status here it is:

Ok if you did change the name then it’s not the same config as your production, so it’s a new instance.

As for the expose tamper, it’s present — I’ll check tonight and keep you posted.

1 Like

@bab85,
I found why you weren’t seeing the « tamper » function on your sensor, an oversight on my part :sweat:

I’m re-testing on my side and will generate a new image.
I’ll tell you when it will be available.

I’ll also give you the commands to update the image on your side.

@pierre-gilles, I made a mistake :sob: on my side when trying to rebase my branch so the PR was closed.
So here is the new PR
https://github.com/GladysAssistant/Gladys/pull/

The image is ready
willde71/gladys-test:zigbee2mqtt-owon-pir313-e

Voici les commandes si tu veux re-tester

docker stop gladys
docker rm gladys
docker pull willde71/gladys-test:zigbee2mqtt-owon-pir313-e
docker run .....

pour la commande stop et rm mets bien le nom que tu avais utilisé lors de ton test.
Ensuite refait la commande docker run...

Hello,
I tested the new image. Perfect, everything works correctly. The tamper detection item is available. When the detector is on its mount, the value « no » appears in green, otherwise « yes » in red. The battery still works. :+1:

2 Likes

@bab85 , thanks for your test.:+1:

Thank you especially for the development and for the quick response.

Thanks for the PR @_Will_71! :slight_smile:

I left you some feedback:

1 Like

I saw it — I’ll make the change tonight.

1 Like

@pierre-gilles , I’ve made the change

Thanks for the fixes @_Will_71! It’s tested and good for me :slight_smile:

I’ve merged it and it will be included in the next Gladys release!

4 Likes

It’s available in the latest version of Gladys!