ESPHome Links

ESPs are the eyes and ears of TechnoCore. They aren't mandatory, but I'd highly recommend looking around ESPHome's Documentation to see what is possible and how it works.

Note: I'm still exploring how to manage the ESPs in a sane and DRY way. Here are the methods I've employed:

  • Mounted the /config folder to a folder on the server, and then used NextCloud to sync changes between my local machine and the server. This is my current solution.
  • Mounted the /config folder to a folder on the server, and then used sshfs to mount that folder on my local machine. To do this, you'll need to setup passwordless ssh to your server, and the add something like the following to your /etc/fstab: technocore@technocore:/home/technocore/technocore/esphome/config /home/spencer/src/technocore/hals fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,allow_other,reconnect 0 0 This worked OK when I was on the local network, but broke when I left the network.
  • Used the text editor from within ESPHome. This worked OK, but doesn't have a way of editing files in folders, nor of creating symlinks.

Service Information

Seedships: ESPHome
ESPHome Documentation
ESPHome's GitHub Repo
TechnoCore's ESPHome GitHub Repo


Documentation

Getting Started

Automations

Meat of how to program ESPs. Not very long.

Filters

How to manipulate and correct readings

Configuration Types

Good bit on using substitutions

!directives

ESPHome supports most of Home Assistant's !directives (!include, !secret... etc.). Home Assistant's page about !directives

Examples

Settings for premade devices

Think smartplugs, lights, and wall switches.

!import other files:

https://github.com/nuttytree/ESPHome-Devices/blob/bd9b81baed6acc739fb4894d96b40abf5d3452a0/living_room_lights.yaml

Battery powered ESP32 deep sleep (BME200)

https://esphome-configs.io/devices/esp32deepsleepbme280/


Devices

List of 3rd party devices that ESP Home supports (Teckin, Sonoff...)

https://esphome.io/devices/sonoff.html


Calibration

Calibrate Teckin with ESPHome

https://blog.quindorian.org/2019/02/home-assistant-10-wifi-energy-meter-with-esphome.html/ https://frenck.dev/calibrating-an-esphome-flashed-power-plug/

Example calibrating a sensor

https://esphomelib.com/esphomeyaml/components/sensor/hx711.html?highlight=calibrate

A sensor with a "baseline" built in for calibration

https://esphome.io/components/sensor/ccs811.html?highlight=i2c


C++ Tips:

String to int: atoi(myString.c_str())

https://stackoverflow.com/questions/7663709/how-can-i-convert-a-stdstring-to-int

const char[] vs std::string

https://softwareengineering.stackexchange.com/questions/149350/how-to-nicely-use-constant-stdstring-in-c#answer-149351


Troubleshooting

How to use specific esphome-core version.

https://esphome.io/components/esphomeyaml#esphomeyaml-esphomelib-version

Increase the number of inotify watchers in order to get Guard to work:

https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers

Considerations for setting up ESPHome as a stand alone service

https://community.home-assistant.io/t/esphomelib-help-docker/62383/10