Getting Started

  1. Register for openioe web portal

https://openioe.gnanodaya.org

  1. Install openioe from the terminal(Linux)/ cmd (Windows)

pip install openioe
  1. Generate API Key

from openioe.openioe_apis import *
oi=openioe_apis()
oi.UserEmail='xxxxxxxxxx'
oi.UserPassword='xxxxxxxxxxx'
ResponseJson,ResponseCode=oi.GenerateAPIKey()
APIKey=ResponseJson['API Key'])
  1. Add IoT Device/s

oi.APIKey=APIKey
oi.DeviceName='Test000'
oi.CryptoName='None'
oi.DataFormat='Value'
ResponseTest,ResponseCode=oi.CreateDevice()
print(ResponseTest)
print(ResponseCode)
  1. Read from IoT Device

oi.DeviceID=xx
oi.DevicePin=xxx
SensorData,ResposeCode=oi.ReadValue()
print(SensorData)
print(ResposeCode)
  1. Write to IoT Device

oi.Data=10
SensorData,ResposeCode=oi.WriteValue()
print(SensorData)
print(ResposeCode)

Last updated