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 and Thingsboard
#1
Hi,
Anyone using Thingsboard together with Logicmachine?
Would appreciate some input on how to handle the static topics of Thingsboard when using the gateway API: https://thingsboard.io/docs/reference/gateway-mqtt-api/

Best regards
Eilert Bjerkan
Reply
#2
https://forum.logicmachine.net/showthread.php?tid=5106
Reply
#3
Thank you admin, sorry for not researching that before asking.

My question is really connected to the lack of understanding of how to use the example code for MQTT of of this thread: https://forum.logicmachine.net/showthread.php?tid=1759

In the case of Thingsboard, the topics are fixed (one for telemetry (v1/devices/me/telemetry) and two for control (v1/devices/me/rpc/request and v1/devices/me/rpc/response)). 
Could you please show me what I need to change to go from your object-to-topic conversion over to a static topic with some telemetry and some commands.

I see that I need to do the commands in the On_Message callback but I couldnt find the right spot to publish whenever updates where made to the KNX variables.

Best regards
Eilert
Reply
#4
Our examples follow best practices of MQTT where each topic is a single entity. Thingsboard uses a single topic for all data so our example won't work without modifications. A possible solution is to use an event script for publishing if you don't have a lot of messages. You can use HTTP instead of MQTT in this case.
Reply


Forum Jump: