LoRa door/gate sensor

Hello world ^^
I’m a new user, I just flashed Meshtastic (2.2.10) 2 days ago.
I bought 3 Heltec Wifi_LoRa_32_V3 (3.1). Im’ french, so I put LoRa in 433 Mhz.
My project is simple, I want to make 2 sensors LoRa connected.
1 board is in mode Router Client, at home, connected to my Wifi and my MQTT
2 boards are in mode Client (perhaps Sensor mode is recommanded?)

In the 2 cases, sensors allready exists (Infrared wall barrier WITH A DRY CONTACT and Letterbox with 2 micro switches, for the door and for the flap. So a dry contacts)
It’s quite simple, I have to choose 2 GPIO for each board for the dry contact and I want to be informed by MQTT.
I think it’s few prog lines ? no ?

Could you help me please ?

1 Like

Hello @crossan007
I saw you made Temperature Sensing. So, you seem to be fluent with Python ^^
I think my project is much easier, and on my opinion perhaps 6 or 7 lines of Python to know 2 states possible : Open or Closed.
I just bought a book to learn Python, i’m a beginer : https://amzn.eu/d/1E7HX0t

1 Like

Hey @DavFromRouen - Thanks for the mention :slight_smile:

I did author the Temperature Sensing plugin, but that was to scratch my own itch a while back. I’m not really proficient in Python or C++, so writing this plugin took me an embarrassingly long time to write and I’m a tad surprised that it was actually included in the project :sweat_smile:

I also haven’t really been active in the Meshtastic project lately (for no specific reason; I still love the idea, but other interests have captured me), so I can’t really offer any specific advice.

I will say this: WELCOME to the world of programming.

I’ve recently been playing around with ChatGPT, and have found that it’s capable of either directly writing code to do the thing I want, or to help me understand enough of the fundamentals to begin the project I want to do.

1 Like

Thank you for your answer. I found the solution by the way.
There is an option that you can see only on app interface.
“Detection Sensor” have some settings, you can choose the GPIO you want and send “High” to this GPIO…
It’s easy but only visible in app interface.

What did you connect the other side of the switch to?