MQTT in from ESPEasy rule

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hinano2012
New user
Posts: 4
Joined: 13 Mar 2018, 00:27

MQTT in from ESPEasy rule

#1 Post by hinano2012 » 15 Mar 2018, 22:28

Hello
I don't understand if it's a domoticz, a MQTT or a ESPEasy problem configuration.
When I send From ESPEasy to domoticz via a MQTT mosquito server this command in a ESPEasy rules:

Publish domoticz/in, {"idx":35, "command":"switchlight", "switchcmd":"Set Level", "level":"30"}

I got in the domoticz log:

2018-03-15 20:26:12.826 MQTT: Topic: domoticz/in, Message: {"idx":35, "command":"switchlight", "switchcmd":"set level", "level":"30"}
2018-03-15 20:26:12.827 Error: MQTT: Invalid data received!

If I send the same command via a local mosquitto client:

mosquitto_pub -h localhost -t 'domoticz/in' -m '{"idx":35, "command":"switchlight", "switchcmd":"Set Level", "level":"30"}'

It works
Nothing special in the mosquitto.log server log.
Any idea ?

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: MQTT in from ESPEasy rule

#2 Post by AndrewJ » 15 Mar 2018, 22:35

Hi, hinano2012,
One thing I do notice is that the switchcmd is "Set Level" (uppercase S and L) in the one which works, whereas the first one has lowercase letters.
Might make a difference?
HTH.
Andrew

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: MQTT in from ESPEasy rule

#3 Post by grovkillen » 15 Mar 2018, 22:46

Maybe update to latest build? Rules had a bug that lower cased publish mqtt.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

hinano2012
New user
Posts: 4
Joined: 13 Mar 2018, 00:27

Re: MQTT in from ESPEasy rule

#4 Post by hinano2012 » 16 Mar 2018, 09:00

Thanks for your help

- I check with lowercase in the mqtt publishing command in rules. Same thing publishing to MQTT OK but domoticz doesn't understood.
- With last sources unfortunately now ESPEasy failed to publish to MQTT mosquitto server.

bad luck
Other idea ?

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: MQTT in from ESPEasy rule

#5 Post by Micha_he » 16 Mar 2018, 09:15

If you use the send-to-controller-function from the device section for your MQTT-publish, then maybe you take a look here.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests