So, I’ve read about loads of MQTT-compatible ESP8266 frameworks recently. Can anyone recommend on which is particularly easy to interface with HA, please?
ESP home is very easy. The default mqtt settings have home assistant discovery enabled. Likewise with the new api (though I have not used this yet). All configuration is done in yaml.
Here’s an example that has a switch to ring a doorbell chime, a status monitor and wifi signal strength monitor:
esphomeyaml: ### this will be created by the web interface when you first set up the board.
name: doorbell_downstairs
platform: ESP8266
board: d1_mini
wifi:
ssid: 'WAPRU' ### your wifi SSID and passwrd password here
password: !secret wifi_pwd
manual_ip:
static_ip: 10.1.1.84 ### a static IP address here if you want (helps with OTA updates)
gateway: 10.1.1.1
subnet: 255.255.255.0
mqtt:
broker: 10.1.1.100 ### your mqtt broker IP address here or use the new api instead
username: !secret mqtt_usr
password: !secret mqtt_pwd
logger:
# level: WARN ### once you have everything working, uncomment this and re-upload to reduce mqtt chatter.
ota:
password: !secret esp_pwd ### over the air updates.
binary_sensor:
- platform: status ### status indicator for the Wemos D1
name: "Doorbell Downstairs Status"
sensor:
- platform: wifi_signal ### wifi monitor for the Wemos D1
name: "Doorbell Downstairs WiFi Signal"
update_interval: 15s
filters:
- sliding_window_moving_average:
window_size: 15
send_every: 15
send_first_at: 15
switch: ### output switch
- platform: gpio
pin:
number: D5
mode: OUTPUT_OPEN_DRAIN ### Pull the line to 0V (low) or float o/c (high) as my doorbell chime switch has a 3.3v pullup.
name: "Downstairs Doorbell"