Vigilance Networks

HTTP

Post Parameters(query string).
For example, here is the initial calling sequence:
1. addGateway with first gateway's LicenseKey and name(any string that will be used later to identify the gateway in a list). sessionKey is null. This will return sessionKey.
2. getGateways will return the id of the first gateway
3.bindGateway with the gatewayId of the first gateway
4.login with default username and pasword

Gateways

addGateway
URL
https://api.mindolife.com/API/Session/addGateway

Input Parameters
String licenseKey;
String gatewayName;
String sessionKey /*(null if this is the first gateway)*/

Output
{"key" : "xxx"}
updateGateway
URL
https://api.mindolife.com/API/Session/updateGateway

Input Parameters
String sessionKey;
int gatewayId;
String gatewayName;

Output
{"status":true}
Error Output/s
{ "error": { "id": "3006", "data": "xxxx" } }
deleteGateway
URL
https://api.mindolife.com/API/Session/deleteGateway

Input Parameters
int gatewayId;
String sessionKey;

Output
{"status":true}
getGateways
URL
https://api.mindolife.com/API/Session/getGateways

Input Parameters
String sessionKey;

Output
{"gateways":{"count":"3","gateway":[{"gatewayName":"55","gatewayId":"3409","timeOnGateway":"0","demoSessionExpiration":"120","isDemo":"true"},{"gatewayName":"qa","gatewayId":"3387","timeOnGateway":"0","demoSessionExpiration":"120","isDemo":"true"},{"gatewayName":"qa","gatewayId":"3388","timeOnGateway":"0","demoSessionExpiration":"120","isDemo":"true"}]}}
bindGateway
URL
https://api.mindolife.com/API/Session/bindGateway

Input Parameters
int gatewayId;
String sessionKey;

Output
{"status":true}
unbindGateway
URL
https://api.mindolife.com/API/Session/unbindGateway

Input Parameters
String sessionKey;

Output
{"status":true}

Login

login
URL
https://api.mindolife.com/API/Gateway/login

Input Parameters
String username;
String password;
boolean keepMeLoggedIn;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "5003", "data": "xxxx" } }
{ "error": { "id": "5002", "data": "xxxx" } }
{ "error": { "id": "5001", "data": "xxxx" } }
{ "error": { "id": "1000", "data": "xxxx" } }
logout
URL
https://api.mindolife.com/API/Gateway/logout

Input Parameters
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "5001", "data": "xxxx" } }
{ "error": { "id": "1000", "data": "xxxx" } }
isLoggedIn
URL
https://api.mindolife.com/API/Gateway/isLoggedIn

Input Parameters
String sessionKey;

Output
{"isLoggedIn":true,"loggedInUser":{"username":"admin","lastLogin":0,"userId":41,"role":"Administrator","displayName":"admin"}}
Error Output/s
{ "error": { "id": "5001", "data": "xxxx" } }
{ "error": { "id": "1000", "data": "xxxx" } }

Devices

addDevice
URL
https://api.mindolife.com/API/Gateway/addDevice

Input Parameters
String licenseKey;
String name;
String sessionKey;

Output
{"DevicesContainerUnits":{"DevicesContainerUnit":[{"Sensor":[{"id":461,"signalStrength":196,"connectivityRate":"ok","protocol":"RF","lastLifeSign":0,"tag":[],"name":"My Sensor","state":0,"action":[]}]}]}}
Error Output/s
{ "error": { "id": "1", "data": "xxxx" } }
updateControl
URL
https://api.mindolife.com/API/Gateway/updateControl

Input Parameters
String id /* device id*/;
String name /*device new name*/,String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "1", "data": "xxxx" } }
removeControl
To remove control it sould be disconnected from all other objects like Policies, Groups …
URL
https://api.mindolife.com/API/Gateway/removeControl

Input Parameters
String removeControlPassword;
String ids /*can contain one or more devices ids*/;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "1", "data": "xxxx" } }
getDevices
URL
https://api.mindolife.com/API/Gateway/getDevices

Input Parameters
String sessionKey;

Output
{"DevicesContainerUnits":{"DevicesContainerUnit":[{"Sensor":[{"id":461,"signalStrength":196,"connectivityRate":"ok","protocol":"RF","lastLifeSign":0,"tag":[],"name":"DF000099","state":0,"action":[{"time":"1493273194630","source":"1","userId":"-1","state":"2"},{"time":"1493272835063","source":"1","userId":"-1","state":"0"}]}]},{"Thermostat":[{"id":460,"signalStrength":194,"connectivityRate":"ok","protocol":"RF","lastLifeSign":0,"tag":[],"name":"AC000099","state":126,"action":[{"time":"1493272942582","source":"1","userId":"-1","state":"126"}]}]},{"Notification":[{"id":457,"signalStrength":255,"connectivityRate":"ok","protocol":"TCP","tag":[],"name":"Notification","state":"[{\"id\":102,\"phone_name\":\"Samsung SM-G935F\"},{\"id\":105,\"phone_name\":\"Shadi bar\"}]","action":[]}]},{"Timer":[{"id":456,"signalStrength":255,"connectivityRate":"ok","protocol":"TCP","tag":[],"name":"Timer","state":"0","action":[]}]}]}}
Error Output/s
{ "error": { "id": "2", "data": "xxxx" } }
changeControlState
Related APIs
URL
https://api.mindolife.com/API/Gateway/changeControlState

Input Parameters
int id /* (device id)*/;
int state;
String sessionKey;
String reqID;

Output
{"status":true}
Error Output/s
{ "error": { "id": "3", "data": "xxxx" } }
doCalibration
Related APIs
URL
https://api.mindolife.com/API/Gateway/doCalibration

Input Parameters
int id;
String action /*values [start/end]*/;
String sessionKey;
String reqID;

Output
{"status":true}
Error Output/s
{ "error": { "id": "3", "data": "xxxx" } }
changeControlConfig
URL
https://api.mindolife.com/API/Gateway/changeControlConfig

Input Parameters
int id /*(device id)*/;
String config /*config message to be sent to the device*/;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "3", "data": "xxxx" } }

Policy

addPolicy
Get the list of all policies Policies is a set of rules that the user can configure to set a relational behaviour between devices.
Special instructions : ChangeTo: is a pattern that of 1 byte, if the policy should keep a bit as is in current state, this bit should be represented as *
Days of week : 1,2,3,4,5,6,7
Year : yyyy if need to set a specific year, * for any or don’t write this property
month : mm is needed to set a specific month, * for any or don’t write this property
day : dd is needed to set a specific day of month (1-31), * for any or don’t write this property
hour: hh is needed to set a specific hour of day, * for any or don’t write this property
minute: is needed to set a specific minute in hour, this is mandatory for any pattern
URL
https://api.mindolife.com/API/Gateway/addPolicy

Input Parameters
String name;
int groupID;
boolean isExecuted;
boolean isOneTime;
boolean status;
String extendedDetails extended explaination/*Valida XML*/;
Enum type;
String sessionKey;

Output
{"policies":{"policy":[{"id":698,"groupID":"","isOneTime":false,"details":{"when":[{"condition":{"minute":"39","conditionType":"time","month":"","year":"","day":"","hour":"1","daysOfWeek":""}}],"do":[{"action":{"after":"-1","changeTo":"{\"command\":\"sendMsg\",\"msg\":\"new\",\"id\":[]}","changeBackTo":"","actionType":"command","deviceId":"457"}}]},"status":true,"isExecuted":false,"name":"New Name","type":"Regular"}]}}
Error Output/s
{ "error": { "id": "5", "data": "xxxx" } }
updatePolicy
URL
https://api.mindolife.com/API/Gateway/updatePolicy

Input Parameters
int id;
String name;
boolean status;
int groupID;
boolean isExecuted;
boolean isOneTime;
String extendedDetails extended explaination/*Valida XML*/;
Enum type;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "7", "data": "xxxx" } }
removePolicy
URL
https://api.mindolife.com/API/Gateway/removePolicy

Input Parameters
int id;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "5", "data": "xxxx" } }
getPolicies
URL
https://api.mindolife.com/API/Gateway/getPolicies

Input Parameters
String sessionKey;

Output
{"policies":{"policy":[{"id":695,"groupID":"","isOneTime":false,"details":{"when":[{"condition":{"minute":"11","conditionType":"time","month":"","year":"","day":"","hour":"11","daysOfWeek":""}}],"do":[]},"status":true,"isExecuted":false,"name":"New Name","type":"Regular"}]}}
Error Output/s
{ "error": { "id": "8", "data": "xxxx" } }
doPolicy
Related APIs
URL
https://api.mindolife.com/API/Gateway/doPolicy

Input Parameters
int id;
String sessionKey;
String reqID;

Output
{"status":true}
Error Output/s
{ "error": { "id": "5", "data": "xxxx" } }

Groups

addGroup
URL
https://api.mindolife.com/API/Gateway/addGroup

Input Parameters
String name;
Enum type /*values [Regular, Room, Administrative]*/;
JsonArray devices extended explaination/*json array [{``id11 : 1, ``description`` : ``...``}, ...]*/;
String description;
String sessionKey;

Output
{"response":"{\"id\":1,\"description\":\"\",\"name\":\"New Group\",\"devices\":[{\"id\":\"449\",\"description\":\"\"}],\"type\":0,\"isEnabled\":true}"}
Error Output/s
{ "error": { "id": "9002", "data": "xxxx" } }
updateGroup
URL
https://api.mindolife.com/API/Gateway/updateGroup

Input Parameters
int id;
String name;
Enum type;
String description;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "9002", "data": "xxxx" } }
removeGroup
To remove the group it must be empty
URL
https://api.mindolife.com/API/Gateway/removeGroup

Input Parameters
String id;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "9002", "data": "xxxx" } }
getGroups
URL
https://api.mindolife.com/API/Gateway/getGroups

Input Parameters
String sessionKey;

Output
{"groups":[{"id":1,"description":"","name":"New Group","type":0,"devices":[{"id":"449","description":""},{"id":"450","description":""}],"isEnabled":true}]}
Error Output/s
{ "error": { "id": "9001", "data": "xxxx" } }
addGroupDevice
Adding a device to a group
URL
https://api.mindolife.com/API/Gateway/addGroupDevice

Input Parameters
String groupId;
int deviceId;
String description;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "9002", "data": "xxxx" } }
removeGroupDevice
URL
https://api.mindolife.com/API/Gateway/removeGroupDevice

Input Parameters
int groupId;
int deviceId;
int sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "9002", "data": "xxxx" } }

Users

addUser
Special instructions : Password must be: a digit must occur at least
once,
a lower case letter must occur at least once,
an upper case letter must occur at least once,
a special character must occur at least once,
no whitespace allowed,
at least 8 characters
URL
https://api.mindolife.com/API/Gateway/addUser

Input Parameters
String displayName;
String username;
String password;
Enum role/* Administrator, Regular, Visitor, Child, Installer */;
String sessionKey;

Output
{"users":{"user":[{"username":"rawhi","lastLogin":0,"userId":46,"role":"Administrator","displayName":"rawhi"}]}}
Error Output/s
{ "error": { "id": "6004", "data": "xxxx" } }
{ "error": { "id": "6003", "data": "xxxx" } }
{ "error": { "id": "6005", "data": "xxxx" } }
{ "error": { "id": "0", "data": "xxxx" } }
changeDisplayName
URL
https://api.mindolife.com/API/Gateway/changeDisplayName

Input Parameters
int userId;
String newDisplayName;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "6004", "data": "xxxx" } }
{ "error": { "id": "6001", "data": "xxxx" } }
{ "error": { "id": "0", "data": "xxxx" } }
changePassword
URL
https://api.mindolife.com/API/Gateway/changePassword

Input Parameters
int userId;
String oldPassword;
String newPassword;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "6001", "data": "xxxx" } }
{ "error": { "id": "6004", "data": "xxxx" } }
{ "error": { "id": "6002", "data": "xxxx" } }
{ "error": { "id": "2003", "data": "xxxx" } }
{ "error": { "id": "0", "data": "xxxx" } }
changeRole
URL
https://api.mindolife.com/API/Gateway/changeRole

Input Parameters
int userId;
Enum role;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "6004", "data": "xxxx" } }
{ "error": { "id": "6001", "data": "xxxx" } }
{ "error": { "id": "0", "data": "xxxx" } }
removeUser
URL
https://api.mindolife.com/API/Gateway/removeUser

Input Parameters
int userId;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "6004", "data": "xxxx" } }
{ "error": { "id": "6001", "data": "xxxx" } }
{ "error": { "id": "0", "data": "xxxx" } }
getUsers
URL
https://api.mindolife.com/API/Gateway/getUsers

Input Parameters
String sessionKey;

Output
{"users":{"user":[{"username":"admin","lastLogin":0,"userId":41,"role":"Administrator","displayName":"admin"}]}}
Error Output/s
{ "error": { "id": "0", "data": "xxxx" } }

Settings

getDate
URL
https://api.mindolife.com/API/Gateway/getDate

Input Parameters
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "11002", "data": "xxxx" } }
setDate
URL
https://api.mindolife.com/API/Gateway/setDate

Input Parameters
String date /*date format 2017-07-11*/,String sessionKey

Output
{"status":true}
Error Output/s
{ "error": { "id": "11001", "data": "xxxx" } }
getTime
URL
https://api.mindolife.com/API/Gateway/getTime

Input Parameters
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "11004", "data": "xxxx" } }
setTime
URL
https://api.mindolife.com/API/Gateway/setTime

Input Parameters
time, sessionKey

Output
{"status":true}
Error Output/s
{ "error": { "id": "11003", "data": "xxxx" } }
getAvailableTimezones
URL
https://api.mindolife.com/API/Gateway/getAvailableTimezones

Input Parameters
String sessionKey;

Output
{"timezones":{"Atlantic":[["-4:00","Atlantic\/Bermuda","Bermuda"],["-3:00","Atlantic\/Stanley","Stanley"],["-2:00","Atlantic\/South_Georgia","South Georgia"],["-1:00","Atlantic\/Azores","Azores"]]}}
Error Output/s
{ "error": { "id": "11007", "data": "xxxx" } }
getTimezone
URL
https://api.mindolife.com/API/Gateway/getTimezone

Input Parameters
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "11006", "data": "xxxx" } }
setTimeZone
Related APIs
URL
https://api.mindolife.com/API/Gateway/setTimeZone

Input Parameters
String timezoneId;
boolean shouldUpdate;
String sessionKey;
int reqID;

Output
{"status":true}
Error Output/s
{ "error": { "id": "0", "data": "xxxx" } }

Misc

getSessionClientInfo
URL
https://api.mindolife.com/API/Gateway/getSessionClientInfo

Input Parameters
String sessionKey;

Output
{"clientName":"Google Android SDK built for x86","name":"","clientSource":""}
Error Output/s
{ "error": { "id": "7201", "data": "xxxx" } }
setSessionClientInfo
URL
https://api.mindolife.com/API/Gateway/setSessionClientInfo

Input Parameters
String nickname;
String clientName;
String clientSource;
String sessionKey;

Output
{"status":true}
Error Output/s
{ "error": { "id": "7202", "data": "xxxx" } }
getNotificationTopic
URL
https://api.mindolife.com/API/Gateway/getNotificationTopic

Input Parameters
String regID /*regestrationId from google API*/;

Output
{"topic":"96B5E49CE9AXXXXXXXCDC39746E4B3A4C3A36D752CB238873A2499A6D2E52E9846"}

Event

Socket.IO Based API.
Connection URL
https://client.mindolife.com:9259
Connection input parameters
String sessionKey

Devices

changeControlState
** eventID = reqID
Event Name
changeControlState

Input Parameters
Output
{"type" : "boiler", "controls" : [{"id":461,"signalStrength":196,"connectivityRate":"ok","protocol":"RF","lastLifeSign":0,"tag":[],"name":"DF000099","state":0,"action":[{"time":"1493273194630","source":"1","userId":"-1","state":"2"},{"time":"1493272835063","source":"1","userId":"-1","state":"0"}]}], "status" : "true/false", "eventID" : "xxxx"}
doCalibration
** eventID = reqID
Event Name
doCalibration

Input Parameters
Output
{"type" : "shutter", "controls" : [{"id":461,"signalStrength":196,"connectivityRate":"ok","protocol":"RF","lastLifeSign":0,"tag":[],"name":"DF000099","state":0,"action":[]}], "status" : "true/false", "eventID" : "xxxx"}

Policy

doPolicy
This request will also run another event : changeControlState which will be received for every device that exists in the executed policy. ** eventID = reqID
Event Name
doPolicy

Input Parameters
Output
{"type" : "policy", "status" : "true/false", "eventID" : "xxxx"}

Settings

setTimeZone
Event Name
setTimeZone

Input Parameters
Output
{"timezone":"Asia\/Jerusalem"}

Device State description

Device type

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

Control (Dimmer)

0-31 (5 bits) Light level

0 – toggle off 1 – toggle on

0 – Diming off 1- Dimming in

0 –Un Locked 1 - Locked

On/Off switch

                                                                                 Unused                 

0 – toggle off 1 – toggle on

0 – Light off 1- Light On

0 –Un Locked 1 - Locked

Boiler

Unused

0 – toggle off 1 – toggle on

0 – Off 1- On

0 –Un Locked 1 - Locked

Plug

Unused

0 – Off 1- On

0 –Un Locked 1 - Locked

Shutter

Unused

00 - Stop

0 –Un Locked 1 - Locked

01 – Up

10 - Down

11 - Error

Motion sensor

0-63 (6 bits) Detection sensitivity level

0 – No motion 1 – Motion detected

0 –Un Locked 1 - Locked

Temperature sensor

0-128 (7bits) room temperature in Celsius degrees (+40 -> 0 = -40c)

0 –Un Locked 1 - Locked

General UART connector

0-254 (8 bits) public states defined by the user

 

About
Products
Social