Mqtt 2.5

mqtt
mqtt-binding
Tags: #<Tag:0x00007f0142d92b10> #<Tag:0x00007f0142d92890>

(David Graeff) #1

Hey all,

I have prepared some additional features for OH 2.5 snapshot users. Probably not in before Christmas, but soon after.

The readme got extended with some rules to realize what the MQTT eventbus binding did in 1.x and migration hints for mqtt1 --> mqtt2.

And also:

  • Allow outgoing transformations.
  • Allow chained incoming transformations.

Cheers,
David


Need help to migrate to the mqtt binding v2 in openhab 2.4
Binding-mqtt - 2.5.0.SNAPSHOT; rollershutter command is sent wrong
Using a javascript with JSON Transform through MQTT
(Rich Koshak) #2

Is the outgoing transform a stop gap solution until such time that a more generic way can be implemented in the core infrastructure? Or is a more generic solution so far off as to just be a wish?

Don’t get me wrong, I’m thrilled to see the capability come back. I’m just curious.


(David Graeff) #3

Exactly. The transformation service is cached to at least avoid the service lookup on every publish.
I still not recommend a heavy javascript transformation, but some people might just need a MAP one.


(BasM) #4

Hi David, et al,

Thanks for the great work on the MQTT binding.
I upgraded (without reading the release notes, auch) and found the new binding to require me te rewrite my .items and .things files. But glad I spend the time. Works great.

How would I use / test the 2.5 binding ?
(I’m using an apt based install).

Thanks.

Kind regards,

Bas


(David Graeff) #5

For the moment there is no other way than to use the snapshot version of openHAB (or to build from source of course).


(Thomas Binder) #6

Sorry, if I’m asking, but I’m still a bit confused :wink:
Presently I use the MQTT-Eventbus for integrating three OH2-instances, works flawlessly.

If I understand correctly, MQTT2.4+ doesn’t offer eventbus-functionality (as of yet). Are there any plans to implement something like eventbus in 2.5+?
So I presently should stay with MQTT1 and migrate later?


(David Graeff) #7

Eventbus access is not allowed for oh2 bindings. If you want it like it is with mqtt1, you unfortunately need to stick to v1. In oh2 you use rules/scripts instead to get a similar behaviour.

What I can imagine to be possible is a real add-on dedicated to connect multiple oh instances. Might use mqtt internally via the new mqtt support.


(Thomas Binder) #8

thanks. now I understand!

PS: Rules and scripts Sound a bit odd to have a simple eventbus-sync. So my opinion is, a “eventbus add-on” would be a real need - I can imagine, I’m not the only one having multiple OH2-instances… :wink:


(Michael Murton) #9

@David_Graeff I just updated to SNAPSHOT-2.5.0~S1498 to be able to use the min/max scaler on dimmer channels, but its not scaling the output only the input. From what I can tell it shouldn’t be doing that.
Do I need to manually updating the binding to the copy on github for that?


(David Graeff) #10

The documentation says “outputs a value between 0 and 100”. As long as that is in the “latest”-section of the documentation, the corresponding change that I made recently is not yet available for openHAB.

In the future the output will be scaled as well, true.


(Zskadar) #11

Hi David, is there any news with regards of mqtt 2.5 outgoing transformation? I’ve moved to 2.5 snapshot, but I couldn’t found any info about it.
Thanks in advance!


(David Graeff) #12

This is the pull request. And as you can see, I did not have time to continue to work on that :confused:

Cheers, David