Page 1 of 1

[Solved] Trying to use MQTT to control a servo

Posted: 09 Nov 2019, 20:41
by dynamicdave
I'm trying to use MQTT (from Node-RED) to control a servo - not working.

The topic in the MQTT-Out node in NR is.... node68/servo/1/14 with a msg.payload of 120

The on-board blue LEDon the Wemos flashes to indicate a transfer has taken place, just seems the command is not understood.

However, if I use HTTP, as follows it works (which indicates the wiring is correct and the servo is fine).

http://192.168.1.68/control?cmd=servo,1,14,120

Any suggestions as to what I'm doing wrong?
Is my syntax correct?

The FW I'm using is... ESP_Easy_mega-20191104_normal_ESP8266_4M1M.bin on a Wemos D1 Mini.

[Solved] Re: Trying to use MQTT to control a servo

Posted: 09 Nov 2019, 21:13
by dynamicdave
With some help from a friend I've got it working.

The MQTT topic should be... node68/cmd

And the payload should be... servo,1,14,120 (to move to 120 degrees)