Giter VIP home page Giter VIP logo

auroraplusha's Introduction

buy me a coffee hacs_badge Maintenance

Aurora+ for Home Assistant

The Aurora+ integration adds support for retriving data from the Aurora+ API such as:

  • EstimatedBalance - This is shown in the Aurora+ app as 'Balance'
  • UsageDaysRemaining - This is shown in the Aurora+ app as 'Days Prepaid'
  • AverageDailyUsage
  • AmountOwed
  • ActualBalance
  • UnbilledAmount
  • BillTotalAmount
  • NumberOfUnpaidBills
  • BillOverDueAmount

Note: To use the Aurora+ integration you need a valid account with Aurora.

Configuration

Using YAML: add auroraplus platform to your sensor configuration in configuration.yaml. Example:

# Example configuration.yaml entry
sensor:
  - platform: auroraplus
    name: "Power Sensor"
    username: [email protected]
    password: Password
    scan_interval:
      hours: 2
    rounding: 1

Note: Name, scan_interval and rounding are optional. If scan_interval is not set a default value of 1 hours will be used. If rounding is not set a default value of 2 will be used. Most Aurora+ data is updated daily.

auroraplusha's People

Contributors

leighcurran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auroraplusha's Issues

Installed Auroraplus sucessfully via HACS but will not install as an integration

I have an Aurora+ account and was stoked when I found your integration however I Installed Auroraplus sucessfully via HACS but will not install as an integration in my Home assistant - error logs are below:

Logger: homeassistant.components.sensor
Source: custom_components/auroraplus/sensor.py:122
Integration: Sensor (documentation, issues)
First occurred: August 20, 2021, 11:36:23 PM (2 occurrences)
Last logged: August 20, 2021, 11:36:23 PM

auroraplus: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 646, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/auroraplus/sensor.py", line 122, in update
self._session.getsummary()
File "/usr/local/lib/python3.9/site-packages/auroraplus/init.py", line 78, in getsummary
summarydata = self.request("day")
File "/usr/local/lib/python3.9/site-packages/auroraplus/init.py", line 69, in request
request = self.session.get(self.url + '/usage/' + timespan +'?serviceAgreementID=' + self.serviceAgreementID + '&customerId=' + self.customerId + '&index=-1', headers={'Authorization': self.token})
AttributeError: 'api' object has no attribute 'serviceAgreementID'

AuroraPlus module

Hey @LeighCurran, thanks for this integration I was about to write my own and found this. It's a great start for what I'm wanting to achieve.

I can't see your AuroraPlus python module, is it a private repo or has it been taken down?

Incorrect summary data

I have installed AuroraPlusHA via HACS and, for all intent and purposes, the connection seems functional, and I'm getting some data out.

I am not certain the data makes sense, though, as it doesn't quite line up with what I get in Aurora+:

  • consumption and feed in only appear once a day, seemingly for the full amount
  • those full amounts don't match what the dashboard shows.

Screenshot from 2023-05-28 12-58-34
Screenshot from 2023-05-28 12-55-53

Out of curiosity, I also checked the usage in HA for the next day, in case the daily reports are aggregates of the previous day, but that doesn't seem to be the case either.

Screenshot from 2023-05-28 12-58-41

Is it possible to get hourly usage+feed-in data?

Playing around with https://pypi.org/project/auroraplus/ and my account, I see a number of weird things, such as

  • 'HasSolarTariff': False,
  • 'KilowattHourUsage': None,
    so I suspect there might be something weird in my Aurora+ account setup, rather than with the HA integration.

I'm not sure where to look next to try to fix that. Would you have any suggestions?

Unable to retrieve data

Seems like now that aurora is enforcing MFA (according to a recent email) - this no longer is able to retrieve the information.

I suspect this would sadly be the end of this integration unless there has also been a change to the API

Data from specific dates in auroraplus?

HI @LeighCurran - I'm trying to use your auroraplus module to pull data from specific dates in the aurora+ history. Can you advise how I should modify the call to requests to do something like get the data for 05/01/2023? (or if not, do you have any recommendations for a tool I can use to intercept the REST api calls so that I can figure it out myself?)

Thanks,

BT

Errors

Hi there

Does this still work? We recently signed up for Aurora+ and would love to integrate it into HA.

I have followed the instructions and am getting these errors. Does anyone have any suggestions on what I have done wrong?

auroraplus: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 570, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/auroraplus/sensor.py", line 161, in update
self._state = round(float(self._session.EstimatedBalance),self._rounding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'api' object has no attribute 'EstimatedBalance'

auroraplus: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 570, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/auroraplus/sensor.py", line 154, in update
self._session.getsummary()
File "/usr/local/lib/python3.11/site-packages/auroraplus/init.py", line 61, in getsummary
summarydata = self.request("day")
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/auroraplus/init.py", line 52, in request
request = self.session.get(self.url + '/usage/' + timespan +'?serviceAgreementID=' + self.serviceAgreementID + '&customerId=' + self.customerId + '&index=-1', headers={'Authorization': self.token})
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'api' object has no attribute 'serviceAgreementID'

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.