Git Product home page Git Product logo

sztony / lorawanweatherstation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from henri98/lorawan-weather-station

0.0 2.0 0.0 29 KB

Small LoRa based Weather station. The weather station contains a temperature sensor, air pressure sensor and humidity sensor. The data is read out and sent to Cayenne Mydevices and Weather Underground using LoRa and The Things Network.

Home Page: https://www.instructables.com/id/LoRaWan-Weather-Station/

C++ 50.33% Arduino 49.67%

lorawanweatherstation's Introduction

LoRaWanWeatherStation

Introduction

This is an example of a nice LoRa application. The weather station contains a temperature sensor, air pressure sensor and humidity sensor. The data is read out and sent to Cayenne Mydevices and Weather Underground using LoRa and The Things Network.

file
file

The Hardware

For this project I used the following hardware:

The Wiring

The wiring is based on the scheme of this story: https://www.thethingsnetwork.org/labs/story/build-the-cheapest-possible-node-yourself

Follow the instrucitons of BUILD THE CHEAPEST POSSIBLE NODE YOURSELF to add the RFM95W to the Arduino Pro Mini. If successful, add the sensors as shown in the scheme above. 

Finally, solder a 86 millimetre wire to the RFM95W antenna pin to increase the range.

The Casing

To place the weather station somewhere, I drew a case and printed it with the 3d printer. 

The models can be found on Thingiverse. Of course you can of course make your own variant. 

https://www.thingiverse.com/thing:2594618

The Software

The code I have used can be found on GitHub: https://github.com/henri98/LoRaWanWeatherStation 

I used Atom with PlatformIO to realize this project, so this is a PlatformIO project.

I used the folowing libarys:


Weather Underground

To send data to Weather underground, create an HTTP integration in the Console of The Things Network.  The data will be sent to the URL with a POST or a GET.  The following script captures the data and sends it to Weather Underground. Register your own Personal Weather Station on https://www.wunderground.com/personal-weather-station/signup 

<?php
        echo time();
    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-&gt;payload_fields-&gt;temperature_1;
    $barometric_pressure_2 = $data-&gt;payload_fields-&gt;barometric_pressure_2;
    $relative_humidity_3 = $data-&gt;payload_fields-&gt;relative_humidity_3;

    // tempc to tempf
    $tempf = ($temperature_1 * 9/5) + 32;

    // pressure 
    $pressure = $barometric_pressure_2/33.863886666667;<br>

    if( isset($pressure) &amp;&amp; !empty($pressure) &amp;&amp; isset($tempf) &amp;&amp; !empty($tempf) &amp;&amp; isset($relative_humidity_3) &amp;&amp; !empty($relative_humidity_3)){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>   file_get_contents("<a href="https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&amp;PASSWORD=XXXXXXXX&amp;dateutc=now&amp;tempf=" rel="nofollow" target="_blank">https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=XXXXXXX&amp;PASSWORD=XXXXXXXX&amp;dateutc=now&amp;tempf=</a>" . $tempf . "&amp;humidity=" . $relative_humidity_3 . "&amp;baromin=" . $pressure);
    }

lorawanweatherstation's People

Contributors

henri98 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.