publish command with too complex parameters ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

publish command with too complex parameters ?

#1 Post by tparvais » 11 Jan 2021, 22:10

: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

?

TD-er
Core team member
Posts: 8747
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: publish command with too complex parameters ?

#2 Post by TD-er » 11 Jan 2021, 22:21

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}}'

tparvais
Normal user
Posts: 99
Joined: 28 Oct 2015, 23:13

Re: publish command with too complex parameters ?

#3 Post by tparvais » 11 Jan 2021, 22:39

you make my day :) thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 52 guests