Samples
How to open door lock
To open an outdoor station lock you first need to fetch the configuration and search for a device and channel that has a value of "40" as deviceTypeId and a value of "0001" as channelID.
The input datapoint can be used to send a unlock command by setting the value to "1". The output datapoint shows the current state of the lock.
Fetch the configuration
Request
{SystemWIP(dtId:"592c91f0-8d9b-44bf-88da-23fd1ef6d994"){Assets(first:20,offset:0,dtId:"592c91f0-8d9b-44bf-88da-23fd1ef6d994_Device_101807A7F02809C"){__typename dtId label nameId deviceTypeId}}}
Response
{
"data": {
"SystemWIP": [
{
"Assets": [
{
"__typename": "DeviceWIP",
"dtId": "592c91f0-8d9b-44bf-88da-23fd1ef6d994_Device_101807A7F02809C",
"label": "OS 002-01",
"nameId": "WIP_0801",
"deviceTypeId": "40"
}
]
}
]
}
}
Open the door
{
ChannelWIP(
dtId: "592c91f0-8d9b-44bf-88da-23fd1ef6d994_Device_101807A7F02809C_Channel_1"
) {
inputs(key: "0") {
value {
DataPointService {
SetDataPointMethod {
callMethod(value:"1")
{code}
}
}
}
}
}
}
Check current state
{ChannelWIP(dtId:"592c91f0-8d9b-44bf-88da-23fd1ef6d994_Device_101807A7F02809C_Channel_1"){outputs(key:"0"){value{DataPointService{RequestDataPointValue{value time }}}}}}
Returns the following, meaning the door is unlocked
{
"data": {
"ChannelWIP": [
{
"outputs": [
{
"value": {
"DataPointService": {
"RequestDataPointValue": {
"value": "1",
"time": "2023-06-15T03:10:47.476Z"
}
}
}
}
]
}
]
}
}
Incoming call notification
To get incoming call notification you first need to subscribe for a device and channel that has a value of "40" as deviceTypeId and a value of "0002" as channelID.
The output datapoint shows the current state.
Subscribe the message
Subscribe
subscription{DataPointSubscription (dtId:"592c91f0-8d9b-44bf-88da-23fd1ef6d994",serialNumber:"101807A7F02809C"){ value timestamp}}
Returns the following, meaning the incoming call
{"type":"subscription_data","id":0,"payload":{"data":{"DataPointSubscription":{"serialNumber":"101807A7F02809C","channelNumber":"2","datapointId":"0","value":"{\"status\":1,\"block\":8,\"floor\":4,\"room\":4,\"image\":\"/images/20230530111935_wfx.jpg\"}","timestamp":"2023-05-30T03:19:40.524Z"}}}}
Create download link
Request
{ISystemWIP(dtId: "592c91f0-8d9b-44bf-88da-23fd1ef6d994")
{
DeviceManagementWIP
{
ImagesDES
{
LoadPage
{
Page
{
name
CreateDownloadLink
{callMethod
}
}
}
}
}
}
}
Response
{
"data": {
"ISystemWIP": [
{
"DeviceManagementWIP": {
"ImagesDES": {
"LoadPage": {
"Page": [
{
"name": "20230613101529_lvg.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613101529_lvg.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:25Z&se=2023-06-17T05:02:25Z&sp=r&spr=https&sig=WwClAZaxMWDG2pRQfvyMJZPq8j98y3TRhrYXi2vLu6A%3D"
}
},
{
"name": "20230613102055_bho.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102055_bho.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:25Z&se=2023-06-17T05:02:25Z&sp=r&spr=https&sig=Pa8wMMG5zGTtuZHnZueVLwYld7jLLcDG1Sth55PdwTk%3D"
}
},
{
"name": "20230613102251_dnj.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102251_dnj.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:25Z&se=2023-06-17T05:02:25Z&sp=r&spr=https&sig=kg3L6H8ewt7IIHOO5O9Y789dBpVoHhHHvG4cbMyHbQk%3D"
}
},
{
"name": "20230613102422_wnx.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102422_wnx.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:25Z&se=2023-06-17T05:02:25Z&sp=r&spr=https&sig=2PJNTX2JNF6vJ7ZBHBNKWMKl3lRXApcycQeI5bV%2BYZ4%3D"
}
},
{
"name": "20230613102501_ynf.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102501_ynf.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:26Z&se=2023-06-17T05:02:26Z&sp=r&spr=https&sig=dxTbYqgRUW58Q2a4CBrTt4mBntiYi6bQHBtD2vM7R5Y%3D"
}
},
{
"name": "20230613102520_dak.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102520_dak.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:26Z&se=2023-06-17T05:02:26Z&sp=r&spr=https&sig=ln4NgurmCOIFOVsLzMAh9zyCwKR0PkiGhxFBFkVQePo%3D"
}
},
{
"name": "20230613102937_zbb.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613102937_zbb.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:25Z&se=2023-06-17T05:02:25Z&sp=r&spr=https&sig=Mnj3hYDPmoCBHp%2BYm4KmarNtmJcryedZD1iGguH02qY%3D"
}
},
{
"name": "20230613114536_nwl.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613114536_nwl.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:26Z&se=2023-06-17T05:02:26Z&sp=r&spr=https&sig=hASu6RmWXjayKrHUk9KpS948xMJhqv584xI1fnedEyI%3D"
}
},
{
"name": "20230613114544_rbb.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613114544_rbb.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:26Z&se=2023-06-17T05:02:26Z&sp=r&spr=https&sig=kvm55zYr68ODn7OX7OIlDPAvPxvrD%2FBPbHUhskIyiN8%3D"
}
},
{
"name": "20230613114804_qsc.jpg",
"CreateDownloadLink": {
"callMethod": "https://epbpdeviflspeu1sa01.blob.core.windows.net/sc-iot-hub-welcome-ip/1942cf4e-7ae7-4ee4-ae2f-b18dd4db2715/ImagesDES/20230613114804_qsc.jpg?sv=2017-11-09&sr=b&st=2023-06-15T05:02:26Z&se=2023-06-17T05:02:26Z&sp=r&spr=https&sig=3fq9KA%2FrpFRRW08PG059n36zgxxe0ghjK4GtLWCUb08%3D"
}
}
]
}
}
}
}
]
}
}
Then you can use the link to download the image.