Skip to content

Setup aborts with 404 when SmartBox has un-installed node slots (installed: false) #50

Description

@5urfbutler

Description

Setup fails for a Haverland SmartBox that has one or more un-installed node slots in its mgr/nodes response. SmartboxDevice.initialise_nodes iterates every node returned by mgr/nodes and calls SmartboxNode.createsession.get_node_status for each one. For a node with "installed": false (an empty / unpaired slot), the API returns 404 Not Found on .../htr_mod/<addr>/status, and the raised SmartboxError aborts the entire device setup — so none of the real, installed radiators load.

Environment

  • hass-smartbox: 2.3.0
  • smartbox library: 2.5.1
  • Home Assistant: 2026.6.4 (Python 3.14)
  • Reseller: Haverland (api-haverland)

Steps / debug log (device id + tokens redacted)

GET .../mgr/nodes returns a mix of installed and un-installed nodes:

{"nodes": [
  {"addr": 2, "type": "htr_mod", "name": "",          "installed": false},
  {"addr": 3, "type": "htr_mod", "name": "Utility",   "installed": true},
  {"addr": 4, "type": "htr_mod", "name": "Annex",     "installed": true},
  {"addr": 5, "type": "htr_mod", "name": "Bedroom 1", "installed": false},
  {"addr": 7, "type": "htr_mod", "name": "Hall",      "installed": true},
  {"addr": 9, "type": "htr_mod", "name": "",          "installed": false}
]}

Then the very first status fetch (the un-installed addr 2) 404s and kills setup:

DEBUG [smartbox.session] Getting .../api/v2/devs/<dev>/htr_mod/2/status.
ERROR [smartbox.session] ClientResponseError: Not Found, status: 404
smartbox.error.SmartboxError: 404, message='Not Found', url='.../htr_mod/2/status'
ERROR [custom_components.smartbox] Error setting up entry ... for smartbox

Traceback: models.py get_devices → SmartboxDevice.initialise_nodes → SmartboxNode.create → session.get_node_status.

Suggested fix

Skip nodes that aren't installed before fetching their status, in SmartboxDevice.initialise_nodes (the for node_info in session_nodes: loop):

for node_info in session_nodes:
    if node_info.get("installed") is False:
        continue
    node = await SmartboxNode.create(...)

Ideally also make the per-node status fetch tolerant (skip / log a node that 404s) so a single bad node can't abort the whole device.

I applied the installed is False skip locally and all installed radiators then load correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions