World’s First MQTT Supported Smart Assistant: CEYD-A
In this video prepared by Mr. Muharrem Taç, after sending Sonoff the software that connects to his own MQTT server, the software was enabled to work with CEYD-A’s MQTT support.
To use CEYD-A’s MQTT capabilities, we can define our commands from the “my commands” menu or from the https://kodla.ceyd-a.com
Alternatively, you can use the https://tasarla.ceyd-a.com page to develop blocks without writing code. In this way, you can create setups without writing code with drag-drop-puzzle.
MQTTPUBLISH
1 2 3 | {!RET mqttpublish tcp://IP_ADRES:PORT,SUBJECT,DEVICE_ID,CONTENT!} |
Example:
1 2 3 | {!RET mqttpublish tcp://iot.eclipse.org:1883,Test subject,1,1!} |
With the version 6.1.9.3 of CEYD-A, mqttpublishauth command has been activated. In addition to the previous command, there are 2 new parameters: username and password.
MQTTPUBLISHAUTH
1 2 3 | {!RET mqttpublishauth tcp://IP_ADRES:PORT,SUBJECT,DEVICE_ID,CONTENT,USERNAME,PASSWORD!} |
Example:
With the following example that you can define command from https://kodla.ceyd-a.com , when you say connect to adafruit , CEYD-A will try to connect tcp://io.adafruit.com:1883 with the parameters provided in the command and will respond with info.
1 2 3 4 5 6 7 | WORDS: connect PATTERN: {ANY}connect to adafruit{ANY} RESPONSE: {!SET result={!RET mqttpublishauth tcp://io.adafruit.com:1883,xxxxxx/feeds/feed1,deviceid,test content,xxxxxx,key!}!} {!IF $result==connected??I connected to your AdaFruit IO account and broadcast test content.::Unfortunately the problem occurred.!} |
Alternatively, using design blocks, you can enter https://tasarla.ceyd-a.com and design following command:
With the 6.1.9.5 version of CEYD-A, the mqttsubscribeauth command has been activated. Its parameters are the same as for mqttpublishauth. It only gives the value returned from the subscribed field instead of connected as the result value.
MQTTSUBSCRIBEAUTH
1 2 3 | {!RET mqttsubscribeauth tcp://IP_ADRES:PORT,SUBJECT,DEVICE_ID,CONTENT,USERNAME,PASSWORD!} |
Example:
With the following example that you can define command from https://kodla.ceyd-a.com , when you say subscribe to adafruit , CEYD-A will try to connect and subscribe tcp://io.adafruit.com:1883 with the parameters provided in the command and will respond with info.
1 2 3 4 5 6 7 | WORDS: subscribe PATTERN: {ANY}subscribe to adafruit{ANY} RESPONSE: {!SET result={!RET mqttsubscribeauth tcp://io.adafruit.com:1883,xxxxxx/feeds/feed_text,deviceid,test content,xxxxxx,key!}!} {!IF $gosterildi==??Cevap: {!GET $result!}{!SET $gosterildi=1!}::.!} |
Note: You can enter and update your own commands at https:/kodla.ceyd-a.com
MQTT (Message Queuing Telemetry Transport) is a telemetry messaging protocol based on broadcast and subscription logic. It is used in communication between machines. The most important feature that distinguishes it from similar protocols is that it is lightweight and can be used easily in many platforms.
Source: www.iot.gen.tr/