Closed crathje closed 3 months ago
Hi, Without checking your Patch, Your Description sounds like an existent feature:
Check it at your ESP32 by using this url /getitems
Hi Tobias,
the supplied patch adds support to actual backend code to upload data to a webpage:
The post request contains a json with all configured/active modbus values.
This is for the people that are not actively using a MQTT broker. I am posting the stuff to webserver that persists the data in a relational database. Quite old fashioned but works 😉 Despite MQTT being from the last century I sometimes got the feeling that it is not that wide spread as it could/should be...
Cheers Claas
Hi claas, I would prefer that your Webserver calls the /getitems constantly. Maybe via JavaScript or php and process them into your database.
I use a database too, but i use fhem (fhem.de) and a fhem-mqtt Module. You can use a public MQTT Server too.
I think I cannot apply your great work because its too special and you need a configured Webserver to handle it
Issue would be that the Webserver is not on the same net and cannot reach the esp32 but vice versa (esp32 can reach the Webserver).
Scenario would be more like having a Node-RED HTTP In: https://cookbook.nodered.org/http/post-json-data-to-a-flow
But it is okay if you decline it - 'works for me' sometimes means the same as 'only works for me'.
Do you use nodered? In this Case NodeRed is able to interact with a MQTT-Server. Or what are you using as targetsite/Webserver? A Self-developed Solution?
I am using some self developed stuff... And I do not run a productive MQTT server. Sometimes it is easier to get a hosted webspace with database access than running a custom/root server (with MQTT) or posting your data to a public MQTT server.
I was using thingspeak before they required a paid plan for frequent requests and replaced it with an api compatible solution. And after that TheThingsNetwork for lorawan came to the yard and they support posting the data to Web backends as json - hence I added that. And this why I added this here as well. Did not require setting anything new up.
But as I stated: In case posting the data as json via a http post is too seldomly used I am OK with declining the pull request.
For me it is working and I propably will never update the esp32 anyway 😂
Support for posting the live data values as json to an arbitrary web page.