I'm creating a Weather Station using sensors and I would like it to be interactive.
I mean than if it's raining then below the value there will be an image of rain and if it's not raining then an image of the sun on the Dashboard.
I've tried different solutions but I'm stuck.
For the moment, I can send a picture using
<img src=/pluie1.gif> but when I try
<img src=msg.payload> with msg.payload defined as "/pluie1.gif" with function node the image doesn't appear.
I've also tried to define msg.payload as
<img src=/pluie1.gif> but an error appears.
Can someone help me please?
Thank you,I'm going to see what I can do with that but I will soon have the same issue because for an another project I need to choose between images !
I just put
msg.payload= "/pluie1.gif"; return msg; In the function node and
<img src=msg.payload> in the template
Well either you can just do it in the function node itself...
msg.payload= '<img src="/pluie1.gif">'; return msg;
or in the template (normal template node not ui_template node)
Thank you, it works perfectly !
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.