node-visionect-api
node package to easily use visionect services.
NPM package here www.npmjs.com/package/visionect-api
Prerequisite
You'll need an instance of Visionect Server to use it https://docs.visionect.com/VisionectPackages.html When your server is running, go to your backend, select the user tab, and add a new apiKey.
Install the package
- With npm installed :
npm install visionect-api
- Require it in your project
var api = require('./visionect-api')
- Configure visionect-api
api.setConfig({
{
host : "your_host",
port : 8081,
apiKey : "your_apiKey",
apiSecret : "your_apiSecret"
}
})
Usage
Right now all request returns a promise object, you can use it like so :
api.getDevices().then(function (devices) {
// console.log(devices);
})
Troubleshooting
Don't forget to look up Visionect documentaton if you have any question regarding Visionect services https://docs.visionect.com/
If sendImage returns "connection refused", try changing the settings of your device :
- directly in the back office :
- select your device
- under session/backend
- change to "HTTP - external renderer"
- or with the API
- getDevice(yourUuid)
- edit device object : ["Backend"]["Name"] = "HTTP"
- update device with your object