Skip to content

About

Connects Home Assistant to ioBroker

Topics

Resources

Security policy

Stars

28 stars

Watchers

4 watching

Forks

Repository files navigation

Logo

ioBroker.hass

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information on how to disable the error reporting, see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

This adapter allows the connecting of Home Assistant to ioBroker.

Usage

Create a long-term token in HASS and use it as PW (copy it also in the repeat field).

Then it should read out all attributes for all devices. Services might be controllable (e.g. "turn_on"). To control services, you have two options:

Set a direct value

Set the state with an ack=false value which is not a string (e.g. Boolean true), then it will be triggered also in HASS without additional service data. This will only work if the service has one field to be sent - then the value is sent as this field! If the service has more than one field, you will find a warning in the log that provides more details about the fields that are possible to be sent, e.g.

Please make sure to provide a stringified JSON as value to set relevant fields! Please refer to the Readme for details!
Allowed field keys are: temperature, target_temp_high, target_temp_low, hvac_mode

Set a stringified JSON to provide one or multiple fields

Set the state with an ack=false String value which is a stringified JSON object to call the service and use the JSON object as service data

For the last option on a light.turn_off with e.g. {"transition":10,"flash":"short"} these two service data details are sent with the call to HASS. The available fields with their exact data definition can be seen in the JSON definition of the ioBroker object in the native fields section and would look like the following in the above example:

{
    // ...
    native: {
        "fields": {
            "transition": {
                "name": "Transition",
                "description": "Duration it takes to get to next state.",
                "selector": {
                    "number": {
                        "min": 0,
                        "max": 300,
                        "unit_of_measurement": "seconds"
                    }
                }
            },
            "flash": {
                "name": "Flash",
                "description": "If the light should flash.",
                "advanced": true,
                "selector": {
                    "select": {
                        "options": [
                            "long",
                            "short"
                        ]
                    }
                }
            }
        },
        "entity_id": "light.mi_control_hub_light",
        "attr": "turn_off",
        "type": "light"
    }
    //...
}

For some services like set_speed it is required to call with a JSON object like {speed: "high"} in general to provide required values. In this case the field definition looks e.g. like:

{
    //...
    native: {
        "fields": {
            "speed": {
                "name": "Speed",
                "description": "Speed setting.",
                "required": true,
                "example": "low",
                "selector": {
                    "text": null
                }
            }
        }
        // ...
    }
    // ...
}

Configuration

There is a good article about the connection.

Please check it https://www.smarthomejetzt.de/mit-iobroker-auf-eine-home-assistant-hass-io-installation-und-die-geraete-zugreifen/

Unfortunately only in German, but the Google Translate works rather good

Secure connection (wss)

Enable Secure if Home Assistant is reachable via HTTPS. If Home Assistant uses a self-signed certificate or a certificate of your own (private) CA, the connection fails with self-signed certificate or self-signed certificate in certificate chain. In this case you can either

  • enable Ignore certificate errors. The certificate of Home Assistant is then not verified at all, so use this only in trusted networks, or
  • keep the verification and let Node.js trust the CA store of your operating system (where your own CA is installed): iobroker object extend system.adapter.hass.0 '{"common":{"nodeProcessParams":["--use-system-ca"]}}'

Entity exclude filter

Optionally, restrict which Home Assistant entities are synchronised into ioBroker.

Each non-empty, non-comment line in the Exclude patterns field is a glob (only * is a wildcard and matches any sequence of characters, including .). Matching is case-sensitive and anchored to the full id. There are two kinds of patterns:

  • Entity patterns (all patterns not starting with entities.) are matched against the full entity_id (e.g. switch.living_room) only.
  • Object path patterns start with entities. and are matched against the ioBroker object id without the instance prefix (e.g. entities.sensor.living_room_temperature.device_class). The instance prefix may be included (e.g. hass.0.entities.…), so ids copied from the object browser work as well.

An entity that matches an entity pattern, or whose channel entities.<entity_id> matches an object path pattern, is:

  • skipped when objects are created or updated (initial sync and re-syncs)
  • ignored when its state changes in HASS (no state writes triggered in ioBroker)

A single state, attribute or service object that matches an object path pattern is skipped individually. This can be used to drop noisy attributes such as device_class or state_class without dropping the sensor itself. Entity patterns never match object paths: *battery* drops battery entities, but not the battery_level attribute of other entities.

Lines starting with # are treated as comments.

Examples:

# Drop every entity whose name starts with `iob_`, regardless of domain:
*.iob_*

# Drop sensors only:
sensor.iob_*

# Drop a whole ioBroker object subtree:
entities.device_tracker.*

# Drop noisy attributes from all synced entities while keeping the main state:
entities.*.*.device_class
entities.*.*.state_class

Tick Verbose filter logging to log every excluded entity_id individually during the first sync (requires adapter loglevel info or debug). Subsequent re-syncs only emit the aggregate count to keep the log clean.

An empty pattern list leaves the adapter behaviour identical to previous versions.

Large installations

js-controller warns when an adapter instance has more objects than its object warning limit (5000 by default). A Home Assistant installation can easily exceed this, so the adapter declares a default limit of 30000 (js-controller >= 7.1.2). If the warning still appears for an existing instance, raise the value of system.adapter.hass.<instance>.objectsWarnLimit or reduce the number of objects with object path patterns (see above).

Changelog

2.3.1 (2026-11-30)

  • (@GermanBluefox) The port of Home Assistant (native.port) is no longer listed by js-controller 8 as a port used by the instance (common.declareUsedResources: false)

2.3.0 (2026-11-24)

  • (GermanBluefox) Do not show the misleading 'Allowed field keys' hint for services without fields (#79)
  • (GermanBluefox) Added the option "Ignore certificate errors" to connect to Home Assistant with a self-signed certificate (#88)
  • (GermanBluefox) Fixed the issues reported by the repository checker (#217)

2.2.1 (2026-11-18)

  • (GermanBluefox) Avoid unhandled promise rejections (DB closed) during shutdown (#184)

2.2.0 (2026-11-15)

  • (@GermanBluefox) State changes received during a resync or after a reconnect are no longer overwritten by the older snapshot
  • (@GermanBluefox) An invalid access token stops the connection attempts instead of retrying every 3 seconds
  • (@GermanBluefox) Requests pending when the connection is lost now fail with "connection lost" instead of never being answered

2.1.2 (2026-10-13)

  • (@GermanBluefox) Fixed the build: 2.1.1 was not published to npm

Older changes can be found in CHANGELOG_OLD.md.

License

The MIT License (MIT)

Copyright (c) 2018-2026 bluefox dogafox@gmail.com

See LICENSE.

About

Connects Home Assistant to ioBroker

Topics

Resources

Security policy

Stars

28 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages