# Getting Started

1. Register for openioe web portal

&#x20;      <https://openioe.gnanodaya.org>

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

```
pip install openioe
```

3. Generate API Key

```python
from openioe.openioe_apis import *
oi=openioe_apis()
oi.UserEmail='xxxxxxxxxx'
oi.UserPassword='xxxxxxxxxxx'
ResponseJson,ResponseCode=oi.GenerateAPIKey()
APIKey=ResponseJson['API Key'])
```

3. Add IoT Device/s

```python
oi.APIKey=APIKey
oi.DeviceName='Test000'
oi.CryptoName='None'
oi.DataFormat='Value'
ResponseTest,ResponseCode=oi.CreateDevice()
print(ResponseTest)
print(ResponseCode)
```

4. Read from IoT Device

```python
oi.DeviceID=xx
oi.DevicePin=xxx
SensorData,ResposeCode=oi.ReadValue()
print(SensorData)
print(ResposeCode)
```

5. Write to IoT Device

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