how do I load new firmware into this module SWB2-1? do you have any instructions?
Help FTL232RL and windows esphome flasher
My log lists:
Using 'COM5' as serial port.
Connecting........_____....._____....._____....._____....._____....._____....._____
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header
Yaml in esphome
substitutions:
friendly_name: ESP-Strip
device_description: "convert strip Tuya Lingan SWB2-1"
esphome:
name: esp-strip1
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "6d46e4943a7c28f4a232784e352152aa"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp-Strip1 Fallback Hotspot"
password: "yE2hgZxfsoks"
captive_portal:
sensor:
# Wifi signal
- platform: wifi_signal
name: "${friendly_name} Signal"
update_interval: 300s
switch:
- platform: gpio
id: led
pin:
number: GPIO12
inverted: true
- platform: gpio
name: "${friendly_name} USB"
pin: GPIO15
id: plugusb
- platform: gpio
name: "${friendly_name} Socket3"
pin: GPIO12
id: plug1
- platform: gpio
name: "${friendly_name} Socket1"
pin: GPIO14
id: plug2
- platform: gpio
name: "${friendly_name} Socket2"
pin: GPIO05
id: plug3
Thanks
EDIT: Ha ha fix reverse pin RX a TX
And another problem:
Using 'COM5' as serial port.
Connecting....
Detecting chip type... ESP8266
Connecting...
Chip Info:
- Chip Family: ESP8266
- Chip Model: ESP8266EX
- Chip ID: 00FE6CEE
- MAC Address: 98:F4:AB:FE:6C:EE
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
- Flash Size: 4MB
- Flash Mode: dout
- Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Unexpected error: Error while erasing flash: Timed out waiting for packet content
EDIT 2
helped to replace it with another flasher module
EDIT3
full yaml code whit button (click turn on/hold turn off) and add current meter (ads1115 adc and ct_clamp SCT-013-50A)
i2c:
sda: GPIO4
scl: GPIO2
ads1115:
- address: 0x48
sensor:
# Wifi signal
- platform: wifi_signal
name: "${friendly_name} Signal"
update_interval: 300s
- platform: ads1115
multiplexer: 'A0_GND'
gain: 6.144
name: "ADS1115 Channel A0-GND"
id: adc_sensor
update_interval: 30s
internal: true
- platform: ct_clamp
sensor: adc_sensor
name: "${friendly_name} Current"
update_interval: 30s
filters:
- calibrate_linear:
# Measured value of 0 maps to 0A
- 0 -> 0
# Known load: 4.0A
# Value shown in logs: 0.1333A
- 0.003 -> 0.142
id: ctcurrent
- platform: template
name: "${friendly_name} Power"
lambda: |-
return (235.0 * id(ctcurrent).state);
unit_of_measurement: 'W'
update_interval: 30s
# Example configuration entry
switch:
- platform: gpio
id: led
pin:
number: GPIO12
inverted: true
- platform: gpio
name: "${friendly_name} USB"
pin: GPIO15
id: plugusb
restore_mode: ALWAYS_ON
- platform: gpio
name: "${friendly_name} Socket1"
pin: GPIO12
id: plug1
restore_mode: ALWAYS_ON
- platform: gpio
name: "${friendly_name} Socket2"
pin: GPIO14
id: plug2
restore_mode: ALWAYS_ON
- platform: gpio
name: "${friendly_name} Socket3"
pin: GPIO05
id: plug3
restore_mode: ALWAYS_ON
# Example configuration entry
binary_sensor:
- platform: gpio
name: "${friendly_name} gpio13"
pin:
number: GPIO13
mode: INPUT_PULLUP
id: press_strip
filters:
- invert:
- delayed_on: 10ms
device_class: power
on_click:
- min_length: 50ms
max_length: 990ms
then:
- switch.turn_on: plug1
- switch.turn_on: plug2
- switch.turn_on: plug3
- switch.turn_on: plugusb
- min_length: 1000ms
max_length: 5000ms
then:
- switch.turn_off: plug1
- switch.turn_off: plug2
- switch.turn_off: plug3
- switch.turn_off: plugusb