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)
Python Client for MLflow Tracking Server

Python Client for MLflow Python client for MLflow REST API. Features: Unlike MLflow Tracking client all REST API methods are exposed to user. All clas

MTS 35 Dec 23, 2022
This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu

Remaded Discum Its not Official Discum Wrapper ! This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu Authors @merubokkusu (

discum-remaded 8 Aug 09, 2022
A simple, infinitely scalable, SQS based queue.

SimpleQ A simple, infinitely scalable, SQS based queue. Meta Author: Randall Degges Email: [emai

Randall Degges 162 Dec 21, 2022
A discord nuking tool made by python, this also has nuke accounts, inbuilt Selfbot, Massreport, Token Grabber, Nitro Sniper and ALOT more!

Disclaimer: Rage Multi Tool was made for Educational Purposes This project was created only for good purposes and personal use. By using Rage, you agr

†† 50 Jul 19, 2022
Texting service to receive current air quality conditions and maps, powered by AirNow, Twilio, and AWS

The Air Quality Bot is generally available by texting a zip code (and optionally the word "map") to (415) 212-4229. The bot will respond with the late

Alex Laird 8 Oct 16, 2022
Full-featured Python interface for the Slack API

This repository is archived and will not receive any updates It's time to say goodbye. I'm archiving Slacker. It's been getting harder to find time to

Oktay Sancak 1.6k Dec 13, 2022
Indian Space Research Organisation API With Python

ISRO Indian Space Research Organisation API Installation pip install ISRO Usage import isro isro.spacecrafts() # returns spacecrafts data isro.lau

Fayas Noushad 5 Aug 11, 2022
A delivery protection and notification system

DeliveryProtect This project builds a delivery protection and notification system, based on integration of Arduino Uno and Raspberry Pi 4. The codes a

2 Dec 13, 2021
MemeBot - A discord bot that tracks how good people's memes are

MemeBot A discord Meme "Karma" Tracking bot Dependancies Make sure you have pymongo installed and a mongodb cluster setup with two collections. pip in

Uday Sharma 3 Aug 10, 2022
A free sniper bot built to work with PancakeSwap: Router V2

Pancakeswap Sniper Bot PancakeSwap sniper bot. Automated sniping bot to snipe crypto coin launches. How it works The sniping bot can be used in three

89 Aug 06, 2022
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

2 Feb 28, 2022
Um bot para contar quantas vezes o meu amigo troca de pfp/nick/tag essas coisas ae pq aquele mlk n para quieto

EkiBot Um bot que tem apenas as suas funções de audit log com as PFP's (avatares) dos usuários Pode ser usado para um usuário em específico, ou até me

Samuel 3 Aug 11, 2021
Python Twitter API

Python Twitter Tools The Minimalist Twitter API for Python is a Python API for Twitter, everyone's favorite Web 2.0 Facebook-style status updater for

2.9k Dec 29, 2022
Date Time Userbot With Python

DATE_TIME_USERBOT An Telegram Bot By @Pythone_3 Config Vars API_ID : Telegram API_ID, get it from my.telegram.org/apps API_HASH : Telegram API_ID, get

Sinzz-sinan-m 2 Oct 20, 2021
Fairstructure - Structure your data in a FAIR way using google sheets or TSVs

Fairstructure - Structure your data in a FAIR way using google sheets or TSVs. These are then converted to LinkML, and from there other formats

Linked data Modeling Language 23 Dec 01, 2022
This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, having fun :) Creator: Marlon Zanardi

🚀 Space Crypto auto click bot ready-to-use 🚀 This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, ha

170 Dec 20, 2022
Simple, yet effective moderator bot for telegram. With reports, logs, profanity filter and more :3

👹 Samurai Telegram Bot Simple, yet effective moderator bot for telegram. With reports, logs, profanity filter and more :3 Description Personal bot, m

Abraham Tugalov 106 Dec 13, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
Python SDK for LUSID by FINBOURNE, a bi-temporal investment management data platform with portfolio accounting capabilities.

LUSID® Python SDK This is the Python SDK for LUSID by FINBOURNE, a bi-temporal investment management data platform with portfolio accounting capabilit

FINBOURNE 6 Dec 24, 2022
An information scroller Twitter trends, news, weather for raspberry pi and Pimoroni Unicorn Hat Mini and Scroll Phat HD.

uticker An information scroller Twitter trends, news, weather for raspberry pi and Pimoroni Unicorn Hat Mini and Scroll Phat HD. Features include: Twi

kottuora 5 Oct 31, 2022