I am working on a OCPP implementation in Python that just have been open sourced. Could that be useful? You can find it here: https://github.com/mobilityhouse/ocpp
The biggest problem I see with OCPP is that if you want to write a client, you have to know what server it’s for, because a wss connection requires a certificate and the method of exchanging certificates with an unknown server is completely unclear. At least I haven’t been able to make it work.
The point of OCPP is “open” - your client has to be able to play with any server, otherwise you cannot sell anything that isn’t specifically tied to a particular server. I.e. if I use HomeAssistant, do I then tell GreenLots they better get themselves that server if I want them to do public billing for my clients?
Besides, OCA saw the error of their ways and they published a certificate fix in 2018, a year after I wrote my stuff.
OCPP integration in home-assistant might not work for your use case. If I understand you correctly you want to connect multiple chargers and bill clients using those chargers. I agree with you, you shouldn’t want to do that with home assistant.
I was more thinking about a private person having his own charger. It would be awesome if you could connect that to home-assistant to see some details about an ongoing transaction.
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.
@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.
@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’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?
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.
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?
@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
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.
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.