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.
DeviceModelRequest¶
Topic: josev/cs. Used by OCPP to request the device model from CS. |
||
type |
object |
|
properties |
||
|
type |
string |
format |
uuid |
|
|
const |
device_model |
|
const |
request |
|
type |
object |
Example:
{
"id": "fbd5a78d-a201-4fd3-9fc3-86a0d6624049",
"name": "device_model",
"type": "request",
"data": {}
}
DeviceModelResponse¶
Topic: cs/josev. Used by CS to send the device model to OCPP. |
|||||
type |
object |
||||
properties |
|||||
|
type |
string |
|||
format |
uuid |
||||
|
const |
device_model |
|||
|
const |
response |
|||
|
type |
object |
|||
properties |
|||||
|
type |
string |
|||
|
type |
string |
|||
|
type |
string |
|||
enum |
ocpp1.6, ocpp2.0.1, ocpp2.1 |
||||
|
type |
string |
|||
pattern |
^(ws|wss):// |
||||
|
type |
integer |
|||
maximum |
3 |
||||
minimum |
1 |
||||
|
type |
string |
|||
|
type |
string |
|||
|
type |
string |
|||
|
type |
string |
|||
|
type |
string |
|||
|
type |
string |
|||
|
type |
integer |
|||
minimum |
0 |
||||
|
type |
array |
|||
items |
type |
object |
|||
|
type |
array |
|||
items |
type |
object |
|||
allOf |
if |
properties |
|||
|
type |
integer |
|||
minimum |
2 |
||||
then |
properties |
||||
|
type |
string |
|||
pattern |
^wss:// |
||||
else |
properties |
||||
|
type |
string |
|||
pattern |
^(ws):// |
||||
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_version":"ocpp2.0.1", # [Optional: Default: ocpp2.0.1, other allowed values ocpp1.6 and ocpp2.1]
"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]
"default_message_timeout":30, # [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]
"min_limit":-40, # [Optional]
"max_limit":120 # [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¶
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.
DeviceModelUpdateUpdate¶
Topics: cs/josev or josev/cs. Used by CS and OCPP to send each other device model updates. |
||||
type |
object |
|||
properties |
||||
|
type |
string |
||
format |
uuid |
|||
|
const |
device_model_update |
||
|
const |
update |
||
|
type |
object |
||
properties |
||||
|
type |
string |
||
|
type |
string |
||
|
type |
string |
||
|
type |
array |
||
items |
type |
object |
||
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]
"min_limit":-40, # [Optional]
"max_limit":120 # [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¶
Note.
min_limit and max_limit are the variable’s fixed characteristics, not settable attributes: the CSMS cannot change them with a SetVariablesRequest. Both are optional and independent – a variable may declare one, both or neither, and omitting them on a device_model_update leaves any previously reported limit in place.
max_limit is the maximum value for the numeric data types (integer, decimal); for string, OptionList, SequenceList and MemberList it is the maximum length of the (CSV) string. min_limit is only meaningful for the numeric data types.
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.
DeviceModelUpdateUpdate¶
Topics: cs/josev or josev/cs. Used by CS and OCPP to send each other device model updates. |
||||
type |
object |
|||
properties |
||||
|
type |
string |
||
format |
uuid |
|||
|
const |
device_model_update |
||
|
const |
update |
||
|
type |
object |
||
properties |
||||
|
type |
string |
||
|
type |
string |
||
|
type |
string |
||
|
type |
array |
||
items |
type |
object |
||
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¶
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.
DeviceModelResetRequest¶
Topic: josev/cs. Used to reset the device model stored in josev. |
||
type |
object |
|
properties |
||
|
type |
string |
format |
uuid |
|
|
const |
device_model_reset |
|
const |
request |
|
type |
object |
properties |
||
Example:
{
"id": "4471a02b-f846-4731-b605-1e353104ab86",
"name": "device_model_reset",
"type": "request",
"data": {}
}
DeviceModelResetResponse¶
Topic: josev/cs. Used to respond to a DeviceModelResetRequest. |
|||
type |
object |
||
properties |
|||
|
type |
string |
|
format |
uuid |
||
|
const |
device_model_reset |
|
|
const |
response |
|
|
type |
object |
|
properties |
|||
|
enum |
accepted, rejected |
|
|
type |
string |
|
Example:
{
"id": "4471a02b-f846-4731-b605-1e353104ab86",
"name": "device_model_reset",
"type": "response",
"data": {
"status": "accepted"#or"rejected",
"rejected_reason": "", # empty if accepted
}
}