Also late to the party 2.5 to 3.3, don't know what to do next

Hi Folks, please excuse the lack of understanding. I’ve tried reading various threads about my issues but its all overwhleming and I started with the Docs on "Migration to openHAB 3’ which suggested I just needed to choose option 3 in openhabian-config and everything would be perfect!

Was on 2.5 and used openhabian option 3
All my configuration was in files, EXCEPT for THINGS that I discovered in OH2

  1. I did get an error after OH3 was completed about SAMBA not working so I rebooted.
  2. I thought I could just use Basic UI but :8080 took me to the initial setup where I entered a user name and password, once in I had the OH3 UI
  3. All my ITEMS appear to be there but are NULL I saw a message about deleting MAPDB persistence data
  4. My THINGS seem to be there but all started saying ONLINE and then a few moments later they say ERROR: HANDLER
  5. My logtail has stopped with the latest messages saying all LINKS removed - I assume related to 3 & 4 above
  6. MQTT server is offline - unitialised - how to get it back do I need to reinstall Mosquiito?

HELP! Where do I start, I thought it was going to seemless with option 3 and I could work on the OH3 specific stuff later.

I stopped and restarted the openhab service and the THINGS came back online.
The Android App seems to be back up too using my sitemap - I tried locking and unlocking the front door from the app and it works but takes about 30 seconds to action while before it was instant

Regarding the tail -F - of course I relized the files are no longer openhab2 but openhab is it not now using port 9001? - Reinstall Fronttail through option 21 doesnt work for port 9001.

*** Update, I had to change the /etc/systemd/system/frontail.service file to have the correct EXEC path and restart frontail.

For (6) MQTT - The Broker thing is unitialised and therefore everything else is ERROR:BRDIGE but selecting the Broker thing gives me no means of adding the connection name the IP, username password etc?

MainUI is always going to be there, it’s the admin UI. To get to your sitemaps click the little square icon in the upper right corner (Other Apps) and, if BasicUI is installed you’ll have option to open it. Look at the URL and that will be the direct path to get to BasicUI in the future.

It’s always been on port 9001. Make sure that the service is reading from the right files too. There is no more openhab2 anywhere. It’s only openhab now. So the logs are in /var/log/openhab.

We’ll need to see a screenshot I think.

But you could delete it and recreate it. If you take note of the UID of the old one before deleting it and make sure the UID of the new bridge matches, you won’t even need to go adjust your other MQTT Things to point to the new bridge.

Thanks @rlkoshak I never saw that little icon, I’ll have to create a favourite to the direct link as I’m always going to want to got ot BasicUI until I have time to setup the main UI

For fronttail, yes as per my second post I had to change the frontail.service file to point to the right directories.

So its just the MQTT I tried removing the old broker as there was no info, not even a UID, I tried adding a new one calle HomeAuto which was the original name.

I did note all my details from OH2 and wrote this for the broker

MQTT system broker config: 
Connection Name: HomeAuto

Is the long number the UID it seems in 3 parts

No, the part of the UID you need to worry about is the “HomeAuto” part of “mqtt:systemBroker:HomeAuto”. However, as long as that broken Thing is in a state of REMOVING, OH won’t let you create another Thing with the same ID. You might want to restart to get rid of that broken Thing. If it still hangs around, we can do some surgery to purge it manually.

Rebooted and the old Broker is back to Uninitialised, it didnt remove. - Whats the Surgery :slight_smile:

I ended up just changing all the MQTT things (messages) to point to the new Bridge

On another point the OH2 directorys still exist and my SD card (16Gb) looks like only 1GB left, which is strange because I had previously used the option to move root to USB also 16GB

No, do not use system broker (which relates to no-longer available integrated broker)
Use “Ordinary broker bridge”

Sorry @rossko57, not quite with you?
As above

“I ended up just changing all the MQTT things (messages) to point to the new Bridge”

The only issue is now the one that ported from OH2 is stuck in removing, if I reboot it goes to uninitialised, and just wont finish removing

Yes, that’s because it is a systembroker type, which should never have been carried forward to OH3.
Once in, yes it is hard to get rid of (but harmless, just a nuisance)
There are several threads on this, example

If the thread @rossko57 linked to doesn’t solve it, the surgery involves stopping openHAB and manually removing the Thing from the JSONDB manually with a text editor. It’s easy to mess up so it’s not something to take on lightly. But backups make it easy to recover if it goes wrong.

Try removing the thing twice in a row, it should ask if you want to force remove the thing if you try a second time whilst it is already trying to remove the thing from the first attempt.

The thread @rossko57 highlighted, doesnt have any solutions for my case, as I dont have the ability to edit any parameters, but I’m also not getting errors in the logs - so I can live with something sitting uninitialised in things.

Thanks @matt1 I will try that though

One new problems i’ve found if you will continue to bear with me.

I have a rule that takes a picture generated by MotioneyeOS on another PI. Motioneye informs OH through the following command which works fine

curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "ON" ""

In OH the camera rule takes this picture and places in the html config directory to be displayed on the sitemap

 if (Camera1Trig.state == ON)
        // This new part is to create an image that can be shown on the sitemap.
        // Note that the varaiables had to be defined down here or the command returned null for them
        // Image is stored in the html directory
        val url = "" //Camera 1 is Wansview
        val outputfile = "/srv/openhab2-conf/html/" + "snapshot.jpg"
        var cmd = "curl -m 10 -o " + outputfile + " " + url

This generates an error in the logs Cannot run program "curl -m 10 -o /srv/openhab2-conf/html/snapshot.jpg": error=2, No such file or directory

Now I thought fine its pointing to an openhab2 location that doesnt exist - thing is the location does still exist, but there is no equivalent to /srv/openhab-conf/html in …/srv/ on my pi to point to instead, can someone suggest how this should be changed?

Also for some reason the HTTP binding didnt get installed when I upgraded even though it was there in OH2, so I reinstalled it in case that was the issue.

executeCommandLine has changed parameters for OH3, there are lots of threads about this. Basically you need to supply separate arguments instead on of one long space-sperated string.

1 Like

Ahhh thank you for the pointer, the error message was very misleading “No such file or directory”
I hadn’t thought the format of executeCommandLine could be the issue

but just for clarification the path /srv/openhab2-conf/html doesnt have an equivalent in OH3?
Can I write straight to /etc/openhab/html ?

This is kind of conflating things. /srv/openhab2_conf has nothing to do with OH 2 nor OH 3. I think it might have been set up by openHABian as part of Samba. But in OH 2 that folder was linked to /etc/openhab2. If an equivalent configuration were made for OH 3, it’d be linked to /etc/openhab. But the config folder’s “real” home is and has always been in /etc. What ever that /srv folder is, it’s something set up and configure independently and outside of openHAB itself.

1 Like

Hi Folks, I’ve had 3.3 up and running well now, fixed a a few rules etc mostly around time methods.

Anyhow the last question I have and I’ll mark the thread complete is around OH2 files and folders, I still seem to have a lot of OH2 bloat taking up space on my SD card.

I saw the following in the upgrade docs but not sure if it is correct to use in my case,

sudo apt purge openhab2 

I use openhabian and did the upgrade as option 3

If not this command is there a list of folders that can be deleted?

If OH 2 is still installed, use the apt command. If not, remove /etc/openhab2 and /var/lib/openhab2.

Take backups in case something is still depending on something from those folders you may not realize.

As I say I just used the openhabian option in openhabian-config so I’ll delete the directories.