openHAB 4.0 Milestone discussion

https://www.openhab.org/download/

The same for all other OS version, with Milestone 4.0.0M1 it says: install Java 11!

Yepp, that’s wrong. For snapshot, though, it’s correct.

I’ve opened an issue Downloads Page for OH 4 Milestone still say to install Java 11 · Issue #400 · openhab/website · GitHub but don’t know enough about how the website is built to figure out where to make the change. So I need to await instructions or hope someone who knows Vue can figure out what to change where.

I figured out where the change needs to be made but need to study the code a bit to figure out what to change so it shows the right thing for milestones.

1 Like

Is there a reason that " can’t be supported for inches and ’ for feet? Very few people, if any would use in instead of ".

Not sure, all I can say is that it currently is not implemented.

I would as " can slightly be overseen.

It’s standard convention for people in the United States.

1 Like

’ can also mean minutes and " seconds, primarily when writing coordinates, but sometimes for time as well, so it would be ambiguous to use as a unit.

Not really, given this is for length conversion.

According to the documentation for both 3.4 and 4.0, the system default is ‘in’, not ‘ft’: Units Of Measurement | openHAB. I created a defect for this: Default imperial unit for Length changed from inches to feet · Issue #3552 · openhab/openhab-core · GitHub

I tried to install it via Openhabian config tool and received these errors:

2023-04-15_00:55:13_EDT [openHABian] Checking for root privileges... OK
2023-04-15_00:55:14_EDT [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2023-04-15_00:55:14_EDT [openHABian] openHABian configuration tool version: [main]{2023-04-13T22:49:27+02:00}(986ec5e)
2023-04-15_00:55:14_EDT [openHABian] Checking for changes in origin branch main... OK
2023-04-15_00:55:18_EDT [openHABian] Switching to branch main... OK
2023-04-15_00:55:18_EDT [openHABian] Adding slightly tuned bash configuration files to system... OK
2023-04-15_00:55:32_EDT [openHABian] Updating Linux package information... OK
2023-04-15_00:56:10_EDT [openHABian] Fetching OpenJDK 17... FAILED
2023-04-15_00:56:17_EDT [openHABian] Installing OpenJDK 17... FAILED
2023-04-15_00:56:57_EDT [openHABian] Checking for default openHABian username:password combination... OK
2023-04-15_00:56:57_EDT [openHABian] We hope you got what you came for! See you again soon ;)

what is the OS that is installed on your system ? I assume buster or older and not bullseyes, right ?
OpenJDK17 is available for buster and older.

Yes, after my openhab crashed for not having Java 17, I read a thread that said I had to upgrade to bullseye. Do I have to wipe my whole system now and start over? I tried to downgrade and it failed.

Make a backup of your settings (use sudo openhab-cli backup) copy the created zip file to a safe space, get the latest openhabian Image and put it on a new SD Card, copy the zip file to the first partition and name it initial.zip. Start from the new SD Card.
(If you have no new SD card, of course you can use the old one)-

It’s a little misleading that MQTT is listed as new addon when only some new discovery options have been added.

1 Like

You’re right, there is actually only a new binding extension being added (our release notes script does not identify those individually). I have change it to “MQTT Ruuvi Gateway” now.

2 Likes

I think there was change within 4.0.0.M2 for custom widgets if you are using the component “f7-list-item”
Before the relevant “slots” where “media” and “text”, but “text” has to be “title” now.
Everything else can be kept as before.

Further investigations later I think that there is a bug in OH4. The slot “text” should work but doesn’t. It seems that it is thrown away during parsing.

Following widget code for a f7-list-item

                - component: f7-list-item
                  config:
                    class: no-padding
                    noChevron: true
                  slots:
                    media:
                      - component: oh-icon
                        config:
                          icon: =props.icon1
                          style:
                            font-size: "=(props.size1 === undefined) ? '24px' : '24px'"
                    text:
                      - component: Label
                        config:
                          class: text-align-center no-padding
                          style:
                            font-size: "=(props.size1 === undefined) ? '24px' : props.size1"
                            font-weight: normal
                            width: 100%
                          text: =@props.item1

results in following HTML code:
image

But I think it should like this snippet for “title” which gets transferred to “item-title” class.

image

Seems that the “text” option is not tranferred to HTML.

I noticed that the logs now contain redundant updated messages. For example, this from my ecobee for an hour:

2023-04-17 06:01:39.627 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:04:43.724 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:09:50.278 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:12:54.146 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:14:57.891 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:18:01.808 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:21:05.820 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:24:09.531 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:27:13.569 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:29:16.206 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:32:20.180 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:37:26.558 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:40:32.212 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:43:36.038 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:44:37.477 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:47:41.372 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:50:45.253 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:53:49.194 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:56:53.120 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat
2023-04-17 06:59:57.656 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'eHvacMode' updated to heat

There was a change to now correctly pass the slot names down to the component. You can consider the old implementation as a bug, the new implementation is correct.

The text slot is „thrown away“ during parsing because it is only supported for media list, see the Framework7 docs: List Item Vue Component | Framework7 Vue Documentation.

The logger configuration was adjusted to suppress these events from the log, it seems that the log4j2.xml file was not updated during upgrade. You may have modified it, then apt asked if it should update it from the package maintainer and you chose the pre-selected option „Keep my version“.
You can manually updated your /var/lib/openhab/etc/log4j2.xml, you can find the 4.0.0 Milestone 2 version on GitHub: openhab-distro/distributions/openhab/src/main/resources/userdata/etc/log4j2.xml at 4.0.0.M2 · openhab/openhab-distro · GitHub.

2 Likes