From 28c5c96c7ae1b3c4584bf689b70282d5b4f88d32 Mon Sep 17 00:00:00 2001 From: Andreas <69649604+a529987659852@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:42:48 +0100 Subject: [PATCH] Update README.md --- README.md | 75 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 8cef49c..f93f514 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # openWB2 with Home Assistant -This is a custom component for Home Assistant supporting the [openWB](https://openwb.de/main/) wallbox for charging electric vehicles. The integration subscribes to MQTT topics `prefix/` which are used by openwb to broadcast information and displays this informations as entities. You can also change, for example, the charge mode of a charge point using a dropdown. +This is a custom component for Home Assistant supporting the [openWB](https://openwb.de/main/) wallbox for charging electric vehicles. The integration subscribes to MQTT topics which are used by openWB to broadcast information and displays this informations as entities. You can also change, for example, the charge mode of a charge point. Note: I provide this custom integration without any warranty. It lies in the responsability of each user to validate the functionality with his/her own openWB! @@ -9,17 +9,17 @@ This integration assumes that you run the **openWB using software version 2.x**. If you need help, also have a look [here](http://tech-engineering.de/home-assistant-und-openwb). Although created for the previous version of this integration, you should still find useful information if you're not familiar to MQTT and/or custom integrations in Home Assistant. -## What does the custom integration provide in detail? +## What does the custom integration provide? My integration provides the following device types: -- Wallbox: This device type represents the openWB itself. You get the following sensors: +- Wallbox: This device type represents the openWB itself and provides the following sensors: - House consumption - Total battery power and state of charge - Total PV production - Total charging power - - The sensors correspond to what the openWB shows in the upper section on the overview page. -- Charge Point: This device represents a charge point of the openWB. You should be able to configure the internal charge point as well as charge points from remote openWBs. -You get, for example, the following sensors: + - *Note*: The sensors correspond to what the openWB shows in the upper section on the overview page. + +- Charge Point: This device represents a charge point of the openWB and provides, for example, the following sensors: - Charge power (total and individual phases) - Number of active phases - Current @@ -28,53 +28,58 @@ You get, for example, the following sensors: - Total energy values - Plug and charge states - And so on... -- Counter: This device represents a counter, for example, the counter that measures your inbound and outbound energy from the supplier. You get, for example, the following sensors: + - *Note*: You should be able to configure the internal charge point as well as charge points from remote openWBs. + +- Counter: This device represents a counter, for example, the counter that measures your inbound and outbound energy from the supplier. This device provides, for example, the following sensors: - Power (total and individual phases) - Current - Voltage - Total energy values (imported and exported energy) - And so on... -- Battery: This device represents a battery, for example, a house battery. You get, for example, the following sensors: + +- Battery: This device represents a battery, for example, a house battery and provides, for example, the following sensors: - Power - State of charge - - Total energy values (charged into the battery and taken out of the battery) - -## Example Configuration for openWB2 -When setting up this integration, you must choose the device to be created and provide additional details (MQTT root and device ID). - -How to find out the device ID and MQTT root? - -This image shows an example of the MQTT topics published by openWB2 and how to identify the MQTT root topic -HowToConfigureChargePoint-MQTT - -This image shows the openWB2 status page (http:///openWB/web/settings/#/Status) and the device IDs: -![HowToConfigureChargepoint-Status](https://github.com/a529987659852/openwbmqtt/assets/69649604/621be5ee-0a75-44ea-a652-6197ae368f49) + - Total energy values (charged into the battery and taken out of the battery) + - And so on... +- PV Generator: This device represents a PV generator and provides, for example, the following sensors: + - Power + - Current + - Energy values (total, today, month, year) + - And so on... -# How to add this custom component to home assistant +# How to add this custom component to Home Assistant -## Step 1: Deploy the Integration Coding to HA +## Step 1: Deploy the Integration Coding to Home Assistant ### Option 1: Via HACS Make sure you have [HACS](https://github.com/hacs/integration) installed. Under HACS, choose Integrations. Add this repository as a user-defined repository. ### Option 2: Manually -## Step 1: Clone component -Clone the custom component to your custom components folder. +Clone the custom component to your custom_components folder. + +## Step 2: Restart Home Assistant +Restart your HA instance. + +## Step 3: Add and Configure the Integration +In HA, choose Settings -> Integrations -> Add Integration to add the integration. HA will display a configuration window. For details, refer to the *Example Configuration* section -## Step 2: Restart HA -Restart your HA instance as usual. +# Example Configuration for openWB2 +When setting up this integration, you must choose the device type to be created and provide additional details (MQTT root and device ID). +- The device type corresponds to the list of devices from the previous section. +- The device ID is shown on the Status page of the openWB management webinterface. +- The MQTT root is the header topic which is used by the wallbox to publish all values. -## Step 3: Add the Integration -In HA, choose Settings -> Integrations -> Add Integration to add the integration. HA will display a configuration window. For details, see next section. If the integration is not displayed, it may help to refresh your browser cache. +**How to find out the device ID and MQTT root?** -# Configuration of the Integration and Additional Information -The integration subscribes to MQTT topics `prefix/` which are used by openwb to broadcast information. +This image shows an example of the MQTT topics published by openWB2 and how to identify the MQTT root topic +HowToConfigureChargePoint-MQTT + +This image shows the openWB2 status page (http://your-ip/openWB/web/settings/#/Status) and the device IDs: +![HowToConfigureChargepoint-Status](https://github.com/a529987659852/openwbmqtt/assets/69649604/621be5ee-0a75-44ea-a652-6197ae368f49) -The first parameter, **mqttroot**, defines the prefix that shall be applied to all MQTT topics. By default, openWB publishes data to the MQTT topic `openWB/#` (for example `openWB/lp/1/%Soc`). In this case, set the prefix to openWB and the integration will subscribe to MQTT data coming from openWB, for example `openWB/lp/1/%Soc`, or `openWB/global/chargeMode`, and so on. - -The second parameter, **chargepoints**, is the number of configured charge points. For each charge point, the integration will set up one set of sensors. -# Mosquitto Configuration in an Internal Network +# Additional Information: Mosquitto Configuration in an Internal Network If you're in an internal network, for example your home network, you can simply subscribe the openWB mosquitto server with the mosquitto server you're using with home assistant. No bridge is required. Instead, add the following to the configuration (for example in /etc/mosquitto/conf.d/openwb.conf): @@ -92,4 +97,4 @@ cleansession true ``` If using the mqtt configuration above, **mqttroot** is `openWB` (this is the default value). Don't add a '/'. -If your're publishing the data from the openWB mosquitto server to another MQTT server via a bridge, the topics on the other MQTT server are usually prepended with a prefix. If this is the case, also include this prefix into the first configuration parameter, for example `somePrefix/openWB`. Then, the integration coding will subscribe to MQTT data comfing from MQTT, for example `somePrefix/openWB/global/chargeMode`, or `somePrefix/openWB/lp/1/%Soc`, and so on. +If your're publishing the data from the openWB mosquitto server to another MQTT server via a bridge, the topics on the other MQTT server are usually prepended with a prefix. If this is the case, also include this prefix into the first configuration parameter, for example `somePrefix/openWB`. Then, the integration coding will subscribe to MQTT data comfing from MQTT, for example `somePrefix/openWB/system/ip_address`, or `somePrefix/openWB/chargepoint/4/get/charge_state`, and so on.