openHAB 3.0 Milestone 3 discussion

5 posts were split to a new topic: OH2 rule failing in OH3

Hi, I’m facing error

2020-11-28 10:00:01.666 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'tmp_LivingDining-9' failed: An error occurred during the script execution: Could not invoke method: java.util.List.size() on instance: [Ljava.lang.String;@9e18950 in tmp_LivingDining

in the following rule (it was ok in 2.5.10)

rule "Descodificar estados da lareira"
	Item GF_LivingDining_Stove_Out changed
	var lines = GF_LivingDining_Stove_Out.state.toString.split('\n')
	if (lines.size('\n') > 6) {
		val estado_lar = lines.get(4).split('=').get(1)
		var temp_amb = Double::parseDouble(lines.get(7).split('=').get(1))

	// caso a lareira tenha sido ligada/desligada fora do OpenHAB vamos actualizar o estado
	if (GF_LivingDining_Stove_Stat.state == "0" && GF_LivingDining_Stove.state == ON){
		// a lareira foi desligada
	} else if (GF_LivingDining_Stove_Stat.state == "7" && GF_LivingDining_Stove.state == OFF){
		// a lareira foi ligada

GF_LivingDining_Stove_Out is updated with a script (Exec add-on) and contains:


I need to parse contents of lines 5 & 8 and assign their value to some items.

Are you sure this worked? lines.size(’\n’) is kind of nonsense. lines is an array created by splitting the string on ‘\n’. That split removed all the ‘\n’ as a result. So even if this worked the call to size would always return 0 because there are no more \n.

But the perform goes even deeper because there is no size method that takes a String on Lists. So remove the argument to size and it should be ok.

1 Like

As I played around a bit on my test-installation I already built my whole model for my smarthome… But as I messed around, I also did some major misconfiguration, I wanted to solve. I figured, if I could get my model as “code”, I could easily remove those and insert them in my “staging”-environment before I’m ready to switch fully to OH3 (at least for my main installation, I have to have an OH2 around for some legacy 1.x bindings I use).


I’m afraid it produces the same error. Will try Regex instead.

Edit: if (lines.size('\n') > 6) should be if (lines.length > 6)


had some issues updating to milestone 3 (from m2) - so i basically did a fresh install. One problem - all my zwave nodes won’t initialize (no xml file created). Do you know if there is anything (a flag, file) to delete or how to reinforce the initalization? All nodes are found when adding them (node 4, node 5…) but no update (manufacturerer etc.) takes place. Only one xml file for the controller exists.


Edit - [SOLVED] No access to USB zwave stick was the solution, don’t know why it was necessary this time…

People please stay on topic and do not post all of your personal issues with M3 into this thread but open new ones.

That being said, @Z0l you (like me) might suffer from this still open issue:

EDIT: @kai could you add a “OH3 migration” category to “Setup, Installation and Use” please ?



great job, m3 comes with some very powerfull features, especially the developer sidebar.

I have some thoughts, which can make the user experience greater:

  • I love the Event-Monitor, perhaps it is possible to add also a Log-Monitor?
  • Things, Rules, Scripts and Schedules have an alphabet picker. I have over 500 items, so an alphabet picker for items would help a lot
  • Changing the sort order of the items (by Text, by Name) would be great
  • The code view for Rules, Pages and Things is a great feature for guys who loved the configuration files in OH2. It combines the power of fast editing and accessability by the web ui. It would be great, if there could be a code view for items to.
  • The code view will be much more powerfull, if one could switch from the collection overview (of rules / things / maybe items) to code view with all the elements of the collection in it (to have the possibility of search & replace in all rules, for example).
  • A feature for adding Rules from Textual Definition like the one for items would be helpfull


It would be cool, if one could really import the text files for items and rules into the UI config.
At the moment, they show up but are not fully editable.

Mhhhhh, is there anybody using the developer sidebar on the iPad?


I don’t know if this is the right place.
Started to learn the new version 3 before migrating from 2.5.

The design looks good and happy for the most part so part.

I think only that there is a missed opportunity on two things.

  1. The web access is still without SSL support. This would have been nice (maybe with Let’s Encrypt integration?)
  2. Yes, we have secured the configuration with and admin accoutn, but for viewing it’s still open.
    Would be nice to extend the security to put everything behind a login.

I hope these options will be considerd and added at a later time.
Keep up the good work!


What is the benefit of using SSL support within you local network ??

OH2 has always has SSL support using port 8443. Has that been removed for OH3?

Sorry, my bad.
This is correct, I forgot because I’m using nginx proxy so I could get secure access with authentication.

But maybe an option to auto redirect to https could still be nice.

I accessing it also remotely so that’s why.

If using remotely, you should use your nginx proxy, still no need for SSL internally or use myopenHAB.

1 Like

Of course SSL over port 8443 was not removed!


delivering Let’s Encrypt certificates for your local instance would be an awesome myopenhab/OH Cloud feature.

I use Let’s Encrypt with the nginx proxy

What’s the command to upgrade from M2 to M3 without going to M4?

That depends a lot on how you installed. I was able to just specify the Docker tag for M3.