Device Model ++++++++++++ Initial configuration --------------------- Josev shall ask once for the initial configuration every time it boots or the process restarts. The example response below illustrates an example response for a CS with 2 EVSEs, 3 Connectors, and a single custom component called `TemperatureSensor`. The device_model response **must** include `model`, `vendor`, the initial OCPP credentials and network connection settings as `identity`, `basic_auth_password`, `ocpp_csms_url` and `security_profile`. It also **must** include at least one `evse` and `connector` record, with all of the fields shown below. Custom components **must** include `name` and at least one variable which must also include `name` and `value`. .. admonition:: Description. :class: seealso .. jsonschema:: ../../../schemas/DeviceModelRequest.json :hide_key: /**/additionalProperties Example:: { "id": "fbd5a78d-a201-4fd3-9fc3-86a0d6624049", "name": "device_model", "type": "request", "data": {} } .. jsonschema:: ../../../schemas/DeviceModelResponse.json :hide_key: /**/additionalProperties .. admonition:: IMPORTANT NOTE :class: attention Example:: { "id":"4065160c-f9a7-4d29-a925-9bbc44b9aa40", "type":"response", "name":"device_model", "data":{ "model":"CS Model Name", "vendor":"CS Manufacturer Name", "identity":"CS_001", "ocpp_csms_url":"ws://ocpp.dev.switch-ev.com/switch-ev", "security_profile":1, "basic_auth_password":"some-password", "serial_number":"978-3-16-148410-0", "firmware_version":"1.0.0", "sim_iccid":"891460000000000012", # [Optional] "sim_imsi":"313460000000001", # [Optional] "evses":[ { "ocpp_id":1, "iso15118_id":"GB*SEV*E123456789", "power_kw":22.0, "supply_phases":3, "connectors":[ { "id":1, "connector_type":"cCCS2" } ] }, { "ocpp_id":2, "iso15118_id":"GB*SEV*E123456790", "power_kw":22.0, "supply_phases":3, "connectors":[ { "id":1, "connector_type":"cType2" }, { "id":2, "connector_type":"cG105" } ] } ], "components":[ { "name":"TemperatureSensor", "instance":"first", # [Optional] "evse_id":1, # [Optional] "connector_id":2, # [Optional] "variables":[ { "name":"Temperature", "instance":"realtime", # [Optional] "value":"45.8", "unit":"celsius", # [Optional] "mutability":"ReadOnly", # [Optional] "constant":false, # [Optional] "data_type":"decimal" # [Optional] }, { "name":"AvailabilityState", "instance":"Actual", # [Optional] "value":"Available", "mutability":"ReadOnly", # [Optional] "constant":false, # [Optional] "data_type":"OptionList", # [Optional] "values_list":"Available,Occupied,Reserved,Unavailable,Faulted" # [Optional] } ] } ] } } -------- Update from CS ------------------- .. admonition:: Note. :class: note Generally this message will be sent when some hardware state changes on a custom component, for example a change of temperature on a `TemperatureSensor`. Updating the OCPP credentials by the manufacturer (charging station identity, basic auth password, CSMS url and security profile) is not allowed. .. jsonschema:: ../../../schemas/DeviceModelUpdateUpdate.json :hide_key: /**/additionalProperties Example:: { "id":"8a1c757d-dfc4-48a7-a99b-d67a1265bc40", "name":"device_model_update", "type":"update", "data":{ "firmware_version":"1.0.0", # [Optional] "sim_iccid":"891460000000000012", # [Optional] "sim_imsi":"313460000000001", # [Optional] "components":[ { "name":"TemperatureSensor", "instance":"first", # [Optional] "evse_id":1, # [Optional] "connector_id":2, # [Optional] "variables":[ { "name":"Temperature", "instance":"realtime", # [Optional] "value":"46.8", "unit":"celsius", # [Optional] "mutability":"ReadOnly", # [Optional] "constant":false, # [Optional] "data_type": "decimal" # [Optional] }, { "name":"AvailabilityState", "instance":"Actual", # [Optional] "value":"Available", "mutability":"ReadOnly", # [Optional] "constant":false, # [Optional] "data_type":"OptionList", # [Optional] "values_list":"Available,Occupied,Reserved,Unavailable,Faulted" # [Optional] } ] } ] } } --------- Update from Josev ------------------- .. admonition:: Note. :class: note If a custom component has a variable which has `mutability: read_write` then the CSMS user can update this value using a `SetVariablesRequest`. This will result in a `device_model` update message from Josev to CS. .. jsonschema:: ../../../schemas/DeviceModelUpdateUpdate.json :hide_key: /**/additionalProperties Example:: { "id":"4471a02b-f846-4731-b605-1e353104ab86", "name":"device_model_update", "type":"update", "data":{ "components":[ { "name":"AirCoolingSystem", "instance":"first", # [Optional] "evse_id":1, # [Optional] "connector_id":2, # [Optional] "variables":[ { "name":"Enabled", "instance":"actual", # [Optional] "value":"false", "mutability":"ReadWrite", # [Optional] "constant":false # [Optional] } ] } ] } } --------- Device Model Reset Request -------------------------- .. admonition:: Note. :class: note Generally this can be sent during testing or by the CS itself to force Josev to re-request a fresh device model from CS. .. jsonschema:: ../../../schemas/DeviceModelResetRequest.json :hide_key: /**/additionalProperties Example:: { "id": "4471a02b-f846-4731-b605-1e353104ab86", "name": "device_model_reset", "type": "request", "data": {} } .. jsonschema:: ../../../schemas/DeviceModelResetResponse.json :hide_key: /**/additionalProperties Example:: { "id": "4471a02b-f846-4731-b605-1e353104ab86", "name": "device_model_reset", "type": "response", "data": { "status": "accepted"#or"rejected", "rejected_reason": "", # empty if accepted } } --------