Hi.
Don’t really know where to put this question, hope I’m in somewhat right region
I have a light meter Item which have previously been a dimensionless Number. I thought it’d be prettier making it a Number:Illuminance instead. I thought the unit would be Lux (as stated at http://next.openhab.org/docs/concepts/units-of-measurement.html ) but it turns out I get the values in percent. So now when my sensor reports 33 Lux it’s presented as 33 %. Did I do anything wrong somewhere or did anyone else do something wrong?
This isn’t really a big problem now, I’m living in Sweden and last time we saw the sun was over a month ago. But eventually the reading will go over 100 lux which will be strange in the system
If the unit of the value your sensor gets you is percent then it is right that and you need to change back to a dimensionless Number.
Or you can apply a transformation on thing level.
I’m not really sure if I understand this answer… The value is in Lux and I want it presented as Lux, which I thought was default for luminance. I can’t really understand where the percent comes from at all?
edit: Haha… Now it got even more strange. The current reading is “2E+1 %”. I think that’s supposed to be 20 Lux
It’s from an Aeotec ZW100, through the ZWave Binding. Could it be a problem with the ZWave device database? I can’t seem to reach the online database. @chris, has it moved lately?
On the temperature channel on the same device I have an Item which is Number:Temperature and it gives me correct values in degrees Celsius (just FWIW).
Well, it was more than months since I last tried to look in it Thanks a lot!
Ok, after checking the database, I can’t find anything about which unit the luminance sensor is supposed to be using. So I still get the feeling the values from it should be interpreted as Lux and nothing else. @chris, you got any input on this?
With this one, you get given the channel type by the binding/database combo, no choices, and must then link that to the matching Item type.
Your little screenshot earlier shows channel type Number:Illuminance which seems correct.
Two things might be wrong;
Most likely you’ve got into a mess linking to incorrect Item type originally, and that’s having a lingering effect. I’d suspect editing an existing Item type will not fix up any associated links.
I’d create a brand new Item of Number:Illuminance type and link to your zwave channel, deleting your old link and then your old Item.
If that does not work, it is possible the binding is not sending the correct Quantity type data - but that seems most unlikely.
Ok, tried that now. The new Item also shows the value as percent. So that boils down to the binding sending the wrong unit? Should I simply file a bug? @chris?
Probably. And also the thing a few lines up about “Sensor Type = Luminance(3), Scale = 1”. I’ve no idea what scale 1 is though, guess it will tell @chris something
I never saw the PR coming so I thought you didn’t fix this yet, but after upgrading to RC2 i just realized that the readings are now in lux. Thanks a lot!