Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicciniamh/iot
IoT Strategy and Sample Code
https://github.com/nicciniamh/iot
Last synced: about 1 month ago
JSON representation
IoT Strategy and Sample Code
- Host: GitHub
- URL: https://github.com/nicciniamh/iot
- Owner: nicciniamh
- License: apache-2.0
- Created: 2017-02-15T20:17:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-02T20:13:48.000Z (over 7 years ago)
- Last Synced: 2023-08-16T20:52:57.109Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 229 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Internet of Things (IoT) Stuff - Updated Version
I have done a major revamp of the sensor class modules. Instead of being specific to sensor hardware they have classes of temperature, humidity, relay, etc. This is more in line the the IoT strategy of
"abstraction" over the network. Unless there is a specific reason to use a specific sensor type it is better to use generic models. For example, I have two type of sensor devices but their internet servers
serve the data in the same format, thus, there is no reson to differentiate between the two.----
These files contain descriptions and exampls of my IoT Strategies.
## IoT
The IoT base class (iotSensor) does nothing and throws an exception when instantiated.
The class is used simply as base for other IoT devices and allows for heterogenous
device classes to be defined yet tested against the base class.Each IoT device at a minimum must provide a getData method to read the data or state of the
device.The methods defined by the IoT base class are:
```
sendData(data): send data to IoT device, returns self
getData() Retrieve data from IoT device, returns self
setHigh() Set high limit for data, returns self
setLow() Set low limit for data, returns self
isHigh() Return boolean if data is equal or greater to high
isLow() Return boolean if data is equal or less to low
```See [lib](lib/) for the specifics on the sensors.