Home Assistant Hilo Integration via HACS

Overview

hacs_badge Total alerts Language grade: Python

BETA This is a beta release. There will be some bugs, issues, etc. Please bear with us and open issues in the repo.

Hilo

Hilo integration for Home Assistant

Introduction

This is a custom component to allow control of Hilo devices from Home Assistant. This is an unofficial integration and unsupported by Hilo.

We are not employees of, or paid by, Hilo. We can't be held responsible if your account is getting suspended because of the use of this integration. Hilo might change their API any time and this might break this integration.

Shout out

Big shout out to Francis Poisson who's the original author of this integration. Without the work he put into this integration, I would probably have never even considered Hilo.

I decided to move the integration here because of the latest updates from Hilo broke the original one and I took the time to completely rewrite it. Hilo is now pushing device readings via websocket from SignalR.

Features

  • Support for switches and dimmers as light devices
  • Get current and set target temperature of thermostat
  • Get energy usage of pretty much each devices
  • Generates energy meters and sensors
  • Sensor for Hilo Events (challenges)
  • Sensor for Hilo Gateway
  • NEW: Now configuration is done via the UI
  • NEW: Updates are now closer to realtime

To Do:

  • Add functionalities for other devices
  • unit and functional tests
  • Adding type hints to the code
  • Write a separate library for the hilo api mapping Now available here
  • Translate everything in French #tokebakissite

Installation

Manual

Copy the custom_components/hilo directory from the latest release to your custom_components directory.

HACS

Follow standard HACS procedure to install.

Configuration

Just add the integration in the Integrations GUI.

If you want to use the energy meters, make sure you have a utility_meter section in your configuration.yaml file, even if it's empty.

Advanced configuration

Some options are available under the Configure button in Home Assistant:

  • generate_energy_meters: Boolean (beta) Will generate all the entities and sensors required to feed the Energy dashboard. For details, see the note below.

  • hq_plan_name: String Define the Hydro Quebec rate plan name. Only 2 values are supported at this time:

    • rate d
    • flex d
  • scan_interval: Integer Number of seconds between each device update. Defaults to 60 and it's not recommended to go below 30 as it might result in a suspension from Hilo.

Energy meters

Energy meters are a new feature of this integration. We used to manually generate them with template sensors and automation but they now have been fully integrated into the Hilo integration.

All generated entities and sensors will be prefixed with hilo_energy_ or hilo_rate_.

How to enable them

  • If you never configured any utility meter, you will need to add an empty utility_meter block in your configuration.yaml. The reason why we do this is because there's no official API to integrate the meters.

  • Restart home assistant and wait 5 minutes until you see the sensor.hilo_energy_total_low entity gettin created and populated with data:

    • The status should be in collecting
    • The state should be a number higher than 0.
  • If you see the following error in your logs, this is a bug in Home Assist and it's because the power meter in question has 0 w/h usage so far. This will disappear once usage has been calculated. There's a PR upstream here to address this.

    2021-11-29 22:03:46 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
    [...]
    ValueError: could not convert string to float: 'None'
    

Lovelace sample integration

Here's an example on how to add the energy data to Lovelace:

      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: entity
                entity: binary_sensor.defi_hilo
                icon: mdi:fire
              - type: entity
                entity: sensor.smartenergymeter
                name: Hydro
                icon: mdi:speedometer
              - type: entity
                entity: sensor.hilo_rate_current
                name: Cout Actuel
          - type: energy-date-selection
          - type: energy-sources-table
          - type: energy-usage-graph
          - type: energy-distribution
            link_dashboard: true

Warning

When enabling Hilo generated energy meters, it's recommended to remove the manually generated ones to have the most accurate statistics, otherwise we might end up with duplicate data.

This wasn't tested with already active data and energy entities (ie: Battery, Gaz, Solar, or even other individual devices). It's possible that enabling this will break or delete these original sensors. We can't be held responsible for any data loss service downtime, or any kind as it's described in the license.

If you're facing an issue and you want to collaborate, please enable debug log level for this integration and provide a copy of the home-assistant.log file. Details on how to enable debug are below.

References

As stated above, this is an unofficial integration. Hilo is not supporting direct API calls and might obfuscate the service or prevent us from using it.

For now, these are the swagger links we've found:

Contributing

Reporting any kind of issue is a good way of contributing to the project and it's available to anyone.

If you face any kind of problem or weird behavior, please submit an issue and ideal, attach debug logs.

To enable debug log level, you need to add this to your configuration.yaml file:

logger:
  default: info
  logs:
     custom_components.hilo: debug
     pyhilo: debug

If you have any kind of python/home-assistant experience and want to contribute to the code, feel free to submit a merge request.

Collaborators

Comments
  • Idées d'automatisation

    Idées d'automatisation

    Je me demandais qu'elles étaient vos automations avec les devices Hilo. Je crois que nous cherchons tous un peu des idées pour faciliter notre vie et si vous voulez les partager ici, c'est la place. Il y a déjà plusieurs forums pour discuter de ça mais j'étais curieux de savoir ce que la communauté hilo-hass avait fait.

    documentation question style 
    opened by valleedelisle 114
  • Challenge lock empêche l'activation des scenes lors du début des défis

    Challenge lock empêche l'activation des scenes lors du début des défis

    Quand le défi débute les thermostats sont immédiatement bloqué avec la fonction "challenge_lock" ce qui empêche la modification des température pour le défi.

    Ça prendrais peux être un délais pour permettre aux scene de s'activer et après bloquer les thermostats.

    Add your logs here.

    Cette erreur provient d'une intégration personnalisée

    Logger: custom_components.hilo Source: custom_components/hilo/climate.py:79 Integration: Hilo (documentation, issues) First occurred: 17:00:34 (25 occurrences) Last logged: 17:04:30

    [Thermostat chambre_Laurence (349350)] Attempt to set temperature to 15.0 was blocked because challenge lock is active [Thermostat chambre_Joelle (349351)] Attempt to set temperature to 15.0 was blocked because challenge lock is active [Thermostat chambre_principale (349352)] Attempt to set temperature to 15.0 was blocked because challenge lock is active [Thermostat chambre_principale (349352)] Attempt to set temperature to 14.5 was blocked because challenge lock is active [Thermostat chambre_principale (349352)] Attempt to set temperature to 14.0 was blocked because challenge lock is active

    enhancement 
    opened by skimaniac 66
  • Incompatibilité  core-2022.2.0b0 et hilo_energy_total_daily_low?

    Incompatibilité core-2022.2.0b0 et hilo_energy_total_daily_low?

    J’ai updaté à core-2022.2.0b0 et j’ai des problèmes avec mes compteurs de énergie, ça fait des erreurs avec le hilo_energy_total_daily_low

    c’est comme si ça a été renommé ou ça n’existe plus.. entk dans le code chez nous j’ai mis hilo_energy_total_low et ca semble régler à court terme..

    mais je vous avise si jamais vous pensiez updater à la nouvelle bêta core ça pourrait briser et vous forcer à taponner… à suivre

    bug 
    opened by FrancoLoco 41
  • Incompatibilité Home Assistant 2022.5

    Incompatibilité Home Assistant 2022.5

    Ne marche pas bien avec 2022.5 présentement… updatez à vos risques et périls.. pour ma part j’ai rollbacké et j’ai encore des trucs qui ne marchent plus avec Hilo depuis…

    opened by FrancoLoco 35
  • Thermostat affiche 0

    Thermostat affiche 0

    Depuis hier soir, apres la mise à jour du core-2021.12.6 je n'ai plus d'affichage de mes thermostat. mais les utility meter fonctionne quand meme. Capture d’écran, le 2021-12-28 à 07 50 06 je n'ai pas eu le temps de passer tout les log en revu j'ai juste remarqué ça:

    Giving up _async_request(...) after 2 tries (aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://apim.hiloenergie.com/Automation/v1/api/Locations/311/Devices'))

    opened by skimaniac 23
  • Erreur d'authentification à l'initialisation

    Erreur d'authentification à l'initialisation

    J'ai un bad request 400 sur l'authentification par username/password lorsque je configure initialement l'intégration.

    Le pop up me donne comme erreur [%key:common::config_flow::error::unknown%]. Les logs sont un peu plus utiles:

    Logger: pyhilo
    Source: /usr/local/lib/python3.9/site-packages/pyhilo/api.py:292
    First occurred: 9:14:51 PM (4 occurrences)
    Last logged: 9:17:01 PM
    
    ClientResponseError: 400, message='Bad Request', url=URL('https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow')
    

    Je roule HASS dans un container et je suis sur la version 2022.4.0.

    opened by Maximebb 21
  • Les compteurs d'énergie par appareil sont surestimés

    Les compteurs d'énergie par appareil sont surestimés

    J'ai remarqué que les compteurs d'énergie par appareil sont surestimés... exemple je voulais voir combien mon garage consomme par jour et j'était surpris du résultat, mais en observant de plus près on voit que c'est une erreur. Exemple ce matin le total juste de cet appareil dépasse déja le total global pour la maison (lui correspond quand même assez près de celui d'Hilo).

    On voit entre autres que ca remonte de 0 à un chiffre élevé d'un coup au moment où la première consommation de la journée se fait:

    image

    image

    PS: j'ai aussi remarqué que le compteur "unknown" est environ le double de la vraie consommation.. pas de spike de son côté, mais il monte juste trop vite...

    bug 
    opened by FrancoLoco 19
  • Erreur 500 ce soir, restauré un backup d'hier même problème

    Erreur 500 ce soir, restauré un backup d'hier même problème

    Peut-être un bug côté Hilo mais l'app fonctionne. Suis-je seul au monde ? Bonne soirée :)

    Cette erreur provient d'une intégration personnalisée

    Logger: custom_components.hilo Source: custom_components/hilo/init.py:154 Integration: Hilo (documentation, issues) First occurred: 20:57:39 (1 occurrences) Last logged: 20:57:39

    Config entry failed: 500, message='Internal Server Error', url=URL('https://apim.hiloenergie.com/Notifications/Registrations/4583255011347083147-5405541980714257213-2')

    opened by Fox350 15
  • Ajout des devices à Homekit

    Ajout des devices à Homekit

    Bonjour,

    J'ai bien installer le plugin dans pacs, mais il ne m'a pas demandé mon compte Hilo. comment je fais pour les entrer?

    Merci pour votre plugin.

    Version of the custom_component

    Configuration

    Add your logs here.
    

    Describe the bug

    A clear and concise description of what the bug is.

    Debug log

    
    Add your logs here.
    
    
    documentation question 
    opened by jfmeuniercow 14
  • Question

    Question

    Salut! Je viens de découvrir l'intégration Hilo! Wow! Très belle job!

    Tout fonctionne parfaitement. Je voulais juste savoir la différence entre les 2 entités hilo_energy_XXXXXX_daily low et hilo_energy_XXXXX_daily medium ?

    Merci beaucoup!

    question 
    opened by bergy218 14
  • check_tarif: Unable to find state for sensor.hilo_energy_total_daily_low

    check_tarif: Unable to find state for sensor.hilo_energy_total_daily_low

    Version of the custom_component

    Latest 23dec. 20h50: 79f8ca2

    Configuration

    J'ai ajouté 'utility_meter:' à mon configuration.yaml J'ai activé le "Generate energy meters" dans l'intégration, comme décrit dans le bug https://github.com/dvd-dev/hilo/issues/12 il se décoche, alors pour tester j'ai modifié "DEFAULT_GENERATE_ENERGY_METERS = False" dans custom_components/hilo/const.py pour le mettre à true.

    Describe the bug

    Même bug à la base que https://github.com/dvd-dev/hilo/issues/10

    sensor.hilo_energy_meter00* sont généré mais pas de sensor.hilo_energy_total_daily*

    Debug log

    J'ai activé le debug mais je ne trouve rien de plus utile que ceci comme erreur/warning. Laisse moi savoir si tu saurais quoi chercher exactement. Je peux t'envoyer un grep de tout les log qui contienne hilo mais je ne veux pas le poster publique..

    2021-12-23 20:39:37 WARNING (MainThread) [custom_components.hilo] check_tarif: Unable to find state for sensor.hilo_energy_total_daily_low
    2021-12-23 20:39:37 DEBUG (MainThread) [custom_components.hilo] Finished fetching [email protected] data in 0.983 seconds (success: True)
    
    
    opened by arsenicks 14
  • Bump release-drafter/release-drafter from 5.21.1 to 5.22.0

    Bump release-drafter/release-drafter from 5.21.1 to 5.22.0

    Bumps release-drafter/release-drafter from 5.21.1 to 5.22.0.

    Release notes

    Sourced from release-drafter/release-drafter's releases.

    v5.22.0

    What's Changed

    New

    Full Changelog: https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Problème avec la phase d'appreciation

    Problème avec la phase d'appreciation

    Lors de mes deux défi du 22 décembre, je n'ai pas eu les étapes "appreciation" sur mon sensor "defi_hilo":

    image

    Pourtant j'ai mis la configuration à 3 dans la configuration de l'integration:

    image

    Comment est-ce que je peux corriger ce problème? Est-ce qu'il y a moyen de valider que lors de mon prochain défi il sera bien la?

    Version of the custom_component

    v2022.9.1

    opened by plchampigny 3
  • Plus de mise à jour, même après un reload de l'intégration ?

    Plus de mise à jour, même après un reload de l'intégration ?

    Depuis hier, Home Assistant ne semble plus recevoir de mises à jour de Hilo. J'ai rechargé l'intégration plusieurs fois, rien n'y fait. Comment déboguer/résoudre le problème ?

    opened by mboisson 16
  • Entite encore dans integration après retrait de celle ci dans Hilo

    Entite encore dans integration après retrait de celle ci dans Hilo

    Hey!

    Jai supprime une entite d'Hilo pour la link avec mon HUB direct sur Home Assistant

    Par contre, meme après reload ou meme restart de HA, l'entite est encore dans ma liste de l'integration.

    Es ce que la suppression des entites devraient faire parti de l'integration lorsque l'entite n'existe plus?

    opened by petebdeblois 2
  • Erreur lors du setup

    Erreur lors du setup

    J'ai changé ma paserelle. Effacer l'integration a HA, reboot, redownload, reboot. et je n'arrive pas a me loguer

    User name et password son bon. Derniere version de HA.

    image

    Unknown error while logging into Hilo: 400, message='Bad Request', url=URL('https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow') 2:58:25 PM – (ERROR) Hilo (custom integration) ClientResponseError: 400, message='Bad Request', url=URL('https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow') 2:58:25 PM – (ERROR) Hilo (custom integration)

    opened by marc3k18 39
  • Unknown device attribute gateway_asset_id

    Unknown device attribute gateway_asset_id

    Bonjour,

    Dans les logs je vois beaucoup de messages (585 occurrences d’après le logger) de type Warning avec cette description:

    Logger: pyhilo Source: custom_components/hilo/init.py:405 Integration: Hilo (documentation, issues) First occurred: 7:27:01 AM (585 occurrences) Last logged: 9:12:59 AM

    Unknown device attribute gateway_asset_id: d0965abb-e2b0-409e-be9e-50d7452e58cf

    Cela ne semble pas provoquer de problème mais je remonte quand même cette observation vu le volume.

    opened by matthieugd 5
Releases(v2022.9.1)
Análise de dados abertos do programa Taxigov.

Análise de dados do Taxigov Este repositório contém os cadernos Jupyter usados no projeto de análise de dados do Taxigov. Conjunto de dados O conjunto

Augusto Herrmann 1 Jan 10, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
Troposphere and shellscript based AWS infrastructure automation creates an awsapigateway lambda with a go backend

Automated-cloudformation-infra Troposphere and shellscript based AWS infrastructure automation. Feel free to clone and edit for personal usage. The en

1 Jan 03, 2022
A discord tool to use bugs and exploits

DiscordTool A discord tool to use bugs and exploits Features: send a buggy messa

6 Aug 19, 2022
A simple Discord Mass-Ban that's still working with Member Scraper.

Mass-Ban [!] This was made for education / you can use for revenge. Please don't skid it. [!] If you want to use it, please use member scraper before

WoahThatsHot 1 Nov 20, 2021
API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is available. If a new grade has been entered, the program sends a notification e-mail with the subject.

OGE-ESIREM-API Introduction API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is

Benjamin Milhet 5 Apr 27, 2022
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug · Request Feature Features Checks tokens Checks all

dropout 10 Dec 01, 2022
Update your World of Warcraft AddOns hosted on GitHub

AddOns Update Tool Tool to update World of Warcraft AddOns hosted on GitHub Features Pure Python: only Dulwich and Colorlog Multithreaded tasks Manual

Mr. Alchemist 16 Dec 06, 2022
Unofficial Meteor Client wiki

Welcome to the Unofficial Meteor Client wiki! Meteor FAQs | A rewritten and better FAQ page. Installation Guide | A guide on how to install Meteor Cli

Anti Cope 0 Feb 21, 2022
A Discord Server Cloner Which Can Clone Any Discord Server In Just Few Minutes

A Discord Server Cloner Which Can Clone Any Discord Server In Just Few Minutes.

samet 4 Jul 23, 2022
Code release for Transferable Curriculum for Weakly-Supervised Domain Adaptation (AAAI2019)

TCL Code release for Transferable Curriculum for Weakly-Supervised Domain Adaptation (AAAI2019) Dataset Office-31 dataset, with 0.4 label noise Requir

THUML @ Tsinghua University 17 Jul 07, 2022
Guildead - Guilded api wrapper written in python

Guildead Guilded api wrapper written in python. I have found "exploit" (guilded

0хVιcнy#1337 5 Sep 23, 2022
Emo-Fun is a bot which emojifies the text you send it

About Emo-Fun is a bot which emojifies the text you send it. It is easier to understand by an example Input : Hey this is to show my working!! Output

Suvodeep Sinha 3 Sep 30, 2022
A play store search telegram bot

Play-Store-Bot A play store search telegram bot Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.c

Fayas Noushad 17 Oct 28, 2022
Набор утилит для Discord с использованием языка программирования Python.

Discord Tools v0.1 Functions: WebHook spamer Spotify account generator (What?) QR Code Token stealer Token generator Discord nitro gen/check Discor to

Максим Скризов 3 Aug 23, 2022
Davide Gallitelli 3 Dec 21, 2021
Benachrichtigungs-Bot für das niedersächische Impfportal / Notification bot for the lower saxony vaccination portal

Ein kleines Wochenend-Projekt von mir. Der Bot überwacht die REST-API des niedersächsischen Impfportals auf freie Impfslots und sendet eine Benachrichtigung mit deinem bevorzugtem Service. Ab da gilt

sibalzer 37 May 11, 2022
THERE IS AN IMPOSTER AMONG US. VOTE HIM OUT BEFORE HE [ R E D A C T E D ].

🛡️ Guardian There is an impostor among us. Can you help us find out who it is? ⚙️ Installation and Usage Make sure to install Tesseract-OCR before ru

Catus Magnus 1 Jan 06, 2022
A modified Sequential and NLP based Bot

A modified Sequential and NLP based Bot I improvised this bot a bit with some implementations as a part of my own hobby project :) Note: I do not own

Jay Desale 2 Jan 07, 2022
An API wrapper library for opensea api.

Opensea API An API wrapper library for opensea api. Installation pip3 install opensea Usage Retrieving assets: from opensea import get_assets # This

Ankush Singh 38 Jul 17, 2022