Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mqtt] Command only works with %.0f not with %s using outgoing value format #6831

Closed
radokristof opened this issue Jan 13, 2020 · 1 comment
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@radokristof
Copy link
Contributor

radokristof commented Jan 13, 2020

Previously working rules (doesn’t matter if it’s DSL or JSR) behave strangely on the MQTT binding (I have only found it in Dimmer type).
Sending a command to the Dimmer item (for example 70 (%)) will only send 7. Controlling the value from sitemap is correct.
The outgoing value transform is active in this case, I have this (int) value sent as “%s”. However it works as before from sitemap, so I don’t know what changed and what is causing this…

This looks weird… (I have sent a 70 command):

2020-01-13 18:12:31.303 [ome.event.ItemCommandEvent] - Item 'Living_Room_Floor_Lamp_Brightness' received command 70

2020-01-13 18:12:31.305 [.event.RuleStatusInfoEvent] - a0923642-287f-4a3d-be1d-0e26c7e9eedf updated: IDLE

2020-01-13 18:12:31.470 [nt.ItemStatePredictedEvent] - Living_Room_Floor_Lamp_Brightness predicted to become 70

2020-01-13 18:12:31.518 [vent.ItemStateChangedEvent] - Living_Room_Floor_Lamp_Brightness changed from 85 to 70

2020-01-13 18:12:31.520 [vent.ItemStateChangedEvent] - Living_Room_Floor_Lamp_Brightness changed from 70 to 7

So it sends the 70 value but somehow it changes to 7…

Sending the same command from console, the same result…

Sniffing the output from MQTT, this is sent at 70 value:

"brightness": 7E+1
So openHAB recognizes the value in this normalized format but the device not (that’s why its bouncing the state at 70 and then 7).

@radokristof radokristof added the bug An unexpected problem or unintended behavior of an add-on label Jan 13, 2020
@radokristof radokristof changed the title [mqtt] State only works with %.0f not with %s using outgoing value format [mqtt] Command only works with %.0f not with %s using outgoing value format Jan 14, 2020
@J-N-K
Copy link
Member

J-N-K commented Jan 14, 2020

@jochen314 can you take care of that? If no specific format is given the result should be the same as before (i.e. 70, not 7E+1)

martinvw pushed a commit that referenced this issue Jan 20, 2020
* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
baggior pushed a commit to baggior/openhab2-addons that referenced this issue Jan 20, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
baggior pushed a commit to baggior/openhab2-addons that referenced this issue Jan 20, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
Revert "set state on write"

This reverts commit 41d28e8.
tmrobert8 pushed a commit to tmrobert8/openhab-addons that referenced this issue Jan 21, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
Signed-off-by: Tim Roberts <timmarkroberts@gmail.com>
leluna pushed a commit to leluna/openhab2-addons that referenced this issue Mar 21, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
Signed-off-by: leluna <hengrui.jiang@googlemail.com>
Hans-Reiner pushed a commit to Hans-Reiner/openhab2-addons that referenced this issue Apr 11, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
…b#6838)

* redo outgoing format
* Fix scientific notation for percent type

Signed-off-by: Jochen Klein <git@jochen.susca.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

2 participants