Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tony_wk
New user
Posts: 8
Joined: 26 Jun 2017, 05:03

Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

#1 Post by tony_wk » 13 Sep 2017, 07:52

I flashed the Sonoff basic with R200 dev firmware and work with domoticz to control a light. I want to power on the Sonoff and the light is on. When I enable relay GPIO12 boot state to high, every time I power on it, the light turns on for 2 seconds then automatically turns itself off. I was suspicious it is caused by domoticz as the switch state is off in domoticz while the sonoff is turned on, then domoticz forced the state synchronization by sending off command to sonoff. But this approved to be wrong. I stop domoticz, the problem still exists.

I also tried to add a 1 second timer in the rule to set relay GPIO12 to high. But that is only executed after the light completed the initial on and off cycle.

What is wrong?

Tony

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

Re: Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

#2 Post by grovkillen » 13 Sep 2017, 08:25

The internal GPIOs are being known to flicker during boot. If this is a problem I suggest you try to use an IO expander (PCF8574 for example).

https://www.letscontrolit.com/wiki/index.php/PCF8574

You could also try to use GPIO 13 or GPIO 14 and see if they behave better. (I generally use GPIO 14 for my relays that I need to have non-flickering during boot)
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:

tony_wk
New user
Posts: 8
Joined: 26 Jun 2017, 05:03

Re: Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

#3 Post by tony_wk » 13 Sep 2017, 08:39

Thanks for the quick reply.
I think the Sonoff unit has hardwired the relay to GPIO12 correct? So I can't use GPIO13,14 for its built in relay. IO extension board is not an option as I need to squeeze Sonoff into my wall switch concrete hole and no much room left. Is it possible to make some Sonoff board wiring change in order to use GPIO 14 to control its relay?

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

Re: Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

#4 Post by grovkillen » 13 Sep 2017, 13:46

Sorry for confusing you. I was referring to a bare ESP unit. The Sonoff is hardwired, yes. :P
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:

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Sonoff enable relay GPIO12 boot state to high but it turns off after 2 seconds automattically

#5 Post by papperone » 13 Sep 2017, 14:55

well theroretically it's doable, just a matterto find the GPIO12 trace, cut it, solder a jumper wire from the break to the GPIO14 pin of the ESP... :mrgreen:
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests