Skip to content

Pionizer/pionizer-axp192

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pionizer AXP192 Component

AXP192 power management library for ESPHome adopted for a custom ESPHome library for AI and related edge devices.

Installation

Copy the components to a custom_components directory next to your .yaml configuration file, or include directly from this repository.

Configuration

Sample configurations are found in the /sample-config folder.

This component adds a new model configuration to the AXP192 sensor which determines which registers are needed for each device. Available models are model: m5core2, model: m5stickc and model: m5tough.

Include axp192 component

external_components:
  - source: github://pionizer/pionizer-axp192
    components: [axp192]

M5Stick-C

sensor:
  - platform: axp192
    model: m5stickc
    id: power_mgmt
    address: 0x34
    i2c_id: i2c_bus
    update_interval: 60s
    brightness: 100%
    battery_level:
      name: ${device} Battery Level
      id: batterylevel

M5Stack Core2

sensor:
  - platform: axp192
    model: m5core2
    id: power_mgmt
    address: 0x34
    i2c_id: i2c_bus
    update_interval: 60s
    brightness: 100%
    battery_level:
      name: ${device} Battery Level
      id: batterylevel

M5Tough

sensor:
  - platform: axp192
    model: m5tough
    id: power_mgmt
    address: 0x34
    i2c_id: i2c_bus
    update_interval: 60s
    brightness: 100%
    battery_level:
      name: ${device} Battery Level
      id: batterylevel

The display component required for the M5Tough is as follows:

display:
  - platform: ili9341
    # 320x240
    model: M5STACK
    cs_pin: GPIO5
    dc_pin: GPIO15
    lambda: |-
      it.print(160, 0, id(title_font), id(color_white), TextAlign::TOP_CENTER, "Hello World");

Credits and Disclaimers

This library is built on prior work published by @M5Stack as well as individual contributors like @airy10, @apolselli, @abmantis, @geiseri, @martydingo, @gonzalop, @shish, @cmet7, @JensGuckenbiehl, @leoedin, @rolloo, @paulchilton amongst others.

License

The original work by @M5STack that most or all of this is based on was originally licensed under MIT License. However, the various Github projects failed to specify the proper license and given this is currently an active fork of several of these repos, the license cannot be set at the repo level. Anyone leveraging this work should consider this to be derived work from the original MIT licensed code.

TODO

  • Additional contributions from @JensGuckenbiehl and @rolloo to review and merge into this code base

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.5%
  • Python 6.5%