Haverland Radiators Smart Box Integration

Hi @davefrooney

I’ve dropped my old account and created a brand new one, unfortunately, same problem, same logs.

Any test I can do ? Do you have a full working example ?

Thanks for help

This is the configuration I have for my device and it works without any issues.

smartbox:
  accounts:
  - api_name: api-brand
    username: [email protected]
    password: "password"
    device_ids:
    - 0bbabaadfafa
  basic_auth_creds: "NTRiY68g7df9sg6df789g6d9876g6"

It does look like you have invalid credentials somewhere. The first line of your log say “client id or secret are wrong”

Hi Dave,

I thank you for your support but unfortunately, it doesn’t work, I may do the same big error on all my trials.

Please, can you do me a favor and try to connect with my temporary but fully working credentials here : https://u.pcloud.link/publink/show?code=XZfhdCXZkQEHlrh6y2JOnfvYtTieJVlLh6U7

I will try now

Sorry to bother,

I know this might sound like a stupid question, but where did you login into in order to get the header? There is no web app as far as I’m aware…

Thanks in advance

Hello,
First of all, thank you very much for the great work.
The brand of my radiators are HJM.
I have obtained the basic auth from the token with Chrome.

I installed the integration from HACS and configured my configuration.yaml file with the following data:

smartbox:
  accounts:
  - api_name: calorhjm #also tried with api-calorhjm
    username: *****@gmail.com
    password: ******
    device_ids:
    - *******
  basic_auth_creds: ***************************==

I am getting the following errors:

Logger: homeassistant.setup
Source: custom_components/smartbox/model.py:192
Integration: smartbox (documentation, issues)
First occurred: 01:41:48 (1 occurrences)
Last logged: 01:41:48

Error during setup of component smartbox
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f9fbcde20>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='calorhjm.helki.com', port=443): Max retries exceeded with url: /client/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9fbcde20>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/config/custom_components/smartbox/__init__.py", line 67, in async_setup
    devices = await get_devices(
  File "/config/custom_components/smartbox/model.py", line 192, in get_devices
    session = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 21, in __init__
    self._auth(
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 33, in _auth
    response = requests.post(token_url, data=token_data, headers=token_headers)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='calorhjm.helki.com', port=443): Max retries exceeded with url: /client/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9fbcde20>: Failed to establish a new connection: [Errno -3] Try again'))

I can login with my user and password at this website: https://api.calorhjm.com

What could I be doing wrong?
Thank you very much

Hi, I’m using the same radiator of HJM brand.

The API you need to wrtie in the configuration is “api-hjm”.

I’ll hope it work.

1 Like

Thank you!

working perfectly!

Hi there,
Since a few days I noted that this integration ceased to work for me. Does someone experience the same issue ?
I get the following error logs. Can someone help and point me out what is the issue and how to fix ?
Thanks in advance.

Logger: homeassistant.setup
Source: custom_components/smartbox/model.py:192
Integration: smartbox (documentation, issues)
First occurred: 12:57:52 AM (1 occurrences)
Last logged: 12:57:52 AM
Error during setup of component smartbox

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 416, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.9/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.9/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.9/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='climastar.helki.com', port=443): Max retries exceeded with url: /client/token (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/config/custom_components/smartbox/__init__.py", line 67, in async_setup
    devices = await get_devices(
  File "/config/custom_components/smartbox/model.py", line 192, in get_devices
    session = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 21, in __init__
    self._auth(
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 33, in _auth
    response = requests.post(token_url, data=token_data, headers=token_headers)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='climastar.helki.com', port=443): Max retries exceeded with url: /client/token (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

EDIT: issue solved. It’s connecting to climastar.helki.com but that should be api-climastar.helki.com. There was a breaking change to the config in v0.1.0 that means if your api_name was ‘foo’ it now needs to be ‘api-foo’

I have tried to install again and I get this error:

ERROR (MainThread) [custom_components.smartbox] Nodes of type “acm” are not yet supported; no entities will be created. Please file an issue on GitHub.

Hello,
First of all, thank you very much for the great work. The brand of my radiator is Haverland.
I have obtained the basic auth from the token with Chrome, installed the custom integration from HACS and configured my configuration.yaml file with the following data:

smartbox:
  accounts:
  - api_name: api-haverland
    username: *****@gmail.com
    password: ******
    device_ids:
    - *******
  basic_auth_creds: ***************************==

I am getting the following error:

Este error se originó a partir de una integración personalizada.

Logger: homeassistant.setup
Source: custom_components/smartbox/model.py:192
Integration: smartbox (documentation, issues)
First occurred: 16:09:12 (1 occurrences)
Last logged: 16:09:12

Error during setup of component smartbox
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/config/custom_components/smartbox/__init__.py", line 67, in async_setup
    devices = await get_devices(
  File "/config/custom_components/smartbox/model.py", line 192, in get_devices
    session = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 36, in __init__
    self._auth(
  File "/usr/local/lib/python3.9/site-packages/smartbox/session.py", line 51, in _auth
    response.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api-haverland.helki.com/client/token

What could I be doing wrong?
Thank you very much

EDIT:
Problem solved – the token was wrong. After having tried different basic authentification generators which gave me the same credential strings, I have used the “inspection” option of chrome developer tools and extract the right token.

Hi,

I’m a novice looking for some help with this please. I have Haverland Smartwave heaters and I’m having trouble setting this up. I added this using HACS and I can get temperatures reporting back but nothing else is working as expected. Smartbox V1 creates 3 entities for each heater.

climate.living_room, sensor.living_room, sensor.living_room_2

I’ve created the energy sensor and when I click on the climate – Auto, Heat and Off I get

Failed to call service climate/set_hvac_mode. ‘stemp’

Failed to call service climate/set_hvac_mode. 400 Client Error: Bad Request for url: https://api-haverland.helki.com/api/v2/devs/e9c68fd3d870539650/htr_mod/6/status

Failed to call service climate/set_hvac_mode. 400 Client Error: Bad Request for url: https://api-haverland.helki.com/api/v2/devs/e9c68fd3d870539650/htr_mod/6/status

Is there something I have missed?

Update. I changed stemp to climate_temp in climate.py as a temporary measure and I now have some limited functionality. It is reporting modes and temps in the climate entity but I am unable to change anything and the power on\off does not work. My heaters\app seem to support modes auto, manual, presence and self_learn. Power mode by on: true\false and the temps by selected_temp: “comfort”, “eco” or “ice”. Does this mean the heater will not be compatible with this integration?

1 Like

It looks like your heaters might be slightly different to the ones we’ve tested with so far. Could you run the smartbox utility from the smartbox python package (https://github.com/graham33/smartbox) and run smartbox status (supplying your credentials)?

I am very much a novice so other than very basic stuff I’m stuck and would need directions on how to run smartbox status.

I’ve added some docs on github: https://github.com/graham33/smartbox/blob/main/README.md

smartbox should already be installed in the python environment where you run Home Assistant, since it’s required by the smartbox Home Assistant integration. Otherwise you should just be able to pip install it from PyPI.

Hi, I’m having the same issue (Nodes of type “acm” are not yet supported). Did you ever resolve it?

It should be possible to support these. Let’s continue the conversation on GitHub (Nodes of type "acm" are not yet supported; no entities will be created · Issue #46 · graham33/hass-smartbox · GitHub).

Hello all, and thank you for this amazing work.
I am new to Home assistant, and would like to control these heaters.
Could anyone explain how to set that up from scratch?
My understanding is that I should have a python running (from docker for example) that sends/receives data to/from HA through MQTT.
I have no experience setting anything is HA, so MQTT integration is still a bit cryptic, how do I set that up ?
I think a short but simple guide would be awesome !

1 Like

This integration works for radiator heat accumulator/storage? (Haverland, HJM, Elnur gabarron,…)

Hi lmorales,

Can I ask exactly how you got the right token? I have the exact same problem.

I’ve been using the Chrome inspector but I can’t see any specific Authorisation headers. The URL path includes a ?token=*********** but I don’t think that’s right and it doesn’t work anyway :slight_smile: