ESPHome on SHA2017 Badge: Difference between revisions

From NURDspace
No edit summary
(3 intermediate revisions by the same user not shown)
Line 11: Line 11:
= How to install =
= How to install =
I am assuming some familiarity with ESPHome at this point. If not, check the guides on the ESPHome site: https://esphome.io/guides/getting_started_command_line.html or https://esphome.io/guides/getting_started_hassio.html
I am assuming some familiarity with ESPHome at this point. If not, check the guides on the ESPHome site: https://esphome.io/guides/getting_started_command_line.html or https://esphome.io/guides/getting_started_hassio.html
* Compile firmware using a yaml config file suited for your needs (a working one can be found [https://gist.github.com/Nizzle/6971c2cc066e6412740487bcc3b2c62a/ here]).
* Create a yaml config file suited for your needs (a working base can be found [https://gist.github.com/Nizzle/6971c2cc066e6412740487bcc3b2c62a/ here]).
* Upload it to the badge through USB (I used [https://github.com/esphome/esphome-flasher esphome-flasher] since I got errors trying uploading with esphome cli and I am too stupid to use [https://github.com/espressif/esptool esptool] :p).
* Run <pre>esphome yourconfig.yaml run</pre>
If you enabled wifi and OTA and everything went well, you can program it wirelessly next time.
 
It shoud compile and upload your firmware to the badge over USB. If you enabled wifi and OTA and everything went well, you can program it wirelessly next time.
(First time I used [https://github.com/esphome/esphome-flasher esphome-flasher] since I got errors trying uploading with esphome cli and I am too stupid to use [https://github.com/espressif/esptool esptool] :p, but coming from the latest MicroPython esphome upload seemed fine, so I might have done something wrong the first time).


= Stuff that is working =
= Stuff that is working =
Line 20: Line 22:
* Button marked ''flash'' on the back
* Button marked ''flash'' on the back
= Todo =
= Todo =
* Support for the E-Ink screen.
== DKE Group DEPG0290B1 E-Ink screen ==
Unfortunately the screen is not supported in ESPHome. There is a [https://esphome.io/components/display/waveshare_epaper.html Waveshare E-Paper Display Component], but it looks like this does not work with our screen. Maybe we can use this as a base for our own component.  
Unfortunately the screen is not supported in ESPHome. There is a [https://esphome.io/components/display/waveshare_epaper.html Waveshare E-Paper Display Component], but it looks like this does not work with our screen. Maybe we can use this as a base for our own component.
== RGB(W) LEDs ==
This proved harder than expected.
* We need to enable a pin on the MPR121 to power the LEDs, no easy way to do this through [https://esphome.io/components/binary_sensor/mpr121.html MPR121]
* GPIO8 cannot be used because ESPHome build complains this pin is (possibly) being used for the SPI flash
 
= Links =
= Links =
* [https://raw.githubusercontent.com/SHA2017-badge/PCB/master/sha2017_rev1_0_0_schematic.pdf schematics for the badge]
* [https://raw.githubusercontent.com/SHA2017-badge/PCB/master/sha2017_rev1_0_0_schematic.pdf schematics for the badge]
* [https://docs.badge.team/badges/sha2017/hardware/ Badge.team hardware docs]

Revision as of 20:02, 14 October 2020

ESPHome on SHA2017 Badge
NoPicture.png
Participants Dennis
Skills ESP32
Status In progress
Niche Other
Purpose Use for infra
Tool No
Location
Cost
Tool category

ESPHome on SHA2017 Badge Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:No | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:No | [[Tool Cost::{{{Cost}}} | }}

What

The SHA2017 Badge is an awesome piece of hardware based on a ESP32 and an e-ink screen. It can run Micropython and a ton of apps for that are available @ the Hatchery. While I was thinking about writing an app for controlling Home Assistant, I realized that ESPHome would be very suited for that. So here are some pointers to running ESPHome on the SHA2017 Badge.

How to install

I am assuming some familiarity with ESPHome at this point. If not, check the guides on the ESPHome site: https://esphome.io/guides/getting_started_command_line.html or https://esphome.io/guides/getting_started_hassio.html

  • Create a yaml config file suited for your needs (a working base can be found here).
  • Run
    esphome yourconfig.yaml run

It shoud compile and upload your firmware to the badge over USB. If you enabled wifi and OTA and everything went well, you can program it wirelessly next time. (First time I used esphome-flasher since I got errors trying uploading with esphome cli and I am too stupid to use esptool :p, but coming from the latest MicroPython esphome upload seemed fine, so I might have done something wrong the first time).

Stuff that is working

  • Touch pads (through MPR121)
  • USB and battery voltage readings (not verified but they seem sane)
  • Button marked flash on the back

Todo

DKE Group DEPG0290B1 E-Ink screen

Unfortunately the screen is not supported in ESPHome. There is a Waveshare E-Paper Display Component, but it looks like this does not work with our screen. Maybe we can use this as a base for our own component.

RGB(W) LEDs

This proved harder than expected.

  • We need to enable a pin on the MPR121 to power the LEDs, no easy way to do this through MPR121
  • GPIO8 cannot be used because ESPHome build complains this pin is (possibly) being used for the SPI flash

Links