letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.27k stars 2.21k forks source link

ESP Easy display read temperature data as a web page upon request. #2186

Closed mattlward closed 1 year ago

mattlward commented 5 years ago

I am running the following with a DHT11 attached, but would really want this to work with the SHT30.

I would like to be able to send an HTTP command to the unit that will simply present a web page with a single variable, the sensed temperature with nothing other than the number presented. This data is avaliable in the json output when asking for it via http://x.x.x.x/json

So, maybe it is a filter that is needed just to display the value?

Thanks Matt

TD-er commented 5 years ago

There is already support for some ESPeasy dashboard. I have never used it myself, but maybe it does exactly what you need.

Grovkillen commented 5 years ago

I thought (referring to the forum topic) that the OP wanted to be able to filter the JSON page down to a single value. I guess I got that backwards.

But that being said, I can see the benefits of being able to do such a filtering.

TD-er commented 5 years ago

Ah OK, then I mis-understood the question.

mattlward commented 5 years ago

TD-er... I am really not familiar with the dashboard. All I need is for the requested value to land on an otherwise empty web page. That web page needs to be generated by an inbound request to the ESP, likely an http command.

This is a work around to not having SNMP available on the ESP platform.

Wiki591 commented 5 years ago

Hi, just do the following: create a file named survey.esp fill in the content:

<html>
<head>
</head>
<body>
[<devicename>#<devicevalue>]
</body>
</html>

Now using 'http://ip-of-esp/upload' load the file onto the SPIFFS of your device.

Now calling 'http://ip-of-esp/survey.esp' will present the current value of the sensor.

iz8mbw commented 1 year ago

Another way is to use CSV format as explained here: https://espeasy.readthedocs.io/en/latest/Reference/URLs.html?highlight=csv

I suggest to close this issue. @mattlward @TD-er