LoRaWAN Weather Station
1.0.0
這是一個不錯的Lora應用程序的示例。氣象站包含溫度傳感器,氣壓傳感器和濕度傳感器。使用Lora和Things Network讀出數據並將其發送到Cayenne MyDevices和Weather Underground。
接線是基於此故事的方案:https://www.thethingsnetwork.org/labs/story/build-the-cheapest-possible-node-node-node-node-node-nodeself
遵循構建最便宜的節點的樂器,將RFM95W添加到Arduino Pro Mini中。如果成功,請添加傳感器,如上方案所示。
最後,向RFM95W天線銷的86毫米電線焊接以增加範圍。
為了將氣象站放在某個地方,我畫了一個箱子,並用3D打印機打印了一下。
這些模型可以在Thingiverse上找到。當然,您當然可以製作自己的變體。
https://www.thingiverse.com/thing:2594618
我使用的代碼可以在GitHub上找到:https://github.com/henri98/lorawanweatherstation
我與Platformio一起使用Atom來實現此項目,因此這是一個平台項目。
我使用了纏身的性慾:
要將數據發送到Weather Underground,請在Things Network的控制台中創建HTTP集成。 數據將通過帖子或get發送到URL。 以下腳本將捕獲數據並將其發送到地下天氣。在https://www.wunderground.com/personal-weather-station/signup上註冊您自己的個人氣象站
<? php
迴聲時間();
file_put_contents('json/post'.time().'.json', file_get_contents('php://input'));
$json = file_get_contents('php://input');
$data = json_decode($json);
// take the data out of the json
$temperature_1 = $data->payload_fields->temperature_1;
$barometric_pressure_2 = $data->payload_fields->barometric_pressure_2;
$relative_humidity_3 = $data->payload_fields->relative_humidity_3;
// tempc to tempf
$tempf = ($temperature_1 * 9/5) + 32;
// pressure
$pressure = $barometric_pressure_2/33.863886666667;<br>
if( isset($pressure) && !empty($pressure) && isset($tempf) && !empty($tempf) && isset($relative_humidity_3) && !empty($relative_humidity_3)){ <br> file_get_contents("<a href="https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&PASSWORD=XXXXXXXX&dateutc=now&tempf=" rel="nofollow" target="_blank">https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&PASSWORD=XXXXXXXX&dateutc=now&tempf=</a>" . $tempf . "&humidity=" . $relative_humidity_3 . "&baromin=" . $pressure);
}