Comments (4)
Hello, we are currently working on a new documentation that will be much more precise on how to initialise the device manager plugin.
But you should be able to create an engine using this piece of code.
this.app.sdk
.query({
action: 'create',
controller: `device-manager/engine`,
group,
index,
})
.catch((error) => {
this.app.log.error(`[${index}] Cannot ${action} ${plugin} engine: ${error}`);
throw error;
});
The device manager is an open source plugin, there is no need to have a paid plugin to setup engine
from kuzzle-device-manager.
Thank you @rolljee .
I hope the documentation is completed soon and has more examples.
from kuzzle-device-manager.
I tried successfully creating the engine, then I created the asset
, maybe I created the correct json content
body
POST http://localhost:7512/_/device-manager/models/assets
Authorization: Bearer xxxx
{
"engineGroup":"esp",
"model":"Distiller",
"measures": [
{
"name": "temperature",
"type": "float"
},
{
"name": "humidity",
"type": "float"
}
]
}
But the server responded back error, I know index
, but I don't know collection
and targets
on the url?
{
"action": "writeAsset",
"controller": "device-manager/models",
"error": {
"code": 33619971,
"id": "api.assert.missing_argument",
"message": "Missing argument \"index, collection or targets\".",
"props": [
"index, collection or targets"
],
"stack": "BadRequestError: Missing argument \"index, collection or targets\".\n [...Kuzzle internal calls deleted...]\n at DocumentController.search (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/api/controllers/documentController.js:92:20)\n at doAction (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/api/funnel.js:1079:47)\n at Funnel.executePluginRequest (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/api/funnel.js:756:20)\n at FunnelProtocol.query (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/core/shared/sdk/funnelProtocol.js:95:51)\n at Proxy._timeoutRequest (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle-sdk/src/Kuzzle.js:763:34)\n at Proxy.query (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle-sdk/src/Kuzzle.js:591:21)\n at Proxy.query (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/core/shared/sdk/embeddedSdk.js:132:22)\n at AssetService.refreshModel (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle-device-manager/lib/modules/asset/AssetService.ts:333:35)\n at async Kuzzle.ask (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/kuzzle/event/kuzzleEventEmitter.js:229:22)\n at async ModelService.writeAsset (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle-device-manager/lib/modules/model/ModelService.ts:106:5)\n at async ModelsController.writeAsset (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle-device-manager/lib/modules/model/ModelsController.ts:115:24)\n at async Funnel.processRequest (/home/xdien/workspace/next-iot/backend/node_modules/kuzzle/lib/api/funnel.js:668:28)",
"status": 400
},
"headers": {},
"node": "knode-bored-maugrim-14974",
"requestId": "7afe4c19-d9d2-417e-907c-90908ff3e827",
"result": null,
"status": 400,
"volatile": null
}
from kuzzle-device-manager.
I was able to create the asset but the error was because I filled in the wrong engineGroup
"engineGroup":"esp",
from kuzzle-device-manager.
Related Issues (20)
- Ensure Epoch Millis for `measuredAt` in measures HOT 4
- Add `"comma-dangle": ["error", "always"],` to `.eslintrc.json` HOT 1
- Update asset and device measures depending on most recent
- Measure battery in integer HOT 1
- Use `userId` for origin id instead of `deviceId` when the measure is pushed from an asset HOT 1
- Error at startup `Cannot load user \"payload-gateway\": there is no security profiles associated to it`
- Link a metadata to an assetCategory is prone to race condition
- Add stacktrace when failing to decode payloads HOT 1
- Partially updating metadata of type object replace the whole metadata
- Define name of mesure type in its definition, not at registering HOT 1
- Update asset is prone to race condition HOT 2
- Query arguments are not forwarded from `assets:search` to `document:search`
- Add full path of modified nested metadata in history when updating an asset HOT 1
- Update metadata in existing assets when the model is modified HOT 1
- Fix type in AssetService
- CSV export does not export all columns
- How to handle devices online via MQTT HOT 2
- listAssets always returns empty HOT 1
- mapping set to strict, dynamic introduction of [value] within [asset.measures.Heating1.values] is not allowed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kuzzle-device-manager.