Hi all,
I built in a KNX device SO250 from Elsner that measures my water level in a tank. It works ok and puts the right values on the bus which I can see with the busmonitor.
It delivers 7 values: 5 thresholds, 1 Software revision and the water level.
I defined the Thing of this sensor device and added a channel of type number using PaperUI, and triggering the measurement with the following address: 4/2/7+<4/2/0.
I can see in the BUS monitor of ETS the right value, but then receive something like an integer value (1520 instead of 1,57 m).
My gut feeling is that there must be an error in the conversion. Is there a way to cast a 4 byte real to something similar in an Openhab Item?
I have no clue which information you else need, but any hint is highly appreciated.
kind regards
Maybe you need to set a different data point type in your channel definition file matching the one you have in ETS.
This could solve your conversion problem.
The default DPT is 9.001. From the docs of the device I guess you need something like 14.xxx (EIS 9), maybe 14.039 (Length in m).
Just an educated guessā¦
True to an extent: The datapoints declared in the KNX binding do not transform the data, you will still get a DecimalType value (I assume as per OPās description, itās a number type channel, respectively a Number item).
So, in order to be precise, the actual 4 byte value (in this case) gets read by the KNX binding in a very dependent manner on the calimero library.
What you do with the binding returned value, is your job within openHAB. I can bet itās still a DecimalType.
Hi,
I looked into the DP and I used 14.039 in ETS which is length in meter. That was also my first guess and I corrected it to this value before posting.
It shows up as a decimal value but when looking at it using āclicking the valueā it shows a comma value.
What can I do in openhab to convert it?
hm - I never used transformation services before. What do you mean when saying āproxy itemsā? Just an item that is not linked to a certain binding?
One further comment - I looked at the RawData coming across the KNX Bus and it shows the number
3F E47AE2 - converting it to float results in 1,785 (m) which is shown correctly in the decooded DP value in ETS monitor.
I am getting more and more confused.
The number I see in OpenHab is 2585.6 - I donāt get the relationship between these numbers.
Again I would go for the DPT.
I define my Things and Channels in text files, allowing a more easy way to handle them.
E.g. for an actor giving additional information I defined a channel like this:
Type number : A_W āWaermepumpeā [ ga=ā13.010:<16/4/13ā]
As you see the DPT 13.010 is explicitly used instead of the default 9.001
How about trying to define your number that way ? It would give the binding information about how to interpret the value coming from the bus.
IĀ“ve seen such a behaviour as you mention above in my system, thatĀ“s why I suggested it in the first run.
Did you try ?
I changed the DPT in ETS in various formats and gave it a try. I also tried out 13.010. I would try this DPT conversion thing in my configration in PaperUI directly. Maybe this helps.
I moved away from the configuration files as my environment is pretty big (at least I find it quite big) and with OH2 it started to work very good.
I need to try this in a config file, too.
I moved away from PaperUI as setting up all things and items after a reinstall in PaperUI is a tedious job.
But I simple copy the files and everything is back to normal - obviously everybody has his/her preferred solution.
The DPT I mentioned above is just for my channel, use 14.039, not 13ā¦
You can only apply a transformation at the binding level if the binding supports that.
KNX does not support transforms, so far as I know.
You can use a āprofileā transform on a channel where it links to an Item. But this is currently limited to String type Items, so not much use here either.
Hi Oggerschumer,
you gave me the final push. I changed the configuration in Paper UI to this address: ā14.039:<4/2/0ā and this made exactly the conversion I needed. Now I have 14.039 in ETS and in Openhab set!
Lessons learnt for me is: Whatever you write in a configuration file can be entered also in the fields of PaperUI!
Thanks man! You made my day and this topic can go to solved!