Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

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

Geschrieben

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

Geschrieben
  • Autor

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.

Join the conversation

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

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.