ESPHome cannot connect to Magic Home light

I have a RGBWW MagicHome light.The chip is an ESP8285MOD.I have set up the parameters for the building of the flash file, it has been validated but when I try to flash OTA, I get an error:

ERROR Connecting to 192.168.2.146:8266 failed: [Errno 111] Connection refused

Is there a need to provide a username/password for the light at all?

My configuration is as follows:

esphome:
  name: bedroom_light
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "<ssid>"
  password: "<wifi pass>"
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.2.146
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.2.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
    
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bedroom Light Fallback Hotspot"
    password: "THe4CVVVxVHG"

captive_portal:

# Enable logging

mqtt:
  broker: 192.168.2.25
  username: mqttuser
  password: mqttpass
  discovery: clean
# Enable logging
logger:
#  level: WARN
#  level: DEBUG
#  level: VERY_VERBOSEWARN

# Enable Home Assistant API
api:

ota:

light:
  - platform: rgbww
    name: "Master Light"
    red: output_red
    green: output_green
    blue: output_blue
    cold_white: output_coldwhite
    warm_white: output_warmwhite
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K
  
output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO5
    max_power: 80%
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO4
    max_power: 80%
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO13
    max_power: 80%
  - platform: esp8266_pwm
    id: output_coldwhite
    pin: GPIO14
    max_power: 80%
  - platform: esp8266_pwm
    id: output_warmwhite
    pin: GPIO12
    max_power: 80%

Is it Tuya based? Have you ‘hacked’ the bulb first by using Tuya Convert ?

Thanks.

No I have not run a TUYA convert on it. I thought I just had to flash straight from ESPHome on the HomeAssistant. I will go away and do this now.

Hi @XavierUK
Yes, you have to ‘hack’ them, ie. take them out o the tuya cloud, I find it the easiest to just flash a tasmota, and then update it to esphome, but it’s absolutely possible to upload the esphome directly from the tuya convert. Have fun :grin: