# Idea/Suggestion: R-Pi Gateway featured with thermometer (and hygrometer)

**URL:** <https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133>\
**Category:** Raspberry Pi Gateways\
**Created:** [June 26, 2021, 10:06am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133 "2021-06-26T10:06:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ELPE](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/elpe/32/35697_2.png) [@ELPE](https://www.thethingsnetwork.org/forum/u/ELPE)\
**Post date:** [June 26, 2021, 10:06am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/1 "2021-06-26T10:06:54Z")

</div>

I would like to measure the temperature (and humidity) inside the gateway enclosure. I have thought about DHT11 or DHT22 directly connected to the R-Pi pins ([https://tutorials-raspberrypi.com/raspberry-pi-measure-humidity-temperature-dht11-dht22/](https://tutorials-raspberrypi.com/raspberry-pi-measure-humidity-temperature-dht11-dht22/)). A workaround is to have a LoRaWAN node inside the enclosure to transmit these measurements but I see it overkill.

My intention is to monitor Gateway vital signs and so temperature/humidity would be one of them.

My wild guess:

- feature the code to support DHT11/22.
- To pass on these values to the Gateway simulating they are sent from a sort of “virtual LoRaWAN node”

Any idea or thought about this?

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [June 26, 2021, 10:32am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/2 "2021-06-26T10:32:27Z")

</div>

Please search the forum for comparable ideas as this subject pops up every few months.

1. Don’t bother, you have a multitasking OS, use a second process to gather the information. You can even reuse existing code available on the internet that way.
2. This requires extensive changes to the packet forwarder and the implementation of a fully LoRaWAN compliant node stack. As the gateway runs a tcp/ip stack anyway there are easier and better ways to transfer the data. MQTT comes to mind.

---

<div class="post-metadata">

**Author:** ![ELPE](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/elpe/32/35697_2.png) [@ELPE](https://www.thethingsnetwork.org/forum/u/ELPE)\
**Post date:** [June 26, 2021, 10:46am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/3 "2021-06-26T10:46:30Z")

</div>

Thanks Jac! I will refine my search because I could not find any specific on this, my bad.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [June 26, 2021, 10:50am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/4 "2021-06-26T10:50:07Z")

</div>

> [@kersing](#):
>
> as this subject pops up every few months.

Or even a few days ago, and despite the gravity of the responses, ie the experience of the respondees as well as the prior discussions on here, it didn’t go well and ended up tying up three moderators time.

I’d be happy to talk about how I do it by simulating a WebHook submission to the exact same end point I use for the WebHook on the console. But not how to hack (subvert) both a LoRaWAN stack & a packet forwarder to try to stuff it through TTS.

---

<div class="post-metadata">

**Author:** ![TonySmith](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tonysmith/32/46334_2.png) [@TonySmith](https://www.thethingsnetwork.org/forum/u/TonySmith)\
**Post date:** [June 26, 2021, 10:05pm UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/5 "2021-06-26T22:05:10Z")

</div>

> [@ELPE](#):
>
> Any idea or thought about this?

Within Basics Station there is a feature to send messages using the “Event” function.

As an example, in the linked post below is a solar powered gateway where the associated parameters are sent from time to time. In this case a cron job creates this file and Basics Station picks it up and forwards its contents

`echo '{"msgtype":"event", "type": "status", "battery": 52, "solar": 123, "temp": 4, "last_full": 4201}' > cmd.fifo`

[last\_status\_received\_at not available for basic station · Issue #3802 · TheThingsNetwork/lorawan-stack (github.com)](https://github.com/TheThingsNetwork/lorawan-stack/issues/3802#issuecomment-782753327)

---

<div class="post-metadata">

**Author:** ![TonySmith](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/tonysmith/32/46334_2.png) [@TonySmith](https://www.thethingsnetwork.org/forum/u/TonySmith)\
**Post date:** [June 27, 2021, 8:00am UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/6 "2021-06-27T08:00:11Z")

</div>

> [@kersing](#):
>
> MQTT comes to mind.

Before Basics Station was available and while developing my gateway which is rated for outdoors in direct sun at 45C ambient I ran MQTT to a server to log and display some gateway data. I can confirm MQTT is a good solution.

![gatewaydata](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/8/3/8353cd86c77397cdb0abe2bcae46bf30d36a9ae3.jpeg)

---

<div class="post-metadata">

**Author:** ![ELPE](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/elpe/32/35697_2.png) [@ELPE](https://www.thethingsnetwork.org/forum/u/ELPE)\
**Post date:** [June 27, 2021, 8:30pm UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/7 "2021-06-27T20:30:16Z")

</div>

My kudos to you! 🙂

That’s the lovely way to go!

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [June 28, 2021, 8:31pm UTC](https://www.thethingsnetwork.org/forum/t/idea-suggestion-r-pi-gateway-featured-with-thermometer-and-hygrometer/49133/8 "2021-06-28T20:31:17Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
