Last active
November 9, 2023 17:04
-
-
Save debsahu/0ad5e1de664763e84994cc3a4a5d5dc0 to your computer and use it in GitHub Desktop.
ESPHome config for connected ESP8266 to MAX7219 Dot-Matrix Display to show useful information from HomeAssistant
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
esphome: | |
name: veneer_display | |
platform: ESP8266 | |
board: d1_mini | |
wifi: | |
networks: | |
- ssid: !secret esphome_wifi_ssid1 | |
password: !secret esphome_wifi_pass1 | |
# - ssid: !secret esphome_wifi_ssid2 | |
# password: !secret esphome_wifi_pass2 | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "Veneer Display Fallback Hotspot" | |
password: !secret esphome_fb_wifi_pass | |
web_server: | |
port: 80 | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: !secret esphome_haapi_pass | |
ota: | |
password: !secret esphome_ota_pass | |
mqtt: | |
broker: !secret mqtt_broker | |
username: !secret mqttuser | |
password: !secret mqttpass | |
time: | |
- platform: homeassistant | |
id: homeassistant_time | |
spi: | |
clk_pin: D5 | |
mosi_pin: D7 | |
display: | |
- platform: max7219digit | |
id: display_max | |
cs_pin: D8 | |
num_chips: 8 | |
intensity: 3 | |
scroll_speed: 100ms | |
update_interval: 100ms | |
lambda: |- | |
if(id(power_on_off).state) { | |
it.printf(0, 0, id(digit_font), TextAlign::TOP_LEFT, "%s", id(hatxt).state.c_str()); | |
it.intensity(atoi(id(habri).state.c_str())); | |
it.scroll_left(); | |
} | |
binary_sensor: | |
- platform: template | |
name: "Power State" | |
id: power_on_off | |
internal: true | |
switch: | |
- platform: template | |
name: "Veneer Display Power Switch" | |
icon: mdi:dots-grid | |
optimistic: true | |
restore_state: yes | |
turn_on_action: | |
- binary_sensor.template.publish: | |
id: power_on_off | |
state: ON | |
turn_off_action: | |
- binary_sensor.template.publish: | |
id: power_on_off | |
state: OFF | |
font: | |
- file: "pixelmix.ttf" | |
id: digit_font | |
size: 8 | |
glyphs: | |
- ' ' | |
- '@' | |
- '*' | |
- '!' | |
- '"' | |
- '%' | |
- ( | |
- ) | |
- + | |
- ',' | |
- '-' | |
- . | |
- '0' | |
- '1' | |
- '2' | |
- '3' | |
- '4' | |
- '5' | |
- '6' | |
- '7' | |
- '8' | |
- '9' | |
- ':' | |
- A | |
- B | |
- C | |
- D | |
- E | |
- F | |
- G | |
- H | |
- I | |
- J | |
- K | |
- L | |
- M | |
- N | |
- O | |
- P | |
- Q | |
- R | |
- S | |
- T | |
- U | |
- V | |
- W | |
- X | |
- Y | |
- Z | |
- _ | |
- a | |
- b | |
- c | |
- d | |
- e | |
- f | |
- g | |
- h | |
- i | |
- j | |
- k | |
- l | |
- m | |
- n | |
- o | |
- p | |
- q | |
- r | |
- s | |
- t | |
- u | |
- v | |
- w | |
- x | |
- y | |
- z | |
- ° | |
text_sensor: | |
- platform: wifi_info | |
ip_address: | |
name: "Veneer Display IP Address" | |
ssid: | |
name: "Veneer Display Connected SSID" | |
bssid: | |
name: "Veneer Display Connected BSSID" | |
- platform: homeassistant | |
name: "HA Txt" | |
id: hatxt | |
entity_id: input_text.venner_text | |
- platform: homeassistant | |
name: "HA Brightness" | |
id: habri | |
entity_id: input_number.venner_bri | |
sensor: | |
- platform: wifi_signal | |
name: "Veneer Display WiFi Signal Sensor" | |
update_interval: 60s | |
- platform: uptime | |
name: "Veneer Display Uptime Sensor" | |
- platform: adc | |
id: adc_val | |
pin: A0 | |
name: "Veneer Display Brightness" | |
update_interval: 60s | |
unit_of_measurement: "adc" | |
filters: | |
- multiply: 3.3 | |
- calibrate_linear: | |
- 0.0 -> 0.0 | |
- 3.3 -> 15 |
Yes, I just compiled everything again, and works great, Thank you so much.
hello and thanks for the wonderful job, I can't send any command from the home assistant for example I would like to adjust the brightness via mqtt but I can't, does anyone have any examples?
is it possible to display symbols?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@osfersa @hdjweb Added new version of the code that has power switch on it.