Skip to content

Instantly share code, notes, and snippets.

@andyshinn
Last active August 7, 2024 01:09
Show Gist options
  • Save andyshinn/101b9758483b93da69cacc359f8842f0 to your computer and use it in GitHub Desktop.
Save andyshinn/101b9758483b93da69cacc359f8842f0 to your computer and use it in GitHub Desktop.
esphome:
name: chargewell
on_boot:
then:
- switch.turn_on: backlight_switch
esp32:
board: adafruit_feather_esp32_v2
logger:
level: DEBUG
mcp23008:
- id: 'mcp23008_hub'
address: 0x20
wifi:
ssid: NotProgrium
password: !secret wifi_password
web_server:
port: 80
version: 3
i2c:
sda: SDA
scl: SCL
display:
- platform: lcd_gpio
dimensions: 20x4
data_pins:
- mcp23xxx: mcp23008_hub
number: 3
mode: OUTPUT
- mcp23xxx: mcp23008_hub
number: 4
mode: OUTPUT
- mcp23xxx: mcp23008_hub
number: 5
mode: OUTPUT
- mcp23xxx: mcp23008_hub
number: 6
mode: OUTPUT
rs_pin:
mcp23xxx: mcp23008_hub
number: 1
mode: OUTPUT
enable_pin:
mcp23xxx: mcp23008_hub
number: 2
mode: OUTPUT
lambda: |-
it.print("Hello World!");
switch:
- platform: gpio
id: backlight_switch
name: "Backlight"
pin:
mcp23xxx: mcp23008_hub
number: 7
mode: OUTPUT
❯ esphome run chargewell.yaml
INFO ESPHome 2024.7.3
INFO Reading configuration chargewell.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing chargewell (board: adafruit_feather_esp32_v2; framework: arduino; platform: platformio/espressif32@5.4.0)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 8MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- ESPmDNS @ 2.0.0
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
RAM: [= ] 12.4% (used 40764 bytes from 327680 bytes)
Flash: [===== ] 46.4% (used 851449 bytes from 1835008 bytes)
================================================================ [SUCCESS] Took 1.60 seconds ================================================================
INFO Successfully compiled program.
esptool.py v4.7.0
Serial port /dev/cu.usbserial-575E0522651
Connecting............
Chip is ESP32-PICO-V3-02 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 0c:8b:95:94:9e:60
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 8MB
Flash will be erased from 0x00010000 to 0x000e1fff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 857216 bytes to 556022...
Wrote 857216 bytes (556022 compressed) at 0x00010000 in 14.3 seconds (effective 479.4 kbit/s)...
Hash of data verified.
Warning: Image file at 0x1000 is protected with a hash checksum, so not changing the flash size setting. Use the --flash_size=keep option instead of --flash_size=8MB in order to remove this warning, or use the --dont-append-digest option for the elf2image command in order to generate an image file without a hash checksum
Compressed 17472 bytes to 12126...
Wrote 17472 bytes (12126 compressed) at 0x00001000 in 0.7 seconds (effective 214.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 273.4 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 409.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/cu.usbserial-575E0522651 with baud rate 115200
[20:08:31]1184
[20:08:31]load:0x40078000,len:13160
[20:08:31]load:0x40080400,len:3036
[20:08:31]entry 0x400805e4
[20:08:32][I][logger:156]: Log initialized
[20:08:32][I][app:029]: Running through setup()...
[20:08:32][I][i2c.arduino:218]: Performing I2C bus recovery
[20:08:32][C][mcp23008:010]: Setting up MCP23008...
[20:08:32][C][switch.gpio:011]: Setting up GPIO Switch 'Backlight'...
[20:08:32][D][switch:016]: 'Backlight' Turning OFF.
[20:08:32][D][switch:055]: 'Backlight': Sending state OFF
[20:08:32][D][switch:016]: 'Backlight' Turning OFF.
[20:08:32][D][switch:012]: 'Backlight' Turning ON.
[20:08:32][D][switch:055]: 'Backlight': Sending state ON
[20:08:32][C][lcd_gpio:010]: Setting up GPIO LCD Display...
[20:08:32][C][wifi:047]: Setting up WiFi...
[20:08:32][C][wifi:060]: Starting WiFi...
[20:08:32][C][wifi:061]: Local MAC: 0C:8B:95:94:9E:60
[20:08:32][D][wifi:481]: Starting scan...
[20:08:33][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:33][W][component:238]: Components should block for at most 30 ms.
[20:08:33][W][component:157]: Component wifi set Warning flag: scanning for networks
[20:08:35][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:35][W][component:238]: Components should block for at most 30 ms.
[20:08:37][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:37][W][component:238]: Components should block for at most 30 ms.
[20:08:39][W][component:237]: Component display took a long time for an operation (1067 ms).
[20:08:39][W][component:238]: Components should block for at most 30 ms.
[20:08:39][D][wifi:496]: Found networks:
[20:08:39][I][wifi:540]: - 'NotProgrium' (48:8F:5A:80:EA:31) ▂▄▆█
[20:08:39][D][wifi:541]: Channel: 6
[20:08:39][D][wifi:542]: RSSI: -40 dB
[20:08:39][D][wifi:545]: - 'Bens House' (9C:4F:5F:2F:83:3C) ▂▄▆█
[20:08:39][D][wifi:545]: - 'st4cey02 Fiber 2.4 GHz' (A2:B5:3C:E6:C5:DB) ▂▄▆█
[20:08:39][D][wifi:545]: - 'st4cey02 Fiber 2.4 GHz' (A2:B5:3C:1C:50:6E) ▂▄▆█
[20:08:39][D][wifi:545]: - 'SpectrumSetup-9D' (C0:3C:04:A3:47:A3) ▂▄▆█
[20:08:39][D][wifi:545]: - 'Perry-1' (A0:04:60:C5:1D:62) ▂▄▆█
[20:08:39][D][wifi:545]: - 'Meshed Up Wifi' (28:BD:89:FD:E9:52) ▂▄▆█
[20:08:39][D][wifi:545]: - 'Meshed Up Guest' (2A:BD:89:FD:E9:50) ▂▄▆█
[20:08:39][D][wifi:545]: - 'kevinnikkiwifi' (08:B4:B1:53:28:09) ▂▄▆█
[20:08:39][D][wifi:545]: - '' (46:00:49:CD:AD:79) ▂▄▆█
[20:08:39][D][wifi:545]: - 'Austin09241211' (9C:4F:5F:67:15:5F) ▂▄▆█
[20:08:39][I][wifi:312]: WiFi Connecting to 'NotProgrium'...
[20:08:39][I][wifi:616]: WiFi Connected!
[20:08:39][C][wifi:427]: Local MAC: 0C:8B:95:94:9E:60
[20:08:39][C][wifi:432]: SSID: 'NotProgrium'
[20:08:39][C][wifi:435]: IP Address: 192.168.1.65
[20:08:39][C][wifi:439]: BSSID: 48:8F:5A:80:EA:31
[20:08:39][C][wifi:440]: Hostname: 'chargewell'
[20:08:39][C][wifi:442]: Signal strength: -40 dB ▂▄▆█
[20:08:39][C][wifi:446]: Channel: 6
[20:08:39][C][wifi:447]: Subnet: 255.255.255.0
[20:08:39][C][wifi:448]: Gateway: 192.168.1.1
[20:08:39][C][wifi:449]: DNS1: 192.168.1.1
[20:08:39][C][wifi:450]: DNS2: 0.0.0.0
[20:08:39][C][web_server:128]: Setting up web server...
[20:08:39][I][app:062]: setup() finished successfully!
[20:08:40][W][component:170]: Component wifi cleared Warning flag
[20:08:40][I][app:100]: ESPHome version 2024.7.3 compiled on Aug 6 2024, 20:06:39
[20:08:40][C][wifi:599]: WiFi:
[20:08:40][C][wifi:427]: Local MAC: 0C:8B:95:94:9E:60
[20:08:40][C][wifi:432]: SSID: 'NotProgrium'
[20:08:40][C][wifi:435]: IP Address: 192.168.1.65
[20:08:40][C][wifi:439]: BSSID: 48:8F:5A:80:EA:31
[20:08:40][C][wifi:440]: Hostname: 'chargewell'
[20:08:40][C][wifi:442]: Signal strength: -37 dB ▂▄▆█
[20:08:40][C][wifi:446]: Channel: 6
[20:08:40][C][wifi:447]: Subnet: 255.255.255.0
[20:08:40][C][wifi:448]: Gateway: 192.168.1.1
[20:08:40][C][wifi:449]: DNS1: 192.168.1.1
[20:08:40][C][wifi:450]: DNS2: 0.0.0.0
[20:08:41][W][component:237]: Component display took a long time for an operation (1067 ms).
[20:08:41][W][component:238]: Components should block for at most 30 ms.
[20:08:41][C][logger:185]: Logger:
[20:08:41][C][logger:186]: Level: DEBUG
[20:08:41][C][logger:188]: Log Baud Rate: 115200
[20:08:41][C][logger:189]: Hardware UART: UART0
[20:08:41][C][i2c.arduino:071]: I2C Bus:
[20:08:41][C][i2c.arduino:072]: SDA Pin: GPIO22
[20:08:41][C][i2c.arduino:073]: SCL Pin: GPIO20
[20:08:41][C][i2c.arduino:074]: Frequency: 50000 Hz
[20:08:41][C][i2c.arduino:086]: Recovery: bus successfully recovered
[20:08:41][I][i2c.arduino:096]: Results from i2c bus scan:
[20:08:41][I][i2c.arduino:102]: Found i2c device at address 0x20
[20:08:41][C][mcp23008:026]: MCP23008:
[20:08:41][C][switch.gpio:068]: GPIO Switch 'Backlight'
[20:08:41][C][switch.gpio:091]: Restore Mode: always OFF
[20:08:41][C][switch.gpio:031]: Pin: 7 via MCP23XXX
[20:08:41][C][lcd_gpio:027]: GPIO LCD Display:
[20:08:41][C][lcd_gpio:028]: Columns: 20, Rows: 4
[20:08:41][C][lcd_gpio:029]: RS Pin: 1 via MCP23XXX
[20:08:41][C][lcd_gpio:031]: Enable Pin: 2 via MCP23XXX
[20:08:41][C][lcd_gpio:033]: Data Pin 0: 3 via MCP23XXX
[20:08:41][C][lcd_gpio:034]: Data Pin 1: 4 via MCP23XXX
[20:08:41][C][lcd_gpio:035]: Data Pin 2: 5 via MCP23XXX
[20:08:41][C][lcd_gpio:036]: Data Pin 3: 6 via MCP23XXX
[20:08:41][C][lcd_gpio:043]: Update Interval: 2.0s
[20:08:41][C][web_server:173]: Web Server:
[20:08:41][C][web_server:174]: Address: chargewell.local:80
[20:08:41][C][mdns:116]: mDNS:
[20:08:41][C][mdns:117]: Hostname: chargewell
[20:08:43][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:43][W][component:238]: Components should block for at most 30 ms.
[20:08:45][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:45][W][component:238]: Components should block for at most 30 ms.
[20:08:47][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:47][W][component:238]: Components should block for at most 30 ms.
[20:08:49][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:49][W][component:238]: Components should block for at most 30 ms.
[20:08:51][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:51][W][component:238]: Components should block for at most 30 ms.
[20:08:53][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:53][W][component:238]: Components should block for at most 30 ms.
[20:08:55][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:55][W][component:238]: Components should block for at most 30 ms.
[20:08:57][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:57][W][component:238]: Components should block for at most 30 ms.
[20:08:59][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:08:59][W][component:238]: Components should block for at most 30 ms.
[20:09:01][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:01][W][component:238]: Components should block for at most 30 ms.
[20:09:03][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:03][W][component:238]: Components should block for at most 30 ms.
[20:09:05][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:05][W][component:238]: Components should block for at most 30 ms.
[20:09:07][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:07][W][component:238]: Components should block for at most 30 ms.
[20:09:09][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:09][W][component:238]: Components should block for at most 30 ms.
[20:09:11][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:11][W][component:238]: Components should block for at most 30 ms.
[20:09:13][W][component:237]: Component display took a long time for an operation (1066 ms).
[20:09:13][W][component:238]: Components should block for at most 30 ms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment