OpenIoE
  • Open IoE - 3.0.0
  • Open IoE App
    • Introduction
    • Getting Started
    • Features
      • IoT Devices
      • Plots
      • Gauges
      • Controls
    • Examples
      • Temperature-Humidity Monitoring & LED Control
  • API References
    • Overview
    • Read API
    • Write API
    • Additional APIs
    • Integration
  • Python Library
    • Introduction
    • Getting Started
    • List of Functions
    • Examples
      • Read Function
      • Write Function
      • Create Function
  • Matlab
    • Matlab Client
Powered by GitBook
On this page
  1. Python Library

Getting Started

PreviousIntroductionNextList of Functions

Last updated 1 year ago

  1. Register for openioe web portal

  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)
https://openioe.gnanodaya.org