
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@openremote/core
Advanced tools
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:
api/master/info
endpoint)ManagerConfig
)mdi
iconset (if requested in the ManagerConfig
- if not specified iconset will be downloaded)@openremote/rest
) - Sets a timeout of 10s and will also add a request interceptor to
add required Authorization
header for authenticationnpm i @openremote/core
yarn add @openremote/core
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:
import openremote from "@openremote/core";
openremote.init({
managerUrl: "http://localhost:8080",
keycloakUrl: "http://localhost:8080/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
}
});
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:
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);
}
}
./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.
./dist/util
)Various utility methods for common tasks.
The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition, Internet Explorer 11 is also supported.
FAQs
OpenRemote 3.x Core
The npm package @openremote/core receives a total of 1,315 weekly downloads. As such, @openremote/core popularity was classified as popular.
We found that @openremote/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.