MQTT Client Device | JSON data format

Hi,

i have written a module that makes it possible to send data without creating an MQTT-Device instance

It is in Beta, if you want to install it, you need to type in the symcon store the name „simple MQTT sending Tool“ exactly.

Now you can create a instance and bind it to your Symcon mqtt-server-instance… If you have more than one MQTT server instance, you must add one for each instance.

After that, you can send json like this:

SMST_sendJson(integer $InstanzID, string $Topic, array $Payload); # sends an array to the topic, the json_encoding is done in the function.

// example: 
SMST_sendJson(12345,'dummy/topic/set/',array("variable" => true));

or string like that

SMST_sendString(integer $InstanzID, string $Topic, string $Payload); # sends a string to the topic

// example: 
SMST_sendString(12345,'dummy/topic/set/','restart');

hope this module is usefull

Best regards

1 „Gefällt mir“