Java Runtime Environment: which java platform is used and what version
openHAB version: 2
Issue of the topic:
In the log I see
2018-12-08 00:54:34.178 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'default.rules', using it anyway:
There is no context to infer the closure's argument types from. Consider typing the arguments or put the closures into a typed context.
There is no context to infer the closure's argument types from. Consider typing the arguments or put the closures into a typed context.
There is no context to infer the closure's argument types from. Consider typing the arguments or put the closures into a typed context.
and this is coming from this function:
rule "count members" when
Member of group_house_switch_light changed
then
var Integer ctOff = group_house_switch_light.members.filter[m|m.state == OFF].size
var Integer ctOn = group_house_switch_light.members.filter[m|m.state == ON].size // maybe var Int instead of var Integer?
var Integer ctSum = group_house_switch_light.members.filter[m|true].size
var lOn = ctOn.toString + " Licht(er) von " + ctSum.toString + " eingeschaltet"
var lOff = ctOff.toString + " Licht(er) von " + ctSum.toString + " ausgeschaltet"
string_house_switch_light.postUpdate(lOn)
NumberOfLightsOFF.postUpdate(lOff)
logInfo("lOn", lOn)
logInfo("lOff", lOff)
end
2018-12-09 11:46:10.166 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type JSONPATH
2018-12-09 11:46:10.173 [WARN ] [ab.binding.http.internal.HttpBinding] - Couldn't transform response because transformationService of type 'JSONPATH' is unavailable
http_luftdaten_2730.url="http://api.luftdaten.info/v1/sensor/1519/"
http_luftdaten_2730.updateInterval=60000
Number HTTP_number_pm10 "PM10: [%s µg/m³]" { http="<[http_luftdaten_2730:60000:JSONPATH($[0].sensordatavalues[0].value)]"}
Number HTTP_number_pm2_5 "PM2,5: [%s µg/m³]" { http="<[http_luftdaten_2730:60000:JSONPATH($[0].sensordatavalues[1].value)]"}
Both happens during startup only is this okay?? How can I avoid this??
This connected to the fact that OH2 has a somewhat unstructured start up process and can load and execute rules before other prerequisites are ready (items, persistence, etc).
There are several threats discussing the startup behavior, here are a few options mentioned that you may want to consider, all require some work:
Alternatively, if it does not cause you any follow up problems, just ignore
Well, it has been a while since I did that, but from recollection I would say: yes. Just be aware that once you have done this, it will take several minutes for your rules to get loaded after each (re)start of OH2. Extra patience is required. But you can follow the process in the logfile where it will be logged when the rule files get loaded.
2018-12-09 11:46:10.166 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type JSONPATH
2018-12-09 11:46:10.173 [WARN ] [ab.binding.http.internal.HttpBinding] - Couldn't transform response because transformationService of type 'JSONPATH' is unavailable
http_luftdaten_2730.url="http://api.luftdaten.info/v1/sensor/1519/"
http_luftdaten_2730.updateInterval=60000
Number HTTP_number_pm10 "PM10: [%s µg/m³]" { http="<[http_luftdaten_2730:60000:JSONPATH($[0].sensordatavalues[0].value)]"}
Number HTTP_number_pm2_5 "PM2,5: [%s µg/m³]" { http="<[http_luftdaten_2730:60000:JSONPATH($[0].sensordatavalues[1].value)]"}
This is assuming that you installed all bindings through the PaperUI: go to PaperUI, click on “add-ons” and choose the tap “transformations”; from the list there just click install next to JSONPATH
Same issue here. I have multiple errors with all transformation extensions (jsonpath, map, regex, scale, …) when I reboot after upgrade (openhabian here). Then I restart the service OH and all messages disappear …