Upgrade OH 3.4.4 to OH 4.1 Best Direction

No.

Thank you likewise.

What a great idea…

From now on I deal with openHAB; no more openHABian.

Thank you for your very helpful response.

Not correct.

There are three places where the unit might be defined. When it is not defined at a given place, there is a default behavior:

  1. The Channel might define a unit indicating the unit of the value the Channel publishes. When not defined, the unit defined in 2 is assumed.

  2. The Item might define unit metadata which defines the unit of the state of the Item. This also defines the unit of the value saved to persistence and therefore what’s used in your charts. When not defined, the system default unit is assumed based on the Item type (e.g. Number:Length’s default is m (meters)). When an update is received with some other unit, the value is converted to this unit before the Item is updated.

  3. The Item might define a State Description Pattern that includes a unit. This is the unit the state of the Item will be converted to for display purposes only.

That’s not how it works. If you have a Number:Dimensionless you will always have a unit on the Item’s state. If you have not added unit metadata to the Item, the system default is assumed which for Number:Dimensionless is a simple ratio (one).

And if you are using any other language besides Rules DSL, you can very easily get at the value of an Item with a state that has units without lengthy anything.

If you really want to not use UoM at all, change your Items to be just Number. That will strip the unit off of updates before the Item is updated and the Item will only have a simple number without units.

However, you can simplify things a lot by taking advantage of units. For example, if you have a Channel publishing 3000 mV, you could set the unit metadata on your Number:ElectricPotential Item to V and the divide by 1000 happens automatically. You don’t need the transform.

And then in a JS Scripting rule you can ignore the units if you choose: items.MyVolts.numericState > 5 though you have to know the units of the Items state before hand and make sure your numbers you are doing math with are the same

or you can keep the units: items.MyVolts.quantityState.greaterThan('5000 mV') which is a little more verbose (JS doesn’t allow operator overloading so we can’t use >) but has the advantage that you don’t have to know or care what unit the Item carries, just that it’s an ElectricPotential. The mV in this case would be converted to V before the comparison is made.

In Rules DSL it is a bit more awkward thanks to it’s unability to automatically figure out that the Item’s state is a QuantityType on it’s own. But that’s just another reason I no longer recommend Rules DSL for new rules development.

jRuby I think handles UoM stuff even better than JS Scripting.

As for the rest, all I can do is reiterate what’s been said that openHABian and openHAB are not the same. openHABian is one way among many to install and configure openHAB. It has it’s own version numbers, and it’s own tools.

It helps to think of it in layers:

openHAB  Frontail. Mosquitto ...
openHABian
Raspberry Pi OS
Hardware

Your hardware runs an operating system Raspberry Pi OS (bookworm if you are up to date). openHABian configures that OS and installs and configures a number of software services, of which openHAB is one. Each layer has it’s own requirements, capabilities, and versioning.

Depending on what you are looking at or working with you (i.e. the context) you will see different things. When you first run after burning the SD card image you are seeing openHABian working. When you log in to the machine, you are seeing that you have an openHABian configured machine. When you run openhabian-config you are working with openHABian.

When you are modifying files in /etc/openhab or /var/lib/openhab, interacting with MainUI, BasicUI, etc, or running openhab-cli you are working with openHAB.

When you are looking at logs through Frontail, configuring Grafana, and stuff like that you are working with a third party service. That third party service may have been set up by openHABian but it it not a part of openHABian, nor is it openHAB.

This is a really common source of confusion with real world impact on users and readers of this forum. It is not pedantic nor is it a waste of time to be precise in what is being talked about because it is a completely separate set of maintainers and experts who are involved depending on whether one is talking about openHABian or openHAB.

2 Likes

A big thank you, Rich, for taking the time to constructively clarify how things work.
I am sure others can learn lots from you; I certainly can.

While I have been using OH for years (since 1.something), I figured I only “work” it, as in configuring it once or twice a year, but then massively, as in a few days in a row… which could explain my struggles, as I have to relearn the same thing over and over, because I unlearned it by not using (working/configuring) it.

I will certainly dig deeper into the UoM topic (and have already started the clean-up; also removing items from persistence I really don’t need persisted).

Good to hear… I have yet to take the plunge. When I have these ‘OH working bees’, I think to myself, yeah, let’s convert to JS; and then comes, why bother do (seemingly simpler) jRuby instead, then realising the massive job ahead to convert 200 rules (some of which I do no longer understand myself at first glance), including the learning period required (which will be forgotten, given the time of use and my progressing age).

As for openHAB and openHABian, as I understood it, it is openHAB with a bunch of scripts wrapped around it, which makes it easier to install and operate, in particular for new users. I will escape this “problem”, by using exclusively openHAB — that is abstaining from openHABian altogether (as I don’t really fit the profile). I don’t think there is a point in splitting hairs over using openHABian 4.2, being a version of openHABian that uses that version of openHAB. It was always clear to me (and seemingly others) when people posted queries related to openHABian, that they were using openHABian (with whatever core of openHAB).

Again, thank you for your (significant) effort to set me straight. :slight_smile:

And again, you are mixing up version numbers.
openHABian is at version 1.9c whereas openHAB is at 4.2 now.
It is important to use correct version number when reporting issues, so we can identify if one uses the latest version. Even openHABian <1.9c can install openHAB 4.2, as it will use latest available stable version.

You are not a customer. Customers are paying for a product they are using.
Or at least they are valueing it when it’s for free and developers like myself have spent a lot of their spare time to build it to help with your user experience.

The product I’m talking about is openHABian, not openHAB.
It is at version 1.9c and it is crucial to understand that and the whole openHAB-openHABian-RPi (= Application-OS-HW) eco system for yourself but even more so it is essential to know for us forum users that you are asking to help you.

You obviously have still not understood is that this is NOT rhetorical or hair splitting at all.
Until and unless you finally get to understand that and its consequences, please refrain from resorting to cynical and ad hominem reponses about people (developers, even) that once were willing to help you in their spare time but now no longer are, for obvious reasons.
And also once you do.
Thank you.

It’s a rhetorical use of the word.

… which I made where?

It looks like someone ‘fuelt sich auf den Schlipps getreten’.
If you feel, that way, then it is exactly that, you feel that way. Nothing I can do about.

If you speak for yourself, do as you please; I actually appreciate that.

I advocate not doing new development in Rules DSL. If you have Rules DSL stuff that already works, leave them be until you have a need to replace them or just want to. There is no rule that says you can only use one rules langauge at a time.

This is incorrect. openHABian is Rasberry Pi OS with a bunch of script around it to install and configure openHAB and other software. I can only reiterate that it’s not rhetorical. It’s critical information.

What you are saying would be something like Microsoft Office is just Word with a bunch of scripts around it to make it easier to install and operate. You have the cart put before the horse.

It really is important though that the correct version numbers are reported for the the thing being discussed. To continue the simili, talking about openHABian 4.2 is like talking about Windows 16.8 (16.8 is the latest version of Word on my work computer) when the correct version of Windows is 11.

The version of openHAB is not tied to the version of openHABian. You can run OH 2.5.12 on openHABian 1.9c. That doesn’t make openHABian become version 2.5.12. Similarly you can run OH 4.2 on openHABian 1.5. The two versions are independent and therefore to use the version of one when referring to the other is essentially meaningless.

Even if you personally don’t care about such distinctions and think they are pointless, we need to protect ourselves as helpers on the forum from future readers of this thread who would come away with the wrong idea if we leave misues of version numbers like this uncorrected.

2 Likes

Thanks, understood.

I certainly do care about version numbers, and didn’t say anything to contrary.


I reckon it is way too late for this thread to try setting the record straight. However, I will try…

Post 8 was in essence a query if the install process for version 4 can applied to version 4.2 as had, at this point already installed 4.2 but nothing further. In case my approach was wrong, I could easily start from scratch.

Post 11: this is were the focus is shifting to version numbers…
Now let me add this, over the years and throughout the forum, there is rarely (and I say rarely, as I even tend to say never, as I can’t recall having seen it) are reference to the openHABian version.
In fact, for years, and more recently, I have reported my environment as:

  • openHABian 3.4.3 on rPi4 with 4GB

Not once was an issue raised, that I am reporting my environment the wrong way.

Post 12: If you take my name out of this post, and read it objectively, you now hear the voice of a user who is concerned. Replace the ??? with a “WHAT?” in response to “there is no such thing as openHABian 4.2”.

I thought what did I do wrong?
Did I pull the wrong image?
Did the install go wrong?
Did I update the system and ruined what openHABian installed?

(So, I checked my system, pulled my installation transcript file, as I document what I do step by step)… fully focusing on “what is wrong with my installation”.
To reiterate, my mind at the time was not on versioning, but on ‘install potentially flawed or gone wrong’.

What followed are my posts 13, 16, 17 … all are saying (objectively): but look all these things point to installed openHAB 4.2 in/with/through the openHABian image I had downloaded; even stating the steps I undertook to get there.

Post 19: If it is not clear now to the objective observer, it can be seen that I tried openHABian-cli, also stating I never heard of it. For me this situation was serious, trying to figure out what went wrong.
Then I read “Of course not. It does not exist.” WHAT? Why am I given incorrect information. I am sure that at this point, most would not be happy with this ‘development’.
Again, look at this objectively… I am pulling my hair out to figure what has gone wrong with my installation, while someone is pulling a leg and throwing a rhetorical.

Post 20: demonstrates me realising the pear-shaped moment.

At this point I had it; here I am trying to figure out what I did wrong with my installation, only to realise I am fed (As I perceived it at the tiem) with nonsense.

I then thought, if I should even respond further to this thread. If I am peeved, I usually force myself to sleep a night over it… but I thought, I have got my personal AI, why not let it assess and comment on the situation… and asked it to read the whole post, and focus on the development from post #10

It came up with a summary that matched my perception. Again, think about to for a moment… my perception, and a machine ‘thinks’ the same way = I must have assessed the situation in the right way. (My subsequent post was literally hidden immediately, hence, is no longer visible.)

It was only then that I realised that the post had turned form installation to versioning. Clearly, my focus had been on something different.

So with this explanation in mind, we can see ‘we’ talked past each other; each having a different focus.


In conclusion, I will say the same: versioning is important, but looking at forum posts overall, and my reference to openHABian based on the OH version, it is common place to refer in short to openHABian (OH version); e.g., openHABian 3.3.

So for all you defenders of proper versioning, I agree with you.

Context is important to make sense of the thread since post 10.
In context, the “correct” version of openHABian was the least of my concerns at that point in time.

Let’s move on.

No, but with this post, you fail to do that.
You haven’t gotten to admit the key point in this: that from the very beginning (years ago) you have not understood what openHABian really is and how that relates to openHAB.
Despite that about anyone on this thread including Rich as a well-respected expert and myself as the maintainer of openHABian have kept telling you you’re wrong.

And you fail to understand how important that distinction is for any forum activitity including this thread.

With this post you still show no reflection on how your communication can have been (and was !) perceived by a truely objective observer that has the proper openHABian-openHAB understanding.
In the light of facts, your responses were in part ignorant, intentionally provocative and condescending and even in your ‘final’ post (that ends with asking us to move on), you are showing no sign that you might have understood that so your post IMHO is only a feeble attempt to justify your behaviour.
You lack to apologize yourself for not understanding the difference in the first place although that’s been the root cause for all this waste of time (your wording). Granted that’s ever getting harder the longer that’s ago.
But even more so you lack to apologize for comments like ‘what a waste of time’ right to someone (me) wasting his (my) time on supporting you, to tell right the maintainer you drop using openhabian because of this and even recommend others to follow your example.
Finally your unsäglicher attempt of justifying your point by an AI-generated statement in the now-hidden post. Complete bs that is. Did noone ever tell you that AIs fail miserably at times? Or do you also not listen to people telling you that?
BTW most users on this thread including myself are forum moderators so can still read it (but it was neither flagged nor hidden by me but by others who found that to be inappropriate as did I).

Finally, you fail to understand how harmful all of that is to developer and forum supporter motivation. I suggest another re-read of the thread in this light.

I flagged/hided it as a forum admin cause using AI generated comments about others posts are inappropriate!

I think this endless discussion should stop now and we all should come back on-topic.

2 Likes

Gladly, but please in the future do be careful to make clear the distinction between openHABian and openHAB, the separate versioning of each, and which you are referring to. It really does help us out a whole lot. When dealing with installtion, some operating system issues, the openhabian-config, and upgrades it’s usually going to be openHABian related.

If you are dealing with Items, Things, Sitemaps, Pages, rules, and any other OH concept, errors in openhab.log, and stuff like that, it’s openHAB related.

If you are dealing with third party tools like Mosquitto, Frontail, InfluxDB, Grafana, NodeRed, and any number of other third party software that openHABian might install and configure or you might do so yourself, you may find limited support here on this forum and may need to look to the developer of the third party tool for help.

But an important question is thenical issue on this thread solved or are there still outstanding issues?

2 Likes