Giter Site home page Giter Site logo

esphome-m5stickc's Introduction

NOTE: A st7735 screen component is now part of esphome and a more complete axp192 component can be found here : https://gitlab.com/geiseri/esphome_extras.git

https://gitlab.com/geiseri/esphome_extras/-/tree/main/components/axp192


Additional components to use esphome with a M5StickC.
Mostly a work in progress.
Copy the components to a custom_components directory next to your .yaml configuration file.

  • axp192 : power management - configuration hard coded for the M5StickC - should be made more generic. Must be present to initialize the screen power.
    Can be also used to read some of the power info - most sensors aren't published yet.
    Mostly the AXP192 from M5Stack sample code adapted for esphome.
  • st7735 : TFT screen - configuration hard coded for the M5StickC - should be made more generic.
    Adapted from https://github.com/musk95/esphome-1/tree/dev/esphome/components/st7789v + M5StickC sample code for the init

esphome-m5stickc's People

Contributors

abmantis avatar airy10 avatar apolselli avatar geiseri avatar gonzalop avatar shish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-m5stickc's Issues

esp-idf support?

I am using a fork of your repository - https://github.com/martydingo/esphome-axp192 - to enable my M5Stack Core2. As soon as I attempted to move from an arduino to the esp-idf framework required by voice_assistant, I got an error about ESP.h (no detail) related to the axp192 component.

Can your component be used with esp-idf? I believe ESPHome is working towards a permanent move to that framework so it is only a matter of time before this will be come a big problem :(

Cannot upload the sample code

Hi.
First of all, thank you!!! :)

I'm trying to upload the sample code on my m5stick but I get this error:

...
Serial port COM15
Connecting....
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Coding Scheme None
MAC: d8:a0:1d:56:bc:80
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...

A fatal error occurred: Timed out waiting for packet header
*** [upload] Error 2
========================= [FAILED] Took 16.00 seconds =========================

On the stick there is a sample code uploaded with che arduino IDE and it's working.

Any suggestion?

Thank you!
Giuseppe

problems on installation on home assistant

Hello,

I'm trying to follow the steps on this github, however facing some issues
I have a M5Stick-C model and want to try to connect this with some old probes installed on my bathrooms and allow me to view each one a has leak alarms. but first would like to try this steps.

As you can see on the image, at the end it fails. can someone give some shadow to achieve this? I'm a bit new with ESPs and M5Stack

Screen Shot 2022-05-08 at 20 46 48
Screen Shot 2022-05-08 at 20 48 27

display stays black

I tried using exactly the sample YAML file, verbatim except for:

  • changing to a font file that I already had in my environment
  • removing references to the axp192 (different problem :-( )

So far, I can get nothing to appear on the screen. I even simplified the display lambda down to just a constant string, but still nothing. Logging and blinky lights show that button presses are working as expected. I am using the latest esphome (1.14.5).

Is it possible that something has changed in esphome in the last couple of months to throw a wrench into this?
My m5stick-c is recently purchased. Could there be a hardware change that causes the problem? (The demo program that came on the m5stick-c worked fine until I flashed over it.)

I'm just starting to troubleshoot this, so I'm wondering if someone has hit this already and knows the simple answer.

version of espHome

It is worth noting the required version of espHome is 1.16.2 due to the color.to_rgb_565 requirement.
Both dev and latest have this removed.

Display stays off after power cycle

After flashing esphome with your AXP component the display stays on while the m5stick has power. After the first powerdown and bootup it stays off though. Is it possible that I'm missing a switch or output that isn't in the sample-config which is necessary to turn the backlight on?

Error compiling st775

Hi,
I'm trying to upload your sample yaml to a M5StickC from HA ESPHome integration, but is giving me an error on compile time with st7735.h.
Here's a log of a compilation

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core-esp32.html
PLATFORM: Espressif 32 > M5Stack Core ESP32
HARDWARE: ESP32 240MHz 320KB RAM (4MB Flash)
DEBUG: CURRENT(esp-prog) EXTERNAL(esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- 1.0.3
|-- 1.0
| |-- 1.0
|-- 1.0
|-- 1.0.1
|-- 1.0
|-- 1.0
Compiling /data/m5stick1/.pioenvs/m5stick1/src/esphome/components/st7735/st7735.cpp.o
Compiling /data/m5stick1/.pioenvs/m5stick1/src/esphome/core/controller.cpp.o
Compiling /data/m5stick1/.pioenvs/m5stick1/src/esphome/core/esphal.cpp.o
Compiling /data/m5stick1/.pioenvs/m5stick1/src/esphome/core/log.cpp.o
In file included from src/esphome/components/st7735/st7735.cpp:1:0:
src/esphome/components/st7735/st7735.h:109:39: error: expected template-name before '<' token
public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_HIGH, spi::CLOCK_PHASE_TRAILING,
^
src/esphome/components/st7735/st7735.h:109:39: error: expected '{' before '<' token
src/esphome/components/st7735/st7735.h:109:39: error: expected unqualified-id before '<' token
src/esphome/components/st7735/st7735.cpp:355:1: error: expected '}' at end of input
} // namespace esphome
^
src/esphome/components/st7735/st7735.cpp:355:1: error: expected '}' at end of input
*** [/data/m5stick1/.pioenvs/m5stick1/src/esphome/components/st7735/st7735.cpp.o] Error 1

I'll check tomorrow to build it using the esphome-cli
Thank you for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.