openioe 1.1.1

Creator: railscoder56

Last updated:

Add to Cart

Description:

openioe 1.1.1

Open IoE
Open IoE is a simple IoT platform to operate IoT devices.
There are two options available,


Python Library (Client)


Web services (REST APIs)



1. Python Library
Users are expected to take these steps,


Install Python Library
pip install openioe


Write the client code using the following methods


Method List:
NoMethodDescriptionExample1ReadValueTo read the sensor data from single nodes. 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)
2WriteValueTo 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)
3ReadJSONTo 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)
4WriteJSONTo 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)
5ReadXMLTo 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)
6WriteXMLTo 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='OpenIoE'
SensorData,ResposeCode=oi.WriteXML()
print(SensorData)
print(ResposeCode)
7ReadTo 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)
8WriteTo 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)
9Generate API KeyTo generate new API key for a given email and password.from openioe.openioe_apis import *
oi=openioe_apis()
oi.UserEmail='xxxxxxxxxx'
oi.UserPassword='xxxxxxxxxxx'
ResponseJson,ResponseCode=oi.GenerateAPIKey()
print(ResponseJson['User ID'])
print(ResponseJson['API Key'])
print(ResponseJson['Message'])
print(ResponseCode)
10Create New DeviceTo add new IoT device for a given API key, name, cryptotype and data format.from openioe.openioe_apis import *
oi=openioe_apis()
oi.APIKey='pnHEmHgjFl0PT247Eae9'
oi.DeviceName='Test000'
oi.CryptoName='None'
oi.DataFormat='Value' # 'XML' or 'JSON'
ResponseTest,ResponseCode=oi.CreateDevice()
print(ResponseTest)
print(ResponseCode)
11Get API KeyTo get API key from user email and password.from openioe.openioe_apis import *
oi.UserEmail='v@v.com'
oi.UserPassword='v'
ResponseText,ResponseCode=oi.ReadAPIKey()
print(ResponseText)
print(ResponseCode)
12Get Data SetTo get Dataset stored for device.from openioe.openioe_apis import *
oi.DeviceID='xxx'
ResponseTest,ResponseCode=oi.DownloadDeviceData()
print(ResponseTest)
print(ResponseCode)
13DeveloperTo display the developer informationfrom openioe.openioe_apis import *
oi=openioe_apis()
oi.Developer()

2. Web Services
Users are expected to take these steps,

Register and login to OpenIoE- Register/Login
Create API Key/ Get API Key from OpenIoE.
Embed the API Key, Device ID and Pin into the client code.

Visit the OpenIoE 3.0 web portal at https://openioe.gnanodaya.org
Visit the OpenIoE 3.0 Help Portal at https://openioedoc.gnanodaya.org
API List:
NoAPIDescriptionTypeExample1showdevicevalueTo get hardware value from web service.http get<endpoint>/showdevicevalue/<apikey>/2/4332updatedevicevalueUpdate the hardware value passed as a parameterhttp get<endpoint>/updatedevievalue/<apikey>/2/433/23showdevicejsonTo get hardware JSON from web service.http get<endpoint>/showdevicejson/<apikey>/2/4334updatedevicejsonUpdate the hardware JSON passed as parameterhttp post<endpoint>/updatedevicejson/<apikey>/2/433 <Data>5showdevicexmlTo get hardware XML file from web service.http get<endpoint>/showdevicexml/<apikey>/2/4336updatedevicexmlUpdate the hardware XML passed as parameterhttp post<endpoint>/updatedevicexml/<apikey>/2/433 <Data>
7generateapikeyGenerate new API Key by providing user credshttp get<endpoint>/generateapikey/<emailid>/<password>
8createuserdeviceAdd new IoT device to your accounthttp get<endpoint>/createuserdevice/<APIKey>/<DeviceName>/<CryptoName>/<DataFormat>


Developers



Thanks and Regards
Venkataswamy R
Assistant Professor
Department of Electrical and Electronics Engineering,
School of Engineering and Technology
Christ (Deemed to be University)
Bengaluru-560074, India

venkatswamy.in

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.