v5.33
operator
manufacturer
Last updated on
Legacy REST API
caution
While still supported, this API is deprecated and we strongly recommend using the up-to-date REST API, for which we provide support and documentation.
1. Introduction
The following explains how to use the REST API to retrieve Charge Controller information.
info
- In order to use the REST interface, it must first be enabled in the Operator Settings under "REST interface".
- The REST API can currently only be used to read out ("read-only") the parameters.
2. Enabling the Legacy REST API
In the Config UI, under SYSTEM / General set REST interface to Enabled (without UID).
3. REST API over HTTP
3.1. HTTP header parameters
Use the following HTTP header parameters for queries:
3.2. Example requests
You can get the Charge Controller's state via the REST API.
With the following GET request you can retrieve the status with an existing USB connection:
curl -XGET -H 'Authorization: Basic Auth' -H 'Username: operator' -H 'Password: your_password' -H "Content-type: application/json" 'http://192.168.123.123/rest/full_state'
4. Rest protocol key names and values
To access the | |
|---|---|
| # Rest interface documentation | enable Enable REST interface in Operator Page |
| # Rest Protocol in full state for all key/value pairs | access via this URL: http://controller_ip/rest/full_state |
| # Rest Protocol in individual state for particular key/value pairs | access via this URL schema: http://controller_ip/rest/ <KEY> |
Example
To access conn_state, replace KEY with conn_state
- Schema:
http://rest/<KEY> - Schema applied to get
conn_state:http://rest/conn_state
|
Key name⬍ | Key values or example⬍ |
|---|---|
| # conn_state | no_vehicle_connected vehicle_connected_schuko vehicle_charging_schuko vehicle_connected_type2 vehicle_charging_type2 vehicle_connector_error |
| # auth_state | not_authorized_for_charging wait_for_auth authorized_for_charging auth_timeout |
| # auth_uid | e.g: 046e453af012ca3 |
| # time_since_charging_start | e.g: 2127 |
| # meter_wh | e.g: 426416 |
| # power_w | e.g: 3600 |
| # transaction_wh | e.g: 13500 |
| # display_text | e.g: <tariffInfoResponse\> <tariffEntry\> <chargeMode\> <maxPower\>3.7</maxPower\> <currentType\>AC</currentType\> </chargeMode\> <hourPrice\>60</hourPrice\> </tariffEntry\> <tariffEntry\> <chargeMode\> <maxPower\>8.0</maxPower\> <currentType\>AC</currentType\> </chargeMode\> <hourPrice\>120</hourPrice\> </tariffEntry\> <tariffEntry\> <chargeMode\> <maxPower\>22.0</maxPower\> <currentType\>AC</currentType\> </chargeMode\> <hourPrice\>300</hourPrice\> </tariffEntry\></tariffInfoResponse\> |
| # cp_id | e.g: +4983900000000001 |
| # ocpp_state | available occupied reserved unavailable faulted preparing charging suspendedevse suspendedev finishing |
| # type2_state | a b c d e |
| # type2_proximity | no_cable 13 20 32 63 cable_attached short_circuit |
| # sig_current | e.g: 16 |
| # schuko_state | idle connected power_on |
| # backend_conn_state | not_connected connecting connecting_proxy_ok connected not_reacheable rejected pending |
| # free_charging | off on |
| # slave_state | available occupied reserved unavailable faulted preparing charging suspendedevse suspendedev finishing |
| # ocpp_meter_cfg | ehz_meter_rs232 s0_meter_opto_1 s0_meter_opto_2 no_meter s0_meter_dedicated_input internal_meter modbus_meter_abb modbus_meter_eastron_sdm630 modbus_meter_eastron_sdm120_220 modbus_meter_garo_gnm3d modbus_meter_garo_gnm1d modbus_meter_garo_gm3t modbus_meter_garo_EM270 modbus_meter_finder modbus_meter_saia_ale3 modbus_meter_inepro_pro1_2 modbus_meter_inepro_pro380 modbus_meter_optec modbus_meter_nzr modbus_meter_tq_em300lr modbus_meter_carlo_gavazzi_em200 modbus_meter_carlo_gavazzi_em340 modbus_meter_garo_gnm3t modbus_meter_ime_ce4dmid31 modbus_meter_siemens7kt1666 modbus_meter_tq_em300lr_tcp modbus_meter_siemens7km2200_tcp modbus_meter_hager_ecr380d modbus_meter_garo_gnm3td modbus_meter_carlo_gavazzi_em210 modbus_meter_phoenixcontact_eem_mb371_tcp modbus_meter_schneider_iem3555 modbus_meter_ecs_m3pro modbus_meter_janitza_umg_512_pro modbus_meter_janitza_umg_512_pro_tcp modbus_meter_janitza_umg_605_pro modbus_meter_janitza_umg_605_pro_tcp modbus_meter_dzg_dvh4013 modbus_meter_gossen_metrawatt_em2289 modbus_meter_eastron_sdm72d modbus_meter_iskra_wm3m6 modbus_meter_tq_em410420 modbus_meter_tq_em410420_tcp modbus_berg_bme_461 modbus_berg_b23 modbus_meter_phoenixcontact_eem_em357 modbus_meter_nzr_ecocount_q4 modbus_meter_abb_ev3 dc_dzg_gsh01 modbus_meter_ytl_dts353f internal_ac_meter internal_dc_meter modbus_eichrecht ehz_meter_usb |
| # ocpp_meter_serial | e.g: 65465484ds |
| # current_a | e.g: 14.0,14.5,14.1 |
| # energy_man_current | e.g: 12 |
| # ambient_temp | e.g: +25.30 |
| # firmware_ver | e.g: 5.31.0-17351 |
| # cc_serial_n | e.g: 1703512493/b94060007 |
| # manuf_serial_n | e.g: 1703512493 |
| # con_cycles_schuko | e.g: 560 |
| # con_cycles_type2 | e.g: 1450 |
| # max_current | e.g: 32 |
| # rcmb_state | triggered okay |
| # rcmb_max | e.g: 0.0, 0.0 |
| # rcmb_values | e.g: 0.0, 0.0 |
| # cable_attached | off on |
| # schuko_cfg | disable enable |
| # rcd_state | disable triggered okay |
| # mcb_type2_state | disable triggered okay |
| # mcb_schuko_state | disable triggered okay |
| # cp_vendor | e.g: Acme Inc. |
| # errors | e.g: plug_locking_failed;;rfid_reader_not_communicating |
| # cp_model | e.g: CC612_2M3PR |
| # voltage_v | e.g: 230,230,230 |
| # wlan_state | wlan_disconnected wlan_connected |