[mqtt] Wrong decimal representation in Number channels #6662
Comments
Someone has reported this on the forum as well. This is a show stopper for OH 2.4, bummer. Could be related to openhab/openhab-core#436 |
Need to look at the code but it looks like a mix of DecimalType and PercentType. |
TypeParser takes a list of possible types as an argument. In my list PercentageType appears before DecimalType. I guess what happens is that PercentageType grabs any value between 0 and 100 and outputs a value between 0-1 if converted to a string. |
For |
Because TypeParser preferred PercentageType, all number values between 0-100 where always interpreted as percentage. Fixed by only allowing DecimalType. Signed-off-by: davidgraeff <david.graeff@web.de>
I can confirm that the fix has solved the problem, that was really fast! Thank you guys! 👍 |
I have just upgraded to #1459
Value sent |
Hi @vzorglub! With "1459" you are talking about openHAB's snapshot version number, right? If that's the case, don't worry, as Kai pointed out here, the openHAB snapshot version usually doesn't include the latest ESH repo code, a build has to be manually triggered. My test has been done using the Eclipse IDE and there everything works correctly now, so the issue is, in fact, fixed 😉 Please, delete your newly created issue 👍 |
When can we expect the fix in the SNAPSHOT, please?
…On Wed, 12 Dec 2018 at 11:06, Aitor Iturrioz ***@***.***> wrote:
Hi @vzorglub <https://github.com/vzorglub>!
With "1459" you are talking about openHAB's snapshot version number,
right? If that's the case, don't worry, as Kai pointed out here
<#6497 (comment)>,
the openHAB snapshot version usually doesn't include the latest ESH repo
code, a build has to be manually triggered. My test has been done using the
Eclipse IDE and there everything works correctly now, so the issue is, in
fact, fixed 😉
Please, delete your newly created issue 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6662 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ASmb4Gl_HxqQRfTFWtPcaYI8ZwZ49Qyjks5u4OMsgaJpZM4ZNXQt>
.
|
Ask @kaikreuzer, kindly, to build a new stable version of ESH and this fix will be included in the next snapshot 😉 |
Hi @davidgraeff!
I don't know if I'm doing something wrong, but I'm seeing strange values in mqtt number channels. In my case I'm using a Homie device with latest ESH code base (I have done a git pull before the tests). Here you have what is being publish on the mqtt broker (using mosquitto_sub client):
And this is what is being received by the item (through the channel):
(Same values can be seen in Paper UI control tab, all values are 100 times smaller)
The configuration of the channel seems to be correct:
I don't see anything wrong in the device, but something has changed recently, because a couple of weeks ago everything went smoothly. Any clue? 😕
Thanks for your support!
Aitor
The text was updated successfully, but these errors were encountered: