ESP output flickering Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Rosomak
Posts: 7
Joined: Wednesday 30 January 2019 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: IE
Contact:

ESP output flickering

Post by Rosomak »

I have been struggling with this problem for several years and I can't cope.
ESP Output turns on and off very fast after reboot for a few or a dozen or so seconds. (Sometimes this happens when you quickly turn the switch on and off).

Domoticz ver: 2023/2 on Raspberry Pi
ESP_Easy: mega-20231225

Although it doesn't matter because it is not dependent on the software version or whether it is esp32 or esp8266.
It looks as if Domoticz was shouting over ESP Easy and vice versa, how to set the output.

Removing On/Off action from switch settings ends this behavior, but then Im not able to control output from Domoticz dashboard.

Domoticz:
I created dummy hardware with virtual sensor type: Switch with Idx:127
Inside switch settings I created http request to turn on or off ESP output.
ESP Easy:
I created two devices, one for ESP output with Idx: 127 called "Light" and one for ESP input.
I also make one rule:

Code: Select all

On System#Boot do
 gpio,14,0
endon

On Input#State=0 do
 if[Light#State]=0
  gpio,14,1
 else
  gpio,14,0
 endif
endon
Its a very minimal setup but is killing me when during night, after ESP reboot due to network failure I have a DISCO at home :(
Any sugestions ?
Attachments
Domoticz Settings.png
Domoticz Settings.png (80.41 KiB) Viewed 9103 times
ESP Settings.png
ESP Settings.png (180.28 KiB) Viewed 9103 times
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: ESP output flickering

Post by jvdz »

You do not have the internal pull-up active for gpio14, so do you have a resistor to pull it down or up to garantee it's default state?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Rosomak
Posts: 7
Joined: Wednesday 30 January 2019 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: IE
Contact:

Re: ESP output flickering

Post by Rosomak »

jvdz wrote: Friday 05 January 2024 16:36 You do not have the internal pull-up active for gpio14, so do you have a resistor to pull it down or up to garantee it's default state?
It has no effect. Neither internal pullup nor resistor helps.
There doesn't even have to be an input device and rules can be empty.
Don't tell me that no one has this problem?
User avatar
RonkA
Posts: 95
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Location: Harlingen
Contact:

Re: ESP output flickering

Post by RonkA »

Not having this problem myself but maybe:

Code: Select all

On System#Boot do
 gpio,4,0
 gpio,14,0
endon
Also do you have debounce set on the swich?
SolarEdge ModbusTCP - Open Weather Map - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Rosomak
Posts: 7
Joined: Wednesday 30 January 2019 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: IE
Contact:

Re: ESP output flickering

Post by Rosomak »

Hi RonkA,
Thank you for your post.

I did a minimal setup now. One device in Domoticz and one device in ESP. No Rules, No PB Switch, External 10k pullup resistor at the output. Please see what is happening with the output when I change the state fast enough.
[youtube]https://youtube.com/shorts/cuNayzz_o9w?feature=share[/youtube]

I noticed it is worst when network is busy. And once again it does not mether I use sonoff, nodemcu, my own design esp8266 or esp32.

One thing that helps a lot is to change "Check Replay:" to 'Check Acknowledgment'.
Attachments
ESP Settings1.png
ESP Settings1.png (203.39 KiB) Viewed 8750 times
Domoticz Settings.png
Domoticz Settings.png (129.01 KiB) Viewed 8750 times
User avatar
RonkA
Posts: 95
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Location: Harlingen
Contact:

Re: ESP output flickering

Post by RonkA »

Inputswich called Output... As if live is not complex enough! :lol:

Anyhoe.. i'm no expert but on my Esp's i use the Domoticz HTTP controller for sensors and for swiches i have Domoticz MQTT running..
Why i did it like this is cannot remember but swiching works fine without your described problems in my setup..

Also i don't see the benefit of looping the state of the swich back to the Esp32 with the On- and Off action part..
Maybe try it without the on off triggers.
SolarEdge ModbusTCP - Open Weather Map - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Rosomak
Posts: 7
Joined: Wednesday 30 January 2019 20:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: IE
Contact:

Re: ESP output flickering

Post by Rosomak »

RonkA wrote: Wednesday 10 January 2024 13:31 Also i don't see the benefit of looping the state of the swich back to the Esp32 with the On- and Off action part..
Maybe try it without the on off triggers.
Without this funcktion I cant change state by clicking icon in domoticz.
RonkA wrote: Wednesday 10 January 2024 13:31 Anyhoe.. i'm no expert but on my Esp's i use the Domoticz HTTP controller for sensors and for swiches i have Domoticz MQTT running..
Why i did it like this is cannot remember but swiching works fine without your described problems in my setup..
I know and you are right, MQTT solves this problem.

After thinking its a time now to move my system to industry 4.0, so I'm facing complete rebuild.
Thanks for help every one.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest