Page 1 of 1

publish command with too complex parameters ?

Posted: 11 Jan 2021, 22:10
by tparvais
:idea:

Hi

I installed milight bulb on a wemos D1 to play gateway to milight bulb

I succeed to make it run from the web interfaxe or via mqqt command with MQTT Explorer.

I want to use one espeasy to send command in a rule via a publish to mqtt. I tried the same command on espeasy/tools/command working on mqttexplorer:

publish milight/0x8233/rgbw/4,{"state":"ON","brightness":143,"bulb_mode":"color","color":{"r":255,"g":0,"b":0}}

but it does not work : Too many arguments, try using quotes!Command unknown: "publish milight/0x8233/rgbw/4,{"state":"ON","brightness":143,"bulb_mode":"color","color":{"r":255,"g":0,"b":0}}"

I tried to add quote, but no success...

How can I push
{"state":"ON","brightness":143,"bulb_mode":"color","color":{"r":255,"g":0,"b":0}}

to topic milight/0x8233/rgbw/4

?

Re: publish command with too complex parameters ?

Posted: 11 Jan 2021, 22:21
by TD-er
See: https://github.com/letscontrolit/ESPEasy/issues/2724

The message you try to send do have normal quotes and commas.
So you must wrap it in commas not used in the parameter, like a single quote.

Code: Select all

publish milight/0x8233/rgbw/4,'{"state":"ON","brightness":143,"bulb_mode":"color","color":{"r":255,"g":0,"b":0}}'

Re: publish command with too complex parameters ?

Posted: 11 Jan 2021, 22:39
by tparvais
you make my day :) thanks