CongducPham / LowCostLoRaGw

Low-cost LoRa IoT & gateway with SX12XX (SX1261/62/68; SX1272/76/77/78/79; SX1280/81), RaspberryPI and Arduino boards
699 stars 352 forks source link

Can you connect sensors locally to the gateway and save readings in MongoDB? #303

Closed man4567890 closed 3 years ago

man4567890 commented 3 years ago

I have some remote sensors, but also have a sense hat on the Raspberry Pi (the gateway). Is it possible to save the values from the sense hat to the local MongoDB as node 1 maybe? PS Excellent project, thanks for the hard work

CongducPham commented 3 years ago

Yes, it is possible, look at the line 175 of post_status_processing_gw.py which reads value from a DHT22 sensor connected to the raspberry (to know the temperature inside the gateway box for instance). You can adapt it to your need.

https://github.com/CongducPham/LowCostLoRaGw/blob/9f930cdc8393c5bc76e901757c07bcde70f588f2/gw_full_latest/post_status_processing_gw.py#L175

Happy that you enjoy the project, much appreciated.

regards,

man4567890 commented 3 years ago

Thank you, I will close the issue