Skip to content

A simple yet efficient custom component to fetch data from EVN Vietnam for Home Assistant

License

Notifications You must be signed in to change notification settings

nguyenquangduc/nestup_evn

 
 

Repository files navigation

hacs Project Maintenance Code Style

Vietnam EVN Data Fetcher for HA

English | Tiếng Việt

This component utilized the simple yet powerful HTTP(S) protocol to periodically fetch the latest e-consumption data from EVN Endpoint into Home Assistant with AIOHTTP module (and a brilliant assist from BeautifulSoup for scaping useful data).

Hence, it supports installation through UI, and can easily integrate monitoring devices into HA without configuring yaml.

ui_display

Before Installation

There are some EVN branches that require authentication to fetch the daily electric consumption data, but others do not need this field.

A qualified EVN account will consist of:

  1. A username (usually your EVN Customer ID or Phone Number).

  2. A password.

Note: Check the table below, if your area needed EVN Account to setup the component, please contact the corresponding support center link to get the required credentials.

Starting from the v1.1.9 version, the component has successfully provided support for the areas listed below:

EVN Branch Vietnam Area Is Supported Is EVN Account Required Support Center
EVNHCMC Ho Chi Minh City ☑️ ☑️ Link
EVNSPC Southern Vietnam ☑️ Link
EVNNPC Northern Vietnam ☑️ Link
EVNHANOI Ha Noi Capital ☑️ ☑️ Link
EVNCPC Central Vietnam (not yet) ? Link

If your area were not yet supported, feel free to contact me, we could make it happen.

Installation

Note: Choose 1 from the below methods for setting up the integration.

Method 1: Installation via HACS (recommended).

  1. Add trvqhuy/nestup_evn custom repository to HACS.

    HACS > Integrations > Triple dots (in the upper right corner) > Custom repositories

    download_01 download_02

    Enter trvqhuy/nestup_evn to Repository and choose Integration from Category

    download_03

  2. Download the repository to your HA Server.

    HACS > Integrations > ➕ Explore & download repositories > EVN Data Fetcher > Choose the latest version > Download this repository

  3. Reboot/restart your HA Server.

  4. Voilà, your installation is completed, now you should move to Configurations section to complete.

Method 2: Manual installation via Samba / SFTP

  1. Clone/download the latest release (or the repos. master branch).

  2. Unzip/copy the custom_components/nestup_evn folder to the custom_components directory of your HomeAssistant installation.

    • The custom_components directory depends on your HomeAssistant configuration directory.

    • Usually, the configuration directory is within your OS Home Directory ~/homeassistant/.

    • In other words, the configuration directory of HomeAssistant is where the configuration.yaml file is located.

    • After a correct installation, your configuration directory should look like the following.

      └── ...
      └── configuration.yaml
      └── secrets.yaml
      └── custom_components
          └── nestup_evn
              └── __init__.py
              └── sensor.py
              └── nestup_evn.py
              └── ...
      

    Note: if the custom_components directory does not exist, you need to create it manually.

Setup and Configurations

Setting up the integration

  1. Search for EVN Data Fetcher in installed integrations.

    Settings > Devices and Services > Integrations > Add Integrations > Find EVN Data Fetcher

    setup_01

  2. Fulfill your EVN Customer ID.

    Requirements: the ID must meet all of the conditions below:

    • Consists of exactly 13 characters.
    • Starts with 'P' letter.

    setup_02

  3. Fulfill your EVN Credentials (Username & Password).

  4. Choose your Billing Start Date. Note: this is the montly billing date of your electric bill from EVN.

    setup_03

  5. Congrats, everything has been done, you can use the component now.

Configurating installed devices

This feature has not been released yet, this is a TO-DO task, to which the maintainer himself won't do.

However, the configuration seems not neccessary to adjust, fixed configurations are listed below.

  1. EVN Retail Electricity Tariff:

    The reference would always be Household Customer Group although this variable may varies due to usage purpose.

    Visit this link for more informations about electricity price.

  2. Default Polling Interval:

    30 minutes is the default interval for fetching new data from EVN, which is reasonable break, otherwise it would take up resources and overwhelm the server.

Thank and Support

If your EVN Area were not supported by this integration, contact me and together we could make it happen for the community.

Last word, the maintainer wants to thank himself for making this project happen.

About

A simple yet efficient custom component to fetch data from EVN Vietnam for Home Assistant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%