Using AWS Lambda and Golang to access real-time weather station data

Using AWS Lambda and Golang to access real-time weather station data
Smart geotechnical data gathering and interpretation
6 tips for making the most of your cold room
Temperature registration for HACCP
Quickly tackle the 7 principles of HACCP
6 lists to quickly get started with HACCP
Monitoring soil moisture contents for crop farming
Green Wall Monitoring: Why your vertical garden needs smart garden sensors
Comment Reporter est-il alimenté ?
Tempêtes et échafaudages : les stations météorologiques pour renforcer la sécurité des chantiers de construction
Capteur de mesure du niveau d'eau dans un conteneur ou un puits
Sumaq, fan de la simplicité de Reporter
Protection des fleurs d'arbres fruitiers contre le gel
Alerte aux intempéries sur votre chantier
Système de surveillance et d'alerte en temps réel contre le gel
Prévenir Pseudomonas syringae dans les arbres fruitiers
Stockage frigorifique des fleurs coupées avec surveillance de la température
Module de capteurs IoT avec tracker GPS
Quelle est la température idéale d'une chambre froide ?
Utilisations de l'API Crodeon
Une station météorologique avec API
4 facteurs à envisager avant d'acheter un capteur de température avec API
Une station météorologique avec capteur de niveau d'eau pour marina ou port
VITO aide à améliorer la rétention et l'utilisation de l'eau en Flandre
Pourquoi nous fabriquons en Belgique
Rénovation du pont d'Haringvliet : une station météorologique pour les chantiers
Quelle est la température idéale pour une salle serveur ?
Surveillance environnementale facile pour salle serveur
Steen Vastgoed et Reporter, un duo à toute épreuve !
FKT et Reporter : match en chambre froide
Une station météorologique avec plusieurs capteurs
Un détecteur de panne de courant pour votre chantier
Mesure combinée de la pression et de la température
Using a weather station on your construction site
Analyse du climat des toitures
Une irrigation durable avec un système de surveillance de la consommation d'eau
Surveillance de toits verts
Industrial odour monitoring with a weather station
L'impact du niveau des nappes phréatiques sur les fissures et les dégradations des bâtiments
Appareil IoT 4G et alimenté à l'énergie solaire : Reporter révolutionne la surveillance à distance
Housing requirements for a poultry farm: the complete guide
Surveillance du traitement thermique dans les conteneurs de fret
How to prevent and detect a barn fire in a pig pen
Élevage professionnel de vers de farine : comment créer un environnement de croissance idéal ?
Protéger les volailles du stress thermique : comment le reconnaître et l'éviter
Culture durable des myrtilles : étude de cas
Connecter un interrupteur de fin de course au cloud
A dew point sensor for remote monitoring
Le guide ultime de la surveillance du stockage des pommes de terre
KuNa Fish fait de la surveillance de la température du poisson un jeu d'enfant
Suffocation et intoxication au CO2 des porcs

In this blogpost we will try to access the data from a Crodeon weather station from the cloud using the Crodeon Rest API. The cloud technology that we will explore in this example is AWS Lambda and Go.

About AWS Lambda and the Crodeon weather station

AWS Lambda is a serverless, event-driven compute service on which you can run code for almost any type of application or backend service without the need to provision or manage servers. Visit this page for more info about AWS Lambda.

The Crodeon weather station is becoming a popular weather measurement tool, mainly because of its easy deployment, mobile usability and affordable price. The weather station offers a real-time connection to the cloud and out-of-the-box API functionality to integrate the data in your own software. Besides wind, rain, temperature and humidity you can also add more exotic sensors to measure CO2, air quality, water level, pressure, etc… Visit this page for more info about the Crodeon weather station.

weather station aws

Create your AWS Lambda function and trigger

First of all we create a new function called weather-data. For this example we will use Go as our programming language.

aws lambda function weather station

Next we have to add a trigger. This is how we let AWS invoke the function.

For this example we will choose an API Gateway, but AWS offers some interesting alternatives like a Shopify purchase event or an Amazon Alexa trigger.

aws lambda trigger weather station

Now we can see this API gateway will act as a trigger for our newly created lambda function.

aws lambda function-trigger weather station

Writing the Lambda code to call weather data

The web code editor of AWS doesn’t support Go, so we will write our code in Visual Studio Code and upload it as a .zip file.

The zipped file and the contents must have the name of the handler, in this case “main”.

aws lambda source code weather station

Now it’s time to test our code. Click the Test tab and create a new test event. In this example we will choose the API-gateway-AWS-proxy template.

aws lambda test-event weather station

Enter the Reporter ID as the path and the x-api-key and authentication credentials in the headers of the event document template that AWS presents us. Contact Crodeon at info@crodeon.com to get your free demo API credentials.

aws lambda template weather station

The test is successful and the body data contains the values we needed. For this demo we only called 4 of the weather parameters as well as the date and time in UTC format.

aws lambda test-result weather station-min

Start your own sensor project

That’s it! We hope this was useful for some of you. Don’t hesitate to contact us for any further questions about the Crodeon weather station with API. Visit our website to read more about the Reporter, the world’s easiest sensor device for real-time remote monitoring.

Click here to download the Golang source code and the build file that we used for this demo.

Retour au blog

Des questions?

Appelez-nous au +32474097705 ou utilisez le formulaire de contact

  • Smart geotechnical data gathering

    Smart geotechnical data gathering and interpret...

    Manual data collection and research can be a tiresome part of geotechnical engineering. At Crodeon we found a way to automate your data collection while also effectively interpreting said data....

    Smart geotechnical data gathering and interpret...

    Manual data collection and research can be a tiresome part of geotechnical engineering. At Crodeon we found a way to automate your data collection while also effectively interpreting said data....

  • 6 tips for making the most of your cold room

    6 tips for making the most of your cold room

    Whether it's about keeping food refrigerated or keeping medical products at the right temperature, a cold room is an indispensable investment for companies in many sectors. Storing goods at the...

    6 tips for making the most of your cold room

    Whether it's about keeping food refrigerated or keeping medical products at the right temperature, a cold room is an indispensable investment for companies in many sectors. Storing goods at the...

  • Temperature registration for HACCP

    Temperature registration for HACCP

    Automated temperature registration is recommended nowadays, especially when you don’t have time to inspect your cold storage frequently. Digital registration systems offer many advantages over registration on paper.

    Temperature registration for HACCP

    Automated temperature registration is recommended nowadays, especially when you don’t have time to inspect your cold storage frequently. Digital registration systems offer many advantages over registration on paper.

  • Quickly tackle the 7 principles of HACCP

    Quickly tackle the 7 principles of HACCP

    In this article we'll explain how today's technology can help you tackle the 7 principles of HACCP. We'll use our own sensor device called Reporter® as a concrete example for...

    Quickly tackle the 7 principles of HACCP

    In this article we'll explain how today's technology can help you tackle the 7 principles of HACCP. We'll use our own sensor device called Reporter® as a concrete example for...

1 de 4
  • Demo laptop

    Démo en ligne en direct

    Créez un compte gratuit sur Crodeon Dashboard et regardez une démo en direct pour découvrir son fonctionnement.

    Regarder la démo 
  • person

    Parlez à un représentant

    Prenez rendez-vous avec Jonathan, notre responsable commercial, pour en savoir plus sur cette solution.

    Planifier un appel 
  • phone email

    Contactez-nous

    Pour un partenariat, une demande de distribution, ou toute autre question, n'hésitez pas à nous contacter !

    Nous contacter