![esp8266 firmware edit esp8266 firmware edit](https://content.instructables.com/ORIG/F0T/ZOJA/JE4KRCVE/F0TZOJAJE4KRCVE.png)
#Esp8266 firmware edit update
To make updates to the firmware, you can edit the config file in the ESPHome Dashboard and then do an OTA update without having to connect the Sonoff switch to the computer.įor example, let’s make a change to the current firmware, Let’s say we want the green LED on the Sonoff switch to either be on or off depending on the state of the relay. version text_sensor: Provides information of the current version of the ESPHome firmware installed on the device.uptime sensor: Tracks the time (in seconds) the device has been online.wifi_signal sensor: Monitors the received signal strength.Letting you know of any warning or errors status_led: Useful to show the status of a device.
![esp8266 firmware edit esp8266 firmware edit](https://image.ibb.co/nsKtXw/ESP8266_flash.png)
switch: Would trigger the relay on and off.binary_sensor: Checks for anytime the button on the Sonoff switch is pressed.Click on Edit to open the config file and enter the following at the bottom: binary_sensor: - platform: gpio pin: number: GPIO0 mode: INPUT_PULLUP inverted: True name: "Desk light button" on_press: - switch.toggle: relay switch: - platform: gpio name: "Desk light relay" pin: GPIO12 id: relay status_led: pin: number: GPIO13 inverted: yes sensor: - platform: wifi_signal name: "Desk light WiFi signal" update_interval: 60s - platform: uptime name: "Desk light uptime" text_sensor: - platform: version name: "Desk light ESPHome version" Let’s go over some of the available settings that you can add. For example, the switch settings to control the relay to turn the Sonoff basic on and off. So, you would need to edit the config file and add a few more components. If you were to flash the firmware to the Sonoff switch now, it would just connect to your WiFi and nothing else. However, it only has some basic settings. OK, so you created the configuration file for the Sonoff switch.