[Solved] Trying to use MQTT to control a servo

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
dynamicdave
Normal user
Posts: 186
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

[Solved] Trying to use MQTT to control a servo

#1 Post by dynamicdave » 09 Nov 2019, 20:41

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.
Last edited by dynamicdave on 09 Nov 2019, 21:13, edited 1 time in total.

User avatar
dynamicdave
Normal user
Posts: 186
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

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

#2 Post by dynamicdave » 09 Nov 2019, 21:13

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests