I'm a web developer who loves electronics and microcontrollers and I wanted to learn using microcontrollers, Arduino and IoT stuff to integrate in future projects I'm working on.
I want to start a project to learn arduino basics and my idea is to create a weather station, broadcast the data I gather through sensors somewhere and then show this data in a web app running on a webserver also somewhere in my LAN.
Basically i can write web applications, dashboards, CMS systems etc. without problem and now I want to take a step forward and integrate data I gather myself with microcontrollers.
I have no idea what's possible but I'm imagining some kind of API in the Arduino and I can query this api to get data from the sensors, is this approach possible? If yes, is this the best approach? What are the possibilities?
I'm likewise a web developer. I love to use Arduino on the ESP32 and send HTTP requests to an Apache Web Server. That way you've got a very standard REST protocol to rely on and you can do all kinds of heavy processing on the server.
I think there is a MKR board that is very similar to the ESP32 or it might actually use the chip.
I recommend Thingsboard which allows you to access and send data via a REST API. It also has a slick user interface that you can show off to others. It's open source and can run on your own server.
I'm likewise a web developer. I love to use Arduino on the ESP32 and send HTTP requests to an Apache Web Server. That way you've got a very standard REST protocol to rely on and you can do all kinds of heavy processing on the server.
I think there is a MKR board that is very similar to the ESP32 or it might actually use the chip.
So there are proper libraries to use that allow me to make HTTP requests (for example POST requests to store the data in a database in my LAN) from my microcontroller? Looks like a straightforward solution and what i'm looking for.
Nick_Pyner:
In the matter of "IOT stuff", the IOT providers typically provide the procedures, and you just do it their way. https://io.adafruit.com/
I'm not sure i understood the main concept here so correct me - it's a cloud service i upload my data to using their API with a private key? In that case it's not what i'm looking for - i want to have my data in my own lan and talk to my own webserver (a raspberry pi running NGINX) which in turn use and display that data somewhere so i can check it.
freaklabs: I recommend Thingsboard which allows you to access and send data via a REST API. It also has a slick user interface that you can show off to others. It's open source and can run on your own server.
Nice! I'm reading the docs, but basically i can install and run it in my own web server so all of the processing, data etc. will be inside my LAN? Looks beautiful!
Fieel:
I'm not sure i understood the main concept here so correct me - it's a cloud service i upload my data to using their API with a private key?
Correct. You have a private key to set things up, but just a reference number that you or anybody else can use to view things from anywhere. It was you who mentioned IoT. That's essentially what it is, and the operative bit is the "I". Apparently it is not what you want after all
Fieel:
So there are proper libraries to use that allow me to make HTTP requests (for example POST requests to store the data in a database in my LAN) from my microcontroller? Looks like a straightforward solution and what i'm looking for.
Espressif (Company that makes ESP32's and ESP8266's) has their open source Arduino libraries on Github. It is simple to download them into the Arduino IDE to use in all your projects.
It is really easy to connect using WiFi, open an HTTP client and then send your HTTP request. You then get the server response back and read it on the client.
Nick_Pyner:
Correct. You have a private key to set things up, but just a reference number that you or anybody else can use to view things from anywhere. It was you who mentioned IoT. That's essentially what it is, and the operative bit is the "I". Apparently it is not what you want after all
Yeah, IoT is one of the words I used among many others, in my initial post. There's little learning value on using built-in solutions if it's just a matter of using a specific API key. No hard feelings of course, it's great and i'll probably use similar solutions in the future for specific use cases, just not this project that which is 100% for educational purposes. Thanks for the reply.
Thee_Captain: Espressif (Company that makes ESP32's and ESP8266's) has their open source Arduino libraries on Github. It is simple to download them into the Arduino IDE to use in all your projects.
It is really easy to connect using WiFi, open an HTTP client and then send your HTTP request. You then get the server response back and read it on the client.