Page 1 of 1

Relationship between http cmd and mqtt

Posted: 21 Apr 2017, 23:33
by Justblair
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

Re: Relationship between http cmd and mqtt

Posted: 22 Apr 2017, 11:03
by Martinus
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

Re: Relationship between http cmd and mqtt

Posted: 23 Apr 2017, 09:35
by Justblair
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. :)

Re: Relationship between http cmd and mqtt

Posted: 02 May 2017, 01:03
by psy0rz
Note that this only seems to be the case for OpenHAB MQTT?

The other two MQTT controllers work differently.