OCPP Server Plugin for linking electric car chargers!

@OrangeTux I am an OCPP expert at one of the major charging station manufacturers. Also a “home assistant” enthusiast as a hobby.

I would like to utilise your library within my home assistant, however I am not confident how to deploy your library. Do you have any directions?

3 Likes

Hello @KEM_Hass ,

A library is not a ready thing to use with Home Assistant. You need to develop the interface between the library and Home Assistant to use it. A library is just a ready thing for being able to program something without knowing the details how, for instance a protocol like OCPP works.

1 Like

@KEM_Hass Or to put it another way, every home assistant integration relies on an open source python library (that also has to be on pypi). @OrangeTux’s python library is open source and also appears on pypi. Box 1 ticked.

The second part is the home assistant integration itself. There is plenty of info on development, and an answer is usually available from discord or this forum pretty quickly. The ha source code provides good inspiration too.

1 Like

@KEM_Hass Sorry for the very late response. I’m not really using this forum. If you’re still interested in integrating OCPP in HA I would love to help you out.

I think it’s best to reach out to me using the issues page of the OCPP project in Github. Than i’ll definitely receive a notification.

1 Like

I’m currently working on an integration. But I’m not sure what people expect from the integration? Anyone that can share his or her expectation; what should the integration do?

2 Likes

I started with OCPP integration. The code can be found here.

  sensor:
    - platform: ocpp
      monitored_variables:
      - "Current.Import"
      port: 9000
      scan_interval:
        seconds: 10

Using the key ‘monitored_variables’ you can select the measurands you want to monitor. A a list of all measurands can be found here.

port is used to configure the port where the central system (the OCPP server) is accepting connections.
scan_interval is used by HA core as refresh rate of the sensor on the UI.

Note that this is a very early version. So several things need to be fixed. But let me know what you think! I’m happy to receive feedback.

6 Likes

Glorious work! Well done.

Great work.
Does the integration provide a service (or switch) to start/stop charging? Does it support assigning a charge to a (virtual) charging account?

1 Like

Is the BMW Wallbox Plus supported by this plugin? It’s technically a Keba P30.

@OrangeTux good idea to include your OCPP python lib into home assistant as a server. I have a Mennekes AMTRON Xtra 22 C2 online - it should support OCPP 1.6. So, I am ready to test. But I do not find a way to tell the AMTRON to connect to an OCPP server :unamused:

I am about to get a plug-in hybrid and a charger that has OCPP 1.6. So I am keen for this integration. Specifically, I want to be able to monitor my solar power generation (HA already doing this) and control the charger so that it matches the output. So I want: charger on/off, charger on x watts.
Can an OCPP charger see the charge status of the battery in the car it it charging?

Unfortunately no AC / level 2 / non-fast chargers support reading the cars state of charge. It’s just a part of the J1772 standard. The cars don’t support it either. DC CCS fast charging does. And DC chargers DO support OCPP. But plug in hybrids do NOT support DC charging, plus the cheapest one is about $10,000 USD and needs 100 amps.

1 Like

Charging and battery information is provided by car APIs. For my Jaguar and Renault this works very well in Home Assistant.

I have a EVBox ELVI supporting OCPP 1.6. I installed the test version of the custom component and it is up and running. Problem now… How do I get a communication up and running between the OCPP server listening on port 9000 and the wallbox… No clue yet. Adding ws://192.168.181.42:9000/ as manual controlling service seems to be not enough here.

Useful would be a list of the measurands supported AND what they are doing. Anyone found such list?

BTW: Home Assistant is compaining that the version tag in the manifest.json is missing and the author has to be contacted regarding that as it will be unsupported in future. I added it by hand and HA seems to be happy with a “version”: “1” at the end.

Btw, checking the issues over at OrangeTux’ project site I found this one:
https://github.com/lbbrhzn/ocpp (Can be found in https://github.com/mobilityhouse/ocpp/issues/100)

A more recent version of a HACS compatible repo for the addin. Works sort of over here, but I made two reports already. He is asking for help, so maybe someone is interested to give him that help.

Does anyone know if it will be possible to have f.e. an Afen Eve Single Proline connected to a Backoffice so it can invoice my employer and get updates from the backoffice but also connected to Homeassistant?
So I can set the max current based on a P1 meter like the Alfen will do with it’s Active loadbalancing feature which is a seperate license?

Or is Homeassistant the new “backoffice” then and it can only connect to one.

1 Like

Hey, did OCPP node work for you? and what kind of data you can get from your Charge Point?

I never used it myself. I get power consumption out of the charge point, but for that I built and installed a “modbus sniffer” which listens in on the readings coming from the internal power meter of my charger. It then sends this over mqtt to HA.

I don’t have any control over the charge-point however.

I see thanks for the info, it would be nice if someone could build an integration for it.

There is a HACS based integration for OCPP already, see GitHub - lbbrhzn/ocpp: Home Assistant integration for electric vehicle chargers that support the Open.

It is now part of the HACS default repository list, so installation is relatively painless.
Also, it uses a ConfigFlow so it does not require any changes to configuration.yaml.

2 Likes