xsherlock Posted September 18, 2015 at 07:31 PM Share Posted September 18, 2015 at 07:31 PM 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. <item> <type>NumberItem</type> <name>GF_Living_Temperature</name> <state>26.68</state> <link> Is that intended? Maciej Quote Link to comment Share on other sites More sharing options...
theo Posted September 18, 2015 at 07:45 PM Share Posted September 18, 2015 at 07:45 PM 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 Regards, Theo Quote Link to comment Share on other sites More sharing options...
xsherlock Posted September 19, 2015 at 07:09 PM Author Share Posted September 19, 2015 at 07:09 PM 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.