openHAB 4.0 Release discussion

I have two problems, which I could not solve and did not found any relevant information in the actual documentation.

The first problems are the UoM for my Netatmo setup. I did not understand, why I had to add the unit “%” to the channel for humidity, to get them work. It was something, I would expect from the binding himself. And this results in a sub-problem, I could not solve. I have the rain gauge and the new Units are (from Number:Speed) km/h for the rain value. In the Netatmo app, the unit is mm/h. Same for rain in the last hour. openHAB uses “m”, correct is “mm”. I tried to change this with , unit=“mm/h” and ,unit=“mm” and it seems, that openHAB uses this, because I could see the values in the UI, but when it rains an hour ago, I got no values in my setup. The rain from today afternoon, which was measure with openHAB 3.4.4, was visible in the history. All devices were online.

The second is a new problem coming from KNX. I had configured a scene with 1.022 as a switch. In real it is a switch and the scene have a ON and OFF. 1.022 is used in the ETS. I got now a message in openhab.log:

Configured DPT '1.022' is incompatible with accepted types '[class org.openhab.core.library.types.OnOffType]' for channel 'knx:device:bridge:bj_up_1_1_7_eg:k1'

See Release openHAB 4.0.0 · openhab/openhab-distro · GitHub which discusses changes to UoM in depth.

The way UoM is now implemented, the value you set in the unit is the unit the Item carries. If the binding updates the Item using different but compatible units, the value will be converted to the units defined in the unit metadata.

When there is no unit metadata supplied, the system default for that type of unit is used. For Speed the system default is km/h. As part of the upgrade process, if you have managed Items unit metadata was created and populated based on the State Description Pattern and, if that didn’t exist, from the Channel. If you have text file based Items, you must create the unit metadata yourself.

Logs? Events received by OH won’t just be dropped without errors in the logs.

Side comment, I checked the code, and the binding provides rain intensity values in mm/h. So even when linking the channel to a raw Number item (not Number:Speed), the values would be as expected.

Indeed which means the problem you are having has nothing to do with units. There is something wrong with the binding, channel, or link between the channel and the Item.

Is it now possible to configure the semantic tags by file manually? Haven’t read sth. in the blog post and also not finding a documentation page for it

1 Like

No, my proposal is not yet merged.
In the coming days, I will open a new topic, providing the required bundle and the instructoons / documentation for users who can’t wait for this feature.

3 Likes

Some of you report here, that they have after update to 4.0.0-1 some issues with unit’s, e.g. in Netatmo.
I have the same units problem, with my Shelly HT’s. (HT and HT Plus). The temperature value is shown currect with e.g. 25.0 degrees. But the humidity is shown in “0.6 one” and not in 60% as in the 3.4.4 Openhabian version it was in past.

Is this now a principle problem, or only one in the Shelly binding?

For humidity or more generally for all Number:dimensionless items, you need to set a unit to your item, that is adding unit=“%”.

Could you please try to use 1.012:x/x/x (replace x/x/x with your group address) as group address for that channel? This explicitly sets the DPT in openHAB.

For reference:

Look for “Another example” where this humidity example is explicitly mentioned.

When adding now the “%” to the metadata under unit, I get this error:

Can you show us your item definition?

Ok, big incompatible changes on units. Read all the links but they’re a bit unclear to me. What is clear, it’s important. Is there a readable instruction what to prepare for a user that only uses the UI. Or someone that can shed some more light?

What I understand/see:
The channels on the thing have a property “unit” when the advanced is checked. They are almost all empty.
The items have a state description metadata. Some of them are filled.
There is a conversion script that might do some things automatic.

The safest seems adding unit and state description on all of them. That’s a lot of work. Is it necessary?

Hi, I’m a little bit confused. On a lot of places there is Java 17 to install before start the upgrade, on the download page for the stable version of OH 4 for Linux / APK / stable 4.0.0 there was communicated Java 11. Would it be forget to change or is Java 11 necessary. For 4.0.1 Snap there is Java 17. Before I run into a problem and must reset all I will ask.

Thanks
Christian

You need Java 17, it seems the download page hasn’t been updated yet.

Many thanks !

I actually find the release notes on UoM changes to be pretty precise, please take your time to re-read them. If you still feel they’re unclear open a new thread please and put up specific questions of yours there. But please no “it’s unclear, explain it to me again” that won’t motivate anyone.

3 Likes

A post was split to a new topic: OH4 upgrade issue

after I updated to openhab 4, I have now no sitemap and not things, I have everything done file based, I can see all items, transformations and rules, the items also changing the values like temperature sensors, so it is working, but strange that I can’t see anymore the thing to it.
when I try to open the sitemap, it tells me I didn’t define a sitemap.
has someone the same?

I use openhab in docker