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)
Owner
null
Replacement for the default Dark Sky Home Assistant integration using Pirate Weather

Pirate Weather Integrations This integration is designed to replace the default Dark Sky integration in Home Assistant with a slightly modified, but f

Alexander Rey 129 Jan 6, 2023
Home Assistant for Opendata CWB. Get the weather forecast of the city in Taiwan.

Home assistant support for Opendata CWB. The readme in Traditional Chinese. This integration is based on OpenWeatherMap (@csparpa, pyowm) to develop.

null 11 Sep 30, 2022
👾 Telegram Smart Group Assistant 🤖

DarkHelper ?? Features ⚡️ Smart anti-apam & anti-NFSW message checker Tag Members , Entertain facility , Welcommer ban , unban , mute , unmute , lock

amirali rajabi 38 Dec 18, 2022
The official Magenta Voice Skill SDK used to develop skills for the Magenta Voice Assistant using Voice Platform!

Magenta Voice Skill SDK Development • Support • Contribute • Contributors • Licensing Magenta Voice Skill SDK for Python is a package that assists in

Telekom Open Source Software 18 Nov 19, 2022
Ross Virtual Assistant is a programme which can play Music, search Wikipedia, open Websites and much more.

Ross-Virtual-Assistant Ross Virtual Assistant is a programme which can play Music, search Wikipedia, open Websites and much more. Installation Downloa

Jehan Patel 4 Nov 8, 2021
SI_EXPLAINER_tg_bot: This bot is an assistant for medical professionals in interpreting the results of patient clustering.

SI_EXPLAINER_tg_bot This bot is an assistant for medical professionals in interpreting the results of patient clustering. ABOUT This chatbot was devel

Alexander Kanonirov 1 Jan 21, 2022
This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant.

HalpyBOT 1.4.2 This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant. Description This repository houses all of the files required

The Hull Seals 3 Nov 3, 2022
First Party data integration solution built for marketing teams to enable audience and conversion onboarding into Google Marketing products (Google Ads, Campaign Manager, Google Analytics).

Megalista Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analy

Google 76 Dec 29, 2022
A Git Alert Bot - Github Integration for Pyrogram & Telethon

Yet Another GitAlertBot Inspired From @Pokurt's GitGram Run Bot: Local Host Git Clone Repo : For Telethon Version : git clone https://github.com/DevsE

DevsExpo 23 Oct 21, 2022
Discord Blogger Integration Using Blogger API

It's a very simple discord bot created in python using blogger api in order to search and send your website articles in your discord chat in form of an embedded message. It's pretty useful for people who are on the blogger platform as there are not much you can do with blogger because of the restrictions.

Owen Singh 8 Oct 28, 2022
Python package and CLI for user-friendly integration with SAS Viya

sasctl A user-friendly Python interface for SAS Viya. Full documentation: https://sassoftware.github.io/python-sasctl Table of Contents Overview Prere

SAS Software 30 Dec 14, 2022
Web app for spotify playlist management with last.fm integration

Music Tools Set of utility tools for Spotify and Last.fm. Built on my other libraries for Spotify (spotframework), Last.fm (fmframework) and interfaci

andy 3 Dec 14, 2022
A python package to easy the integration with Direct Online Pay (Mpesa, TigoPesa, AirtelMoney, Card Payments)

A python package to easy the integration with Direct Online Pay (DPO) which easily allow you easily integrate with payment options once without having to deal with each of them individually;

Jordan Kalebu 2 Nov 25, 2021
Github integration with Telegram

The Telegram bot myGit is your GiHub assistant. In your conversations with your team, you can simply insert the information about the projects you are working at.

Alexandru Buzescu 2 Jan 6, 2022
pyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Master Server

PyDuinoCoin PyDuinoCoin is a simple python integration for the DuinoCoin REST API, that allows developers to communicate with DuinoCoin Main Server. I

BackrndSource 6 Jul 14, 2022
Unofficial GoPro API Library for Python - connect to GoPro via WiFi.

GoPro API for Python Unofficial GoPro API Library for Python - connect to GoPro cameras via WiFi. Compatibility: HERO3 HERO3+ HERO4 (including HERO Se

Konrad Iturbe 1.3k Jan 1, 2023
SSH-Restricted deploys an SSH compliance rule (AWS Config) with auto-remediation via AWS Lambda if SSH access is public.

SSH-Restricted SSH-Restricted deploys an SSH compliance rule with auto-remediation via AWS Lambda if SSH access is public. SSH-Auto-Restricted checks

Adrian Hornsby 30 Nov 8, 2022
Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

Cowin-Slot-Tracker Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service. Requi

invalid username 27 Nov 12, 2022
This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Andrei 157 Dec 15, 2022