openHAB 3.0 Milestone 5 discussion

I did discover a workaround. If this is harmful to the system, I hope someone smarter than me tells me!

You first have to stop openHAB, then you can edit the items definition jsondb file. I’m on my mobile so I don’t have the exact path, but it’s under the user data folder. You also need to update the item name in channel links if the item is linked to a thing. I haven’t worked much on pages yet but I presume they also would need to be updated with the new item name, either textually or with the UI.

Welcome back! I currently use nodeRED in conjunction with openHAB 2.5 but hope to create an OH3 system that barely relies on it or other services. I do intend to keep nodeRED connected as I want to use it as a starting point to teach my kids about programming.

Thx! Your suggestion worked like a charm. In hindsight I don’t understand why I did not think of this approach, but I guess that is the beauty of hindsight; it makes things seem so much clearer, :slight_smile:

I’d like to download M5 and test it on MacOS, but on the officially linked page only M4 is available for download (https://next.openhab.org/download/). Can someone point me to the right download folder?

Try this

https://openhab.jfrog.io/openhab/libs-milestone-local/org/openhab/distro/openhab/3.0.0.M5/openhab-3.0.0.M5.zip

1 Like

When you have validation messages like this, it’s because the thing type defines some constraints. You’ll have to check the thing type definition in the binding to see if they’re correct.

Done - adding a module now looks like this

I tried to group the core module types into categories that made sense - of course you still have the old list with a list of all module types if you click “Show all”. These big buttons cover the core module types (which will be probably 99% of all).
There are well-known so we can deviate from the generic config sheet; in many cases after you’ve selected a category you can switch between types, for items you even have to pick the item first, then the type of trigger, it made more sense that way IMO.

For scripts, you get a nice menu with Blockly + the installed languages, and clicking in the menu gets you straight into the script editor, no more shenanigans.

2020-12-12_01-01-54

There’s a little caveat, for technical reasons the rule has to be saved (or created if it doesn’t exist yet) before you get to the editor.

9 Likes

Just installed 3.0 M4 and slowly added my things and everything is working great! I decided to refactor my things, items and rules. I did not notice that the myopenhab.com is not working and thus Alexa is broken. Can I use the OpenHab Bridge on 2.5.10 to control my devices on 3.0 M4 until we have native support?

Hi Everyone,

I’m coming from 2.5.10 where I had text-based configuration of almost everything, and have moved to a new place. I figured I would take the opportunity to try something new, and have just installed 3.0.0.M5 in a Docker container, and so far so good! A lot of excellent improvements that in time will surely make OH more accessible, without compromising on functionality.

I have what might be a silly question… when the next milestone is released, how do I upgrade without starting from scratch? The documentation for OH2.5.x Docker suggests the /openhab/userdata folder will carry across the config, but my userdata folder looks empty…

I am using docker-compose to run the container, with the docker-compose.yml below:

version: '2.2'

services:
  openhab:
    image: "openhab/openhab:3.0.0.M5"
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "./openhab_addons:/opt/openhab/addons"
      - "./openhab_conf:/opt/openhab/conf"
      - "./openhab_userdata:/opt/openhab/userdata"
    environment:
      USER_ID: 999
      GROUP_ID: 998
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      EXTRA_JAVA_OPTS: "-Duser.timezone=US/Central"

It seems like if I remove the container and pull down a new image, I’ll be starting over? Where is all the configuration I’m doing in the Main UI stored?

Am I missing something silly? I’m super new to Docker, it wouldn’t surprise me if one of my mount / environment commands wasn’t right, or I’ve got a permissions issue.

Also… I really miss the frontail log from 2.5.x - can I reinstall that? Any other options I would need to set in the docker-compose.yml file?

Thanks in advance for any suggestions!

I too am new at docker and openhab3, but what i read and hope i understand correctly it that when you specify file locations with volumes, then the volumes can be remounted to a new container, thusly keeping your files safe and sound.

I think i also understood that this means you can spin down your old release of oh3 and spin up a new one, while still having the old one kicking around in case the new one does not work as expected.

Otherwise I gather you can always use the openhab-cli to do a command line backup, and then restore that backup into the new container.

But i am not confident enough to actually have tried any of that

So ist is a problem with the binding and not with the ui. Then i will open an issue on that.

Thanks

Thanks this worked !!!

When you add external links to a page the console.log of the browser show the link when clicked, but the page is not opening.

All, would you please stay on topic.
Open your own threads when your question isn’t of general interest or not specific to OH3M5.
Thank you.

3 Likes

It didn’t work across several snapshot versions until I purged and reinstalled the openhab package. It’s working since. I could not evaluate the cause. Possibly file permissions in jsondb dir ? But that’s just guessing.

1 Like

I think the rules engine in M5 is rather sick; it seems unable to parse simple things like ON, OFF, NULL, triggeringItem, newState (see below) => shall I open an Issue, or is this already known?

2020-12-12 14:25:06.323 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '24g-25' failed: The name 'ON' cannot be resolved to an item or type; line 592, column 30, length 2 in 24g

2020-12-12 14:25:06.326 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '24g-6' failed: The name 'NULL' cannot be resolved to an item or type; line 182, column 21, length 4 in 24g

2020-12-12 14:25:06.339 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '24g-1' failed: The name 'OFF' cannot be resolved to an item or type; line 97, column 30, length 3 in 24g

2020-12-12 14:25:06.567 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '24g-25' failed: The name 'newState' cannot be resolved to an item or type; line 577, column 13, length 8 in 24g

2020-12-12 14:25:07.020 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '24g-23' failed: The name 'triggeringItem' cannot be resolved to an item or type; line 544, column 20, length 14 in 24g

I see you use Docker Compose, so all you have to do is change the image tag from 3.0.0.M5 to 3.0.0.RC1 and then run sudo docker-compose up -d in the directory of your docker-compose.yml. That will make it pull the new image and recreate your existing container using your existing configuration and data.

All the Main UI configuration is stored in the userdata volume. When you upgrade it will automatically create a .tar.gz backup of your data in userdata/backup before it modifies anything.

I suggest to add a “Edit” button here to jump straight to settings/pages/layout/overview

2 Likes

But they stated

where did you look? /opt/openhab/userdata?

If that is empty that can be an issue that needs to be resolved before trying to upgrade. If your data is stored in the container, upgrading would involve starting again.

Is there a way to select all items at once within the bulk selection in main ui?

I had what maybe is a similar problem that I described in the following.

Hi @wborn and @Bruce_Osborne,

Thank you for your help - I troubleshot the issue with mounting the local directory - my docker-compose.yml had the wrong syntax for the mounts of local directories - corrected one is below:

version: '2.2'

services:
  openhab:
    image: "openhab/openhab:3.0.0.M5"
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "/opt/openhab/addons:/openhab/addons"
      - "/opt/openhab/conf:/openhab/conf"
      - "/opt/openhab/userdata:/openhab/userdata"
    environment:
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      EXTRA_JAVA_OPTS: "-Duser.timezone=US/Central"

Now everything works exactly as I expected - I experimented with removing and re-creating the container a few times, and behaviour is as expected - I can pick up where I left off, no lost items, etc.

NB: I didn’t have to change the UID or GID the container was running, it sufficed to add my local user to the openhab group, and give the group rw permissions for the local directories I wanted to mount.

Thanks for the help!

2 Likes