This page (revision-5) was last changed on 27-Jun-2023 11:24 by Harry Metske

This page was created on 12-Jun-2023 06:59 by Harry Metske

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
5 27-Jun-2023 11:24 4 KB Harry Metske to previous
4 27-Jun-2023 11:27 4 KB Harry Metske to previous | to last
3 27-Jun-2023 11:27 1 KB Harry Metske to previous | to last
2 12-Jun-2023 07:01 835 bytes Harry Metske to previous | to last
1 12-Jun-2023 06:59 788 bytes Harry Metske to last

Page References

Incoming links Outgoing links
Zaptec...nobody

Version management

Difference between version and

At line 11 added one line
!Get the bearer token
At line 13 changed one line
curl -vs -X POST
Or better:
{{{
export TOKEN=$(curl -s -X POST https://api.zaptec.com/oauth/token -H "content-type: application/x-www-form-urlencoded" --data-raw 'grant_type=password&username=harry.metske%40gmail.com&password=<url-encoded password>' | jq -r .access_token)
}}}
At line 19 added 3 lines
!Stop/pause the charger
{{{
At line 23 added one line
}}}
At line 25 added 2 lines
!Resume charging
{{{
At line 28 added 93 lines
}}}
! Get the current state of the charger
{{{
curl -s "https://api.zaptec.com/api/chargers/5273dba1-4e80-49ae-ac44-9420ae596ad3/state" -H "accept: */*" -H "Authorization: Bearer $TOKEN"
}}}
This will return an array of these:
{{{
"ChargerId": "5273dba1-4e80-49ae-ac44-9420ae596ad3",
"StateId": -2,
"Timestamp": "2023-06-09T13:35:24.583",
"ValueAsString": "1"
}}}
This requires [all the zaptec constants|https://api.zaptec.com/api/constants] to interpret the StateId's. \\
To format them in a kind of table, use this jq expression: {{{'.\[] | (.StateId|tostring) + " = " + .ValueAsString'}}}
Which outputs:
{{{
-2 = 1
-1 =
1 = 0
120 = 0
145 = 3600
147 = 600
150 = LTE
151 = 0
153 = 0.210
201 = 41.663
202 = 62.900
204 = 61.804
205 = 62.315
206 = 57.959
207 = 60.859
270 = 13.291
501 = 0.249
502 = 4.070
503 = 0.739
507 = 0.738
508 = 0.039
509 = 0.023
510 = 32.000
511 = 6.000
513 = 0.000
519 = 4
520 = 3
522 = 4
523 = 32.000
544 = 2
545 = 0
546 = 40.000
547 = 32.000
548 = 4
553 = 0.000
554 = OCMF|{"FV":"1.0","GI":"ZAPTEC GO","GS":"ZAP025320","GV":"2.0.4.6","PG":"F1","RD":[{"TM":"2023-06-13T14:00:00,000+00:00 R","RV":149.119,"RI":"1-0:1.8.0","RU":"kWh","RT":"AC","ST":"G"}]}
702 = 12
708 = 30.600
710 = 1
711 = 1
712 = 0
714 = 0
715 = 4
717 =
4: VG:1.27 L12:417.65
718 = 0
721 =
722 =
723 = {"SessionId":"f36151f5-6140-4c52-b893-55e14cbfd5f6","Energy":8.998,"StartDateTime":"2023-06-12T18:22:48.016274Z","EndDateTime":"2023-06-13T20:25:27.022561Z","ReliableClock":true,"StoppedByRFID":false,"AuthenticationCode":"","SignedSession":"OCMF|{\"FV\":\"1.0\",\"GI\":\"ZAPTEC GO\",\"GS\":\"ZAP025320\",\"GV\":\"2.0.4.6\",\"PG\":\"T1\",\"RD\":[{\"TM\":\"2023-06-12T18:22:48,000+00:00 R\",\"TX\":\"B\",\"RV\":140.121,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"},{\"TM\":\"2023-06-12T19:00:00,000+00:00 R\",\"TX\":\"T\",\"RV\":140.14,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"},{\"TM\":\"2023-06-13T12:00:00,000+00:00 R\",\"TX\":\"T\",\"RV\":144.933,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"},{\"TM\":\"2023-06-13T13:00:00,000+00:00 R\",\"TX\":\"T\",\"RV\":149.073,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"},{\"TM\":\"2023-06-13T14:00:00,000+00:00 R\",\"TX\":\"T\",\"RV\":149.119,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"},{\"TM\":\"2023-06-13T20:25:27,000+00:00 R\",\"TX\":\"E\",\"RV\":149.119,\"RI\":\"1-0:1.8.0\",\"RU\":\"kWh\",\"RT\":\"AC\",\"ST\":\"G\"}]}"}
733 = 0
749 = 1
751 = 1
800 = 037cd0c2-5969-4002-a298-f63e3769752e
801 = default
802 = zaptecje
803 = 1179648
804 = 0
805 = 0
807 = #10 Cloud restart command
808 = 2d 07h02m01s T_EM: 34.60 34.07 35.19 T_M: 32.50 33.47 V: 2.43 2.72 1.53 I: 0.02 0.02 0.02 C12 CM1 MCnt:256204 Rs:0 Rc:1
809 = 60.000
811 = 6
815 = 4
823 = 8
830 = [2023-06-08T16:42:48+0000] OTA : Accepted
908 = 2.0.3.2
909 = 0
911 = 2.0.4.6
916 = 2.0.4.6
917 = 1
918 = 1
960 = 242016001464605
962 = 89470060210810207713
963 = 866642058845159
}}}