EDITED Problem 1 solved: Capacitor was not connected well. With better inspection at the light bulb and solving capacitor connection, reboots stopped. Now I just have a problem with led1 not going to bright blue (with ESPHome, with Tasmota it works well).
I bought 46 EU Neutral/NO neutral switches SW11-ESP-xEU and tried several of them with following results:
S O L V E D Problem 1: When switch is pressed and relay is set to on (light bulb goes on) device restarts sometimes immediately, sometimes in a few seconds.
I hoped that I can solve it with new firmware, so I compiled a esphome.bin with provided yaml for a 2 gang switch: https://github.com/athom-tech/athom-configs/blob/main/athom-sw02.yaml
Device is restarting again, so firmware did not help. Even more, now there is a second problem:
Problem 2: With new firmware and athom-sw02.yaml from the github, led1 (for relay1) is not working correctly. When relay1 is powered off, led1 is dimmed red as it should be, but when relay1 is powered on led1 does not become bright blue, it just goes completely off.
I even tried to edit yaml, so that I can just power on and off the led1 and led2 without powering on relays, and led2 is working properly, but led1 just goes off.
Here is a modified snippet that controls both:
- light.turn_on: light4
- light.turn_on: light3
- light.turn_off: light4
- light.turn_off: light3
The same code is controlling light4 (led2) and light3 (led1). But led1 is completely off when turned on.
Led1 definition from current gihub yaml:
# Button LEDs (1.0 = Blue / 0.0 = Red)
- platform: esp8266_pwm
- platform: esp8266_pwm
Before firmware updating, led1 (light3) was working corectly.
So, now I have two problems. Restarting, and led1 on (bright blue) light missing.
I got it working using both GPIO14 and GPIO16 at the same time. With this config the transition is not working correctly when turning on lights (second transition starts after first one ends), but it's ok when turning it off (both transitions starts at the same time - correct). I just set transition time to 50ms and I'm done with it.
After our test, there is no problem, you try the firmware in this link https://github.com/tarontop/athom-configs/blob/main/athom-sw02.bin
Thank You, but the led light still doesn't turn blue. When it's off it is dimmed red as it should be, but when it's on (both using old GPIO14 or GPIO16 from v2) it just goes off.
On tasmota I am using GPIO14 and it works, on ESPHome it doesn't. It just goes off for a light1 led status (led1).
The solution to problem 2 is as follows
Problem 1 is solved.
Problem 2 with led1 blue light missing is only present on ESPHome firmware. On Tasmota everything works well.
Final Tasmota configuration (2-Gang):
Update: I tried with tasmota firmware. And there is the same problem. Device keeps restarting when relays are turned on.
I bought 46 of them, paid customs and everything... but it seems it is hardware related. Maybe it works correctly with a neutral line, but I am using a no neutral line configuration as I am unable to have 'with neutral' configuration.
What can I do now?
Tasmota template I was using (for a 2 gang switch)