meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
home_automation:esp8266:hw:gosund_sp111 [2020/12/19 20:47] – niziak | home_automation:esp8266:hw:gosund_sp111 [2020/12/20 21:18] (current) – niziak | ||
---|---|---|---|
Line 2: | Line 2: | ||
How to reflash with custom firmware using OTA: [[https:// | How to reflash with custom firmware using OTA: [[https:// | ||
+ | OLD method: [[https:// | ||
I was using '' | I was using '' | ||
Line 74: | Line 75: | ||
</ | </ | ||
+ | |||
+ | ====== ESPHome Config ====== | ||
+ | |||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | <file yaml gosund_sp1.yaml> | ||
+ | esphome: | ||
+ | name: gosund_pralka | ||
+ | platform: ESP8266 | ||
+ | board: esp01_1m | ||
+ | esp8266_restore_from_flash: | ||
+ | |||
+ | wifi: | ||
+ | ssid: " | ||
+ | password: " | ||
+ | |||
+ | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
+ | ap: | ||
+ | ssid: " | ||
+ | password: " | ||
+ | |||
+ | captive_portal: | ||
+ | |||
+ | # Enable logging | ||
+ | logger: | ||
+ | |||
+ | # Enable Home Assistant API | ||
+ | api: | ||
+ | |||
+ | ota: | ||
+ | |||
+ | binary_sensor: | ||
+ | - platform: gpio | ||
+ | name: "Power Button" | ||
+ | pin: | ||
+ | number: GPIO13 | ||
+ | inverted: true | ||
+ | on_press: | ||
+ | - switch.toggle: | ||
+ | |||
+ | switch: | ||
+ | - platform: gpio | ||
+ | id: relay | ||
+ | name: ON/OFF | ||
+ | pin: GPIO15 | ||
+ | on_turn_on: | ||
+ | - light.turn_on: | ||
+ | on_turn_off: | ||
+ | - light.turn_off: | ||
+ | |||
+ | |||
+ | time: | ||
+ | - platform: homeassistant | ||
+ | id: homeassistant_time | ||
+ | timezone: Europe/ | ||
+ | | ||
+ | substitutions: | ||
+ | plug_name: GspBiuro | ||
+ | # Higher value gives lower watt readout | ||
+ | current_res: | ||
+ | # Lower value gives lower voltage readout | ||
+ | voltage_div: | ||
+ | |||
+ | # Enable Web server | ||
+ | web_server: | ||
+ | port: 80 | ||
+ | |||
+ | sensor: | ||
+ | - platform: wifi_signal | ||
+ | name: " | ||
+ | update_interval: | ||
+ | | ||
+ | - platform: uptime | ||
+ | name: " | ||
+ | icon: mdi: | ||
+ | update_interval: | ||
+ | | ||
+ | - platform: hlw8012 | ||
+ | sel_pin: | ||
+ | number: GPIO12 | ||
+ | inverted: True | ||
+ | cf_pin: GPIO05 | ||
+ | cf1_pin: GPIO04 | ||
+ | current_resistor: | ||
+ | voltage_divider: | ||
+ | | ||
+ | current: | ||
+ | name: " | ||
+ | unit_of_measurement: | ||
+ | accuracy_decimals: | ||
+ | icon: mdi: | ||
+ | | ||
+ | voltage: | ||
+ | name: " | ||
+ | unit_of_measurement: | ||
+ | accuracy_decimals: | ||
+ | icon: mdi: | ||
+ | | ||
+ | power: | ||
+ | name: " | ||
+ | unit_of_measurement: | ||
+ | id: " | ||
+ | icon: mdi: | ||
+ | | ||
+ | change_mode_every: | ||
+ | update_interval: | ||
+ | | ||
+ | - platform: total_daily_energy | ||
+ | name: " | ||
+ | power_id: " | ||
+ | filters: | ||
+ | # Multiplication factor from W to kW is 0.001 | ||
+ | - multiply: 0.001 | ||
+ | unit_of_measurement: | ||
+ | icon: mdi: | ||
+ | |||
+ | text_sensor: | ||
+ | - platform: version | ||
+ | name: " | ||
+ | |||
+ | output: | ||
+ | # Relay state led | ||
+ | - platform: esp8266_pwm | ||
+ | id: state_led | ||
+ | pin: | ||
+ | number: GPIO2 | ||
+ | inverted: true | ||
+ | |||
+ | light: | ||
+ | # Relay state light | ||
+ | - platform: monochromatic | ||
+ | output: state_led | ||
+ | id: led | ||
+ | |||
+ | # Uses the red LED as a ESPhome status indicator | ||
+ | status_led: | ||
+ | pin: | ||
+ | number: GPIO0 | ||
+ | inverted: true | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Upgrade from Tasmota: | ||
+ | <code bash> | ||
+ | run esphome config.yaml compile | ||
+ | |||
+ | Creating BIN file " | ||
+ | </ | ||
+ | |||
+ | Or '' | ||
+ | |||
+ |