Skip to content

Commit 6ed35af

Browse files
committed
Examples of pushing the status
1 parent 4f052ba commit 6ed35af

File tree

2 files changed

+68
-4
lines changed

2 files changed

+68
-4
lines changed

test/basic.http

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ If-None-Match: {{etag}}
2828

2929
###
3030

31-
GET {{baseUrl}}/status HTTP/1.1
32-
33-
###
34-
3531
GET {{baseUrl}}/home.js HTTP/1.1
3632

3733
###

test/status.http

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Name: REST Client
2+
# Id: humao.rest-client
3+
# Description: REST Client for Visual Studio Code
4+
# Version: 0.21.3
5+
# Publisher: Huachao Mao
6+
# VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=humao.rest-client
7+
8+
# You should use environment vars (https://marketplace.visualstudio.com/items?itemName=humao.rest-client#environment-variables) for these
9+
# but you can also set here if needed (just don't check in!)
10+
11+
#@baseUrl = http://openevse.local
12+
13+
#@ssid = your_ssid
14+
#@pass = your_password
15+
#@apikey = your_key
16+
17+
###
18+
# Get the status of the EVSE
19+
20+
GET {{baseUrl}}/status HTTP/1.1
21+
22+
###
23+
# Update the vehicle status
24+
25+
POST {{baseUrl}}/status HTTP/1.1
26+
27+
{
28+
"battery_level": 80,
29+
"battery_range": 30,
30+
"time_to_full_charge": 6000
31+
}
32+
33+
###
34+
# Update Solar input
35+
36+
POST {{baseUrl}}/status HTTP/1.1
37+
38+
{
39+
"solar": 6000
40+
}
41+
42+
###
43+
# Update Grid I/E input to exporting
44+
45+
POST {{baseUrl}}/status HTTP/1.1
46+
47+
{
48+
"grid_ie": -1000
49+
}
50+
51+
###
52+
# Update Grid I/E input to importing
53+
54+
POST {{baseUrl}}/status HTTP/1.1
55+
56+
{
57+
"grid_ie": 1000
58+
}
59+
60+
61+
###
62+
# Update shaper_live_pwr
63+
64+
POST {{baseUrl}}/status HTTP/1.1
65+
66+
{
67+
"shaper_live_pwr": 1000
68+
}

0 commit comments

Comments
 (0)