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)
A discord token nuker With loads of options that will screw an account up real bad

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

XPTGR 0 Aug 07, 2022
Auto Filter Bot V2 With Python

How To Deploy Video Subscribe YouTube Channel Added Features Imdb posters for autofilter. Imdb rating for autofilter. Custom captions for your files.

Milas 2 Mar 25, 2022
Freqtrade 3commas wrapper for python

Freqtrade 3commas wrapper The aim of this project is to provide an easy way to integrate freqtrade with 3commas. The main reason someone would want to

Alex Babescu 43 Dec 17, 2022
The Simple Google Colab Notebook to Download Files from Direct Link to Google Drive with custom name and bulk link support.

Direct Link to Google Drive (Advanced! 🔥 ) The Most Advanced yet Simple Google Colab Notebook to Download Files from Direct Link to Google Drive. 🆕

Dr.Caduceus 14 Jul 26, 2022
Webservice that notifies users on Slack when a change in GitLab concern them.

Gitlab Slack Notifier Webservice that notifies users on Slack when a change in GitLab concern them. Setup Slack Create a Slack app, go to "OAuth & Per

Heuritech 2 Nov 04, 2021
Shows VRML team stats of all players in your pubs

VRML Team Stat Searcher Displays Team Name, Team Rank (Worldwide), and tier of all the players in your pubs. GUI WIP: Username search works & pub name

Hamish 2 Dec 22, 2022
This is the Best Calculator Bot!

CalculatorBot This is the Best Calculator Bot! Deploy on Heroku Variables API_HASH Your API Hash from my.telegram.org API_ID Your API ID from my.teleg

2 Dec 04, 2021
An implementation of webhook used to notify GitHub repository events to DingTalk.

GitHub to DingTask An implementation of webhook used to notify GitHub repository events to DingTalk.

Prodesire 5 Oct 02, 2022
Robocord is a bot created for the Pycord community.

Robocord is a bot created for the community of the Pycord Server. Just a bot created for Pycord Server. You can start pull requests, I will check it and if its good I will add it to the bot. 👍

Bruce 7 Jun 26, 2022
Python3 library that can retrieve Chrome-based browser's saved login info.

Passax EDUCATIONAL PURPOSES ONLY Python3 library that can retrieve Chrome-based browser's saved login info. Requirements secretstorage~=3.3.1 pywin32=

Auax 1 Jan 25, 2022
BingBot - A bot that will automate searches on bing

bingBot A bot that will automate searches on bing. To install this just download

Lukas 2 Jul 28, 2022
Python Telegram bot api.

pyTelegramBotAPI A simple, but extensible Python implementation for the Telegram Bot API. Getting started. Writing your first bot Prerequisites A simp

FrankWang 6.4k Jan 09, 2023
A Telegram Calculator to calculate your maths sums

CalculatorBot A Telegram Calculator to calculate your maths sums! Made by /Team

TeamOctave 2 Dec 31, 2021
Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild.

Discondelete Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild. Report Bug · Request Feature Table of Contents Abo

core 4 Feb 28, 2022
A Discord bot to easily and quickly format your JSON data

Invite PrettyJSON to your Discord server Table of contents About the project What is JSON? What is pretty printing? How to use Input options Command I

Sem 4 Jan 24, 2022
Example-bot-discord - Example bot discord xD

example-python-bot-discord Clone this repository Grab a token on Discord's devel

Amitminer 1 Mar 14, 2022
Say "good morning" on Discord, in batch, one-click.

🌞 gm Good Morning! Usage Simply copy the channel_list to gm.py and fill authorization_list with authorization token(s). Enjoy. Authorization Please r

e 3 Nov 18, 2022
Kakatua discord music bot

Donate Ayo donasi! Lokal Internasional Ucapan Terima Kasih Tentu saja, donatur Bunga dan talent-talent h!mawari. Semoga rezeki teman-teman semakin lan

1 Oct 30, 2021
A Python Discord bot project generator

Heater Heat up a Discord bot in a blink What is Heater? Heater is a Command Line Interface tool which allows you to generate a barebones Python Discor

DevGuyAhnaf 5 Jan 14, 2022
Google scholar share - Simple python script to pull Google Scholar data from an author's profile

google_scholar_share Simple python script to pull Google Scholar data from an au

Paul Goldsmith-Pinkham 9 Sep 15, 2022