Created
August 17, 2018 20:21
-
-
Save frog32/779fc98f9f349c87d374297b638046aa to your computer and use it in GitHub Desktop.
Smart Coffee Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphomeyaml: | |
name: coffee_machine | |
platform: ESP8266 | |
board: esp12e | |
wifi: | |
ssid: 'ssid' | |
password: '123456' | |
domain: .lan | |
mqtt: | |
broker: '192.168.86.x' | |
username: 'username' | |
password: '123456' | |
log_topic: esphomeyaml/logs/coffee_machine | |
# Enable logging | |
logger: | |
ota: | |
password: '123456' | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: GPIO3 # RX | |
mode: INPUT_PULLUP | |
id: power_led | |
discovery: false | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
- platform: gpio | |
name: "Coffee Machine Water Empty" | |
device_class: problem | |
pin: | |
number: GPIO4 # D2 | |
mode: INPUT_PULLUP | |
id: water_led | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
- platform: gpio | |
name: "Coffee Machine Heating" | |
device_class: heat | |
pin: | |
number: GPIO5 # D1 | |
mode: INPUT_PULLUP | |
id: heat_led | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
# the rest is set up as inputs but not yet functional | |
- platform: gpio | |
pin: | |
number: GPIO12 # D6 | |
mode: INPUT_PULLUP | |
id: single_led | |
discovery: false | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
- platform: gpio | |
pin: | |
number: GPIO14 # D5 | |
mode: INPUT_PULLUP | |
id: double_led | |
discovery: false | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
- platform: gpio | |
pin: | |
number: GPIO16 # D0 | |
mode: INPUT_PULLUP | |
id: long_led | |
discovery: false | |
filters: | |
- invert: | |
- delayed_on: 100ms | |
- delayed_off: 500ms | |
switch: | |
- platform: gpio | |
pin: | |
number: GPIO0 # D3 | |
inverted: True | |
id: power_btn | |
discovery: false | |
# the next button is indended to be able to implement an auto backflush programm later | |
- platform: gpio | |
pin: | |
number: GPIO2 # D4 | |
inverted: True | |
id: long_btn | |
discovery: false | |
# template button that uses power_led and power_button | |
- platform: template | |
name: "Coffee Machine" | |
icon: "mdi:coffee" | |
lambda: >- | |
if (id(power_led).value) { | |
return true; | |
} else { | |
return false; | |
} | |
turn_on_action: | |
- switch.turn_on: | |
id: power_btn | |
- delay: 2s | |
- switch.turn_off: | |
id: power_btn | |
turn_off_action: | |
- switch.turn_on: | |
id: power_btn | |
- delay: 2s | |
- switch.turn_off: | |
id: power_btn | |
dallas: | |
- pin: GPIO13 | |
# Individual sensors | |
sensor: | |
- platform: dallas | |
index: 0 | |
name: "Coffee Machine temperature" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment