List of Functions
1
ReadValue
To read the sensor data from single nodes. The type of data is "Numeric/String".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
SensorData,ResposeCode=oi.ReadValue()
print(SensorData)
print(ResposeCode)
2
WriteValue
To modify the control signal at single nodes. Type of data is "Numeric/String".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xx
oi.Data=10
SensorData,ResposeCode=oi.WriteValue()
print(SensorData)
print(ResposeCode)
3
ReadJSON
To read the sensor data from single nodes. Type of data is "JSON".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
SensorData,ResposeCode=oi.ReadJSON()
print(SensorData)
print(ResposeCode)
4
WriteJSON
To modify the control signal at single nodes. Type of data is "JSON".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
oi.DataJSON={'Value': '10'}
SensorData,ResposeCode=oi.WriteJSON()
print(SensorData)
print(ResposeCode)
5
ReadXML
To read the sensor data from single nodes. Type of data is "XML".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
SensorData,ResposeCode=oi.ReadXML()
print(SensorData)
print(ResposeCode)
6
WriteXML
To modify the control signal at single nodes. Type of data is "XML".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
oi.DataXML='<Name>OpenIoE</Name>'
SensorData,ResposeCode=oi.WriteXML()
print(SensorData)
print(ResposeCode)
7
Read
To read the sensor data from multiple nodes. Type of data is "Numeric/String".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.UserIDPinAPIKeys=[[xx, xxx], [x, xxx]]
SensorData,ResposeCode=oi.Read()
print(SensorData)
print(ResposeCode)
8
Write
To modify the control signal at multiple nodes. Type of data is "Numeric/String".
from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.UserIDPinAPIKeys=[[xx, xxx], [xx, xxx]]
oi.Data=[xx,xx]
Confirmation,ResposeCode=oi.ReadAPI()
print(Confirmation)
print(ResposeCode)
9
GenerateAPIKey
To generate new API key for a given email and password.
from openioe.openioe_apis import *
oi.UserEmail='xxxxxxxxxx'
oi.UserPassword='xxxxxxxxxxx'
ResponseJson,ResponseCode=oi.GenerateAPIKey()
print(ResponseJson['User ID'])
print(ResponseJson['API Key'])
print(ResponseJson['Message'])
print(ResponseCode)
10
CreateDevice
To add new IoT device for a given API key, name, cryptotype and data format.
from openioe.openioe_apis import *
oi.APIKey='pnHEmHgjFl0PT247Eae9'
oi.DeviceName='Test000'
oi.CryptoName='None'
oi.DataFormat='Value' # 'XML' or 'JSON'
ResponseTest,ResponseCode=oi.CreateDevice()
print(ResponseTest)
print(ResponseCode)
11
Developer
To display the developer information
from openioe.openioe_apis import *
oi=openioe_apis()
oi.Developer()
Last updated