OHHH I’ll check that for sure. I just received information that my home charger is now OCPP compatible for residential (it was only for commercial). This service will be able to work with any ocpp compatible one so very nice. Thanks!
If I read well, GitHub - mobilityhouse/ocpp: Python implementation of the Open Charge Point Protocol (OCPP). is just the python script to communicate with it, not the ocpp-mqtt service right?
Would starting from the HomeAssistant integration help?
I found this. I know it’s python and not java but maybe it can help? If I understood how bindings work in openhab, I would try. I learn java in 2000 and with some time I’ll be able to understand python
Yes, this code implements ocpp calls, so I added mqtt part and specific calls, to make it work with openHAB
Oh, is there a place I can see how to do that? I have no clue how all of this work. I was looking to implement EVCC in one instance to make it work but since I don’t have a pv or battery, it’s useless for me
I posted my code here:
It implements stop, start and current limiting for automatization purposes (as well reading and setting CP configuration).
OH wow that’s perfect, I’ll check on how to use that. Thank you!
Edit: I’ll try to create a docker with all of that. On unraid, it’s nice to have stuff in docker. Never created one so I have some learning to do
I have a Wallbox Pulsar Plus EVSE arriving soon and have built an OCPP-MQTT bridge in Node-Red. I will be iterating a bit on it in the coming weeks and would be happy to share the Node-Red content if useful for anyone.
I would also be happy to provide any input I can to assist the OCPP binding development effort.
Does anyone have been able to integrate OCPP to Openhab ? I tried the repos from @rzylius through MQTT but I cannot get it to work correctly for some reasons…
@gyzod I had a look with some simulator, will try to push it a bit forward. What information you would like to source from/write to charger?
Just joining this conversation … I would like to get the connected state (i.e. if a car is connected), the current charging power and set the charging power, start/stop charging.
Isn’t this already possible with the EVCC binding? And of course you need a EVCC service running.
I played with this a couple of weeks ago and it worked very well.
But because my Fronius system already supports this natively, I stopped using it.
Sure (I have authored the evcc Binding, but haven’t been able to use it because NRGKick removed their API from newer models and didn’t deliver the promised API for the newer models — big reason to never buy anything from them again).
I’ve also recently got a Fronius system, however the wallbox isn’t installed yet.
BTW I just updated the Fronius binding to support controlling the battery of hybrid inverters.
Why I would like to see OCPP?
Even though Fronius supports this natively, it would be great to be able to monitor and control charging from openHAB without needing evcc in between, so I could utilise dynamic tariffs etc.
+1 for that would be nice if @splatch can finish this binding.
This is possible using Node-RED as a OCPP-MQTT bridge. I’ve implemented it. It works well. It’s not incredibly elegant to set up or modify, I would rather have used a native OCPP binding, but it doesn’t seem we are there yet.
It requires setting up Node-RED which is not difficult but perhaps not trivial either. It also requires some reading of the OCPP standard docs to understand and modify the JSON that is exchanged between Node-RED and your EVSE.
If interested, let me know, I can share my flow and some details of my setup.
There was an update for the NRGkick, Modbus and Json is now available.
Have a look on their website, is well documented.
Note to anyone interested in testing - please be ready to test with OH 3.0 instance. This is baseline for which I aim to provide a binding, once this version is confirmed to work I’ll port it to all above releases.
I’ve went over protocol above initial handshake and there are few places which move together.
We have there a:
- Charger
- Connector
- Transaction
- Meter
In that order. Meter readings are valid in context of transaction and, to have a transaction ocpp server must allocate identifier for it. This complicates a bit mapping to OH side, since everything below connector is basically a moving target.
Samples which can be sourced from meter contain a lot of combinations (Import/Export registers for Current, Energy.Active, Energy.Reactive, Power.Active Power.Reactive), multiplied by phases (10 options) and contexts (8 options) making it effectively a fairly complex electricity meter. Somewhat bound to the transaction. I am not entirely clear how energy related samples are reported, whether they are calculated from beginning of session or accumulated from beginning of charger operation.
Since there are multiple edge cases coming from ocpp spec, for sure chargers will report their data differently.
Cheers,
Łukasz
Interested. I can spin up a VM all I need is just start stop charging, status(plugged in, charging, stopped, paused,unplugged) and lastly speed of charge from 6 amps to 32 amps. I can test against a wallbox pulsar and wallbox copper SB. All the other power measurements etc not needed in my use case.
I’ve made PR with changes I completed on Friday: First push of more advanced version of OCPP binding. by splatch · Pull Request #91 · ConnectorIO/connectorio-addons · GitHub. Build job is in progress, it should be completed within 40 minutes.
Installation procedure of KARs produced through pull requests is described here: Installation and upgrade within openHAB® :: ConnectorIO® Documentation.
Starting point is this location within repository.connectorio.cloud, where you need to look for 3.0.0-pr91-SNAPSHOT
branch and latest kar file within it.
I’ve tested it so far with simulator (I owe no EVCS), there is no risk of any damages because binding does not write back anything to charger. It does not mutate its configuration in any way. Binding should now detect connectors, their status as well as meter readings within transaction.
Meter readings are currently taken in very primitive form, with minimal processing logic. I am looking forward to hear back from you what readings specific chargers will provide. You will need to set debug log for org.connectorio.addons.binding.ocpp
, then you should see log statements such Received samples for transaction N: ...
Cheers,
Łukasz
So I installed opejdk 11 with openhab 3.0.0 the kar file so far so good.
Now I added in my config of the charger:
ws://my openhab ip:8887/ and no password and an charger if 5798 BLA BLA
Then I added this in openhab
UID: co7io-ocpp:server:ca5c74bdbd
label: OCPP Server
thingTypeUID: co7io-ocpp:server
configuration:
chargers:
- ""
port: 8887
heartbeat: 10
UID: co7io-ocpp:charger:ca5c74bdbd:ef8f461436
label: Charger
thingTypeUID: co7io-ocpp:charger
configuration:
heartbeat: 10
serialNumber: "5798 BLA bla"
bridgeUID: co7io-ocpp:server:ca5c74bdbd
UID: co7io-ocpp:connector:ef8f461436:779c52bb18
label: Connector
thingTypeUID: co7io-ocpp:connector
configuration:
connectorId: 1
bridgeUID: co7io-ocpp:charger:ca5c74bdbd:ef8f461436
I also setup debug via karaf console
215 │ Active │ 80 │ 1.5.1 │ com.fasterxml.classmate
216 │ Active │ 80 │ 3.0.0.pr-91-SNAPSHOT │ org.connectorio.addons.binding
217 │ Active │ 80 │ 3.0.0.pr-91-SNAPSHOT │ org.connectorio.addons.binding.ocpp
openhab> log:set DEBUG org.connectorio.addons.binding.ocpp
But this is all I get in the logs
.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007 x
.ui.internal.UIService ] - Started UI on port 8080 x
nel.internal.HABPanelTile] - Started HABPanel at /habpanel x
n.internal.RuleEngineImpl] - Rule engine started. x
ingStatusInfoChangedEvent] - Thing 'co7io-ocpp:server:ca5c74bdbd' changed from UNINITIALIZED to INITIALIZING x
ingStatusInfoChangedEvent] - Thing 'co7io-ocpp:server:ca5c74bdbd' changed from INITIALIZING to ONLINE x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:chargePointStatus x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:number x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:string x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:frequency x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:number x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:number x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:percent x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:temperature x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:voltage x
ingStatusInfoChangedEvent] - Thing 'co7io-ocpp:charger:ca5c74bdbd:ef8f461436' changed from UNINITIALIZED to INITIALIZING x
ingStatusInfoChangedEvent] - Thing 'co7io-ocpp:charger:ca5c74bdbd:ef8f461436' changed from INITIALIZING to ONLINE x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:chargePointStatus x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:number x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:string x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:dateTime x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:current x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:energy x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:frequency x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:number x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find channel type: co7io-ocpp:power x
l.thing.ThingTypeResource] - Cannot find