Hi,
yesterday I upgraded from version 5.01 to the milestone build, thank you for your work!! Unfortunately, none of my text-based JavaScript rules work anymore — the keyword “rules” is now reported as unknown.
I’m aware of the new option “Auto injection for all scripts, including file-based,” which was enabled by default. However, I noticed that adding the line
I’m not JavaScript expert, but I think the difference in syntax is related to the difference in the JavaScript enging (and the version of JavaScript that it supports). The “new” JavaScript add-on uses GraalJS and the “old” one uses NashornJS. You can still install the NashornJS add-on if you don’t want to rewrite all your scripts right now. My guess is that they will work better there.
I had the same problem a while ago: change that option in the UI to something else, save, go back to Auto injection for all scripts, including file-based scripts and transformations, save, restart openHAB. After that the problem was gone.
I still wonder what causes this. The new configuration parameter defaults to “auto inject everywhere”, so I am a bit out of ideas why it does not do that.
I had to switch between different openHAB versions the last days because of another issue, that behavior was reproducible: switching from 5.0.1 to 5.1.0.M1, switching from 5.1.0.M1 to Snapshot #4840. I switched between 5.0.1 and 5.1.0.M1 several times, every single time I had to apply the workaround for that setting.
No big deal, but it gets you more gray hairs
I’m having the same problem loading items in a Windows environment (The addBindingConfigReader method has thrown an exception). I’ve run some tests and found that quite a few item files load without error, but others don’t. For example, items associated with the astro binding fail to load. Items in a file created using the example in the binding documentation also load with errors. The error occurs during startup.
I’ve identified item files that fail, loaded them afterward, and they seem to boot completely. I’ll also check if the pingdevice works.