Giter Club home page Giter Club logo

ute_homeassistant_integration's Introduction

UTE (Administraci贸n Nacional de Usinas y Trasmisiones El茅ctricas) for Home Assistant 馃嚭馃嚲

THIS PROJECT NO LONGER WORKS

UTE has deprecated the API that this integration relied on. The only way to make it work again is to do another reverse engineering to the new UTE app.

I already sent a PR to remove it from the HACS repos. When the PR is merged, I'll archive this repository.

License hacs_badge

UTE

What is UTE?

From Wikipedia

The National Administration of Power Plants and Electrical Transmissions (Spanish: Administraci贸n Nacional de Usinas y Trasmisiones El茅ctricas), better known as UTE, is Uruguay's government-owned power company. It was established in 1912, following approval of Law 4273 establishing it as a monopoly.

This is an integration to get UTE power information in HomeAssistant.

Installation via HACS

You need to have HACS installed.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  • Search for ute in HACS.
  • Click Install on the UTE Uruguay integration.
  • Restart the Home Assistant.

Configuration

Add the following to your configuration.yaml:

sensor:
  - platform: ute
    email: [email protected]
    phone_number: 598123456
    power_factor: 0.5 # Optional, must be a float between 0 and 1
  - platform: integration
    source: sensor.ute_current_power_usage
    name: Home energy spent
    unit_prefix: k
    round: 2
    method: left

And restart Home Assistant.

Contributing

Contributions are welcome! If you find a bug or have a suggestion, please create an issue or submit Pull Request on Github.

License

This project is licensed under the GNU General Public License, version 3.0. For more details, see LICENSE.


This project is not affiliated with UTE (Administraci贸n Nacional de Usinas y Trasmisiones El茅ctricas) or its affiliates.

ute_homeassistant_integration's People

Contributors

rogsme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mauromp1

ute_homeassistant_integration's Issues

No funciona

Y como se supone que lea el consumo si no tiene dato alguno, ni de cuenta UTE
Entonces ??

Possible capping of API calls

This morning I tried to check the energy consumption and to my surprise the integration (not this one, but it will probably affect it as well) wasn't working, I tried to reload it and still it was not working so i checked the logs and found this:

  • ('Send reading request return status: 429, reason: Too Many Requests, content: API calls quota exceeded! maximum admitted 10 per 1d.',)
  • ('Send reading request return status: 429, reason: Too Many Requests, content: API calls quota exceeded! maximum admitted 2 per 5m.',)
  • ('Login return status: 429, reason: Too Many Requests, content: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>429 Too Many Requests</title>\n</head><body>\n<h1>Too Many Requests</h1>\n<p>The user has sent too many requests\nin a given amount of time.</p>\n</body></html>\n',)

Apparently now there is a limit of 2 calls per 5 minutes and 10 calls per day or at least thats what the error says, so this potentially breaks the integration.

UnboundLocalError: cannot access local variable 'v2' where it is not associated with a value

Hola Roger.
Perd贸n pero es mi primera vez aportando 'errores' .
Quiz谩s estoy haciendo algo mal durante la instalaci贸n.
Esto me devuelve el log de HA.

##############################################

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:575
Integration: Sensor (documentation, issues)
First occurred: 17:50:04 (1 occurrences)
Last logged: 17:50:04

ute: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, 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/ute/sensor.py", line 87, in update
ute_data = self.client.get_current_usage_info()["data"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ute_wrapper/ute.py", line 305, in get_current_usage_info
power_in_watts = self._convert_triphasic_powers_to_power_in_watts(readings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ute_wrapper/ute.py", line 267, in _convert_triphasic_powers_to_power_in_watts
power_2_in_watts = v2 * i2 * power_factor
^^
UnboundLocalError: cannot access local variable 'v2' where it is not associated with a value

image

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.