Haverland Radiators Smart Box Integration

Could you post the relevant section of your YAML config (without any credentials of course)? Also you may want to try the new version I just released, it might give better diagnostic messages.

I have updated to your new version

Log:

2021-04-05 13:49:50 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.

Logger: homeassistant.setup
Source: /usr/local/lib/python3.8/asyncio/events.py:81 
First occurred: 14:02:00 (1 occurrences) 
Last logged: 14:02:00

Setup of smartbox is taking over 10 seconds.
Logger: pyhap.characteristic
Source: /usr/local/lib/python3.8/site-packages/pyhap/characteristic.py:138 
First occurred: 14:02:19 (2 occurrences) 
Last logged: 14:02:19

SecuritySystemCurrentState: value=0 is an invalid value.
SecuritySystemTargetState: value=0 is an invalid value.
Logger: custom_components.smartbox.model
Source: custom_components/smartbox/model.py:96 
Integration: Smartbox (documentation, issues) 
First occurred: 22:48:39 (1 occurrences) 
Last logged: 22:48:39

Couldn't match update /acm/5/setup

My config:

smartbox:
  accounts:
  - api_name: api-elnur
    username: xxxxxx
    password: xxxxxxx
    device_ids:
    - xxxxxxxxxxxxxxxxxx
  basic_auth_creds: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==

On version 0.1.0, Iā€™m not seeing any entities show up. From the logs, it is definitely connecting to the API (seemingly) without issue and getting responses, but the component does not seem to generate any entities.

Partial log (Iā€™ve removed most of the heaters to shorten it):

2021-05-04 22:50:02 DEBUG (MainThread) [custom_components.smartbox] Setting up Smartbox integration
2021-05-04 22:50:02 DEBUG (MainThread) [custom_components.smartbox] accounts: [OrderedDict([('api_name', 'api-haverland'), ('username', '[email protected]'), ('password', 'secretpassword'), ('device_ids', ['11111aa111111a111a'])])]
2021-05-04 22:50:02 DEBUG (MainThread) [custom_components.smartbox] basic_auth_creds: ACREDENTIAL==
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.model] Creating SocketSession for device 11111aa111111a111a
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.model] Starting SocketSession task for device 11111aa111111a111a
2021-05-04 22:50:03 INFO (MainThread) [custom_components.smartbox] Setting up configured device 11111aa111111a111a
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox] Finished setting up Smartbox integration
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.climate] Setting up Smartbox climate platform
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.climate] Finished setting up Smartbox climate platform
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.sensor] Setting up Smartbox sensor platform
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.sensor] Finished setting up Smartbox sensor platform
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.model] Received dev_data: {'connected': True, 'geo_data': {'country': '', 'state': '', 'city': '', 'zip': '', 'tz_code': 'Europe/London', 'position': {'longitude': 00.00000000000000, 'latitude': 00.00000000000000}, 'outdoor_range': 150}, 'geoData': {'country': '', 'state': '', 'city': '', 'zip': '', 'tz_code': 'Europe/London', 'position': {'longitude': 00.00000000000000, 'latitude': 00.00000000000000}, 'outdoor_range': 150}, 'away_status': {'enabled': True, 'away': False, 'forced': False}, 'nodes': [{'addr': 2, 'parent': 1, 'level': 1, 'type': 'htr_mod', 'name': 'LR.3.1', 'installed': True, 'lost': False, 'prog': {'sync_status': 'ok', 'prog': {'0': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '1': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '2': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '3': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '4': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '5': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2], '6': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2]}}, 'setup': {'priority': 'low', 'power': '750'}, 'version': {'hw_version': '1.1', 'fw_version': '1.4', 'uid': '0069003F0347353438313335', 'pid': '020a'}, 'status': {'sync_status': 'ok', 'on': True, 'mode': 'manual', 'selected_temp': 'comfort', 'units': 'C', 'comfort_temp': '19', 'eco_offset': '4', 'ice_temp': '7', 'mtemp': '18', 'active': False, 'presence': False, 'locked': False, 'unit_model': 2, 'unit_fw': 2, 'uart_error': False}}, 'pmo_system': {'main_circuit_pmos': []}}
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.model] Away status update: {'enabled': True, 'away': False, 'forced': False}
2021-05-04 22:50:03 DEBUG (MainThread) [custom_components.smartbox.model] Updating node LR.3.1 away status: False
2021-05-04 22:50:04 DEBUG (MainThread) [custom_components.smartbox.model] Node status update: {'sync_status': 'ok', 'on': True, 'mode': 'manual', 'selected_temp': 'comfort', 'units': 'C', 'comfort_temp': '19', 'eco_offset': '4', 'ice_temp': '7', 'mtemp': '19', 'active': False, 'presence': False, 'locked': False, 'unit_model': 2, 'unit_fw': 2, 'uart_error': False}
2021-05-04 22:50:04 DEBUG (MainThread) [custom_components.smartbox.model] Updating node LR.3.1 status: {'sync_status': 'ok', 'on': True, 'mode': 'manual', 'selected_temp': 'comfort', 'units': 'C', 'comfort_temp': '19', 'eco_offset': '4', 'ice_temp': '7', 'mtemp': '19', 'active': False, 'presence': False, 'locked': False, 'unit_model': 2, 'unit_fw': 2, 'uart_error': False}
2021-05-04 22:50:04 DEBUG (MainThread) [custom_components.smartbox.model] Received update: {'path': '/htr_mod/5/status', 'body': {'sync_status': 'ok', 'on': True, 'mode': 'manual', 'selected_temp': 'comfort', 'units': 'C', 'comfort_temp': '19', 'eco_offset': '4', 'ice_temp': '7', 'mtemp': '19', 'active': False, 'presence': False, 'locked': False, 'unit_model': 2, 'unit_fw': 2, 'uart_error': False}}

Canā€™t seem to work out what the problem is?

I think this might be due to the node type, I donā€™t think weā€™ve seen htr_mod before. It should throw an error at least for unknown node types though, Iā€™ll take a look tonight. What type of device is it?

Itā€™s a Haverland Ultrad. If thereā€™s any more info that would be helpful just let me know.

Edit: changed htr to htr_mod in climate.py and sensor.py and I can get entites to populate, but no control. Error with mode self_learn; added to climate.py as HVAC_MODE_AUTO.

The temperature sensors seem to be reporting OK.

Iā€™ve added support for htr_mod in this release: Release v0.2.0 (alpha) Ā· graham33/hass-smartbox Ā· GitHub. Please give it a try

I didnā€™t see your subsequent edit until I came back to the thread just now. Did adding handling for the self_learn mode fix the issues with control, or are they still present? I can add a mapping for the self_learn mode to HVAC_MODE_AUTO tomorrow.

Added support for self_learn mode in 0.2.1: Release v0.2.1 (alpha) Ā· graham33/hass-smartbox Ā· GitHub

Thanks for the latest releases, Iā€™ve tried them out. Entities now show up out of the box, but still having control issues.

Iā€™m now getting ERROR (MainThread) [custom_components.smartbox.model] Couldn't match update /htr_mod/7/prog showing up in the logs that was not there before.

When I try and turn a heater on/off from the UI I get the following message:
Failed to call service climate/set_hvac_mode. 400 Client Error: Bad Request for url: https://api-haverland.helki.com/api/v2/devs/<device_id>/htr_mod/8/status

The first error (ā€œcouldnā€™t match updateā€) is just a message that I donā€™t yet handle. I expect it gets sent when the programme is changed via the app or webapp. Iā€™ll add something to just ignore those, since I canā€™t think of anything useful to do with them.

I suspect the second error is because your device uses different modes - currently the code uses ā€˜autoā€™ but perhaps thatā€™s not valid for your device. Ideally if you could find out what modes your heaters support, I can make it use the correct ones depending on the heater type. To find this out, you could query the status using the smartbox command line tool I included in GitHub - graham33/smartbox: Python API to control heating 'smart boxes', or if you have access to the webapp for your device you could use something like Chrome developer tools to see what requests are sent when you change the mode.

I fixed the error messages on updates we know about but can ignore in the latest release (Release v0.2.2 (alpha) Ā· graham33/hass-smartbox Ā· GitHub).

If you have time to send some info on the modes being used, itā€™d be great to support this device.

Managed to find the time to have a look at this, sorry for taking so long!

Output from Smartbox:

$smartbox devices
[   {   'dev_id': '<dev_id>',
        'fw_version': '1.25.0',
        'name': '<housename>',
        'product_id': '0105',
        'serial_id': '14'}]
		
$smartbox nodes
<housename> (dev_id: <dev_id>)
[   {   'addr': 2,
        'installed': True,
        'level': 1,
        'lost': False,
        'name': 'LR.3.2',
        'parent': 1,
        'type': 'htr_mod'},

$smartbox setup
<housename> (dev_id: <dev_id>)
LR.3.2 (addr: 2)
{'power': '750', 'priority': 'low'}

$smartbox status
<housename> (dev_id: <dev_id>)
LR.3.2 (addr: 2)
{   'active': False,
    'comfort_temp': '19',
    'eco_offset': '6',
    'ice_temp': '7',
    'locked': False,
    'mode': 'manual',
    'mtemp': '18',
    'on': False,
    'presence': False,
    'selected_temp': 'comfort',
    'sync_status': 'ok',
    'uart_error': False,
    'unit_fw': 2,
    'unit_model': 2,
    'units': 'C'}

And the JSON requests in the POST that are sent from the webUI

#on/off
{"on":true}
{"on":false}

#comfort temperature
{"mode":"manual","selected_temp":"comfort"}

#eco temperature
{"mode":"manual","selected_temp":"eco"}

#anti frost temperature
{"mode":"manual","selected_temp":"ice"}

#mode self learn (based on presence
{"mode":"self_learn"}

#mode presence detection
{"mode":"presence"}

#mode auto - based on calendar

{"mode":"auto"}

#change temp from 19 to 20

{"mode":"manual","comfort_temp":"20","eco_offset":"6","selected_temp":"comfort","on":true,"units":"C"}

#lock
{"locked":true}
{"locked":false}

Using smartbox, I can change between auto, self-learn and presence fine. I can also lock ok. I canā€™t change to manual mode (returning a Bad Request), which I presume is because the request does not contain the extra data (temperature etc) as requested. Also I donā€™t think the different selected_temp options are handled for other devices?

If thereā€™s anything else you need, just let me know - Iā€™ll try and get back to you sooner this time!

Hi Team, My first post here for an integration that looks very promising.

Iā€™m owner of 2 french heaters from the ā€œValdeRomaā€ company, and both of them are using the ā€œsmartboxā€ unit to be smart managed.

Following this long (and a bit complex) topic, Iā€™ve tried to include my heaters in Raspberry HA (which already control Daikin, Mueller heaters, LinksTap, BMW, Logitech Harmony, Denon, Shield and lights and Switches from different companies, Fantastic !)., but Iā€™m stuck with something that looks quite simple, Iā€™m not able to be authenticated.

Iā€™ve used the smartbox command and the configuration.yaml file, none of them works, you will find below some pictures of logs and commands.

Any help will be appreciated, also I was not able to get the API documentation nor some CURL complete example to test, so it may be helpful if some has them.

Note, for the Basic Auth Key, Iā€™ve tried the ā€œALEXAā€ token method, and some others but without any succces.

Hi @FillR

Your auth key looks a bit long. Can you try the key you have commented NTU3ā€¦ And send on the results?

Hi @davefrooney
Nice to read you !

Obviously, Iā€™ve checked, rechecked my username/password, even simplifying pwd by removing special characters

How many accounts do you have setup on the app?

Only one, Iā€™ve just changed the email address once from my previous provider to the new one.

That might be the problem. Can you delete your account and setup the smartbox again with a different email?