Ocpp integration with Autel Maxi / Evolo EV Charger - Problem

I have the ocpp library in home assistant connected to my Evolo EV charger. This is working for basic controls but get this error when trying to adjust the EV Charging current:

Failed to call service number/set value. PropertyConstraint ViolationError: When chargingProfilePurpose -ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}

Does anyone have an idea how to resolve this please?
The aim is then to follow what others have done and use my Solaredge PV system to charge the EV when it can.
Thanks in advance.

From Logbook:
‘’’
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/ocpp/api.py:865
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:51:18 (12 occurrences)
Last logged: 13:35:46

[281471878868160] PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}
[281472130331072] PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}
[281471619775808] PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}
[281472033891520] PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}
[281472092485056] PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {}
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 227, in handle_call_service
await hass.services.async_call(
File “/usr/src/homeassistant/homeassistant/core.py”, line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/number/init.py”, line 105, in async_set_value
await entity.async_set_native_value(native_value)
File “/config/custom_components/ocpp/number.py”, line 127, in async_set_native_value
resp = await self.central_system.set_max_charge_rate_amps(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/ocpp/api.py”, line 281, in set_max_charge_rate_amps
return await self.charge_points[cp_id].set_charge_rate(limit_amps=value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/ocpp/api.py”, line 610, in set_charge_rate
resp = await self.call(req)
^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/ocpp/charge_point.py”, line 281, in call
response = await self._get_specific_response(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/ocpp/api.py”, line 865, in _get_specific_response
raise resp.to_exception()
ocpp.exceptions.PropertyConstraintViolationError: PropertyConstraintViolationError: When chargingProfilePurpose =ChargingStationMaxProfile, chargingProfileKind SHALL NOT be Relative, {} ‘’’

Hi Here ! I have the same problem ! Any idea ?

I have just received this back from Autel via my EVSE supplier:

If kind is Relative, you need to configure the start time startSchedule

Now I need to work out how to change the start schedule. I suppose it requires something like this or else a different profile kind (Receive Charging Profiles using OCPP format (jedlix.com))

I gave up with EVCC in HA and on its own. It showed promise running on a rpi separately, I got it working but then it started complaining and I realised it required a monthly subscription to function which I didn’t feel was of value in my case.
Meanwhile Autel have said they will be integrating the charger with Solaredge (which I have) although no date and have provided me with the modbus information which I think will most likely be a much better way of achieving the same outcomes until a manufacturer level integration arrives.

I am going to give it a good try next week. Once I get my head around the python I should be able to set the time schedule correctly and that will allow me to change the current automatically.

Finally got around to looking at this. Have this script which seems to be working and accepted by the charger. Need some sun to test it tomorrow. Just going to write some automation to kick it all off.

alias: EVSE - Set charging rate
sequence:

  • service: ocpp.set_charge_rate
    data:
    custom_profile:
    chargingProfileId: 8
    stackLevel: 0
    chargingProfileKind: Absolute
    chargingProfilePurpose: ChargePointMaxProfile
    chargingSchedule:
    startSchedule: “{{ now().strftime(‘%Y-%m-%dT%H:%M:%S’) }}”
    duration: 3600
    chargingRateUnit: A
    chargingSchedulePeriod:
    - startPeriod: 0
    limit: >
    {% set solar_watts = states(‘sensor.pv_power’) | int %} {% if
    now().hour == 16 %}
    32
    {% else %}
    {% set spare_amps = (solar_watts / 240) | int %}
    {% if spare_amps < 6 %}
    0
    {% else %}
    spare_amps
    {% endif %}
    {% endif %}

Nope, not accepted by the charger, but does not error either

Hi Mavnz,
Were you able to get any further on the Autel charge control from PV please? With the sunshine coming to life I’m keen to get on with this again now. Still no sign of the Autel integration they said they were working on and they won’t respond in their feature request section either now.

I have the modbus commands for the charger which I believe only work on an Ethernet connection so once I have connected this I’ll be trying that route.

Thanks.