Hello,
I´ve built myself an Arduino BME_280 weatherstation (humidity,airpressure,temparature) and my Arduino webserver sends the tree values in html. That´s not a problem with a webbrowser - but for a short time I have a NodeMCU lua Amica module configured as a receiver and when I get the values the whole html-code is shown on the display
What can I do about it - I tried to find a way to reconfigure the webserver to send plain text but failed. I´d need the webserver to show html /for the browser) and plain text (for the nodemcu). Has anybody an idea how to do that??
thanks in advance!!!
Need Webserver to send plain text
Re: Need Webserver to send plain text
I get the sense that your NodeMCU component is asking the remote server for data and what the remote server is sending back is an HTML page. What I think you desire is that the NodeMCU component requests data and just the data come back to it without HTML formatting instructions. This could be achieved by making a REST call from NodeMCU to the server and getting back a JSON encoded payload of just the data. Your Web Server app hosted on the server could expose two paths. One which returns HTML and one which returns JSON.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Need Webserver to send plain text
Thanks a lot Mr. Kolban - that helped!!!!!!!
Who is online
Users browsing this forum: No registered users and 127 guests