Skip to content

Home Assistant integration for Haverland heating smartboxes

License

Notifications You must be signed in to change notification settings

ajtudela/hass-smartbox

 
 

Repository files navigation

hass-smartbox

hassfest hacs_badge codecov Total downloads Downloads of latest version (latest by SemVer) Current version

Home Assistant integration for Haverland (and other brands) heating smartboxes.

Installation

Using HACS (Recommended)

  1. Add this repository to your custom repositories
  2. Search for and install "Smartbox" in HACS.
  3. Restart Home Assistant.
  4. In the Home Assistant UI go to "Configuration" -> "Integrations" click "+" and search for "Smartbox"

Manually Copy Files

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called smartbox.
  4. Download all the files from the custom_components/smartbox/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the Home Assistant UI go to "Configuration" -> "Integrations" click "+" and search for "Smartbox"

Finally

Open your Home Assistant instance and start setting up a new integration.

Configuration

You will need the following items of information:

  • Name of your resailer
  • Your username and password used for the mobile app/web app.

If there is an issue during the process or authentication, the errors will be displayed.

Additional Options

You can also specify the following options (although they have reasonable defaults):

Consumption history options

We are currently getting the consumption of device throuw the API and we inject it in statistics and TotalConsumption sensor

  • start : we will get the last 3 years of consumption and set the option to auto.
  • auto : every hour, we get the last 24 hours.
  • off : stop the automatic collect. We will still update the sensor every hour.

Resailer logo

By default, each sensor has in own icon depends on the type of the sensor. You can activate this option to display the logo of the resailer instead.

Session options

  session_retry_attempts: 8 # how many times to retry session REST operations
  session_backoff_factor: 0.1 # how much to backoff between REST retries
  socket_reconnect_attempts: 3 # how many times to try reconnecting the socket.io socket
  socket_backoff_factor: 0.1 # how much to backoff between initial socket connect attempts

Features

Heaters Supported Node types

These are modelled as Home Assistant Climate entities.

  • htr and acm (accumulator) nodes
    • Supported modes: 'manual' and 'auto'
    • Supported presets: 'home and 'away'
  • htr_mod
    • Supported modes: 'manual', 'auto', 'self_learn' and 'presence'
    • Supported presets: 'away', 'comfort', 'eco', 'ice' and 'away'

The modes and presets for htr_mod heaters are mapped as follows:

htr_mod mode htr_mod selected_temp HA HVAC mode HA preset
manual comfort HEAT COMFORT
eco HEAT ECO
ice HEAT ICE
auto * AUTO SCHEDULE
self_learn * AUTO SELF_LEARN
presence * AUTO ACTIVITY

Consumption

The smartbox API is only giving the hourly consumption from a start and an end period of time. You can't have real time consumption of a device and this consumption is always increasing.

At every beginning of an hour, during around 15/20 minutes, the API do not provide data for the current hour. So we always get a period of two hour to have at least some data, and get the most recent one to not have drop of consumption.

Every hour, we are updating data sensor with the most recent data. You are able to see the consumption directly into the history graph of the sensor.

But to be sure we ensure the right data to the right hour, we also get the last 24 hours and upsert these data into statistics to avoid time difference and some data drop.

Tip

If you don't want to upsert these 24 hours, you have to set the option to off.

History

The first time we create a config entry (or when the option of the config entry is set to start) we get the last 3 years of consumption. As it is not possible to add it directly to the sensor data, we insert it into the statistics of the sensor. So it let the energy dashboard working with the current and back history.

Tip

If you want to reset all the data, you have to set the option to start.

Debugging

Debug logging can be enabled by increasing the log level for the smartbox custom component and the underlying smartbox python module in the Home Assistant configuration.yaml:

 logger:
   ...
   logs:
     custom_components.smartbox: debug
     smartbox: debug
   ...

Warning

Currently logs might include credentials, so please be careful when sharing excerpts from logs

See the Home Assistant logger docs for how to view the actual logs. Please file a Github issue with any problems.

TODO

  • Graceful cleanup/shutdown of update task
  • use a coordinator to update data (and use the websocket to propagate data)

Note

The initial version of this integration was made by graham33 but it was not maintained.

About

Home Assistant integration for Haverland heating smartboxes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.4%
  • Shell 0.6%