-
Notifications
You must be signed in to change notification settings - Fork 1
/
API examples.txt
47 lines (34 loc) · 1.84 KB
/
API examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
A few API examples:
In this case my ipadres is: "192.168.11.60" and my API key / token is "Gdw34^%FHYDe".
In your case this would be different. (if you change the token, there are several undocumented places that it needs to be update.) best leave it alone for now.
In case you want to the web content implemented in another system you can set you're own style with the following commands:
&size=XXXX$text=XXX&background=XXX
- Where size is the text size
- Text is the text color
- Background is the background color
For example getting my data with my style:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&size=20&text=FFFFFF&background=282828&action=read_temp&sensor=28FF55FA83170400
Example for getting temperature:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=read_temp&sensor=28FF55FA83170400
(&sensor= Sensor Address)
Read Relay State:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=read_relay&relay=8
(&relay = GPIO Pin)
Read All Sensors:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=read_all_sensors
Read All Relays:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=read_all_relays
Set Pool Temperature:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=set_pool_temp&temp=36.4
Get set pool temperature:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=get_pool_temp
Write GPIO Pin / Set device On or Off:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=write_relay&relay=9&state=0
(&state=0 == ON /// $state=1 == OFF)
-----
Get Status of any mode:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=get_mode&dev=heatercontrol (cleaningmode / frostprotection)
(Returns; 0 == ON 1 == OFF)
Set Status of any mode:
http://192.168.11.60/api.php?key=Gdw34^%FHYDe&action=set_mode&dev=heatercontrol&state=0 (cleaningmode / frostprotection)
(&state=0 == ON /// $state=1 == OFF)