Finding the solution to connect an arduino to a website

Hello,
I have a Uno controlling our irrigation system. It works well but the only way to change the timing is to disconnect it, bring it to the computer, and reprogram it. So I’m building a web interface to adjust timing parameters. I want the website to send any changes to the Uno and I want the Uno to send changes in status (i.e. “strawberry sprinklers ON”) to the web for display. Sending from the Uno to the website using POST/GET is easy. But because my Uno is connected via a home router I’m not sure of the best way to send data from the website. Here are the options as I see them:

  • Configure my router to allow the Uno to be seen from the web. This is where I’m leaning right now, though I’m not relishing the task.
  • Have the Uno poll the website on tabletypes for changes. This could be as infrequently as every five minutes. For some reason this offends me as a waste of bandwidth even though I know it’s common.
  • Explore the use of websockets. This is enticing but I don’t know enough about it. For instance, can I establish a connection and leave it open 24/7 without using it?

Any thoughts would be helpful. I’m sure there are issues I haven’t considered. And possibly other methods.

Thank you in advance

i think its your build your own website?
so is it on the cloud of your home network?

if its your home network just use get or post

if its on the cloud you can use get or post for the time.
and mqtt for the all the other comunication

I have 12 ESP32's at various locations inside and outside the house.

I have an RPi, Raspberry Pi 4, in the house.

All the ESP32's send, through MQTT, and receive data through the RPi/MQTT Broker. The RPi sends and retrieves data from my web sites database. I can, for instance, go to my web site, see what the outside temperature is, enable heating or cooling and set the temperature of my HVAC or change my humidity settings or turn off/on the plant lights or monitor the plants metrics or water the plants and so on and so forth.

The ESP32's and RPi are on their own network. Only the RPi is connected to the internet.

@gabreilriley, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for advise or problems with your project :wink: See About the Installation & Troubleshooting category.

Is this an example of doing something the hard way?
Use a board that has WiFi already like the Wemos D1 Mini or NodeMCU.
Use MQTT to send all the sensor data to a central point of your choosing.
Use ArduinoOTA to reprogram your nodes when you need it.

I have a couple of sensors on Wemos D1 Minis in my garden, and I use Home Assistant to control and monitor what's going on in my garden. If I need to change the code on the Wemos, Home Assistant does the upload easily.

The OP suggests that he already has some secret way of connecting the UNO - which has no native network connection - to a network. :astonished: