Skip to content

Latest commit

 

History

History

esphome

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ESPHome

All ESP8266 based components in my home are running on ESPHome.

Most of the configs are based on forum threads and the Tasmota templates for them.

Config structure

The configuration is package based and as modular and reusable as possible. Packages are structured by

  • Shared defaults (API, OTA, version sensors, etc.)
  • WiFi settings (Main floor WiFi, basement WiFi)
  • Board (ESP01, ESP8285, etc.)
  • Device (Shelly1, Shelly2.5, SP111, etc.)
  • Usage template (Fan, switch, light, etc.)

Devices always only define outputs. The usage templates then convert these outputs to components that are exposed in Home Assistant.

e.g. The GoSund SP112 defines one output for AC (a) and one output for USB (b). A physical device now just needs to add the WiFi and device packages and define how the output should be exposed as a component, see the bedroom charging plug for an example.

Devices

Power plugs

Gosund SP111

Single plug with power measurement

As I only own v1.1 and v1.4 devices:

Device differences

Pin v1.0 v1.1 v1.4
GPIO00 Led1i Led1i Led2i
GPIO01 None None User
GPIO02 Led2i LedLinki Led1i
GPIO03 None None User
GPIO04 None HLWBL CF1 None
GPIO05 BL0937 CF BL0937 CF BL0937 CF
GPIO09 None None None
GPIO10 None None None
GPIO12 HLWBL SELi HLWBL SELi HLWBL SELi
GPIO13 Button1 Button1 Button1
GPIO14 HLWBL CF1 None HLWBL CF1
GPIO15 Relay1 Relay1 Relay1
GPIO16 None None None
FLAG None None None

Gosund SP112

Single plug with power measurement and switchable USB ports.

There are two different versions on the market which are almost indistinguishable from the outside!!! The print on the backside of the devices is slightly bolder and larger on v3.4 compared to v2.8.

SP112 v3.4 is almost similar from it's inner parts to the SP111 v1.4

Device type template v2.8 Device type template v3.4

Device differences

Pin v2.8 v3.4
GPIO00 Led2i Led1i
GPIO01 CSE7766 Tx None
GPIO02 Led1i Led2i
GPIO03 CSE7766 Rx None
GPIO04 User HLWBL CF1
GPIO05 Relay2 BL0937 CF
GPIO09 None None
GPIO10 None None
GPIO12 User HLWBL SELi
GPIO13 User Relay2i
GPIO14 Relay1 Relay1
GPIO15 User None
GPIO16 Button1 None
FLAG None Buttoni

AOFO strip

Power strip with four mains outlets and four USB ports

Device type template

LED controllers

Magic Home

Controls RGB light strips

Device type template

Shelly switches / actors

All my inputs are momentary switches! You may need to adjust some templates if you're using regular on/off switches.

Shelly 1

One input, one output

Device type template

Shelly 2.5

Two inputs, two outputs, power measurement.

Used for switch inputs (sensors), lights, fans and covers.

Device type template

Shelly RGBW2

Control LED light strips.

Device type template

Example devices:

Templates

Time based covers

As my covers don't have a proper end stop reporting, I opted to use a time based cover setup.

ESPTool

Just listed here because I'm bad at remembering such commands.

Read original flash

esptool.py --p /dev/ttyUSB0 read_flash 0x00000 0x200000 <filename.bin>

Flash new firmware

esptool.py --p /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 <filename.bin>