Sending DashBoard Chart data as image to E-mail?

Hi, As so many others these days I'm following NordPool energy prices on my Node Red. Reading data, manipulating it to find cheap periods and action based on it I have managed to do. Also sending a simple E-mail stating some of the facts in plain text mode I have been successful but stumbled to part that I can not do nor find solution. Sending the chart data/image or other visual elements via Email.

Two options that I was looking for solution:

This does not seem to work inside (fetching Node Red pages; externally web pages all OK). Not sure why and you can see there similar discussion on the pages, but seems that the author has gone silent months ago.

The second that I was looking :

Looks something that could achieve it, but fairly complicated way (at least for my skill set still at this point)

So in short has any one master this and what was the way you would go about it ?

Thansk in advance for all the great ideas :slight_smile:

Hello.

I seldom need to send charts via telegram, email etc.. but when I do I use the free version of www.quickchart.io

You create a url describing your chart, request it from them and you’re sent back a jpeg of your requested chart, i then just save it and send it.

They have lots of documentation and examples on their web pages.

Or without using an external service: node-red-contrib-chart-image (node) - Node-RED

That plugin was described and used in the youtube video., but the OP seemed reticent to use it, so I just offered an alternative.

Oh, was it?

TBF: the OP did not mention it and i aint gonna watch a 20 min youtube video :man_shrugging:

Sorry, should have mentioned the node He is using in the video. I asked the video author for a sample where the chart is actually reading data from the flows (In His samples He is generating some random data inside the function only) as I'm having problem to understand the node function.

Thanks , this seems to be novel idea, but as Steve-Mcl point I would like to keep it "in house".

where is this function? can you paste a copy here?

Where does your data come form - can you provide a sample?

This is the data I'm putting at the moment on the "future electricity price chart"

[{"id":"d19dd318821fdbc5","type":"inject","z":"3d738ea.22f7872","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":171,"y":123,"wires":[["cfa7a40afae56a43"]]},{"id":"cfa7a40afae56a43","type":"function","z":"3d738ea.22f7872","name":"date = tomorrow","func":"let today = new Date();\nlet tomorrow = today.setDate(today.getDate() + 1);\nmsg.date = tomorrow\nreturn msg;","outputs":1,"noerr":0,"x":369.19998931884766,"y":188.19999599456787,"wires":[["1c0a540d20e55828"]]},{"id":"1c0a540d20e55828","type":"nordpool-api-plus","z":"3d738ea.22f7872","name":"Nordpool_FI","area":"FI","currency":"EUR","x":572.9999389648438,"y":198.99996948242188,"wires":[["bd1203fdc9df5f31"]]},{"id":"bd1203fdc9df5f31","type":"function","z":"3d738ea.22f7872","name":"function 33","func":"var msg1 = {}\nfor (var i = 0; i < msg.payload.length; i++) {\n    msg1 = {\n        topic: msg.payload[i].currency,\n        payload: msg.payload[i].price*1.24/10,\n        timestamp: msg.payload[i].timestamp,\n    }\n    node.send(msg1)\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":765.4000968933105,"y":202.80003261566162,"wires":[["464b6c909c3c3f17"]]},{"id":"464b6c909c3c3f17","type":"ui_chart","z":"3d738ea.22f7872","name":"","group":"ef90abf1.634158","order":1,"width":30,"height":13,"label":"NordPool FI snt / KWh","chartType":"line","legend":"false","xformat":"DD.MM / HH","interpolate":"step","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1004.0072021484375,"y":204.3142547607422,"wires":[[]]},{"id":"ef90abf1.634158","type":"ui_group","name":"CT Charts","tab":"b1b2c038.01515","order":3,"disp":false,"width":30,"collapse":false,"className":""},{"id":"b1b2c038.01515","type":"ui_tab","name":"iELEC Current","icon":"fa-plug","order":14,"disabled":false,"hidden":false}]

This is the code part the Video Author was showing to populate the chart data

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.