# List of Functions

<table><thead><tr><th width="69">No</th><th width="165">Method</th><th width="465">Description</th></tr></thead><tbody><tr><td>1</td><td>ReadValue</td><td>To read the sensor data from single nodes. The type of data is "Numeric/String". </td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>2</td><td>WriteValue</td><td>To modify the control signal at single nodes. Type of data is "Numeric/String".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>3</td><td>ReadJSON</td><td>To read the sensor data from single nodes. Type of data is "JSON".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>4</td><td>WriteJSON</td><td>To modify the control signal at single nodes. Type of data is "JSON".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>5</td><td>ReadXML</td><td>To read the sensor data from single nodes. Type of data is "XML".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>6</td><td>WriteXML</td><td>To modify the control signal at single nodes. Type of data is "XML".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='xxxxxxxxxxxxxxxxxxxx';
oi.DeviceID=xx
oi.DevicePin=xxx
oi.DataXML='&#x3C;Name>OpenIoE&#x3C;/Name>'
SensorData,ResposeCode=oi.WriteXML()
print(SensorData)
print(ResposeCode)
</code></pre></td></tr><tr><td>7</td><td>Read</td><td>To read the sensor data from multiple nodes. Type of data is "Numeric/String".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>8</td><td>Write</td><td>To modify the control signal at multiple nodes. Type of data is "Numeric/String".</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>9</td><td>GenerateAPIKey</td><td>To generate new API key for a given email and password.</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>10</td><td>CreateDevice</td><td>To add new IoT device for a given API key, name, cryptotype and data format.</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">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)
</code></pre></td></tr><tr><td>11</td><td>Developer</td><td>To display the developer information</td></tr><tr><td></td><td></td><td><pre class="language-python"><code class="lang-python">from openioe.openioe_apis import *
oi=openioe_apis()
oi.Developer()
</code></pre></td></tr></tbody></table>
