commit 4d26ae582fe84fa1d45984e3caca051978436b86 Author: Tim Meneely Date: Sat Oct 24 09:17:34 2020 -0400 Initial testing of ESPHome, mostly for Lily ePaper diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0bbf89c --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +**/.pioenvs/ +**/.piolibdeps/ +**/lib/ +**/src/ +**/platformio.ini +/secrets.yaml diff --git a/arial.ttf b/arial.ttf new file mode 100755 index 0000000..8682d94 Binary files /dev/null and b/arial.ttf differ diff --git a/lily/partitions.csv b/lily/partitions.csv new file mode 100644 index 0000000..f846601 --- /dev/null +++ b/lily/partitions.csv @@ -0,0 +1,6 @@ +nvs, data, nvs, 0x009000, 0x005000, +otadata, data, ota, 0x00e000, 0x002000, +app0, app, ota_0, 0x010000, 0x1C0000, +app1, app, ota_1, 0x1D0000, 0x1C0000, +eeprom, data, 0x99, 0x390000, 0x001000, +spiffs, data, spiffs, 0x391000, 0x00F000 diff --git a/lily11.yaml b/lily11.yaml new file mode 100644 index 0000000..c655c15 --- /dev/null +++ b/lily11.yaml @@ -0,0 +1,80 @@ +esphome: + name: lily11 + platform: ESP32 + board: esp32dev + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Lily Fallback Hotspot" + password: "QNWj7LmaNoD6" + manual_ip: + # Set this to the IP of the ESP + static_ip: 192.168.87.11 + # Set this to the IP address of the router. Often ends with .1 + gateway: 192.168.86.1 + # The subnet of the network. 255.255.255.0 works for most home networks. + subnet: 255.255.254.0 + +captive_portal: + +# Enable logging +logger: + level: debug + +# Enable Home Assistant API +api: + +ota: + +status_led: + pin: + number: 19 +# inverted: True + +spi: + clk_pin: 18 + mosi_pin: 23 + miso_pin: 17 + +time: + - platform: homeassistant + id: esptime + +font: + - file: "arial.ttf" + id: font_arial + size: 20 + - file: "arial.ttf" + id: font_arialbig + size: 24 + - file: "times.ttf" + id: font_times + size: 16 + +sensor: + - platform: homeassistant + id: bedroomtemperature + internal: true + entity_id: sensor.bedroomtemperature + + #it.strftime(250, 0, id(font_arial), TextAlign::TOP_RIGHT, "%H:%M", id(esptime).now()); +#Dimensions: 122 x 250 not 128px x 296px +display: + - platform: waveshare_epaper + cs_pin: 5 + dc_pin: 17 + busy_pin: 4 + reset_pin: 16 + model: 2.13in-ttgo-b73 + id: display_update + update_interval: 30s + full_update_every: 30 + rotation: 90° + lambda: |- + it.strftime(250, 0, id(font_arialbig), TextAlign::TOP_RIGHT, "%a %b %e %l:%M %P", id(esptime).now()); + it.line(0,42,250,40); + it.printf(1, 101, id(font_arial), "Bedroom: %.1f°F", id(bedroomtemperature).state); diff --git a/lily11/partitions.csv b/lily11/partitions.csv new file mode 100644 index 0000000..f846601 --- /dev/null +++ b/lily11/partitions.csv @@ -0,0 +1,6 @@ +nvs, data, nvs, 0x009000, 0x005000, +otadata, data, ota, 0x00e000, 0x002000, +app0, app, ota_0, 0x010000, 0x1C0000, +app1, app, ota_1, 0x1D0000, 0x1C0000, +eeprom, data, 0x99, 0x390000, 0x001000, +spiffs, data, spiffs, 0x391000, 0x00F000 diff --git a/lily15.yaml b/lily15.yaml new file mode 100644 index 0000000..68b3d61 --- /dev/null +++ b/lily15.yaml @@ -0,0 +1,79 @@ +esphome: + name: lily15 + platform: ESP32 + board: esp32dev + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Lily Fallback Hotspot" + password: "QNWj7LmaNoD6" + manual_ip: + # Set this to the IP of the ESP + static_ip: 192.168.87.15 + # Set this to the IP address of the router. Often ends with .1 + gateway: 192.168.86.1 + # The subnet of the network. 255.255.255.0 works for most home networks. + subnet: 255.255.254.0 + +captive_portal: + +# Enable logging +logger: + level: debug + +# Enable Home Assistant API +api: + +ota: + +spi: + clk_pin: 18 + mosi_pin: 23 + miso_pin: 17 + +time: + - platform: homeassistant + id: esptime + +font: + - file: "arial.ttf" + id: font_arial + size: 20 + - file: "arial.ttf" + id: font_arialbig + size: 24 + - file: "times.ttf" + id: font_times + size: 16 + +sensor: + - platform: homeassistant + id: timofficetemperature + internal: true + entity_id: sensor.tim_office_temperature + - platform: homeassistant + id: bedroomtemperature + internal: true + entity_id: sensor.bedroomtemperature + +#Dimensions: 122 x 250 +display: + - platform: waveshare_epaper + cs_pin: 5 + dc_pin: 17 + busy_pin: 4 + reset_pin: 16 + model: 2.13in-ttgo-b73 + id: display_update + update_interval: 30s + full_update_every: 30 + rotation: 90° + lambda: |- + it.strftime(250, 0, id(font_arialbig), TextAlign::TOP_RIGHT, "%a %b %e %l:%M %P", id(esptime).now()); + it.line(0,25,250,25); + it.printf(0, 34, id(font_arial), "Office: %.1f°F", id(timofficetemperature).state); + it.printf(0, 54, id(font_arial), "Bedroom: %.1f°F", id(bedroomtemperature).state); diff --git a/lily15/partitions.csv b/lily15/partitions.csv new file mode 100644 index 0000000..f846601 --- /dev/null +++ b/lily15/partitions.csv @@ -0,0 +1,6 @@ +nvs, data, nvs, 0x009000, 0x005000, +otadata, data, ota, 0x00e000, 0x002000, +app0, app, ota_0, 0x010000, 0x1C0000, +app1, app, ota_1, 0x1D0000, 0x1C0000, +eeprom, data, 0x99, 0x390000, 0x001000, +spiffs, data, spiffs, 0x391000, 0x00F000 diff --git a/lily15_upload b/lily15_upload new file mode 100644 index 0000000..339bcb9 --- /dev/null +++ b/lily15_upload @@ -0,0 +1 @@ +esphome lily15.yaml run --upload-port 192.168.87.15 diff --git a/livingroom.yaml b/livingroom.yaml new file mode 100644 index 0000000..28c5e02 --- /dev/null +++ b/livingroom.yaml @@ -0,0 +1,37 @@ +esphome: + name: livingroom + platform: ESP8266 + board: esp12e + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Livingroom Fallback Hotspot" + password: "QNWj7LmaNoD6" + manual_ip: + # Set this to the IP of the ESP + static_ip: 192.168.87.10 + # Set this to the IP address of the router. Often ends with .1 + gateway: 192.168.86.1 + # The subnet of the network. 255.255.255.0 works for most home networks. + subnet: 255.255.254.0 + +captive_portal: + +# Enable logging +logger: + +# Enable Home Assistant API +api: + +ota: + +switch: + - platform: gpio + name: "Living Room Dehumidifier" + pin: 5 + + diff --git a/monofonto.ttf b/monofonto.ttf new file mode 100644 index 0000000..9d65196 Binary files /dev/null and b/monofonto.ttf differ diff --git a/purple.yaml b/purple.yaml new file mode 100644 index 0000000..2a1a70b --- /dev/null +++ b/purple.yaml @@ -0,0 +1,50 @@ +esphome: + name: purple + platform: ESP8266 + board: nodemcuv2 + +wifi: + ssid: "Meneely" + password: "punxsutawney1" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Purple Fallback Hotspot" + password: "QNWj7LmaNoD6" + manual_ip: + # Set this to the IP of the ESP + static_ip: 192.168.87.11 + # Set this to the IP address of the router. Often ends with .1 + gateway: 192.168.86.1 + # The subnet of the network. 255.255.255.0 works for most home networks. + subnet: 255.255.254.0 + +captive_portal: + +# Enable logging +logger: + +# Enable Home Assistant API +api: + +ota: + +i2c: + sda: D2 + scl: D1 + scan: True + id: bus_a + +sensor: + - platform: bme280 + temperature: + name: "Purple_BME280 Temperature" + oversampling: 16x + pressure: + name: "Purple_BME280 Pressure" + humidity: + name: "Purple_BME280 Humidity" + address: 0x76 + update_interval: 60s + + diff --git a/times.ttf b/times.ttf new file mode 100755 index 0000000..f71d84a Binary files /dev/null and b/times.ttf differ diff --git a/write_lily b/write_lily new file mode 100644 index 0000000..4bdc9ec --- /dev/null +++ b/write_lily @@ -0,0 +1 @@ +esphome lily.yaml run --upload-port /dev/ttyS6 diff --git a/write_lily2 b/write_lily2 new file mode 100644 index 0000000..4f9a3c8 --- /dev/null +++ b/write_lily2 @@ -0,0 +1 @@ +esphome lily11.yaml run --upload-port /dev/ttyS9 diff --git a/write_livingroom b/write_livingroom new file mode 100644 index 0000000..eafbb84 --- /dev/null +++ b/write_livingroom @@ -0,0 +1 @@ +esphome livingroom.yaml run --upload-port /dev/ttyS8 diff --git a/write_purple b/write_purple new file mode 100644 index 0000000..70c6000 --- /dev/null +++ b/write_purple @@ -0,0 +1 @@ +esphome purple.yaml run --upload-port /dev/ttyS8 diff --git a/write_purple.bu b/write_purple.bu new file mode 100644 index 0000000..ce80d26 --- /dev/null +++ b/write_purple.bu @@ -0,0 +1 @@ +esphome purple.yaml run --upload-port /dev/ttyS8 --upload-baud-rate=115200