ESPHome GPIO Experimenting?

Cloudfree Smart Bulb - RGBCW with factory default Tasmota works as expected via native web interface - Soft On/Off, Color, CW, WW, etc all good. PLUS hard On/Off control through simple dumb wall switch. Perfect - Bulb can be set as offline from “remote” control with main power switch Off and exactly as needed for intended use…

However, after updating firmware to ESPHome (GPIO per Vendor info, relevant YAML below) the same Bulb again works as expected for the RGBCW aspects BUT will no longer turn On/Off via the wall switch. Given the original Tasmota behavior it’s clear that control from wall switch is possible via firmware.

Lots of online esp8266 info covering pinouts, etc but further research hasn’t turned up additional GPIO relevant regarding specific Bulb or generalized coverage of bulb AC power under ESPHome. (Sonoff S31 offers confirmation as possible clue with Switch component on GPIO12 but that pin is already used as Green channel for this Bulb…)

So as HA Novice wondering - Without damage to Bulb, Is there a good, safe method under ESPHome for testing a specific esp8266 implementation to determine various device GPIO assignments?

Thanks!

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_warm_white
    pin: GPIO13
  - platform: esp8266_pwm
    id: output_cold_white
    pin: GPIO5

light:
  - platform: rgbww
    name: "CF Bulb"
    red: output_red
    green: output_green
    blue: output_blue
    cold_white: output_cold_white
    warm_white: output_warm_white

Try looking at the tasmota config.

Tasmota config was my first thought but nothing found seemed relevant, add info beyond already known, or perhaps more likely, within my knowledge to find/interpret.

Template indicated GPIO 4,5,12,13,14 in use, consistent with those assigned for RGB control. And confirmed by GPIO “Mapping” table.

Checked every Config setup page but nothing seemed related to AC power On/Off. Where and what else should the Tasmota config define?
(Created Tasmota backup (.DMP) file but that doesn’t seem readable…)

Thanks for taking the time to reply.

Template-

{"NAME":"CloudFree LBC","GPIO":[0,0,0,0,416,419,0,0,417,420,418,0,0,0],"FLAG":0,"BASE":18}

GPIO Mapping-
Name CloudFree LBC
Based on Generic (18)
GPIO0 None
GPIO1 None
GPIO2 None
GPIO3 None
GPIO4 PWM 1
GPIO5 PWM 4
GPIO9 None
GPIO10 None
GPIO12 PWM 2
GPIO13 PWM 5
GPIO14 PWM 3
GPIO15 None
GPIO16 None
GPIO17 None

Going back a step, surely the dumb wall switch just cuts power? Why would it be connected to a gpio?

Other than obvious AC power control, don’t know how the wall switch is connected to the bulb. Do know - As mentioned, under Tasmota firmware, when switched On the bulb would light. So, it would seem, that somehow the bulb is “communicating” with the wall switch in some way that ESPHome firmware is not addressing. GPIO control was my inexperienced first line of thought.

How about this approach? Does ESPHome provide a firmware mechanism that can recognize a device “power cycle” and correspondingly set the bulb to On - Perhaps something similar to the “restore_mode” configuration under the Switch component?

Thanks for trying to help…

Take a look at restore_mode ALWAYS_ON.

Note the comment about esp8266_restore_from_flash

That should work but if not you could look at using on_boot:

@Mahko_Mahko Thanks for the feedback - “restore_mode” at the Light level works and an improvement. Light On appears delayed until at least partial boot of bulb but prior full ESPHome control. Under Tasmota the bulb On was almost immediate. Maybe some experimenting with placement of the Light segment in the YAML… Anyhow, progress…

1 Like