This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

MQTT Client app
#81
What are the settings in MQTT explorer and what in our app?
------------------------------
Ctrl+F5
Reply
#82
Try pinging broker from System-Status-Network utilities
------------------------------
Ctrl+F5
Reply
#83
I can ping from the broker to the lm5 but i cant do the other way
Reply
#84
Check network settings for correct gateway and DNS. It is LM who is connecting to broker.
------------------------------
Ctrl+F5
Reply
#85
Hi, I am sending KNX objects to MQTT using the MQTT Client app on LM5.
I would like the payload to be published in JSON format like this:

{
"value": "<object value>",
"dataUnit": "<object unit>",
"state": true
}

Please how can i do it ?
Reply
#86
Can be done using a conversion script in the app but it must be done for each object separately. Depending on the object count it might make more sense to make a separate script for publishing object values.
Code:
return json.encode({   value = value,   dataUnit = 'data-units',   state = true })
Reply
#87
(07.05.2026, 12:54)admin Wrote: Can be done using a conversion script in the app but it must be done for each object separately. Depending on the object count it might make more sense to make a separate script for publishing object values.
Code:
return json.encode({   value = value,   dataUnit = 'data-units',   state = true })
Thaanks
Reply
#88
Hey,
I have a 1-bit GRP address with MQTT direction set to Both. Reading works fine in both directions, but writing has a problem:

Send false via MQTT → LM5 gets true
Send true via MQTT → LM5 gets true

My script:
return json.encode({
value = value,
dataUnit = ' ',
state = value
})
Tried removing the state field too, same result.

Writing from lm5 works fine ,

Attached Files Thumbnail(s)
   
Reply
#89
What is the data format do you expect in MQTT for true and false?
------------------------------
Ctrl+F5
Reply
#90
Set JSON value path to value
Reply
#91
(05.06.2026, 09:50)admin Wrote: Set JSON value path to value

same , 

https://streamable.com/pw3spz

please watch this , https://streamable.com/pc235o
Reply
#92
Do you have any script in the 'In (From MQTT)' you should remove it and as admin mention just put value in JSON value path in topic config.
------------------------------
Ctrl+F5
Reply
#93
(05.06.2026, 10:50)Daniel Wrote: Do you have any script in the 'In (From MQTT)'  you should remove it and as admin mention just put value in JSON value path  in topic config.

After those changes i cant control the object from mqtt, https://streamable.com/qq4ket
Reply
#94
See this
https://app.screencast.com/6OFlzxeNzQcuk
------------------------------
Ctrl+F5
Reply
#95
Boolean <-> string conversion ON/OFF strings must be empty. JSON value path must be set to value
Reply
#96
Thanks
Reply


Forum Jump: