LogicMachine Forum
MQTT Status Problem - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: MQTT Status Problem (/showthread.php?tid=6153)



MQTT Status Problem - savaskorkmaz - 13.10.2025

Hello,
We are communicating with a relay module via MQTT. When we connect using MQTT Explorer, we send the value 00 00 00 07 to the topic address inels/set/2C6A6F1070CE/106/02EAD5 to set the relay output to true. When we send 00 00 00 06, the relay becomes false.
Meanwhile, we also receive the status information from the topic inels/status/2C6A6F1070CE/106/02EAD5 — if it’s true, the data is 00 00 00 07 00 00, and if it’s false, it’s 00 00 00 06 00 00.
Based on this information, I created two points in the Logic Machine MQTT Client — one for the command and one for the status. The issue is that I can send commands from the Logic Machine, but I can’t transfer the status information back to it. I’ve attached screenshots showing my MQTT Client point settings and the MQTT Explorer view.
What kind of mistake could I be making in the status configuration?


RE: MQTT Status Problem - Daniel - 13.10.2025

Remove the string conversion and in script for in (from MQTT) log(payload)
See what you get there


RE: MQTT Status Problem - savaskorkmaz - 13.10.2025

Here are the logs as general and as individiual after log(payload)


RE: MQTT Status Problem - admin - 13.10.2025

It uses new line instead of space for status value. Use a script for status conversion:
Code:
if payload:find('07') then
  return true
elseif payload:find('06') then
  return false
end



RE: MQTT Status Problem - savaskorkmaz - 13.10.2025

It worked. Thx a lot.