So my schedule is weekly and the rule to launch it looks the folowing:
rule "Trash icon update"
when
Time cron "0 0 11 * * ?"
then
logDebug("OTHER", "cron timed trash icon update")
val day_of_week = now.getDayOfWeek
switch day_of_week.toString {
case "1" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/norecyclable.png")}
case "2" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/carta.png")}
case "3" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/organico.png")}
case "4" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/carta.png")}
case "5" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/plastic.png")}
case "6" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/blank.png")}
case "7" : {postUpdate(trash_icon_url2,"http://172.16.10.4:8080/static/blank.png")}
}
logDebug("OTHER", "trash current url: " + trash_icon_url2)
end
and then the template widget in a panel is as simple as :
<img ng-src="{{itemValue('trash_icon_url2')}}"
style="margin-top: 0px;
margin-left: 3px;
margin-right: 0px;
border-radius: 10px;
border: 1px;
border-style: solid;
border-color: rgb(100,100,100) ;
width: 487px;
height:214px" />
Does the job for me, to the next task … solar-grid-battery energy flow graph …