[Basic] illustrate Remote Control
Posted: Tue Dec 13, 2022 7:22 am
The IoT Studio offers remote control functions such as start or stop in both development and service mode. You can find the program named AIC IoT Studio\IoT Studio Remote (
IoT Studio Web Service RESTful Specification:
IoT Studio provide a simple http server can let user send the restful api to control IoT Studio Scense functions.
In option tab page to check the "Enable Web Service" checkbox will enable this feature.
There are two items: Service Port and Security Token let user configure restful port number and security token which value either by manual input or auto generate to press button "...".
ps: the prot number must no other programs used and firewall add in-bound rule for this port.
--------------------------------------------------------------------------------
The restful api format:
header : IOTS_Token:{security token}
GET : http://{the IoT Studio ip}:port/IOTS_SERVICE?IOTS_CMD={CMD}
or
http://{the IoT Studio ip}:port/IOTS_SERVICE?IOTS_CMD={CMD}&IOTS_PARAM={PARAM}
Sample: "To change service mode port"
IoT Studio ip : 10.15.1.85
port : 10000
security token : 12345678
CMD : SRV_CHGPORT
PARAM : 20000
The restful :
header = {"IOTS_Token" : "12345678"}
GET: http://10.15.1.85:10000/IOTS_SERVICE?IO ... ARAM=20000
--------------------------------------------------------------------------------
|--------------------+--------------------+--------------------------------------|
| CMD | PARAM | Note |
|--------------------+--------------------+--------------------------------------|
| SRV_START | none | |
| SRV_STOP | none | |
| SRV_RESTART | none | |
| SRV_CHGPORT | the port number | |
| DEV_START | none | |
| DEV_STOP | none | |
| DEV_RESTART | none | |
| DEV_CHGPORT | the port number | |
|-------------------+--------------------+---------------------------------------|
) in the All Programs list, then click it to launch.
IoT Studio Web Service RESTful Specification:
IoT Studio provide a simple http server can let user send the restful api to control IoT Studio Scense functions.
In option tab page to check the "Enable Web Service" checkbox will enable this feature.
There are two items: Service Port and Security Token let user configure restful port number and security token which value either by manual input or auto generate to press button "...".
ps: the prot number must no other programs used and firewall add in-bound rule for this port.
--------------------------------------------------------------------------------
The restful api format:
header : IOTS_Token:{security token}
GET : http://{the IoT Studio ip}:port/IOTS_SERVICE?IOTS_CMD={CMD}
or
http://{the IoT Studio ip}:port/IOTS_SERVICE?IOTS_CMD={CMD}&IOTS_PARAM={PARAM}
Sample: "To change service mode port"
IoT Studio ip : 10.15.1.85
port : 10000
security token : 12345678
CMD : SRV_CHGPORT
PARAM : 20000
The restful :
header = {"IOTS_Token" : "12345678"}
GET: http://10.15.1.85:10000/IOTS_SERVICE?IO ... ARAM=20000
--------------------------------------------------------------------------------
|--------------------+--------------------+--------------------------------------|
| CMD | PARAM | Note |
|--------------------+--------------------+--------------------------------------|
| SRV_START | none | |
| SRV_STOP | none | |
| SRV_RESTART | none | |
| SRV_CHGPORT | the port number | |
| DEV_START | none | |
| DEV_STOP | none | |
| DEV_RESTART | none | |
| DEV_CHGPORT | the port number | |
|-------------------+--------------------+---------------------------------------|