-
-
Save debsahu/0ad5e1de664763e84994cc3a4a5d5dc0 to your computer and use it in GitHub Desktop.
| 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 |
hdjweb
commented
Apr 12, 2021
via email
But It Will create a swivh in home assistant or Will Active a service? Il mer 7 apr 2021, 21:25 Debashish Sahu @.> ha scritto:
…
@.* commented on this gist. ------------------------------ How can i create a switch ti Power on/off??? https://esphome.io/components/display/max7219digit.html?highlight=max7219digit#screen-on-off — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://gist.github.com/0ad5e1de664763e84994cc3a4a5d5dc0#gistcomment-3697196, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVET7IRYADREIGZU3B55TTTHSWSBANCNFSM42C3UHNQ .
Easiest way is to create a Home Assistant Template Switch that sets brightness of the display to 0 on off and 7 for ON.
Got everything working but I can not get how to get on and off switch
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?
And write in Cyrillic?
https://www.dafont.com/sprite-coder.font
You can check it has multinational glyphs, include it in your project and you should be good to go.
@osfersa @hdjweb Added new version of the code that has power switch on it.
Could you please add a full detailed wiring diagram too pls?
I watched both of your videos too about the dot matrix projects but could not find anything on that mater.
I cannot get ADC to be working i think i'm missing some wiring...
Edit:
For those who might learn it now like me.
Set up ADC based on the reference below:
https://arduino.stackexchange.com/questions/86958/can-arduino-show-the-power-drawn-from-its-output-pin-on-serial-monitor-if-yes
And write in Cyrillic?
https://www.dafont.com/sprite-coder.font You can check it has multinational glyphs, include it in your project and you should be good to go.
@osfersa @hdjweb Added new version of the code that has power switch on it.
Could you please add a full detailed wiring diagram too pls? I watched both of your videos too about the dot matrix projects but could not find anything on that mater. I cannot get ADC to be working i think i'm missing some wiring... Edit: For those who might learn it now like me. Set up ADC based on the reference below: https://arduino.stackexchange.com/questions/86958/can-arduino-show-the-power-drawn-from-its-output-pin-on-serial-monitor-if-yes
I have tried to get German & Spanish special characters, but no luck yet.
And write in Cyrillic?
https://www.dafont.com/sprite-coder.font You can check it has multinational glyphs, include it in your project and you should be good to go.
@osfersa @hdjweb Added new version of the code that has power switch on it.
Could you please add a full detailed wiring diagram too pls? I watched both of your videos too about the dot matrix projects but could not find anything on that mater. I cannot get ADC to be working i think i'm missing some wiring... Edit: For those who might learn it now like me. Set up ADC based on the reference below: https://arduino.stackexchange.com/questions/86958/can-arduino-show-the-power-drawn-from-its-output-pin-on-serial-monitor-if-yes
I have tried to get German & Spanish special characters, but no luck yet.
Sorry i dunno what to tell you man,
it is as simple as opening the font you desire to use copying the glyphs to your yaml to use like i did with baltic chars and symbols:
font:
- file: "Fraset-Display.ttf" #whatever, just make sure you use glyphs that are included in the font file itself unless you don't want to get blanks on your display... i opened the file using charmap app on windows, but any app should suffice that is capable of reading font files.
id: digit_font
size: 16
# Font Glyphs:
glyphs: |-
AÁBCDEÉFGHIÍJKLMNOÓÖŐPQRSTUÚÜŰVWXYZ aábcdeéfghiíjklmnoóöőpqrstuúüűvwxyz0123456789!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~¡¢£¤¥¦§¨©ª«¬®¯±´µ¶·¸º»¼½¾¿×÷ˆˇ˘˙˚˛˜˝–—‘’‚“”„†‡•…‰‹›⁄⁰¹²³⁴⁵⁶⁷⁸⁹⁽⁾₀₁₂₃₄₅₆₇₈₉₍₎€ℓ™Ω℮←↑→↓↖↗↘↙∂∆∏∑−∕∙√∞∫≈≠≤≥◊
note that the space between capital and lowercase letters is intentional, we do want our display to understand the space char too ya know ;)
Once you copied all you need, just complie, upload and presto ;)
for this project i used matrix chunky, and the whole glyphmap is:
ґҐўїіѕєѓђёяюэьыъщшчцхфутсрпонмлкйизжедгвбаЯЮЭЬЫЪЩШЧЦХФУТСРПОНМЛКЙИЗЖЕДГВБАЎЇІЅЄЃЂЁώύόϋϊωψχφυτσςρποξνμλκιθηζεδγβαίήέάΫΪΩΨΧΦΥΤΣΡΠΟΞΝΜΛΚΙΘΗΖΕΔΓΒΑΏΎΌΊΉΈ·ΆſžŽżŻźŹŸŷŶŵŴųŲűŰůŮŭŬūŪũŨŧŦťŤţŢšŠşŞŝŜśŚřŘŗŖŕŔœŒőŐŏŎōŌŋŊʼnňŇņŅńŃłŁŀĿľĽļĻĺĹĸķĶĵĴijIJıİįĮĭĬīĪĩĨħĦĥĤģĢġĠğĞĝĜěĚęĘėĖĕĔēĒđĐďĎčČċĊĉĈćĆąĄăĂāĀÿþýüûúùø÷öõôóòñðïîíìëêéèçæåäãâáàßÞÝÜÛÚÙØ×ÖÕÔÓÒÑÐÏÎÍÌËÊÉÈÇÆÅÄÃÂÁÀ¿¾½¼»º¹¸·¶µ´³²±°¯®¬«ª©¨§¦¥¤£¢¡~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!‐‑‒–—―•₡₢₣₤₥₦₩₪₫€₭₮₱₲₳₴₵₶₷₸₹₺₼₽₾₿⃀℃℉①②③④⑤⑥⑦⑧⑨⑩⓪□一丁丂七三上下九二五八公六十午四天星月期금목수오요월일전토화후¥