ocpp
ocpp copied to clipboard
Create Home Assistant add-on or custom component.
Would this be possible? It would be amazing. thanks!
I have to check HA APIs to so if it's possible. First of all, what do you expect from the integration? How do you want to use the integration?
We have a Chevy Volt and a Charge Point charger. I would like to track the energy usage in HA. It's more a matter of interest than necessity but useful to know. thanks
@DarwinData I've put some effort in creating a first of an integration of OCPP in HA. You can find it here: https://github.com/OrangeTux/core/tree/add-ocpp-support/homeassistant/components/ocpp
Below you can find a sample configuration to enable the integration:
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.
Can you write a rich example about this?
What do you want from a 'rich example'? As I don't use HA I had a hard time to figure out what users would expect from the integration.
but I don't know where to add information such as the id of the central system.
I'm not sure what you mean with 'id of the central system'. The CSMS doesn't has an ID. BY default the server listens on port 9000.
Let me know if you have more questions.
Currently the plugin only supports a single charger. You don't need to configure the charger ID, the plugin accepts all IDs.
Currently you can configure much. Only the port where the server will listen on (defaults to 9000), the measurands you want to display in the HA UI. And the refresh rate of those measurands.
If you want to add more configuration options you've to edit this section.
Every entry in the PLATFORM_SCHEMA
dictionary corresponds to a configuration option in HA's config file. If you want to add more options you need to pick a name for the key. Also you need to configure the type of the configuration value.
Now I still need to make a load that matches the charging pile. Is it because I don't have a load that the charging pile works, so it shows unknown in my integration?
I'm not exactly sure what you mean by this. But normally if a charger is charging it sends MeterValues requests to the Central System. These request contain transaction related metrics, called measurands in OCPP. An example is the measurand 'Current.Import' that contains the amount of current flowing into the car.
You can configure which measurands you want to show in the HA UI using the config option monitored_variables
. Note that most chargers don't send all different measurands possible.
Then where should those icons be set?
You can pick any of the Material Design Icons.
Hi, I am not familiar with HA apps, but the measurand you chose to extract is not the one that will provide you the current consumed by the EV. The one you are looking for is "Current.Import". By definition, Import and Export are in the perspective of the EV and not the Charging Station, thus Current.Import could be translated to "current being imported by the EV"
Could you also provide more info about the AC load you are using? like a link to the description of that device? Thanks!
i've created a HACS compatible repository for the home assistant plugin here:
https://github.com/lbbrhzn/ocpp
I can see BootNitifications, Hartbeat, StatusNotifications from my Wallbox PulsarPlus, but no measurands yet.
Great! I will check it out later.
i've created a HACS compatible repository for the home assistant plugin here:
https://github.com/lbbrhzn/ocpp
I can see BootNitifications, Hartbeat, StatusNotifications from my Wallbox PulsarPlus, but no measurands yet.
I can't add this repository to HACS, it tells me that the structure is invalid.
Any solution?
Thanks
I can't add this repository to HACS, it tells me that the structure is invalid.
Any solution?
Solved now. Please note that this integration is highly experimental. Currently it only supports a single charging session. It's my first python project and my first home assistant integration. Any help on improving it is highly appreciated!