Snapshot Update recommended? JSR223 Javascript ded

Hey guys, long time no see!

I haven’t been around since winter, my openhab setup has been holding up really strong though, no problems at all except some google calendar api changes that i had to take a look at.

i actually tried to update to latest OH2 snapshot a couple of times only to realize that JSR223 Javascript support was completely broken due to some class relocations. Is it finally safe to update now? Any recommendations? Thanks guys!

Howdy, @illnesse!

The snapshots have some issues yet, but depending on your setup, they may not affect you. I’m using it in production, but zwave is giving me big headaches. Scripted automation works great.

The helper libraries for all languages are now all in one repo. There’s still some work to do to get the JS libraries aligned with Jython, but you might like the core.osgi.js and core.metadata.js libraries that I’ve added.

I made an update recently to correct a package name change for JS, so let me know if you find more (although IIRC you’re using some custom ones). For the name changes, I’ve used try/catch so that the libraries are backwards compatible.

1 Like

Sorry to step in with an off-topic question, but could you please share which kind of headaches you have with Z-Wave? (I am running 2.5 M1 (very stable) and think about changing to a snapshot, but with more than 130 Z-Wave nodes I would prefer a stable Z-Wave binding). Thank you!

It’s in the first link above… I also have a LOT of missing events, but this could be in core.

welp, that went relatively quickly. i’m on latest snapshot now using openhab-helper-libraries, with some fixing here and there. Seems to be running flawlessly now. I added my custom libs as personal, the only thing missing in persistenceexstension.js is:

    
	//
	//HistoricItem historicState(Item item, AbstractInstant timestamp)
	//HistoricItem historicState(Item item, AbstractInstant timestamp, String serviceId)
	context.HistoricItem = function(it, timestamp, serviceId) {
		try {
			var item = context.getItem(it);
			return (serviceId == undefined) ? context.pe.historicState(item, timestamp) : context.pe.historicState(item, timestamp, serviceId);
		}catch(err) {
			context.logError("historicState "+__LINE__, err);
		}
		return null;
    };
    

Hi, have you considered sharing your configuration setup again with the update libraries
Many of us liked your project but we are unabled to maintain and upgrading from the last OH version (2.5)
Thank