DeviceHive JavaScript Library. Works with NodeJs and browsers.
Repo devicehive/devicehive-javascript, read from GitHub 1 min ago. devicehive has not joined Take My Repo.
devicehive/devicehive-javascript is a public repo on GitHub by devicehive. DeviceHive JavaScript Library. Works with NodeJs and browsers. It declares the Apache-2.0 license on GitHub. It is written mainly in JavaScript, has 7 stars and last changed on 2018-06-22. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-21.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
DeviceHive-javascript is promise-based library for using DeviceHive.
For Node.js use case (Node v4.x on Mac, Linux, or Windows on a x86 or x64 processor), DeviceHive-javascript will install nice and easy with:
npm install devicehive
In case you want to use DeviceHive-javascript in the browser:
npm install;npm run build;devicehive.js/devicehive.min.js in dist folder.During development you can use this library with Promises, and Async/Await functions.
Note: Using HTTP/HTTPS you need to pass 3 different service URL`s: mainServiceURL, authServiceURL and pluginServiceURL.
const DeviceHive = require('devicehive'); const httpDeviceHive = new DeviceHive({ login: 'login', password: 'password', mainServiceURL: 'http://<host>:<port>/<path>', authServiceURL: 'http://<host>:<port>/<path>', pluginServiceURL: 'http://<host>:<port>/<path>' }); httpDeviceHive.connect();
Note: Using WebSocket you need to pass only one service URL: mainServiceURL.
const DeviceHive = require('devicehive'); const wsDeviceHive= new DeviceHive({ login: 'login', password: 'password', mainServiceURL: 'ws://<host>:<port>/<path>' }); wsDeviceHive.connect();
You can use models described in DeviceHive.models
// Getting Device model const Device = DeviceHive.models.Device; // Getting Device list query model const DeviceListQuery = DeviceHive.models.query.DeviceListQuery;
You can use API described in DeviceHive.command, DeviceHive.configuration, DeviceHive.device, DeviceHive.deviceType, DeviceHive.info, DeviceHive.notification, DeviceHive.network, DeviceHive.plugin, DeviceHive.token, DeviceHive.user.
Here is example of how you can use DeviceHive-javascript:
const DeviceHive = require('devicehive'); // Getting Device model const Device = DeviceHive.models.Device // Getting Device list query model const DeviceListQuery = DeviceHive.models.query.DeviceListQuery; // Configurating DeviceHive const myDeviceHive = new DeviceHive({ login: 'login', password: 'password', mainServiceURL: 'ws://<host>:<port>/<path>' }); // Configurating Device model const device = new Device({ id: 'myTestId', name: 'myTestName', networkId: 1, deviceTypeId: 1, blocked: false }); // Configurating Device List query const myDeviceListQuery = new DeviceListQuery({ networkId: 1 }); // Push message handler myDeviceHive.on(DeviceHive.MESSAGE_EVENT, (message) => { console.log(message); }); // Error handler myDeviceHive.on(DeviceHive.ERROR_EVENT, (error) => { console.error(error); }); // Connecting and usin API myDeviceHive.connect() .then(() => myDeviceHive.device.list(myDeviceListQuery)) .then(data => console.log(data)) .then(() => myDeviceHive.device.add(device)) .then(data => console.log(data)) .then(() => myDeviceHive.device.list(myDeviceListQuery)) .then(data => console.log(data)) .then(() => myDeviceHive.device.delete(device.id)) .then(data => console.log(data)) .then(() => myDeviceHive.device.list(myDeviceListQuery)) .then(data => console.log(data)) .catch(error => console.warn(error));
DeviceHive module
ObjectDeviceHive module
| Param | Type | Description |
|---|---|---|
| options | object |
Initial settings |
| [options.accessToken] | string |
Access token |
| [options.refreshToken] | string |
Refresh token |
| [options.login] | string |
Login |
| [options.password] | string |
Password |
| options.mainServiceURL | string |
Main Service URL |
| [options.authServiceURL] | string |
Auth Service URL (required only for http) |
| [options.pluginServiceURL] | string |
Plugin Service URL (required only for http) |
| [options.autoUpdateSession] | boolean |
Flag to enable/disable autoupdating session. Default: true |
Connect and authorize
Params:
| Param | Type | Description |
|---|---|---|
| options.accessToken | string |
Access token (default DeviceHive constructor configuration) (optional) |
| options.refreshToken | string |
Refresh token (default DeviceHive constructor configuration) (optional) |
| options.login | string |
Login (default DeviceHive constructor configuration) (optional) |
| options.password | string |
Password (default DeviceHive constructor configuration) (optional) |
| options.reconnectionAttempts | number |
Reconnection attempts (default infinity (-1)) (optional) |
| options.reconnectionInterval | number |
Reconnection interval in ms (default 5000) (optional) |
ObjectReturns DeviceHive models
ObjectLook at DeviceCommandAPI.
ObjectLook at ConfigurationAPI.
ObjectLook at DeviceAPI.
ObjectLook at deviceTypeAPI.
ObjectLook at InfoAPI.
ObjectLook at DeviceNotificationAPI.
ObjectLook at NetworkAPI.
ObjectLook at PluginAPI.
ObjectLook at TokenAPI.
ObjectLook at UserAPI.
Returns information about the current configuration
PromisePromisePromisePromiseCreates ConfigurationAPI
| Param | Type |
|---|---|
| name | number |
PromiseUpdates a configuration
| Param | Type |
|---|---|
| configuration | Configuration |
PromiseDeletes an existing configuration
| Param | Type |
|---|---|
| name | number |
Returns information about the current device
PromisePromisePromisePromisePromisePromiseCreates DeviceAPI
| Param | Type |
|---|---|
| deviceId | string |
PromiseReturn a list of devices
| Param | Type |
|---|---|
| deviceListQuery | DeviceListQuery |
PromiseReturns count of devices
| Param | Type |
|---|---|
| deviceCountQuery | DeviceCountQuery |
PromiseRegisters or updates a device
| Param | Type | Description |
|---|---|---|
| device | object |
data |
PromiseDeletes an existing device
| Param | Type |
|---|---|
| deviceId | string |
Returns information about the current command
PromisePromisePromisePromisePromisePromisePromisePromisePromisePromiseCreates DeviceCommandAPI
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| commandId | number |
Command ID |
PromiseReturn a list of commands
| Param | Type |
|---|---|
| commandListQuery | CommandListQuery |
PromiseRegisters a command
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| command | Command |
PromiseUpdates a command
| Param | Type |
|---|---|
| command | Command |
Promise| Param | Type |
|---|---|
| commandPollQuery | CommandPollQuery |
Promise| Param | Type |
|---|---|
| commandPollManyQuery | CommandPollManyQuery |
Promise| Param |
|---|
| deviceId |
| commandId |
Promise| Param | Type |
|---|---|
| commandPollQuery | CommandPollQuery |
Promise| Param | Type |
|---|---|
| subscriptionId | Number |
Returns information about the current notification
PromisePromisePromise**PromisePromisePromiseCreates DeviceNotificationAPI
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| notificationId | number |
Notification ID |
PromiseReturn a list of notifications
| Param | Type |
|---|---|
| notificationListQuery | NotificationListQuery |
PromiseRegisters a notification
| Param | Type |
|---|---|
| notification | Notification |
*| Param | Type |
|---|---|
| notificationPollQuery | NotificationPollQuery |
*| Param | Type |
|---|---|
| notificationPollManyQuery | NotificationPollManyQuery |
Promise| Param | Type |
|---|---|
| notificationPollQuery | NotificationPollQuery |
Promise| Param | Type |
|---|---|
| subscriptionId | Number |
Returns information about the current deviceType
PromisePromisePromisePromisePromisePromisePromiseCreates DeviceTypeAPI
| Param | Type |
|---|---|
| deviceTypeId | number |
PromiseReturn a list of deviceTypes
| Param | Type |
|---|---|
| deviceTypeListQuery | DeviceTypeListQuery |
PromiseReturns count of deviceTypes
| Param | Type |
|---|---|
| deviceTypeCountQuery | DeviceTypeCountQuery |
PromiseRegisters a deviceType
| Param | Type | Description |
|---|---|---|
| deviceType | DeviceType |
data |
PromiseUpdates a deviceType
| Param | Type | Description |
|---|---|---|
| deviceType | DeviceType |
data |
PromiseDeletes an existing deviceType
| Param | Type |
|---|---|
| deviceTypeDeleteQuery | deviceTypeDeleteQuery |
Returns information about the current network
PromisePromisePromisePromisePromisePromisePromiseReturns a network
| Param | Type |
|---|---|
| networkId | number |
PromiseReturn a list of networks
| Param | Type |
|---|---|
| networkListQuery | NetworkListQuery |
PromiseReturns count of networks
| Param | Type |
|---|---|
| networkCountQuery | NetworkCountQuery |
PromiseRegisters a network
| Param | Type | Description |
|---|---|---|
| network | Network |
data |
PromiseUpdates a network
| Param | Type | Description |
|---|---|---|
| networkId | number |
|
| network | Network |
data |
PromiseDeletes an existing network
| Param | Type |
|---|---|
| networkDeleteQuery | networkDeleteQuery |
Returns information about the current plugin
PromisePromisePromisePromisePromisePromiseReturn a list of plugins
| Param | Type |
|---|---|
| pluginListQuery | PluginListQuery |
PromiseReturns count of plugins
| Param | Type |
|---|---|
| pluginCountQuery | PluginCountQuery |
PromiseRegisters a plugin
| Param | Type |
|---|---|
| plugin | Plugin |
| pluginRegisterQuery | PluginRegisterQuery |
PromiseUpdates a plugin
| Param | Type |
|---|---|
| plugin | Promise |
PromiseDeletes an existing plugin
| Param | Type |
|---|---|
| Plugin | object |
Get server info
Creates InfoAPI
Get cache info
Get cluster info
Authentificate using login and password
Creates TokenAPI
| Param | Type |
|---|---|
| login | string |
| password | string |
Create user token
| Param | Type | Description |
|---|---|---|
| token | string |
Plugin token |
Create user token
| Param | Type |
|---|---|
| userToken | UserToken |
Create plugin token
| Param | Type |
|---|---|
| pluginToken | PluginToken |
Refresg token
| Param | Type |
|---|---|
| refreshToken | string |
Returns information about the current configuration
DeviceAPIReturns information about the current device
DeviceCommandAPIReturns information about the current command
DeviceNotificationAPIReturns information about the current notification
DeviceTypeAPIReturns information about the current deviceType
NetworkAPIReturns information about the current network
PluginAPIReturns information about the current plugin
InfoAPIGet server info
TokenAPIAuthenticate using login and password
UserAPIReturn a list of users
Returns information about the current configuration
PromisePromisePromisePromiseCreates ConfigurationAPI
Returns: Promise - selected configuration
| Param | Type |
|---|---|
| name | number |
PromiseUpdates a configuration
Returns: Promise - count of configuration
| Param | Type |
|---|---|
| configuration | Configuration |
PromiseDeletes an existing configuration
| Param | Type |
|---|---|
| name | number |
Returns information about the current device
PromisePromisePromisePromisePromisePromiseCreates DeviceAPI
Returns: Promise - selected device
| Param | Type |
|---|---|
| deviceId | string |
PromiseReturn a list of devices
Returns: Promise - list of devices
| Param | Type |
|---|---|
| deviceListQuery | DeviceListQuery |
PromiseReturns count of devices
Returns: Promise - count of devices
| Param | Type |
|---|---|
| deviceCountQuery | DeviceCountQuery |
PromiseRegisters or updates a device
Returns: Promise - count of devices
| Param | Type | Description |
|---|---|---|
| device | object |
data |
PromiseDeletes an existing device
| Param | Type |
|---|---|
| deviceId | string |
Returns information about the current command
PromisePromisePromisePromisePromisePromisePromisePromisePromisePromiseCreates DeviceCommandAPI
Returns: Promise - selected command
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| commandId | number |
Command ID |
PromiseReturn a list of commands
Returns: Promise - list of commands
| Param | Type |
|---|---|
| commandListQuery | CommandListQuery |
PromiseRegisters a command
Returns: Promise - count of commands
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| command | Command |
PromiseUpdates a command
Returns: Promise - count of commands
| Param | Type |
|---|---|
| command | Command |
Promise| Param | Type |
|---|---|
| commandPollQuery | CommandPollQuery |
Promise| Param | Type |
|---|---|
| commandPollManyQuery | CommandPollManyQuery |
Promise| Param |
|---|
| deviceId |
| commandId |
Promise| Param | Type |
|---|---|
| commandPollQuery | CommandPollQuery |
Promise| Param | Type |
|---|---|
| subscriptionId | Number |
Returns information about the current notification
PromisePromisePromise**PromisePromisePromiseCreates DeviceNotificationAPI
Returns: Promise - selected notification
| Param | Type | Description |
|---|---|---|
| deviceId | number |
Device ID |
| notificationId | number |
Notification ID |
PromiseReturn a list of notifications
Returns: Promise - list of notifications
| Param | Type |
|---|---|
| notificationListQuery | NotificationListQuery |
PromiseRegisters a notification
Returns: Promise - count of notifications
| Param | Type |
|---|---|
| deviceId | Number |
| notification | Notification |
*| Param | Type |
|---|---|
| notificationPollQuery | NotificationPollQuery |
*| Param | Type |
|---|---|
| notificationPollManyQuery | NotificationPollManyQuery |
Promise| Param | Type |
|---|---|
| notificationPollQuery | NotificationPollQuery |
Promise| Param | Type |
|---|---|
| subscriptionId | Number |
Returns information about the current deviceType
PromisePromisePromisePromisePromisePromisePromiseCreates DeviceTypeAPI
Returns: Promise - selected deviceType
| Param | Type |
|---|---|
| deviceTypeId | number |
PromiseReturn a list of deviceTypes
Returns: Promise - list of deviceTypes
| Param | Type |
|---|---|
| deviceTypeListQuery | DeviceTypeListQuery |
PromiseReturns count of deviceTypes
Returns: Promise - count of deviceTypes
| Param | Type |
|---|---|
| deviceTypeCountQuery | DeviceTypeCountQuery |
PromiseRegisters a deviceType
Returns: Promise - count of deviceTypes
| Param | Type | Description |
|---|---|---|
| deviceType | DeviceType |
data |
PromiseUpdates a deviceType
Returns: Promise - count of deviceTypes
| Param | Type | Description |
|---|---|---|
| deviceType | DeviceType |
data |
PromiseDeletes an existing deviceType
| Param | Type |
|---|---|
| deviceTypeDeleteQuery | deviceTypeDeleteQuery |
Returns information about the current network
PromisePromisePromisePromisePromisePromisePromiseReturns a network
Returns: Promise - selected network
| Param | Type |
|---|---|
| networkId | number |
PromiseReturn a list of networks
Returns: Promise - list of networks
| Param | Type |
|---|---|
| networkListQuery | NetworkListQuery |
PromiseReturns count of networks
Returns: Promise - count of networks
| Param | Type |
|---|---|
| networkCountQuery | NetworkCountQuery |
PromiseRegisters a network
Returns: Promise - Network
| Param | Type | Description |
|---|---|---|
| network | Network |
data |
PromiseUpdates a network
Returns: Promise - Network
| Param | Type | Description |
|---|---|---|
| network | Network |
data |
PromiseDeletes an existing network
Returns: Promise - Network
| Param | Type |
|---|---|
| networkDeleteQuery | networkDeleteQuery |
Returns information about the current plugin
PromisePromisePromisePromisePromisePromiseReturn a list of plugins
Returns: Promise - list of plugins
| Param | Type |
|---|---|
| pluginListQuery | PluginListQuery |
PromiseReturns count of plugins
Returns: Promise - count of plugins
| Param | Type |
|---|---|
| pluginCountQuery | PluginCountQuery |
PromiseRegisters a plugin
Returns: Promise - Plugin
| Param | Type |
|---|---|
| plugin | Plugin |
| pluginRegisterQuery | PluginRegisterQuery |
PromiseUpdates a plugin
Returns: Promise - Plugin
| Param | Type |
|---|---|
| pluginUpdateQuery | PluginUpdateQuery |
PromiseDeletes an existing plugin
Returns: Promise - Plugin
| Param | Type |
|---|---|
| topicName | string |
Get server info
PromisePromisePromisePromiseGet server info
PromiseGet cache info
PromiseGet cluster info
Authenticate using login and password
Creates TokenAPI
| Param | Type |
|---|---|
| login | string |
| password | string |
Create user token
| Param | Type | Description |
|---|---|---|
| token | string |
Plugin token |
Create user token
| Param | Type |
|---|---|
| userToken | UserToken |
Create plugin token
| Param | Type |
|---|---|
| pluginToken | PluginToken |
Refresh token
| Param | Type |
|---|---|
| refreshToken | string |
Return a list of users
PromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromisePromiseCreates UserAPI
Returns: Promise - list of users
| Param | Type |
|---|---|
| userListQuery | UserListQuery |
PromiseReturns count of users
Returns: Promise - count of users
| Param | Type |
|---|---|
| userCountQuery | UserCountQuery |
PromiseReturns information about the current user
Returns: Promise - selected user
| Param | Type |
|---|---|
| userId | number |
Promisedevicehive/devicehive-javascript is a public repo on GitHub by devicehive. DeviceHive JavaScript Library. Works with NodeJs and browsers.
It declares the Apache-2.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2018-06-22. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
:house_with_garden: Open source home automation that puts local control and privacy first.
A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, MQTTS, POP3, POP3S, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features

DeviceHive esp8266 firmware. Control hardware via clouds with DeviceHive!
Run DeviceHive Docker containers with Docker Compose and on Kubernetes
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/devicehive/devicehive-javascriptTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.