Code Monkey home page Code Monkey logo

iotawattpy's People

Contributors

agners avatar cgarwood avatar gtdiehl avatar jyavenard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iotawattpy's Issues

Tag the source

Could you please tag the source? This allows distributions to get the complete source from GitHub.

Thanks

AttributeError: 'NoneType' object has no attribute 'text'

I installed and try to run iotawatt HACS custom component for Home Assistant and I'm running into the following issue. @gtdiehl asked me on the issue on the other repo to open the issue here too:

Logger: custom_components.iotawatt
Source: custom_components/iotawatt/init.py:106
Integration: iotawatt
First occurred: August 2, 2021, 10:48:17 PM (2400 occurrences)
Last logged: 6:52:41 PM
Unexpected error fetching IoTaWatt data: 'NoneType' object has no attribute 'text'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/iotawatt/__init__.py", line 106, in _async_update_data
    await self.api.update()
  File "/usr/local/lib/python3.9/site-packages/iotawattpy/iotawatt.py", line 67, in update
    await self._createSensors()
  File "/usr/local/lib/python3.9/site-packages/iotawattpy/iotawatt.py", line 81, in _createSensors
    results = response.text
AttributeError: 'NoneType' object has no attribute 'text'

Trouble pulling "solar surplus" in kwh

Pardon the double-post... i'm not sure if this is an API issue or with the integration. i'm having a terrible time getting a "Solar Surplus" output showing up in HA.

Basically HA seems to want a "return to grid" sensor rather than just looking at negative grid_total values (which would make more sense to me, but whatever). So i created an output called "Solar_Surplus" that looks like this:

Watts = 0 max (-1 x (Main_1 + Main_2))

(alternately, also tried this:)

Watts = 0 max (0 - main_1 - main_2)

The wattage sensor works just fine, but I get 0 kwh for the _kw version. It also appears to never refresh until an HA restart.

FYI, my Grid_Consumed output works just fine, with

Watts = 0 max (Main_1 + Main_2)

Any suggestions? On the Iotawatt itself using the Graph+ UI, i can see these guys no problem in WH over a year, month etc.

Remove total sensors

I found my way here after having trouble setting up IotaWatt in Home Assistant. After a lot of reading, I've come to the conclusion that the Accumulated sensors in Home Assistant should never be used. They cause wildly inaccurate data in the HA energy dashboard. According to Bob, IotaWatt's integration feature makes this obsolete because:

  • Integrators use 5 second granularity, much better than anything that can be done in Home Assistant
  • These queries put excessive/unnecessary load on the IotaWatt

The Accumulated sensors in HA are known here as _total. So I suggest removing all these _total sensors, essentially reverting 4262ab2. If there is no dissent, I'll work on a PR for this and also for the HA integration.

need help?

I have iotawatt and HASS, am a Debian developer, and have some experience with Python, maintenance, releases (check @yarikoptic and projects keen to my heart)... I would be happy to help if at least to keep project in non-abandoned shape. If you agree for help - please add me as a collaborator on this repo and pypi (I am yarikoptic there as well).

Cheers

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.