Force integer format from slider or setpoint

Hi Folks,

Since the update of the android app to v 2.8.0 slider and setpoints deliver the value in float format instead of integer.


The tahoma binding, I use for my blinds and rollershutters, goes offline if it has to deal with floats.
My question is, how can I force the slider or setpoint send integer format?

I had a similar issue with my speaker connected via http binding.
Have you tried updating to 2.9? This solved at least my problem

If you read the linked thread, it tells you -

A) it’s a binding bug really. If you create a github isdue for the binding, it could get fixed properly.

B) as a temporary workaround, the android app author has made a new app version

C) if you like neither suggestion, you can use a proxy Item on your UI and have a rule update your bound Item with an integer

1 Like

Sorry if I’ve written some mistakable.
I see that the binding has troubles with float numbers. But I’m just searching for a lazy solution. A kind of formater for sitemap values?

The next step will be an issue in github, of course.

No, unfortunately not :frowning_face:

Still get log messages like

2019-10-21 20:22:35.974 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Received error code: 400

2019-10-21 20:22:35.981 [WARN ] [oma.handler.SomfyTahomaBridgeHandler] - Apply command response: {"error":"Managed action group is invalid : setOrientation() : Invalid value for command parameter p1 : expected integer value between 0 and 100 but got 56.0"}

==> /var/log/openhab2/events.log <==

2019-10-21 20:22:35.982 [hingStatusInfoChangedEvent] - 'somfytahoma:onoff:2fd3198a:756a177d-c08d-4a3b-8849-410cecf6eb45' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:35.990 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter:2fd3198a:82e8153b-49e1-49f6-9979-818c13dfdfb1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:35.994 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter_silent:2fd3198a:14b3fa15-e075-46c5-829a-73a14c5c247d' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:35.997 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter_silent:2fd3198a:77db2aee-6e1c-4afb-9f02-7e4f1b854bdf' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.001 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter:2fd3198a:5e7ee3ea-6e7e-4983-abff-6f294828b05c' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.006 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter_silent:2fd3198a:07b4622a-d371-429c-9403-9dd34dc128ff' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.010 [hingStatusInfoChangedEvent] - 'somfytahoma:rollershutter_silent:2fd3198a:b536e676-9e01-4f9a-befc-e0f09aff569d' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.021 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorvenetianblind:2fd3198a:178ea6e5-89db-4fe7-abd3-da4ad2a2001f' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.031 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorvenetianblind:2fd3198a:9154d2af-3abd-4838-bca4-d1e9eb68ed52' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.034 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorvenetianblind:2fd3198a:95775f93-fa03-4894-94e5-1939151e6db5' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.037 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorvenetianblind:2fd3198a:81c85ddd-16c8-4164-a0c6-04e0337edf3b' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.040 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorvenetianblind:2fd3198a:6204a9d6-b90e-401a-94cf-15b83e6d4fae' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.042 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorscreen:2fd3198a:27a6e1b8-2e52-43da-ae8d-58964ca933ca' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-10-21 20:22:36.045 [hingStatusInfoChangedEvent] - 'somfytahoma:exteriorscreen:2fd3198a:deb80813-3108-4667-a961-ad4c3fea750d' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)


The simplest workaround is defining the item labels in integer format: Number MyItem "My Item [%d]"

But yes, a binding must be able to deal with Number items in both integer and float format … I explicitly asked Kai about that, and he stated so.

2 Likes

YMMD :smiley:

[%d] solved it.

1 Like