after some struggle I was finally able to integrate the openWB into Home Assistant via MQTT. For my fellow openWBlers I wanted to document the status here.
Have MQTT set up from the addon store
Have SSH access to HA
create a openwb.conf file under /share/mosquitto with belows content
Restart mosquitto and check if you find in the logs Connecting bridge openwb (your.ip.of.openwb:1883)
check with a MQTT (e.g. MQTT Explorer) client of the data arrives in MQTT
I hope you find this useful.
openwb.conf
connection openwb
address your.ip.of.openwb:1883
topic openWB/# both 2
local_clientid rem.mosquitto
Hallo Ralf
Deine Aufstellung ist sehr instruktiv. Ich bin ziemlicher Newbie in MQTT und Home Assistant und hoffe auf deine Hilfe.
Ich habe den Mosquitto erfolgreich konfiguriert und gestartet. Im Log sehe ich zumindest keinen Fehler beim Start des Brokers und der Einbindung der openWB als Client. Im UI des Mosquitto kann ich vmtl nur 1Topic publizieren bzw abonnieren. Wahrscheinlich muss ich dafĆ¼r ein Script erstellen. Hast du Beispiele vor allem fĆ¼r die Bezeichnung der openWB-Daten als Topic.
Im openWB Status/mqtt Log sehe ich mƶglicherweise die korrekten Bezeichnungen, unter denen openWB Daten publiziert werden, zB. RequestYearGraphv1 Message oder nur YearGraphv1
Ich hoffe, dass du oder evtl jemand anderes mit derselben Thematik den alten Thread wieder aufnimmt.
Kurz gesagt:
wo kann ich die korrekten Topic-Bezeichnungen entnehmen?
wo kann ich sie publizieren oder abonnieren?
wie kann ich die Daten und Schalter der openWB in Home Assistant sichtbar machen?
Hi Ralf, sorry to bother you again. Iām not familiar with writing scripts but try to get in. I had integrated Mosquitto successfully. The log doesnāt show errors. I also integrated openwbmqtt via HACS and it seems to work. I hope you have certain experience of openwbmqtt integration.
In lovelace I see most of the openWB sensors except the button to control the charge mode. However there is a note >unknown< and no data behind the sensor. I think this note is a result of a bad configuration of the topics. The openWB bridge is active. Prefix is >openWB/<.
I the folder >config/custom_components/openwbmqtt/translations< Iāve modified the file de.json according to the openWB prefix, host and number of charge points.
Iām in doubt if I should use unsafe port 1883 or safe port 8883.
However using 1883 as well as 8883 leads to the same note >unknown< in Lovelace.
When I have an look into the mqtt- traffic by mqtt-explorer I see the original data of the openWB/lp/1.
For safe port 8883 Iāve already installed Duck-DNS and NGINX. They started successfully as well.
Iām a bit confused about the publishing and subscription of the openWB data and assume that these improper settings might lead to the note >unknown< in lovelace. I donāt know where I have to modify the topic entry.
It would be great to get some support and try to learn. Thanks a lot in advance.
Did you solve that issue ? Have the same problem on my end.
Installed and configured everything like described, but got only >unknown< for the sensor values.
Have double checked the Enty in config.storage\core.config_enties:
M3SR needs to be charged once a week to 100%. I wanted to automate the āmax charging SOCā via the openWB ā¦ and ā¦ works like a charm.
FYI .The SOC form the tesla I get into HA via TeslaMate and do send it out to openWB similar to the Audi one in the 1st post.
I added the following automation and ā¦ et voilat ā¦ SocChargingTo is set at 9am every morning to 80% except for Thursdays where it is set to 100%.
- alias: "openWB - at 9am set socToChargeTo on 80% but Thursdays to 100%"
trigger:
- platform: time
at: "09:00"
- platform: homeassistant
event: start
action:
- service: mqtt.publish
data_template:
topic: "openWB/config/set/sofort/lp/1/socToChargeTo"
retain: true
payload: "{{ (80 + 20 * (now().weekday() in [3])) | int }}"
Doing so I dont need to take care anymore. Just plug it in every evening and HA takes care. This is what automations habe to look like IMHO.
Be carefull with other Tesla models. Most of them require to set the SocChargingTo to 80% normally and only set it to 100% if you really need the extra miles. But you get the jist.
You could create an automation which sets the SocChargingTo to 100% when pressing a button ā¦ or when you have an event in your calender the next day with an address more far away than 400 miles ā¦ the options are endless.
Only when you have those options to connect all the different appliances ā¦ you get thinking about whats possible and push the boundaries.
I just want to share the āopenWBā Integraition again with you
this was already mentioned in a comment aboveā¦ but the integration does provide a couple of sensors more since it was created initiallyā¦
personally, I had some issues with the integration - as long as I used the āMosquitto Brokerā addon acting as a bridge between HomeAssistant and the Broker on the OpenWBā¦
Now, I have connected MQTT directly to the Broker on the OpenWB which seems to be more reliable than using the bridged-brokerā¦
The issue I had was that the Bridged broker sent old data to HomeAssistant after rebooting HomeAssitant (for example, due to updates, or what ever)ā¦
If you are wondering how to integrate multiple openWBs into your installation, you have to adjust your custom mosquitto config and define multiple connections and remap the topic trees, like this:
connection openwb1
address <hostname or ip of your first openWB>:1883
start_type automatic
topic # both 2 openWB1/ openWB/
local_clientid openwb1.mosquitto
try_private false
cleansession true
connection openwb2
address <hostname or ip of your second openWB>:1883
start_type automatic
topic # both 2 openWB2/ openWB/
local_clientid openwb2.mosquitto
try_private false
cleansession true
Then configure the openwbmqtt integration two times using openWB1 and openWB2 as root Topics.
For debugging purposes i can recommend using mqtt-explorer to gain insight into your Homeassistant and openWB brokers.
that only works if you are using the MQTT Broker in HomeAssistant as a Bridge.
In my case, I donāt use this configuration - and have connected the MQTT Integration directly to the broker of the OpenWB - in that case, your configuration would not work, but it might work while using the OpenWB (1) Broker and OpenWB (2) Broker in Bridged modeā¦ ?!
Or - you could set the openwb 2 into āonly chargepointā mode and fully controll it through the other OpenWBā¦
I have two OpenWBs. Both are connected and they do load management between them. I have connected master OpenWB to HA and can see both wall boxes in HA using the openwb integration.
I cannot get the openWB integration to connect to the openWB. I get all the entities, but they all have āunknownā state. Iāve seen others report the problem, but the solution was never published. Can someone help me out on this please?
I can connect successfully with the MQTT explorer, but mqtt sub -t /# -h <openWB-IP> -V 3 does not report anything. Is it normal I have to select protocol version 3?
It is working now out of a sudden, but I am uncertain why. It seems related to a restart. I tried restarting previously, but maybe HA had to be restarted several times. mqtt sub still does not report any topics of openWB (but that was just for checking, so I donāt care).
hmā¦ what was the issue?
It is āquite simpleāā¦
But I donāt use the method described in the readme of the integration - since I had some issues with the MQTT Bridge.
I just connect my HomeAssistant to the MQTT broker running on the Walbox itself - and it is working just fineā¦ with one limitation: I canāt just add any other MQTT Broker to my installation, since the MQTT integration in HomeAssistant does only support one broker.
So this might be a limitation if you are using Tasmota or Zigbee2Mqtt or anything else, that is also using MQTTā¦ (but you could still use the MQTT Broker on your OpenWB for this)