Giter Club home page Giter Club logo

Comments (4)

SV-Zanshin avatar SV-Zanshin commented on July 22, 2024

How are you calculating "Power"? Are you using "getBusMicroWatts()"?

from ina.

Oleg-Sob avatar Oleg-Sob commented on July 22, 2024

I output to Home Assistant with a script via EspHome.

i2c:
sda: D2
scl: D1

sensor:

  • platform: ina226
    address: 0x40
    shunt_resistance: 0.0005 ohm
    current:
    name: "INA226_1 Current"
    accuracy_decimals: 1
    power:
    name: "INA226_1 Power"
    accuracy_decimals: 0
    filters:
    • lambda: return x*2.047;
      bus_voltage:
      name: "INA226_1 Bus Voltage"
      filters:
    • lambda: return x*2.047;
      shunt_voltage:
      name: "INA226_1 Shunt Voltage"
      accuracy_decimals: 0
      filters:
    • lambda: return x*107800;
      max_current: 100A
      update_interval: 10s

It may be possible to correct the formula so that Power has a negative value.
I use with shunt 100A 75mV.

from ina.

SV-Zanshin avatar SV-Zanshin commented on July 22, 2024

I have never used Home Assist or EspHome so I'm not sure what that script does. How does it calculate power?

from ina.

SV-Zanshin avatar SV-Zanshin commented on July 22, 2024

I've updated the "getBusMicroWatts()" function to return negative Watts, but I don't know if that is the function you are using.

from ina.

Related Issues (20)

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.