[Solved] Plobrem with GPIO after reset/reboot.
Moderators: grovkillen, Stuntteam, TD-er
[Solved] Plobrem with GPIO after reset/reboot.
Hello everyone!
I have a question. I connected relay module with 2 relays to wemos D1 with ESPEASY firmware. Created two switches. Connected to GPIO - 13 and 14. Manage through MQTT. Everything works fine. But i have a problem. After reboot/reset, one of the pins automaticaly set to "LOW". And after 1-2 seconds the relay starts working, but I don`t want it. I try enable internal pull-up, but is not usefull.
The first picture from MQTT-SPY. It shows how 2 second later reset pin 13 turn the value "0". Why is this happening? What am I doing wrong?
Hardware settings in the second image. The 3 and 4 image shows the device settings. GIT version: mega-20180323. I don't use rules .
I have a question. I connected relay module with 2 relays to wemos D1 with ESPEASY firmware. Created two switches. Connected to GPIO - 13 and 14. Manage through MQTT. Everything works fine. But i have a problem. After reboot/reset, one of the pins automaticaly set to "LOW". And after 1-2 seconds the relay starts working, but I don`t want it. I try enable internal pull-up, but is not usefull.
The first picture from MQTT-SPY. It shows how 2 second later reset pin 13 turn the value "0". Why is this happening? What am I doing wrong?
Hardware settings in the second image. The 3 and 4 image shows the device settings. GIT version: mega-20180323. I don't use rules .
Last edited by Sturgeon on 04 May 2018, 12:47, edited 1 time in total.
Re: Plobrem with GPIO after reset/reboot.
I try to update firmware. I try to change pin to gpio-4 and -5. I try to use internal pullup resistor. But problem stil is not solved.
I want to use 2-channel relay module through MQTT. All works fine. But after reboot last used gpio change it state automaticaly. Why this is happens?
My rule:
I want to use 2-channel relay module through MQTT. All works fine. But after reboot last used gpio change it state automaticaly. Why this is happens?
My rule:
Code: Select all
on System#Boot do
GPIO,4,1
GPIO,5,1
endon
on Curtains_open#Curtains_open=0 do
timerSet, 1, 3
endon
on Rules#Timer=1 do
gpio,4,1 // Turn off relay
Publish /ESPEasy_Bedroom_Curtains/Curtains_open,1
endon
on Curtains_close#Curtains_close=0 do
timerSet, 2, 3
endon
on Rules#Timer=2 do
gpio,5,1 // Turn off relay
Publish /ESPEasy_Bedroom_Curtains/Curtains_close,0
endon
Re: Plobrem with GPIO after reset/reboot.
So, problem is still not solved.
But I think that the reason for this in MQTT. When my PC (where install Mosquitto broker) is shutdown, ESP not run gpio on restart. When broker is working, last MQTT comand repeat after reboot/restart. What broker preferense can do this behavior?
But I think that the reason for this in MQTT. When my PC (where install Mosquitto broker) is shutdown, ESP not run gpio on restart. When broker is working, last MQTT comand repeat after reboot/restart. What broker preferense can do this behavior?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Plobrem with GPIO after reset/reboot.
Do you have the message retained activated?
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: Plobrem with GPIO after reset/reboot.
I start without MQTT Retain Msg flag. Then I try with this flag (For what? I dont know). Not difference.Do you have the message retained activated?
MQTT spy see only one first message. After reset MQTT spy dont see any message to ESP.
Re: Plobrem with GPIO after reset/reboot.
Try GPIO 12 and 14 , or 4 and 5 if you don't use I2C.
Regards,
Regards,
Re: Plobrem with GPIO after reset/reboot.
In OpenHab mqtt config file I change setting to:
mosquitto.retain=false
And problem solved.
Thanks for all!
mosquitto.retain=false
And problem solved.
Thanks for all!
Who is online
Users browsing this forum: Bing [Bot] and 91 guests