I’m running openhabian OH3 on a Raspi 4, I set it up completeley fresh and copy and pasted all my things, items and rules.
I had some sort of trash calendar with 2 Items:
String abfall_ical_heute “Abfall Heute [JS(abfall_map.js):%s]” { http="
<[http://localhost:8080/static/Abfuhrtermine_Stand_20201214.ICS:36000:JS(abfall_heute.js)]" }
String abfall_ical_morgen “Abfall Morgen [JS(abfall_map.js):%s]” { http="
<[http://localhost:8080/static/Abfuhrtermine_Stand_20201214.ICS:36000:JS(abfall_morgen.js)]" }
The script returned something like “Restmuell” and worked great,
Now in OH3 I read the http Binding has to be configured a little different, so I changed the 2 Items to a thing:
Thing http:url:abfall “Abfalltermine” [
baseURL=“http://localhost:8080/static/Abfuhrtermine_Stand_20201214.ICS”, refresh=3600] {
Channels:
Type string : heute “Abfall Heute” [ stateTransformation=“JS:abfall_heute.js” ]
Type string : morgen “Abfall Morgen” [ stateTransformation=“JS:abfall_morgen.js” ]
}
and the Items to:
String abfall_ical_heute “Abfall Heute [%s]” {channel=“http:url:abfall:heute”
[profile=“transform:JS”, function=“abfall_map.js”]}
String abfall_ical_morgen “Abfall Morgen [%s]” {channel=“http:url:abfall:morgen”
[profile=“transform:JS”, function=“abfall_map.js”]}
This works but I don’t know if that is really the easiest way and my main problem is, it’s not updated after a restart. It takes the set 3600 seconds (1h) until the Items are updated. How can I get them to update directly after the restart?