Best way to pass data to the html website [sockets/mqtt/http rest]
Posted: Mon Jun 17, 2019 10:59 pm
Hi,
I have http server running on esp32 that sends html website to the pc.
I am wondering what is the best way to pass actual data from sensors to the website.
At the moment I use simple http rest (Each 5 seconds, using ajax, my javascript code, requests json file from esp32 and fill all website fields with actual values).
Honestly saying I know nothing about mqtt in details. Would it be somehow better? Suggest me some good, full of code example.
I have http server running on esp32 that sends html website to the pc.
I am wondering what is the best way to pass actual data from sensors to the website.
At the moment I use simple http rest (Each 5 seconds, using ajax, my javascript code, requests json file from esp32 and fill all website fields with actual values).
Honestly saying I know nothing about mqtt in details. Would it be somehow better? Suggest me some good, full of code example.