Issue of the topic:
I “upgraded” from 3.4.4 to 4.0.1. To be precise, because of upgrade issues (Java) I deployed a new installation and imported the configuration from 3.4.4. I’m not sure if this is supportet but most things seem to work as expected. For now there is only one thing I’m confused:
I noticed that different Items changed behaviour in case of QuantityType and thus some if statements do not work anymore. Two examples of a Number:Angle Item and a Number:Temperature Item. In logfile the output looks like this:
Thank you for this. I had to add the userdata folder for the command to run as stated in the documentation.
Unfortunately it didn’t resolve the UoM issue. The log stated the following regarding this particular item:
[main] WARN org.openhab.core.tools.internal.Upgrader - Sonnenstand_Azimut: Could not determine if channel ‘astro:sun:Astronomische_Sonnendaten:position#azimuth’ sets a state description. Check if you need to set unit metadata.
Any other ideas?
Maybe I have to try again to install OH3.4.4 and then try to upgrade.
Well, the upgrade tool is only ever going to be able to handle most cases.And this error is really clear. You have an Item named Sonnenstand_Azimut and it’s linked to an Astro channel. For what ever reason the upgrade tool can’t figure out what unit should be applied, if any. So go set the unit metadata yourself. Azimuth is an angle if I’m not mistaken.
Yes its an angle. But unfortunately the unit metadata does not help. This is the case for different items from different devices and bindings.
If there isn’t another obvious reason for this behaviour, I will try again to setup OH 3.4 and perform a regular upgrade.
There really is no reason to expect that to change anything. And it’s just a warning from the upgrade tool. It doesn’t mean that the Item itself is broken or misconfigured. It’s just telling you that it was unable to create unit metadata for that Item for you as part of the upgrade process so you’ll need to do it yourself.
That’s something different that needs further investigation.
By setting the unit metadata we eliminate a whole host of things that could be causing this to occur.
Â is not one of the documented units. I’m not certain it’s a unit at all. The closest I can find is Å which is an Angstrom which is a unit of length. It doesn’t make sense to combine a length with angle nor temperature. So I’m not certain that this is a unit problem at all. But by setting the unit properly we can see evidence one way or the other, or it might even clean up the problem.
Once we can eliminate the problem being on the Item’s config side, that narrows the problem down to the Link (Profiles?) and the Binding.
Once the Items all have proper unit metadata and have been updated at least once, from a rule log out the unit.
(Sonnenstand_Azimut.state as QuantityType<?>).getUnit().toString()
I will try.
Right now I tried to reinstall OH 3.4 without success, 4.0.1 is installed. However I want to see what happens if I only restore OH Config and not Influxdb. As stated in the description I was unable to restore influx database. Maybe something breaks the DB as it is not accessible for openhab anymore after restore, but I can see data directly in influx. A rebbot brings it back online but without the restored data.
That’s weird. If the Channel is delivering units I would have expected it to deliver it to a String Item too.
Can you show the Link config. It will show what type of Item it expects to be linked to. If it expects to be linked to a Number:Temperature (for example) I would have expected the String Item to get the units too, not just the number.