Giter Site home page Giter Site logo

mateogreil / homeassistant-comwatt Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 3.0 92 KB

Comwatt Integration for HomeAssistant

Python 100.00%
automation comwatt custom-component home-assistant home-assistant-custom-component home-assistant-integration home-automation homeassistant homeassistant-custom-component homeassistant-integration homeautomation energy energy-management energy-monitoring smart-grid

homeassistant-comwatt's Introduction

GitHub Release GitHub Activity License hacs BuyMeCoffee

Comwatt Integration for Home Assistant

Control your Comwatt energy monitoring system via the Comwatt API with Home Assistant. Currently, this integration work only for comwatt gen 4 (and probably more, but not tested yet). If you use energy.comwatt.com, it will probably work. If you use go.comwatt.com or any other, it will not work yet (#7).

Installation

  1. Install this integration using HACS by adding this repository or manually copy the files to your Home Assistant installation.
  2. Restart Home Assistant to load the integration.

Configuration

After installation, search and add component Comwatt in Home Assistant integrations page.

Or click Configuration

Usage

Once the integration is set up and configured, you will have access to sensors representing energy consumption and power consumption from your Comwatt devices. These entities can be added to your Home Assistant dashboard for monitoring and automation purposes.

Features

This integration can handle :

  • Power consumption of device
  • Energy consumption of device
  • Power consumption of network in/out
  • Energy consumption of network in/out
  • Switch capacity of device

Contributions

Contributions and feedback are welcome! If you encounter any issues, have suggestions for improvement, or would like to contribute new features, please open an issue or submit a pull request on the GitHub repository.

If you find this integration useful, consider supporting the development by adding a star !

homeassistant-comwatt's People

Contributors

mateogreil avatar maxencechx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

homeassistant-comwatt's Issues

Aucun appareil ou entité malgré connexion (gen 4)

Bonjour,

(je suis novice sur GitHub donc désolé si je n'ai pas les codes usuels par ici).
J'ai réussi tant bien que mal à installer manuellement Comwatt sur mon Home Assistant.

J'ai une box Comwatt gen 4, la connexion a bien été établie, tout fonctionne sur le site de Comwatt et pourtant, sur Home Assistant, aucun appareil ni entité ne sont remontés donc l'interconnexion n'apporte rien en l'état.
Est-ce lié au fait que le module n'est plus fonctionnel ou un soucis de paramétrage chez moi ?

Merci par avance.
Cordialement

Capture_d’écran_2024-02-14_à_09_09_47

Enhancement Request - Additional Device Control Modes for Comwatt Integration

Comwatt currently provides two switches to enable or disable devices. The first switch toggles between the "planning" and "manual" modes. In "planning" mode, Comwatt autonomously manages the activation and deactivation of the device based on a predefined schedule created on their interface. The "manual" mode allows users to manually control the device, overriding Comwatt's automatic management.

The second switch controls the "on/off" mode, and it can only be modified when the integration is set to "manual" mode.

Add internal switch from comwatt

Can you add the internal switch from Comwatt ? There are two internal relays inside the comwatt.
I have juste updated your last version and I can see and manage the Wifi relay, But I can't see the internal relay.

Thanks by adance
Fred

No switch for "remote module"

When I use electric plugs, there are three entities : Power, Total Power and the switch.
But when I add a remote module (with same functionnalities in ComWatt app) only Power and Total Power are available.

I hope the module and the plug use the same protocol and that you can fixe this quickly...

Thanks for your help and work.

No data from Comwatt

Hello Mathéo,
Since midday, connections to Comwatt data are no longer working. All power or volume information entities are in "unknown" status.

THANKS

Problème de connexion (version anterieure a gen4)

Bonjour

Je pense être sur une version antérieure à la Gen4 du coup mes codes d'accès ne fonctionnent pas.Je me connecte avec mail et mdp.
Capture d'écran 2023-12-16 123054
Je vous mets l'image de l'appli que j'utilise.
Capture d'écran 2023-12-16 123636

Cordialement
Franck

Enhancement request - import old data

Bonjour,

Est ce qu'il serait possible de pouvoir récupérer toutes les données disponibles sur le site de comwat, car dans mon dashboard Energy j'ai seulement les données à partir du jour ou j'ai intégré comwatt à HA.

Merci d'avance.

Optimize API Client Handling for Multiple Sensors

Description

Currently, the API client for Comwatt is stored directly within each sensor. However, this approach leads to a large number of clients in the application when a disconnection occurs, as each sensor needs a new client instance.

Issue Details

Challenge: The current implementation results in a high number of clients, which is not optimal for resource management.

Suggested Solution: Following the Home Assistant best practices here, consider storing a single API client in the Home Assistant data instead of within each sensor. This will lead to a more efficient use of resources.

Remonter vers la console

Bonjour Mathéo,
Merci encore pour l’évolution en 0.2.1, cela fonctionne vraiment très bien, j’ai pu prendre la main sur tous les composants ComWatt et définir mes propres algorithmes.

Par contre ces composants sont tous limités à 16A et je voulais absolument avoir un compteur de consommation pour la voiture, j’ai donc utilisé un switch de marque Tongon (vu par HA comme un TUYA SY2 WiFi switch with metering ).

Penses tu possibles de remonter les informations (état du switch, consomation / 24h …) de ce switch dans la console Comwatt ?

Bonne journée

Resolve Hour Offset Issue in ComwattEnergySensor

Description

Currently, the ComwattEnergySensor is updated with the current date, but the data retrieved from the API corresponds to the previous hour. This results in a one-hour offset in Home Assistant.

Issue Details

Problem Description: The current implementation causes a time misalignment between the sensor update time and the actual data retrieved from the API.

Suggested Solution: To address this issue and ensure accurate time synchronization, it is recommended to utilize the DataUpdateCoordinator as described in the Home Assistant documentation here.

Make site data available

Is your feature request related to a problem? Please describe.
I like very much the auto production rate gauge displayed on the comwatt site homepage and I would like to be able to have the same in home-assistant.

Describe the solution you'd like
To compute the rate, looking at the website requests, it retrieves the site data using site-networks-ts for the last 6 minutes (start=now-6minutes, end=now). Then it uses the productions and consumptions measures to compute the rate (basically it does sum(productions)/sum(consumptions))

So I played a bit with your comwatt client and could compute the same value as displayed on the website with:

site_data = client.get_site_networks_ts_time_ago(siteId)
# Using only the 3 first measures (last 6 minutes)
production = sum(site_data['productions'][:3])
consumption = sum(site_data['consumptions'][:3])
auto_production_rate = production / consumption
print(f'Auto production rate: {auto_production_rate * 100:.0f}%')

I not familiar with the home-assistant integrations api but maybe this Comwatt integration could setup some kind of "site device" for each user site with sensors for each provided data (productions, consumptions, injections, withdrawals, etc). Not sure if it should also provide the computed value or if it should be computed by users in their home-assistant. I'm willing to help and contribute with some guidance 😃.

Can't install Comwatt integration

Good morning,

First of all, thank you very much for developing this integration and for assisting with the issues. Unfortunately, I can't seem to install it.

Once I add the repository to HACS, when I try to install it, I get this message in Home Assistant:

Error
This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you are running the latest version of Home Assistant.

I've tried it several times, restarting HA and nothing. My HA is fully updated (maybe that's the problem?). I don't know if I'm doing something wrong, but I can't get it to work. If it's my fault for doing something wrong, I apologize; I'm new to Home Assistant and maybe I need to do something that I don't know.

In any case, thank you very much for the help.

Adjust Update Frequency for ComwattEnergySensor

Description:

Currently, the ComwattEnergySensor is being updated every two minutes, which is not necessary since the data from the Comwatt API is only refreshed once per hour. To optimize resource usage and reduce unnecessary calls, it is recommended to adjust the update frequency to once per hour.

Suggested Solution:

Utilize the DataUpdateCoordinator to implement polling at an hourly interval, as suggested in the Home Assistant documentation here.

Remove old devices

Describe the bug
Old devices, that are removed from comwatt, are still available on HomeAssistant.

Expected behavior
These devices should be removed from HomeAssistant.

No data from Comwatt, again

Good morning,
I use the entities echange_reseau_soutirage_injection_soutirage_power and echange_reseau_soutirage_injection_injection_power to define the operation of my automation. These entities are updated in principle every 2 minutes.
Several times a day without being able to define why the updates are blocked, 5 hours yesterday afternoon, 3 hours this morning...

When this happens, the sensor consumption updates are also frozen.

If I restart HA then the sensor values becomme "unknown"

Good day

:bug: Device child not containing id

Hello, I had this add on running and working perfectly (thank you btw!) but as of 01/01/2024, there is no entities showing up anymore. I tried reinstalling both HACS and the comwatt add-on without success. Coincidentally, I called up the Comwatt SAV because my G4 box had problems connecting to the cloud for a couple of days after 01/01/2024 and the Comwatt SAV monsieur said that they had been doing some MAJs. So Just wanted to check if I am the only one currently having issues or if it is a general thing? Cheers guys keep up the good work!

Mise à jours switch

Comment et quand se fait la mise à jours du statut des switches dans HA ? Par exemple dans Comwatt le switch interne 1 est sur ON ( à partir de 8h par le calendrier de comwatt (pour le moment)) mais dans HA le statut est OFF

Merci

Impossibility of choosing the solar panel production sensor for the Energy board

Hello and thanks a lot for this addon!

I don't seem to be able to indicate the right sensor for my solar production, which I think should be this one [sensor.solaire_en_autoproduction_power] but which has a POWER class and not ENERGY (to view it in the "Energy distribution" graph).

image

image

I only have these choices, but they don't seem to be the right ones?
image

Would I need another version of [sensor.solaire_en_autoproduction_power] as well, but with an "energy" class?

Thanks

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.