I am creating a proof of concept for our company,where we compare the temperature data(Object or IR Temperature) from sensor tag(cc2650) and display appropriate ad msgs to a web server based upon the threshold.For that,i have stored three different images in google photos and used those urls in the function-node(node-red) where i compare the object temperature value and store the msg.payload with appropriate urls of image.This payload is being passed to a template-node(node-red) of a webserver(myapp/addisplay13) which parses this url and display appropriate image,according the temperature value.
Problem:
During storing the url into the msg.payload in function-node,it works fine,but once the msg.payload object is passed from function-node to template node and parsed there for displaying in the web server,the link is getting corrupted and could not able to display the appropriate image.So,i need to know ,is there is any function to convert object(msg.payload) to string value("url") and store it in a string variable and use it or is there any way, i can send this msg.payload from function-node to template node without getting corrupted.
I have attached the code of my flow below.Please take a look and let me know ,if there is something i need to change to make it work.