-
Import the package
import Aatt
-
Instantiate an Aatt object
aatt = Aatt()
-
Set your account info and device ID
aatt.setAccount("phooltest","CrazyPassword456") aatt.setDevice("1");
-
Add Activity & Data
-
For adding records, you set the activity to RECORD and call the record method on your aatt object. Pass the endpoint ID and the value as parameters.
aatt.setAct("RECORD") aatt.record("1","42") aatt.record("2","86") aatt.record("3","-10") aatt.record("4","0")
-
For checking state of attributes, you set the activity to CHECK and call the check method. Pass the endpoint ID and the attribute ID as parameter.
aatt.setAct("CHECK") aatt.check("1","1") aatt.check("1","2") aatt.check("1","3") aatt.check("2","4") aatt.check("2","5") aatt.check("2","6")
-
-
Call the send method to post the data to the aatt server. It will return a response from the server formatted as a JSON string.
print(aatt.send())
MarshmallowKittenBrigade/aatt_python
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|