Migrating MQTT1 items to MQTT2.4 items

Tags: #<Tag:0x00007f386da3e2e0>

For now it works like a charm

Cool then could you change your post above to:
“This is now my working settings”

Thanks

I am working on migrating my MQTT1 items to MQTT2.4 and it is going pretty well .

Nevertheless, I am stuck migrating some items that required a JS transform call like this

String Location_Den_Samsung "Owntracks Location Den Samsung [%s]" <mqtticon> {mqtt="&lt;[mymosquitto2:owntracks/denis/samsung:state:JS(mqttitude-coordinates.js)]"}

So when I enter

JS(mqttitude-coordinates.js)

in the Incoming value transformation field of the Configure Channel form in Paper UI I always get an error on my Generic MQTT Thing that says

Status: OFFLINE - CONFIGURATION_ERROR Remove and recreate: mqtt:topic:ff8e91b4:Test

What should I write there ?

You should write:
JS:mqttitude-coordinates.js

2 Likes

Yes ! Thank so much for the hint! All my MQTT migration is now done and working very well.

I am SUPER new to this and with very little tech background.
Was struggling with codes and such; searching for conig files (:grin: I am on OpenHAB 2.4 LOL)
Your post sorted it out for me;Sonoff Tasmota running like it should…a Charm!

getting this error with my setup not sure whats wrong it reading but not getting temp in

2019-01-20 15:39:53.111 [WARN ] [eneric.internal.generic.ChannelState] - Incoming payload ‘{“Time”:“2019-01-20T16:39:53”,“DS18B20”:{“Temperature”:17.9},“TempUnit”:“C”}’ not supported by type ‘NumberValue’

state:JSONPATH:$.DS18B20.Temperature

JSONPATH:$.DS18B20.Temperature

1 Like

thanks for that another typo from me been trying for 2 days to get that working

@Sascha_Billian Not like it matters but there should be an opening square bracket [ after the > and before mosquitto I think. I tried to compare your before and after items entry with mine and spotted that little difference.

1 Like

Thanks. Must have been only a typo since my MQTT on OH 2.3 was running without any issues.
Anyway i’ve corrected it

Hi there, i am trying to Setup my new Installation with mqtt2.4, till now i just used the old one with textual config and worked fine. I used map Transformation to transform 1 to on and 0 to off on the Incoming value and now i dont know how to do this in paper ui. is it even possible?

Always get the following error:
Command '0' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.0

Thanks in andvantage

Hi!

Do I need to install the “MQTT Embedded Broker” via Misc in Paper UI or is it enough to install only the mqtt binding posted in first thread?

The MQTT binding is NOT a MQTT Broker!
For the use of MQTT Messages you need a MQTT Broker, the “MQTT Embedded Broker” is one (but not the only one).

1 Like