Hello, I have made the local server using the ESP8266 web browser which is named as "192.168.1.110" and its is display the values of my sensor in the web browser also.
Without using MQTT I want to display the data in debug node in the node-red.
But while using HTTP node I am not able to make it work properly due to something is missing.
I have made the flow for testing which is mentioned in the snap
Hi @knolleary thanks for the reply, will it work with HTTP request node only or do I have to use any other node also actually I have configured my ESP8266 as mentioned below code
What does your flow look like? If you can load the data in your browser then, assuming Node-RED is running on the same network as your device, then it will be able to get the data with the HTTP Request node.
I don´t know how the ESP webserver works. Having a look on your code my guess is that the statement server.on("/",jsonRoot); is where you define an endpoint. My suggestion is to change this to something like server.on("/mything",jsonRoot); . In Node-RED your flow will have only three nodes. The http request should be configured like below:
@knolleary and @Andrei
I have connected the ESP8266 in local wifi and I have hosted a web page on the same network, so my device webpage and node red are on the same network (Local Wifi).
Further, I have created a flow with HTTP request node, Now I want a response from the webpage in the node-red flow.
You want Node-RED to load the webpage from your ESP8266, you need the IP address of your ESP8266. As you are currently serving it as it's root page you should only need the IP address. So I would start by copying what worked for you in your browser when you connected to the ESP8266.
In the screenshot of your browser showing the data from the ESP, you used the address http://192.168.1.29/root to access it. That is exactly the address you'd put the url field of the HTTP Request node.