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)
Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your area.

vaccine-checker Light weight Scripts and Apps for checking availability of Covid Vaccines in India. Notifies when vaccine becomes avialable in your ar

Abishek V Ashok 8 Jun 16, 2021
Using Streamlit to build a simple UI on top of the OpenSea API

OpenSea API Explorer Using Streamlit to build a simple UI on top of the OpenSea API. 🤝 Contributing Contributions, issues and feature requests are we

Gavin Capriola 1 Jan 04, 2022
Shred your reddit comment and post history

trasheddit Shred your reddit comment and post history (x89/Shreddit replacement) Usage Simple Example Download trasheddit: git clone https://github.co

Elly 2 Jan 05, 2022
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!

Installation | Important | Changelogs | Discord NOTE: Hazard is not finished! You can expect bugs, crashes, and non-working functions. Please make an

Rdimo 470 Aug 09, 2022
Faux is a chatbot bridge between urbit and discord.

Faux Faux is a chatbot bridge between urbit and discord. Whenever a member posts in your discord group, a bot will echo their message in your urbit gr

10 Dec 27, 2022
This checks that your credit card is valid or not

Credit_card_Validator This checks that your credit card is valid or not. Where is the app ? main.exe is the application to run and main.py is the file

Ritik Ranjan 1 Dec 21, 2021
Download nitro generator that generates free nitro code that you can use for Discord

Download nitro generator that generates free nitro code that you can use for Discord, run it and wait for free nitro to come

Umut Bayraktar 154 Jan 05, 2023
Automatically Message From Discord Account

Discord-AutoMessage A robust and versatile solution for automated social interactions HOW TO INSTALL Open cmd cd into your project directory Run the f

13 Jul 11, 2022
A Telegram bot that can stream Telegram files to users over HTTP

AK-FILE-TO-LINK-BOT A Telegram bot that can stream Telegram files to users over HTTP. Setup Install dependencies (see requirements.txt), configure env

3 Dec 29, 2021
Source code for "Efficient Training of BERT by Progressively Stacking"

Introduction This repository is the code to reproduce the result of Efficient Training of BERT by Progressively Stacking. The code is based on Fairseq

Gong Linyuan 101 Dec 02, 2022
Isobot is originally made by notsniped. This is a remix of iso.bot by archisha.

iso6.9-08122021b-1.2beta Isobot is originally made by notsniped#0002. This is a remix of iso.bot by αrchιshα#5518. isobot6.9 is a Discord bot written

Kamilla Youver 3 Jan 11, 2022
Discord Selfbot, 90+ commands

Setting the bot up. STEP 1: copy the directory yook.club selfbot was downloaded and extracted into, open cmd and type "cd " then paste. STEP 2: python

yook 1 Dec 12, 2021
A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create cust

Aran 1 Oct 13, 2021
:cloud: Python API for ThePirateBay.

Unofficial Python API for ThePirateBay. Build Status Test Coverage Version Downloads (30 days) Installation $ pip install ThePirateBay Note that ThePi

Karan Goel 334 Oct 21, 2022
Find songs by lyrics.

LyricSearch Hi, welcome to LyricSearch - a simple (Yes), fast (Maybe), and powerful (Approach) lyric search engine. We support Three search methods to

Dicer_ 1 Dec 13, 2021
Reverse engineering multi-device WhatsApp Web.

whatsapp-web-multi-device-reveng In this repository, the research for reverse engineering multi-device WhatsApp Web takes place, see here for a descri

84 Jan 01, 2023
IACR Events Scraper

IACR Events Scraper This scrapes https://iacr.org/events/ and exports it as a calendar file. I host a version of this for myself under https://arrrr.c

Karolin Varner 6 May 28, 2022
A multi purpose discord bot for python

Sypher The best multi purpose discord bot. Add Sypher right now Invite Me | Join

Johan Naizu 1 Dec 15, 2022
A Python interface between Earth Engine and xarray for processing weather and climate data

wxee What is wxee? wxee was built to make processing gridded, mesoscale time series weather and climate data quick and easy by integrating the data ca

Aaron Zuspan 160 Dec 31, 2022
Frwdit-V1 - A Simple Bot can copy any media to a private channel provided

📠 Auto Forward V2 A Simple Bot can copy any media to a private channel provided

FUCK OFF ANE 3 Dec 03, 2022