[OH3] Rules in file do not update

Hi,
after updating to OH3 all my file based rules are there, I can see them in the GUI. But when I change (edit and save) a “rule file” I still see the old code int the GUI. Even after a reboot the openhab uses the old code. Do I have to somehow trigger the update when I change a file?

As far as I understood, using files (no matter if it’s rules, files or things) is a one-way thing: OH3 can read and understand your rule files, but you are not able to change them via the GUI. If you want to do so, you need to recreate the rules via the GUI.

Watch openhab.log. When you save the file you should see a log telling you to that effect and there might be errors or warnings.

If it’s showing that the file is being loaded, it might be that the contents of the rule is cached in the browser and you need to force a fresh pull.

Probably you edit the rule in the wrong (openhab2-conf)
folder?

I done the same mistake :slight_smile:

1 Like

I have exactly the same issue. I was trying to fix some of my rules that have errors with time. So I opened the rule file in VSCode, edited it, saved and … nothing. No events in the logs for rule changes, nothing. The rule in the new OH UI stays the same as well.

EDIT: WTF. Why are there copies of my rule files on multiple locations?

/etc/openhab/rules/Zgoraj_AndrejSoba.rules
/etc/openhab2/rules/Zgoraj_AndrejSoba.rules
/srv/openhab2-conf/rules/Zgoraj_AndrejSoba.rules

Why are the old files still there? And why does samba share still point to the old location? If this is expected it should definitely be in the docs… if not then something is very wrong.

Not WTF but because you did not delete them. The update tool didn’t say it would delete, did it.

It isn’t expected so it isn’t in the docs. As to why the share link points to the old location I don’t know, that depends on how you did the upgrade. Can have been a bug or user fault.

Call me dumb but I would expect a normal upgrade to move the files and remove files that are no longer needed. It’s ok if that is not the case - just not something that I would expect.

I my OH installed through openhabian so I did the upgrade using openhabian-config tool as described in the upgrade instructions.

So, more important question is - how to fix this? I did try re-running the “apply improvements” thing and selecting the option for installing samba shares - that doesn’t seem to do anything.

That’s the thing with writing software for the masses.
One user expects X and another one expects the opposite of X to happen.
On so many things that it’s neither possible nor feasible to document all the potential cases .

That would be another issue then please so search the forum and if that doesn’t get you anywhere try opening another thread but mind the rules and provide all the details on your system and how you installed and upgraded it. Start here.

Sorry but I have to disagree. If this is the normal update process than this has to be documented.

I’m an OpenHab user for many years now and I have update my systems over the years over several versions. But to be honest the update to version 3 is the worst ever. So much was changed that is not or only rudimentory documented. Sure, if you installed alle the beta versions and milestones you know about this stuff. But for a “normal” user that updates only the release versions and reads the update docs this update is all but smooth. Don’t get me wrong version3 is a great update and I realy appriciate all the work that has ben done. But regarding the update mechanism and documentation to me it seems to be rushed out to keep the “yearly” time frame.

Best regards,
Michael

1 Like

Yeah I have to agree with this.

To be constructive for anyone else that might have similar issues though… I managed to fix my samba shares now. The resolution seemed a lot simpler than I thought. I checked the etc/samba/smb.conf and all the paths were pointing to the correct location. So apparently the openhabian-config did it’s job in fixing the shares when I told it to apply those improvements. Just that something didn’t get refreshed. So I disconnected my computer, rebooted the OH server and got access to the correct shares now.

As for clearing the old stuff… should we delete those files manually? Leave them be? Or is there an automated way to do it?

No you don’t have to but it’s your right. And on what statement ?

Whatever you like. I for instance like to keep them as a backup and reference,
There is no automated way I know of.

I moved my post to a new thread ([OH3] problem with multiple rule files), as the discussion here seems not on topic :wink:

Great! Know of anyone to volunteer to do it or help? The docs are the way they are because too few people are volunteering to update them. So if they are not good enough you’ll either have to pitch in an help, or wait until the few of us who are writing docs manage to donate enough of our time to write the docs up to your standards, if they ever get to that point.

Markus called for help with a migration tutorial. No one stepped up. I’ve called for help with the Getting Started Tutorial. No one stepped up. So this is what you get when no one steps up. I’m sorry if you feel inconvenienced by the state of the docs. But realize that I feel pretty damned demoralized after having spent so much of my own time trying to write and edit docs only to get “they’re not good enough!”

We’re all doing the best we can. If that’s not good enough for you pitch in or leave it be.

2 Likes

thanks for bringing that up…I forgot to update the volume bindings in my docker-compose file which led to the same result :man_facepalming: