# @openremote/core

> OpenRemote 3.x Core

Latest version **1.30.0** (published 2026-09-02) · AGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @openremote/core
pnpm add @openremote/core
yarn add @openremote/core
bun add @openremote/core
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.30.0 |
| Published | 2026-09-02 |
| First published | 2019-01-25 |
| Weekly downloads | 0 |
| License | AGPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | OpenRemote |
| Maintainers | openremotedeveloper, wborn |

## Links

- npm: https://www.npmjs.com/package/@openremote/core
- npm.io page: https://npm.io/package/@openremote/core

## Dependencies (12)

- [qs](https://npm.io/package/qs.md) ^6.8.0
- [axios](https://npm.io/package/axios.md) 1.18.1
- [moment](https://npm.io/package/moment.md) ^2.29.4
- [i18next](https://npm.io/package/i18next.md) ^21.5.3
- [platform](https://npm.io/package/platform.md) ^1.3.6
- [keycloak-js](https://npm.io/package/keycloak-js.md) ^25.0.1
- [@openremote/rest](https://npm.io/package/@openremote/rest.md) 1.30.0
- [lodash.transform](https://npm.io/package/lodash.transform.md) ^4.6.0
- [@openremote/model](https://npm.io/package/@openremote/model.md) 1.30.0
- [@openremote/or-icon](https://npm.io/package/@openremote/or-icon.md) 1.30.0
- [i18next-http-backend](https://npm.io/package/i18next-http-backend.md) ^4.0.0
- [url-search-params-polyfill](https://npm.io/package/url-search-params-polyfill.md) ^8.1.0

## Recent versions

- 1.30.0 (latest) — 2026-09-02
- 1.31.0-snapshot.20260916144308 (snapshot) — 2026-09-16
- 1.31.0-snapshot.20260916130646 — 2026-09-16
- 1.31.0-snapshot.20260915122244 — 2026-09-15
- 1.31.0-snapshot.20260911091633 — 2026-09-11
- 1.31.0-snapshot.20260910125057 — 2026-09-10
- 1.31.0-snapshot.20260910120754 — 2026-09-10
- 1.31.0-snapshot.20260908130403 — 2026-09-08
- 1.31.0-snapshot.20260907094218 — 2026-09-07
- 1.31.0-snapshot.20260904133325 — 2026-09-04
- 1.31.0-snapshot.20260904115341 — 2026-09-04
- 1.31.0-snapshot.20260904102436 — 2026-09-04
- 1.31.0-snapshot.20260903144735 — 2026-09-03
- 1.31.0-snapshot.20260903142507 — 2026-09-03
- 1.31.0-snapshot.20260903135821 — 2026-09-03
- … 813 more at https://npm.io/package/@openremote/core/versions

## README

# @openremote/core

[![NPM Version][npm-image]][npm-url]

ES6 modules for connecting to an OpenRemote Manager as well as utilities for performing common tasks.

The default export is a singleton of type `Manager` that can be used to connect to an OpenRemote Manager, initiate
authentication and download common resources (translation files, icons, etc). Everything is initiated by calling
the `init` method, what tasks are performed during initialisation is determined by the `ManagerConfig` passed to the
`init`, the tasks include the following:

- Check the manager exists and is accessible (calls the `api/master/info` endpoint)
- Initialise authentication and perform login redirect (if requested in the `ManagerConfig`)
- Download `mdi` iconset (if requested in the `ManagerConfig` - if not specified iconset will be downloaded)
- Initialise REST API client (`@openremote/rest`) - Sets a timeout of 10s and will also add a request interceptor to
  add required `Authorization` header for authentication
- Initialise console (the console is the device used to render the application desktop, Android or iOS device)
- Download built in OpenRemote translation files
- Download Asset Model Descriptors

## Install

```bash
npm i @openremote/core
yarn add @openremote/core
```

## Usage

For a full list of properties, methods and options refer to the TypeDoc generated [documentation](<>).

Initialisation is done by calling the `init` method which returns a Promise that is fulfilled with a `boolean` indicating
whether initialisation was successful or not.

Initialisation usage example:

```$javascript
import openremote from "@openremote/core";

openremote.init({
    managerUrl: "http://127.0.0.1:8080",
    keycloakUrl: "http://127.0.0.1:8081/auth",
    auth: Auth.KEYCLOAK,
    autoLogin: false,
    realm: "building",
    configureTranslationsOptions: (options) => {
        options.lng = "nl"; // Change initial language to dutch rather than english
    }
}).then((success) => {
    if (success) {
        // Load the app
    } else {
        // Something has gone wrong
    }
});
```

### Asset Mixin (`dist/asset-mixin`)

Exports a `subscribe` function/mixin that can be used by components to connect to one or more Assets in the OpenRemote
Manager; it takes care of subscribing to events for the specified Asset(s), usage example:

```$javascript
class AssetComponent extends subscribe(openremote) {

    constructor() {
        this.assetIds = [this.asset];
    }

    // Override this method to be notified when an attribute event is received for a subscribed asset. This is called
    // whenever an attribute's value is modified.
    public onAttributeEvent(event: AttributeEvent) {}

    // Override this method to be notified when an asset event is received for a subscribed asset. This is called when
    // an asset is first subscribed or when an asset is modified (attribute value changes are handled as attribute events)
    public onAssetEvent(event: AssetEvent) {}

    // If you need to modify an attribute then call the sendAttributeEvent method; the event must be for a subscribed asset.
    doSendEvent(event: AttributeEvent) {
        this.sendAttributeEvent(event);
    }
}
```

### Events (`./dist/event`)

Provides infrastructure for connecting to the OpenRemote Manager client event bus; by default an `EventProvider` instance
`Manager` is initialised by the `Manager` during the initialisation process and can be accessed from `openremote.events`
but it is also possible to instantiate an `EventProvider` manually.

### Util (`./dist/util`)

Various utility methods for common tasks.

## Supported Browsers

The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
Internet Explorer 11 is also supported.

## License

[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)

[npm-image]: https://img.shields.io/npm/v/@openremote/core.svg
[npm-url]: https://www.npmjs.com/package/@openremote/core

---
_Source: https://npm.io/package/@openremote/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
