Page 1 of 1

MQTT Client

Posted: 12 Sep 2016, 15:48
by tooblippe
HI,

First Post, hope I am in correct room.

I have my own mqtt (mosquitto) server running. Would ESPEasy integrate with it? I have looked at the docs and it seems not.
When I say integrate - I mean - be able to receive GPIO commands and set pin states etc via MQTT messages.

I use node-red, and node-red-Dashboard. If it supports getting commands via normal MQTT then this is perfect for me.

Your inputs appreciated.

regards

Re: MQTT Client

Posted: 13 Sep 2016, 18:37
by Martinus
tooblippe wrote:HI,

First Post, hope I am in correct room.

I have my own mqtt (mosquitto) server running. Would ESPEasy integrate with it? I have looked at the docs and it seems not.
When I say integrate - I mean - be able to receive GPIO commands and set pin states etc via MQTT messages.

I use node-red, and node-red-Dashboard. If it supports getting commands via normal MQTT then this is perfect for me.

Your inputs appreciated.

regards
ESP Easy can connect to mosquitto and listen for commands on the '<subscribe template>/cmd' topic.
http://www.esp8266.nu/index.php/ESPEasy ... _Reference

Re: MQTT Client

Posted: 14 Sep 2016, 12:26
by tooblippe
Yes thank you.

I missed the leading "/" in setting the topic and did not understand how to format the cmd but maybe this will help someone.
I used the OpenHAB MQTT as setting
My server is running mosquitto
Lets say your device is called 'POOL'
The command is formatted like this (e.g. to set GPIO pin 5 to 1)


Format your MQTT message like below. Remember the leading '/'
Topic = /POOL/cmd
msg = GPIO,5,1

thanks
Tobie