Relationship between http cmd and mqtt

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Justblair
Normal user
Posts: 63
Joined: 08 Aug 2016, 23:42

Relationship between http cmd and mqtt

#1 Post by Justblair » 21 Apr 2017, 23:33

I am working on a plugin to add MY9291 (RGBW LED controller)

Things are looking good so far, and I seem to be getting the desired results when using http to control the esp8266 (Still to test inside the smart bulb, but logic analyser is looking healthy.

The command I am sending is http://192.168.0.54/control?cmd=my9291,255,255,255,255 and this is responding.

But I am trying to send a command via MQTT and i am getting nothing much useable...

I can send /test/my9291/ payload 255,255,255,255

and I get Par1: 0 Par2: 255 Par3: 0 Par4: 1076067464

I can send /test/my9291/255 payload 255,255,255,255

and I get Par1: 255 Par2: 255 Par3: 0 Par4: 1076067464

But not much else. I notice that the documentation for most output devices does not give more than http outputs, but GPIO for instance does seem to offer some mqtt function.

Can someone tell me what is working/not working here

Martinus

Re: Relationship between http cmd and mqtt

#2 Post by Martinus » 22 Apr 2017, 11:03

You should be able to send exactly the same command as used with http to the ..../cmd topic using MQTT.

Assuming your ESP listens to topic /test, you should send this payload:
my9291,255,255,255,255
to topic:
/test/cmd

Justblair
Normal user
Posts: 63
Joined: 08 Aug 2016, 23:42

Re: Relationship between http cmd and mqtt

#3 Post by Justblair » 23 Apr 2017, 09:35

Thanks... I thought I had tried that, but I must have miss-remembered.

I am getting the responses through that I was looking for. Looks like I will soon be able to control Ai Lights and (And the dozens of clones)

Just got to check the logic analyser some more to make sure. :)

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Relationship between http cmd and mqtt

#4 Post by psy0rz » 02 May 2017, 01:03

Note that this only seems to be the case for OpenHAB MQTT?

The other two MQTT controllers work differently.
Please support ESPEasy development via Patreon or buy us a coffee.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests