-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional information on MQTT mapping and topics
- Loading branch information
1 parent
be7389a
commit 5dbf972
Showing
3 changed files
with
227 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# This file shows a list of MQTT topics that Home Assistant subscribes to populate your entity IDs. | ||
# mqttRoot => configured in your device configuration | ||
# deviceID => configured in your device configuration | ||
|
||
# How ro read this file | ||
#Let's investigate this entry: | ||
# SENSORS_PER_CHARGEPOINT | ||
# mqttTopicCurrentValue = {mqttRoot}/chargepoint/{deviceID}/{key} | ||
# key="get/power", | ||
# | ||
# For the device chargepoint, there is a sensor that subscribes to the MQTT topic | ||
# {mqttRoot}/chargepoint/{deviceID}/get/power | ||
# For example: openWB /chargepoint/0 /get/power | ||
# If you want to know to which sensor entity this MQTT topic is mapped, have a look into the file const.py. | ||
# Check the list SENSORS_PER_CHARGEPOINT and locate the entry with key="get/power". | ||
# | ||
# The property name corresponds to the entity name in Home Assistant. | ||
# In our example, the topic above is mapped to the sensor "Ladeleistung" of the device chargepoint. | ||
|
||
SENSORS_CONTROLLER | ||
mqttTopicCurrentValue = {mqttRoot}/{key} | ||
key="system/ip_address", | ||
key="system/version", | ||
key="system/lastlivevaluesJson", | ||
|
||
SENSORS_PER_CHARGEPOINT | ||
mqttTopicCurrentValue = {mqttRoot}/chargepoint/{deviceID}/{key} | ||
key="get/currents", | ||
key="get/daily_imported", | ||
key="get/daily_exported", | ||
key="get/evse_current", | ||
key="get/exported", | ||
key="get/fault_str", | ||
key="get/imported", | ||
key="get/phases_in_use", | ||
key="get/power", | ||
key="get/state_str", | ||
key="get/voltages", | ||
key="get/power_factors", | ||
key="get/powers", | ||
key="get/frequency", | ||
key="config", | ||
key="get/connected_vehicle/info", | ||
key="get/connected_vehicle/config", | ||
key="get/connected_vehicle/soc", | ||
key="get/rfid", | ||
|
||
SENSORS_PER_COUNTER | ||
mqttTopicCurrentValue = {mqttRoot}/counter/{deviceID}/get/{key} | ||
key="voltages", | ||
key="power_factors", | ||
key="powers", | ||
key="frequency", | ||
key="currents", | ||
key="power", | ||
key="fault_str", | ||
key="exported", | ||
key="imported", | ||
key="daily_imported", | ||
key="daily_exported", | ||
|
||
SENSORS_PER_BATTERY | ||
mqttTopicCurrentValue = {mqttRoot}/bat/{deviceID}/get/{key} | ||
key="soc", | ||
key="power", | ||
key="fault_str", | ||
key="exported", | ||
key="imported", | ||
key="daily_imported", | ||
key="daily_exported", | ||
|
||
SENSORS_PER_PVGENERATOR | ||
mqttTopicCurrentValue = {mqttRoot}/pv/{deviceID}/get/{key} | ||
key="daily_exported", | ||
key="monthly_exported", | ||
key="yearly_exported", | ||
key="exported", | ||
key="power", | ||
key="currents", | ||
key="fault_str", | ||
|
||
BINARY_SENSORS_PER_CHARGEPOINT | ||
mqttTopicCurrentValue = {mqttRoot}/chargepoint/{deviceID}/get/{key} | ||
key="plug_state", | ||
key="charge_state", | ||
key="fault_state", | ||
|
||
BINARY_SENSORS_PER_COUNTER | ||
mqttTopicCurrentValue = {mqttRoot}/counter/{deviceID}/get/{key} | ||
key="fault_state", | ||
|
||
BINARY_SENSORS_PER_BATTERY | ||
mqttTopicCurrentValue = {mqttRoot}/bat/{deviceID}/get/{key} | ||
key="fault_state", | ||
|
||
BINARY_SENSORS_PER_PVGENERATOR | ||
mqttTopicCurrentValue = {mqttRoot}/pv/{deviceID}/get/{key} | ||
key="fault_state", | ||
|
||
SELECTS_PER_CHARGEPOINT | ||
mqttTopicCurrentValue = {mqttRoot}/chargepoint/{deviceID}/{mqttTopicCurrentValue} | ||
mqttTopicCommand = {mqttRoot}/{mqttTopicCommand} | ||
|
||
mqttTopicCurrentValue="get/connected_vehicle/config", | ||
mqttTopicCommand="set/vehicle/template/charge_template/_chargeTemplateID_/chargemode/selected", | ||
|
54 changes: 54 additions & 0 deletions
54
custom_components/openwb2mqtt/mosquittoExampleConfiguration.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# | ||
# bridge to openWB Wallbox | ||
# | ||
connection openwb2 | ||
local_clientid openwb2.mosquitto | ||
|
||
#TODO: Replace IP address | ||
address 192.168.0.68:1883 | ||
|
||
#Sensors Controller | ||
topic openWB/system/ip_address in | ||
topic openWB/system/version in | ||
topic openWB/system/lastlivevaluesJson in | ||
|
||
#Sensors per Chargepoint | ||
#TODO: Replace 4 by your chargepoint ID | ||
topic openWB/chargepoint/4/get/# in | ||
topic openWB/chargepoint/4/config in | ||
|
||
#Sensors per Counter | ||
#TODO: Replace 0 by your counter ID | ||
topic openWB/counter/0/get/+ in | ||
|
||
#Sensors per Battery | ||
#TODO: Replace 1 by your battery ID | ||
topic openWB/bat/1/get/+ in | ||
|
||
#Sensors per PV Generator | ||
#TODO: Replace 3/5 by your PV generator ID. If you have only one generator, delete one line | ||
topic openWB/pv/get/3/get/+ in | ||
topic openWB/pv/get/5/get/+ in | ||
|
||
#Binary Sensors per Chargepoint | ||
#TODO: Replace 4 by cyour chargepoint ID | ||
topic openWB/chargepoint/4/get/+ in | ||
|
||
#Binary Sensors per Counter | ||
#TODO: Replace 0 by your counter ID | ||
topic openWB/counter/0/get/+ in | ||
|
||
#Binary Sensors per Battery | ||
#TODO: Replace 0 by your battery ID | ||
topic openWB/bat/0/get/+ in | ||
|
||
#Binary Sensors per PV Generator | ||
#TODO: Replace 3/5 by your PV generator ID. If you have only one generator, delete one line | ||
topic openWB/pv/get/3/+ in | ||
topic openWB/pv/get/5/+ in | ||
|
||
#Selects per Chargepoint | ||
#TODO: Replace 4 by your chargepoint ID | ||
topic openWB/chargepoint/4/get/connected_vehicle/config in | ||
topic openWB/set/vehicle/template/charge_template/+/chargemode/selected out | ||
|