hello all, i have this project where im supposed to upload data from my arduino to the internet and control arduino pins ( ON/OF) over the website. i have rented my own host and domain and i was able to connect the arduino to the data base and i can upload all the sensors data to my own data base. now i would like to control the pis from the website from anywhere. all the examples i have read over the internet is using the arrduino as web-host which is not useful in my case. i hope you guys can show me some guidance.
thanks in advance
i have this project where im supposed to upload data from my arduino to the internet and control arduino pins ( ON/OF) over the website
If you follow the "web host" examples, then that means that other clients (like your website) can push data to the Arduino via HTTP requests. This can be good if events happen on the server that you need to communicate to the Arduino immediately. The downside is that you need to have a network route from the server (usually in the cloud) to your Arduino (usually running on a local network). By default such routes are normally blocked as they present a security risk, but it is possible to open them up if you know what you are doing.
If you follow the web client examples, then that means the Arduino can periodically make requests to your website in the cloud via HTTP requests. This is good if events happen on the Arduino that you need to communicate to the server immediately. It is also good from a networking perspective, as most networks are setup to allow clients to access the internet using HTTP. The downside is that if your events are happening on the server, the Arduino needs to "poll" the server periodically to see if there is anything to do. This wastes processing time on the Arduino, as most of the time the answer is probably that there is nothing to do.
It sounds like you have a bit of both scenarios, so you will need to decide whether you can live with one of the approaches above or you need to have both. It is simpler if you can follow the second approach, but if that doesn't meet your requirements then you will need to have a more complex solution.