Haverland Radiators Smart Box Integration

hi Imorales,

can you share with me, the method to obtain tokeen??.. im not find it

thanks in advance

Hi Luis!!! Imorales,

Now its solved !!!, As Luis said, on chrome developer tools is the solution

As many ones I have same problem can you explain me the method to obtain tokeen??..

In special how do that: " I have used the “inspection” option of chrome developer tools and extract the right token."

thanks in advance

HI,

Really that’s is a good work and I near to get all ok, but I have some problem.

The brand of equipment are Haverland, auth is ok and obtained with Chrome and smartbox is working properly, detecting equipment and getting data.

But I get these logs:

2022-09-30 14:49:49.715 WARNING (MainThread) [custom_components.smartbox] Found device 636a8e764ea387d77c which was not configured - ignoring

2022-09-30 14:49:49.721 ERROR (MainThread) [custom_components.smartbox] Configured device 2 3 4 was not found

My configuration on configuration.yaml is:

smartbox:
  accounts:
  - api_name: api-haverland
    username: !secret smartbox_usr
    password: !secret smartbox_pass
    session_retry_attempts: 20 # how many times to retry session REST operations
    session_backoff_factor: 1.0 # how much to backoff between REST retries
    socket_reconnect_attempts: 20 # how many times to try reconnecting the socket.io socket
    socket_backoff_factor: 1.0 # how much to backoff between initial socket connect attempts
    device_ids:
    - 2
      3
      4
  basic_auth_creds: !secret smartbox_creds

and this is status obtained with of smartbox

Imagen1

Someone can help me??

Solution:
device_id should be one that we get on smartbox nodes command, in this case: 636a8e764ea387d77c

thanks !!!

Team, I am looking for Electric Radiators that works with Home Assistant. Can you please suggest any companies in the UK?

Seriously, can anybody help? I’ve been stuck for 6 months at the same point, have user/pssw token, just cannot get a connection through smartbox.
Can’t anyone take 2 minute to explain to the dozen of person that nicely asked for help?
I promise to write a guide if I ever get the thing to work !

Hello.

The stemp parameter does not exist in Haverland WIx. Then the setpoint will be obtained based on the mode selection and the parameter value for this mode, for example, if selected_temp mode is comfort, then the setpoint is value of the comfort parameter.

Smartbox should be modified to support this type of equipment.

Imagen1

Thanks !!!

1 Like

Hi, there’s an installation guide in the repository: GitHub - graham33/hass-smartbox: Home Assistant integration for heating smartboxes

If you have any problems using it, please, copy your configuration here so we can help you.

1 Like

Here is my configuration and error log (token/pass/login have been edited)

No matter what I put in auth, I always have an Error 401

configuration.yaml

smartbox:
  accounts:
  - api_name: api-haverland
    username: [email protected]
    password: somePassword1234
    device_ids:
    - ff46a4d22830429beb
  basic_auth_creds: eyJhbGciOiJIRzI9ZiIsInR5cCI6IkpXVCJ9.eyJzAIRpYWxJZCI6IjE0IiwidXNlcklkIjoiNWQ5NjNjOGI5MTNjZDgxNjEzZEQ2YmRhIiwiZW1haWwiOiJqdXN0aW4uYmFjbGVAZ21haWwuY29tIiwic2NvcGUiOiIvdXNlcjpXIC9kZXZzLyo6VyIsImNsaWVudElkIjoiNTU2RSc0MWI3OGUzYmU5YjU2NjA3NTQ4IiwiZXhwIjoxNjY1MjgyMTkwARJpYXQiOjE2NjUyNjc3OTAsImlzcyI6dsslmhGtpIn0.iCJV8u7xqcVTGVmis4fBtOHx9eMxiUqUWdIyUvcA1JE

Error Log

2022-10-09 12:38:49.091 ERROR (MainThread) [homeassistant.setup] Error during setup of component smartbox
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/smartbox/__init__.py", line 93, in async_setup
devices = await get_devices(
File "/config/custom_components/smartbox/model.py", line 215, in get_devices
session = await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/smartbox/session.py", line 43, in __init__
self._auth(
File "/usr/local/lib/python3.10/site-packages/smartbox/session.py", line 58, in _auth
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, 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

Hi, maybe there is a problem with your http basic auth. I used the app “httcanary” in Android to sniff the traffic between my phone and the smartbox to retrive my auth key. Another option is use this: How to view HTTP headers in Google Chrome - Websparrow

im have the same problem with elnur gabarron system, any news? thanks in advance.

Well thank you, looks like I moved forward a step.
For those wondering
token is to get while capturing data on chrome (F12) look for the network tab.
Connect to your smartbox provider ( i2control.haverland.com for haverland brand ) and look at the “token” item
then take the string as shown in the screenshot below

Now next problem, is that all heaters are marked as unavailable. But the sensor part seems to work (can see current temp and Wattage)
Capture d’écran 2022-10-10 235148

It also looks like there was only one point of measurement, then it crashes.
Here is the log

2022-10-10 23:58:09.485 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 812, in _update_entity_states
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 520, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 404, in state
value = self.native_value
File "/config/custom_components/smartbox/sensor.py", line 125, in native_value
return self._status["power"] if self._status["active"] else 0
KeyError: 'power'

Okay was able to fix that :

climate.py:133

    @property
    def target_temperature(self) -> float:
        """Return the target temperature."""
        if "stemp" in self._status.keys():
            return float(self._status["stemp"])
        else:
            _LOGGER.debug(f"No stemp in {self._status=}")
            return None

sensor.py:120

    @property
    def native_value(self) -> Union[float, int]:
        # TODO: is this correct? The heater seems to report power usage all the
        # time otherwise, which doesn't make sense and doesn't tally with the
        # graphs in the vendor app UI
        if "power" in self._status.keys():
            return self._status["power"] if self._status["active"] else 0
        else:
            _LOGGER.debug(f"No power in {self._status=}")
            return 0

temperatures/wattage still don’t get values, but looks like the status of the heater works now
Capture d’écran 2022-10-11 001936

I’m glad you were able to fix it. Please, make a pull request in the repo so all of us can benefits from you. I think there has been some changes in the HA core the last few months. Maybe some thing don’t work properly.

Im need a little help (only 2 days with homeassistant):

Im use home assistant in docker.
First install HACS, later install Matter, next step put the GitHub - graham33/hass-smartbox: Home Assistant integration for heating smartboxes in a custom_components folder, edit conf.yaml, check with the smartbox commands in console and find all radiators and power meter and now?? not find in any location the sensors.

Thanks in advance.

Running an HA assistant instance, with Smartbox integrated, but I’m having problems, cannot set heat or auto mode without giving some errors, even with the fixes from @justinbacle

Also I Cannot set the temperature setpoint, I only have access to current temperature reading, but can only see not edit.

It seems that the API is “reading only” and the calling to change mode (auto, heat, off) have different naming, “eco” “smart”.

Thanks for all the interest. Could I ask those who are raising recent problems to open issues on github (GitHub - graham33/hass-smartbox: Home Assistant integration for heating smartboxes)? I’ll try to take a look at some of these in the next week or so. Hopefully the issues with different devices should be quite easy to fix.

I have control over the modes (Auto, Heat, Off), temperature sensors are working now.
Power usage is not reported, and you cannot set the target temperature either.
I guess implementations may vary from one supplier to another ?

Hello, im not understand what are wrong:

My config.yaml are this:

smartbox:
accounts:

  • api_name: api-elnur
    username: [email protected]
    password: fxxxxx
    session_retry_attempts: 20 # how many times to retry session REST operations
    session_backoff_factor: 1.0 # how much to backoff between REST retries
    socket_reconnect_attempts: 20 # how many times to try reconnecting the socket.io socket
    socket_backoff_factor: 1.0 # how much to backoff between initial socket connect attempts
    device_ids:
    • 5bfcabdxxxxx1
      basic_auth_creds: NTxxxxxx
      sensor:
  • platform: integration
    source: sensor.salor
    name: Salon
    unit_prefix: k
    round: 2
    method: left

And my nodes are this (only one, im have 3 acumulator more and one meter):

“addr”: 3,
“installed”: true,
“level”: 1,
“lost”: false,
“name”: “Salon”,
“parent”: 1,
“type”: “acm”

why not work? homeassistan report a lot of incorrect logs


Thanks.

I’m assuming these are the acm node type mentioned in this issue (looks like you commented on it too): Nodes of type "acm" are not yet supported; no entities will be created · Issue #46 · graham33/hass-smartbox · GitHub. I’m hoping we can support that in the next release.

@elgrajo it looks like you probably have the same issue.

I have heaters similar to these and I’ve seen them advertised on UK TV recently: https://climastar.co.uk/. I don’t have much experience with alternatives to specifically recommend them, I think there are a lot of options in this space.