Domatica Quantum Cloud (DQC) REST API

1.Domatica Quantum Cloud (DQC) REST API

INTRODUCTION

Scope

This document is the User Manual for the Domatica Quantum Cloud REST API, developed by Domatica Global Solutions, SA.

Use this document to:

  • Get yourself familiarized with Domatica Cloud Services REST API;
  • Quickly start using Domatica Cloud Services.

NOTE: Read and understand this document and all related documents before installing, operating, or maintaining your device.

 

Qualified Personnel

Installation procedures must be carried out and inspected by qualified personnel. Qualified personnel are those who, based on their training and experience, are capable of identifying risks and avoiding potential hazards when working with this product

 

Important Information:

For you to use the REST API your Domatica Edge Node (DEN) must be connected to Domatica Quantum Cloud.

To do that, follow the steps described in the Configuration Tool Manual.


Go to Services configuration

List of devices

The following list of devices example, is connected to the DIY (Do It Yourself) Online Development Kit. You can request a list of the devices by using Request System File REST call.

 

Note: Each project has a different list of devices, depending of your configuration.

 

List of devices

 

Light # 1

DCS_CONTROL_ON_OFF_1.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

DCS_CONTROL_ON_OFF_1.percentcontrol

[REAL TIME – State of light: percentcontrol = 0 – 100%]

 

Light # 2

DCS_CONTROL_ON_OFF_2.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

DCS_CONTROL_ON_OFF_2.percentcontrol

[REAL TIME – State of light: percentcontrol = 0 – 100%]

 

Light # 3

DCS_CONTROL_ON_OFF_3.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

DCS_CONTROL_ON_OFF_3.percentcontrol

[REAL TIME – State of light: percentcontrol = 0 – 100%]

 

Light # 4

DCS_CONTROL_ON_OFF_4.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

 

Light # 5

DCS_CONTROL_ON_OFF_5.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

 

Light # 6

DCS_CONTROL_ON_OFF_6.control

[REAL TIME – State of light: control = 0 – OFF; control = 1 – ON]

 

Energy Meter

DCS_ENERGY_METER.instShowValue

[REAL TIME- Instant consumption: instShowValue= #Value# –  #Value#/10=Watts]

 

DCS_ENERGY_METER.instStoreAvgValue

[LOG DATA- Average Consumption during 5 minutes’ period: instStoreAvgValue = #Value# –  #Value#/10=Watts]

 

DCS_ENERGY_METER.instStoreMinValue

[LOG DATA- Minimum Consumption value during 5 minutes’ period: instStoreMinValue = #Value# –  #Value#/10=Watts]

 

DCS_ENERGY_METER.instStoreMaxValue

[LOG DATA- Maximum Consumption value during 5 minutes’ period: instStoreMinValue = #Value# –  #Value#/10=Watts]

 

DCS_ENERGY_METER.accStoreValue

[LOG DATA- Accumulated Energy during 5 minutes’ period: instStoreAvgValue = #Value# –  #Value#/10000=kWh]

 

Temperature Sensor

DCS_TEMPERATURE.instShowValue

[REAL TIME- Instant temperature value: instShowValue= #Value# –  #Value#/100=ºC]

 

DCS_TEMPERATURE.instStoreAvgValue

[LOG DATA- Average temperature value during 5 minutes’ period: instStoreAvgValue = #Value# –  #Value#/100=ºC]

 

DCS_TEMPERATURE.instStoreMinValue

[LOG DATA- Minimum temperature value during 5 minutes’ period: instStoreMinValue = #Value# –  #Value#/100=ºC]

 

DCS_TEMPERATURE.instStoreMaxValue

[LOG DATA- Maximum temperature value during 5 minutes’ period: instStoreMinValue = #Value# –  #Value#/100=ºC]

 

Push Button

DCS_BUTTON.instShowValue

[REAL TIME- Button position: instShowValue=1 – pressed; instShowValue=0 – release]

 

DCS_BUTTON.instStoreAvgValue

[LOG DATA, changed state instShowValue=1 – pressed; instShowValue=0 – release]

 

REST API

The vGatewayId and gToken are the set of identifiers for each equipment provide by Domatica.

 

Set Value

To set multiple values across multiple gateways, place a https post method to the following url:

https://dqc.domaticasolutions.com/api/v1/operation/monitorControl/set

 

METHOD: POST

BODY (data:”1” – Light ON; data:”0” – Light OFF):

{
"gTokens": [{
"vGatewayId": 1311768465454927053,
"gToken": "39992D9EF2E8928039BA0BAF8D02A8A0"
}],
"objects": [{
"vGatewayId": 1311768465454927053,
"idname": "DCS_CONTROL_ON_OFF_1.control",
"data": "1"
}]
}

 

REPLY

{"objects":[{"vGatewayId":1311768465454927053,"idname":"DCS_CONTROL_ON_OFF_1.control","data":"1"}]}

 

Get Value

To get multiple values across multiple gateways, place an https post method to the following url:

https://dqc.domaticasolutions.com/api/v1/operation/monitorControl/get

 

METHOD: POST

BODY

{
"gTokens": [{
"vGatewayId": 1311768465454927053,
"gToken": "39992D9EF2E8928039BA0BAF8D02A8A0"
}],
"objects": [{
"vGatewayId": 1311768465454927053,
"idname": "DCS_TEMPERATURE.instShowValue",
"data": ""
}]
}

 

REPLY

{"objects":[{"vGatewayId":1311768465454927053,"idname":"DCS_DEVICE__TEMPERATURE__9.instShowValue ","data":"2450"}]}

This data value means 24,50 ºC.

 

Request Log File

To request log file across multiple gateways, place a http post method to the following url:
https://dqc.domaticasolutions.com/api/v1/operation/monitorControl/requestlog
The parameters on the request must be base 64 encoded (example: www.base64decode.org)

$quantity=10; $tolerance=5 -> JHF1YW50aXR5PTEwOyAkdG9sZXJhbmNlPTU=

METHOD: POST
BODY

{
 "vGatewayId": 1311768465454927053,
 "gToken": "39992D9EF2E8928039BA0BAF8D02A8A0",
 "parameters": "JHF1YW50aXR5PTEwOyAkdG9sZXJhbmNlPTU="
 }

 

REPLY
You need to decompress from GZip format the Result Message (Example: http://www.txtwizard.net/compression).

Also you can request Log File from a timestamp

parameters="$timestamp=1463763303;$tolerance=5"; -> cGFyYW1ldGVycz0iJHRpbWVzdGFtcD0xNDYzNzYzMzAzOyR0b2xlcmFuY2U9NSI7

 

Request System File

To request system files across multiple gateways, place an https post method to the following url:
https://dqc.domaticasolutions.com/api/v1/operation/monitorControl/requestSystemFile

 

METHOD: POST

BODY:

{
"vGatewayId": 1311768465454927053,
"gToken": "39992D9EF2E8928039BA0BAF8D02A8A0",
"parameters": ""
}

 

REPLY
You need to decompress from GZip format the Result Message (Example: http://www.txtwizard.net/compression).

Share
Was this helpful? Yes No Suggest edit
Suggest Edit
Share