Jump to content

Openhab formating bug?


Recommended Posts

Not sure if that is a bug or a feature? :)


I define Temp sensor wit default xx.y precision.


Number GF_Living_Temperature "Temperature [%.1f C]" <temperature> (GF_Living) {tinkerforge="uid=qnM"}


I would expect that when acccessing those from the Rest interface it will be already rounded  but it is not.








Is that intended?



Link to comment
Share on other sites

Hi Maciej,


I'm the developer of the openHAB Tinkerforge binding. Unfortunately I'm not familiar with the REST interface. I think this question is not TF specific but a general openHAB REST interface question. Therefore your chance to get a good answer is better if you ask the openHAB community at https://community.openhab.org




Link to comment
Share on other sites

The rest interface is available over http://xxx.xxx.xxx.xx:8080/rest/items

It give you back state of all the items in XML. it is an integral part of openhab.


So is that true that a your binding is not looking at all at the sensor state formatting parameters in the .items file and just passes to openhab full precision?  is that with all the other bindings?


Fixing that afterwards in the openhab is quite a pain as requires creating a rule executing on every update.


Would you consider adding a parameter to binding in order to to return rounded result? This sensor has so much jitter that last digit is meaningless anyway.


I would also "fix" the current/voltage binding to give an option to return, voltage/current/power in V/A/W with definded precision and not the millis.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...