Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15.04k stars 3.25k forks source link

Usermod INA219 Current, Voltage & Power Sensor #4237

Open KrX3D opened 3 weeks ago

KrX3D commented 3 weeks ago

Hi,

i created a usermod for the ina219 Current, Voltage & Power Sensor:

INA219-Pin-Outs

I took a liking to the INA226 Usermod here:

https://github.com/Aircoookie/WLED/tree/0_15/usermods/INA226_v2

and took some parts and added my 3 cents to it.

I hope the readme states everything needed to get what can be done.

the only think i couldnt solved is to add the sensors data to the wled home assistant integration page (if thats even possible) so instead it is added just to mqtt. if there is a way to have the autodiscover to add it directly to the wled integrations page, i would be more than happy to change the usermod.

also i hope i added everything correctly in git, since its my first time working like this in git

DedeHai commented 3 weeks ago

since you keep adding commits, is this work in progress? if so, mark it as such or better yet: commit to this PR once you are finished.

KrX3D commented 2 weeks ago

since you keep adding commits, is this work in progress? if so, mark it as such or better yet: commit to this PR once you are finished.

Hi,

no its finsied. I just did some small formatting changes while waiting for a reply. But now im happy with it ;)

EDIT: im also using it for like 2 weeks now without any problems

DedeHai commented 2 weeks ago

ok nice. did you test it working on different ESPs?

KrX3D commented 2 weeks ago

i tested it on an ESP32 S2 (lolin_s2_mini) and an C3 (esp32c3dev) where it is working.

like i said its already running for around 2 weeks

KrX3D commented 1 week ago

Hi,

i tested it now also with an ESp32 Wroom-32 (esp32dev) and it also worked.

did i forget something so it will be added to version 0,15? im new to git with all this pull request stuff

DedeHai commented 1 week ago

looks fine, needs more testing and review, there are a few usermods in pipeline so please be patient.