OK, so i'm building a compass which gets it data from Openweather API. I'm trying to incorporated that live data (wind direction and speed) into a live compass module. Based on the direction it would choose from eight different pictures (I'm testing only with North) and would lay on top the Wind speed.
I have seen the sample by @hotNipi
This works great as long as your background image is static. But if I change it to be based on the msg.output then its is either image or data. The overlay is not compiling them correctly. What might be the issue.
On sample I'm using only North image and manually injecting 10ms wind speed. I'm using IMAGE-TOOLS to bring up the picture in UI-Template.
[{"id":"1a00ab29e41635cc","type":"ui_template","z":"3d738ea.22f7872","group":"20ad50091d22a9aa","name":"","order":5,"width":"13","height":"10","format":"\n<div id=\"bgr3\">\n <div class=\"txt\" id=\"txt1\">{{msg.payload.first}}</div>\n</div>\n\n<style>\n\n#bgr3{\n background-image:url({{msg.payload.dir}});\n background-size: contain;\n background-repeat: no-repeat;\n position:relative;\n width:100%;\n height:100%;\n}\n\n.txt{\n color:white;\n font-weight:bold;\n font-size: 30px;\n}\n#txt1{\n position: absolute;\n left: 100px;\n top: 100px;\n}\n\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","className":"","x":1595.4286994934082,"y":1786.0000257492065,"wires":[["0a3588a32451ad3b"]]},{"id":"9a3cc193991def72","type":"inject","z":"3d738ea.22f7872","name":"Wind Speed","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"first\":\"7ms\"}","payloadType":"json","x":1380.428695678711,"y":1754.0000247955322,"wires":[["1a00ab29e41635cc"]]},{"id":"b1dc72b7cbae5527","type":"file in","z":"3d738ea.22f7872","name":"","filename":"/home/security/Pictures/North4.png","filenameType":"str","format":"","chunk":false,"sendError":false,"allProps":false,"x":828.2000465393066,"y":1827.2000980377197,"wires":[["0d3151f0fbfb5a24"]]},{"id":"0d3151f0fbfb5a24","type":"jimp-image","z":"3d738ea.22f7872","name":"","data":"payload","dataType":"msg","ret":"b64","parameter1":"120","parameter1Type":"num","parameter2":"","parameter2Type":"none","parameter3":"","parameter3Type":"msg","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":0,"jimpFunction":"none","selectedJimpFunction":{"name":"none","fn":"none","description":"Just loads the image.","parameters":[]},"x":1117.2000579833984,"y":1827.200098991394,"wires":[["8c40f886d841a1ed","a665ba2af61ac5ad"]]},{"id":"8c40f886d841a1ed","type":"image viewer","z":"3d738ea.22f7872","name":"","width":"100","data":"payload","dataType":"msg","active":true,"x":1282.1998138427734,"y":1925.2001008987427,"wires":[[]]},{"id":"e4fb4487e4a258a2","type":"inject","z":"3d738ea.22f7872","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"first\":\"55deg\",\"second\":\"120deg\"}","payloadType":"json","x":531.0001564025879,"y":1829.0000257492065,"wires":[["b1dc72b7cbae5527"]]},{"id":"0a3588a32451ad3b","type":"debug","z":"3d738ea.22f7872","name":"debug 60","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1585.9999885559082,"y":1916.6000022888184,"wires":[]},{"id":"a665ba2af61ac5ad","type":"change","z":"3d738ea.22f7872","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.dir","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1363.999984741211,"y":1826.4000511169434,"wires":[["1a00ab29e41635cc"]]},{"id":"20ad50091d22a9aa","type":"ui_group","name":"Default","tab":"15ab88b14795fa9a","order":1,"disp":true,"width":"15","collapse":false,"className":""},{"id":"15ab88b14795fa9a","type":"ui_tab","name":"X-TEST","icon":"dashboard","disabled":false,"hidden":false}]
Help appriciated as always