esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
417 stars 26 forks source link

HX711 via I2C (m5stack) #2902

Open PineappleEmperor opened 4 weeks ago

PineappleEmperor commented 4 weeks ago

Describe the problem you have/What new integration you would like Support HX711 sensors via I2C.

Please describe your use case for this integration and alternatives you've tried: I currently use a lot of m5stack ESP32 gear, and would like to use the m5stack HX711 (along with other sensors) which uses I2C. At present, the HX711 sensor requires dout_pin and clk_pin. I've looked to see if I can directly use arduino code, but this is a messy workaround and I'd prefer to keep to native ESPHome if possible.

Additional context I'm new (and very amateur) with ESPHome, so if I'm missing something obvious please let me know!

Eyal51 commented 1 week ago

same here

HeathersZen commented 1 week ago

Bump. Just got this thing and am getting into making it work.

HeathersZen commented 1 week ago

FWIW, I managed to get the M5 Atom stack to return a value by following this video: https://www.youtube.com/watch?v=GlIS2HsSdWY

The only difference I can tell from my original attempt was that I flashed ESP Home to the device using the https://web.esphome.io/ website instead of the HAOS add-in.

I haven't calibrated it yet, so I may yet run into issues, but here's the YAML that is currently working. I haven't bothered to clean it up yet.

substitutions: name: esphome-web-a03858 friendly_name: Aeroponica-Scale1

esphome: name: ${name} friendly_name: ${friendly_name} min_version: 2024.6.0 name_add_mac_suffix: false project: name: esphome.web version: dev

esp32: board: esp32dev framework: type: arduino

Enable logging

logger:

Enable Home Assistant API

api:

Allow Over-The-Air updates

ota:

Allow provisioning Wi-Fi via serial

improv_serial:

wifi:

Set up a wifi access point

ap: {}

In combination with the ap this allows the user

to provision wifi credentials to the device via WiFi AP.

captive_portal:

dashboard_import: package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main import_full_config: true

Sets up Bluetooth LE (Only on ESP32) to allow the user

to provision wifi credentials to the device.

esp32_improv: authorizer: none

To have a "next url" for improv serial

web_server: port: 80

sensor:

Eyal51 commented 1 week ago

If that's working for you then you're not using a i2c device.

HeathersZen commented 1 week ago

I’m using the M5Stack unit. Perhaps it isn’t the one OP is referring to.Scale Kit with Weight Unitshop.m5stack.comOn Oct 19, 2024, at 9:09 AM, Eyal51 @.***> wrote: If that's working for you then you're not using a i2c device.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

ScottG489 commented 6 days ago

I believe we're referring to this one: https://shop.m5stack.com/products/mini-scales-unit-hx711

From chatting with the devs, this would require code changes to ESPHome.

PineappleEmperor commented 6 days ago

I believe we're referring to this one:

https://shop.m5stack.com/products/mini-scales-unit-hx711

From chatting with the devs, this would require code changes to ESPHome.

Yeah that's the one I was referring to. I had assumed the hx711 component would need changing, but similar to other components that can be used with I2C OR direct pins?