hi,
I am struggling with a quite simple thing, but it drives me crazy.
I have connected a relay to GPIO2 on a wemos D1 mini.
I have flashed mega-20200310 "normal"
controlling the GPIO via http://<IP>/control?cmd=GPIO,2,1 works well. Altough, as the response has added an additional "OK" it is not clean json and node red needs additional parsing for it.
So, as already configured and working here, I have set up Domoticz MQTT (as first and only controller).
Configuration:
so, my assumption would be, if I send "mosquitto_pub -t smartswitch/cmd -m "gpio,2,1" " by MQTT I should turn the GPIO to high and get on ...status the json response.
But I do not get anything.
I can see the device is connecting as I can see on booting the ESP: smartswitch/global/running true
I have tried already: with leading slash, with "%sysname%" after "smartswitch", different topics, etc, I cannot get it working.
I have also tried to set up a "switch input - switch" as device (currently the "devices" are empty), there I could see the "status" on the device, but it always stays "0" and therefore also does not toggle on turing on by HTTP. But as far as I read this is WAD.
hopefully somebody points me in the right direction.
Thanks!
Best regards
ESP Easy Mega MQTT issues
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP Easy Mega MQTT issues
The response shouldn't add the extra ok. It's been addressed but apparently not released yet.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: ESP Easy Mega MQTT issues
thank you.
any hints for the mqtt issue?
Thanks!
Alois
BTW: it drives me crazy. have tried now (feels like) 100 approaches and none is working.
viewtopic.php?t=320
viewtopic.php?t=5642
viewtopic.php?t=3525
so I assume I am not the first one trying to get it work...
any hints for the mqtt issue?
Thanks!
Alois
BTW: it drives me crazy. have tried now (feels like) 100 approaches and none is working.
viewtopic.php?t=320
viewtopic.php?t=5642
viewtopic.php?t=3525
so I assume I am not the first one trying to get it work...
Re: ESP Easy Mega MQTT issues
I think you should check the command reference first to find which commands may work through mqtt subscription. As far as I remember, gpio is not among them. However, you can initiate the event with event command, pass any arguments such as gpio# and state and then use it in rules for activation
Re: ESP Easy Mega MQTT issues
according to the table here https://www.letscontrolit.com/wiki/inde ... O#Commands
MQTT should work.
also the overall command reference here https://www.letscontrolit.com/wiki/inde ... _Reference
tells me for GPIO "Plugin" : Plugin - Can be run from serial, rules engine, HTTP, MQTT
nevertheless grovkillen ' s comment pointed me out in a direction: I fould the bug on github https://github.com/letscontrolit/ESPEasy/issues/2892 and also there a version with clean json output for http which now lets handle me the response clear in node red. So I do parsing and translation to MQTT now there and it is working:
Thanks!
BR
Alois
MQTT should work.
also the overall command reference here https://www.letscontrolit.com/wiki/inde ... _Reference
tells me for GPIO "Plugin" : Plugin - Can be run from serial, rules engine, HTTP, MQTT
nevertheless grovkillen ' s comment pointed me out in a direction: I fould the bug on github https://github.com/letscontrolit/ESPEasy/issues/2892 and also there a version with clean json output for http which now lets handle me the response clear in node red. So I do parsing and translation to MQTT now there and it is working:
Thanks!
BR
Alois
Re: ESP Easy Mega MQTT issues
You are now using the test build I linked in that issue?
Re: ESP Easy Mega MQTT issues
@TD-er no I am using mega-20190805
I did not install the testbuild, there is a comment the build only returns text: https://github.com/letscontrolit/ESPEas ... -587071587
If there are other test-builds you would like to have verified just tell me (or better send me a link to them), I can install them and test.
I also saw https://github.com/letscontrolit/ESPEasy/pull/2778 but I am a bit confused regarding it's state, I think there are some parts open until it will get merged? If you want, I also can test a build out of this.
Best regards
Alois
I did not install the testbuild, there is a comment the build only returns text: https://github.com/letscontrolit/ESPEas ... -587071587
If there are other test-builds you would like to have verified just tell me (or better send me a link to them), I can install them and test.
I also saw https://github.com/letscontrolit/ESPEasy/pull/2778 but I am a bit confused regarding it's state, I think there are some parts open until it will get merged? If you want, I also can test a build out of this.
Best regards
Alois
Who is online
Users browsing this forum: No registered users and 39 guests