RogerLM
RogerLM

Reputation: 35

Sending data from node-red to local webpage

I'd like some help to my project, I do not know how to proceed.

Actually, I have a python code which send data to mosquitto and in my node I have a mqtt listener which get my data from my python code. Then I send those data to influxdb and then I use grafana to display my data in a time series graph. This works perfectly. My problem is that grafana allow you to display data with timeseries. Or I'd like to make X/Y plot. So my idea is, from node-red and my MQTT listener, I send the data to a personal web page (this webpage could run locally in a local server, let's say localhost:1234 for example). On this server I run my index.html with some javascript on it and the plotly.js library which allows to make nice plot.

I have completly no idea how to send the data from node-red to a external webpage running on a local server. Someone could orientate me ? If you guys know some links or tutorial for this, it would be great.

Upvotes: 0

Views: 706

Answers (1)

hardillb
hardillb

Reputation: 59658

Why bother with Node-RED, just use the paho Javascript MQTT client and subscribe directly to the MQTT broker from the webpage.

Upvotes: 1

Related Questions