Not able to connect WBEC to openWB2 standalone via MQTT
TacitRainbow opened this issue · 16 comments
WBEC works fine, local webclient displays the correct values, configuration in WBEC seems to be okay
{"cfgApPass":"wbec1234","cfgCntWb":1,"cfgMqttIp":"192.168.178.xx","cfgMqttLp":[15]}
...but I cannot connect it to the new openWB2 standalone box. There is a precofigured pulldown for a MQTT-chargepoint, but it doesn't offer further configuration choices. Also the topics to be sent and received seem to have different formats (openWB/chargepoint vs. openWB/lp). Can anybody offer an idea or an approach for a newbie (like me) how to fix this issue? THANKS
Seems that I need to adapt the software to these new names. Can you provide me the topics to be sent and received?
Or is it really only the "lp" that needs to be changed to "chargepoint"?
Ok, seems to require more adjustments than just the "lp" <->"chargepoint" :-(
Do you know the meaning of the /chargepoint/16/
Is this the ID of the wallbox, like previously the load point number?
Yup - 16 is the ID of the 'chargepoint' aka 'Ladepunkt' in previous versions.
Another thing I am not sure if it needs to be checked out. Currently the openWB controls charging currency in 1A steps. This will be changed to finer steps in the future (not implemented yet). Hence I wonder if the multiplier in Mqtt.cpp line#45 might not need to be adjusted in due time.
Sorry for the trouble - the openWB v2 is still in beta, so a few issues might magically disappear in due time anyway.
Ok, should work now.
exported and power_factors are not available, but are anyway optional
works - as soon as OpenWB v.2 assigns a 1-digit ID to the chargepoint (might be necessary to delete existing chargepoints in the OpenWB-configuration; if new chargepoints are still assigned incrementally and are above 9, configure two chargepoints and delete the first one... seems to be a workaround)
@steff393 How do I need to set cfgMqttWattTopic if I use two wallboxes with one wbec Premium?
I'm new to OpenWB and just installed OpenWB 2.0
Hi,
for openWB you do not need cfgMqttWattTopic at all.
All you need to configure is here: https://github.com/steff393/wbec/wiki/Configuration-Example:-openWB-via-MQTT
Normally only "cfgMqttIp":"192.168.xxx.yyy" and "cfgMqttLp":[1,2], if you have 2 wallboxes
Thank you!
Hi,
I configured it as described but it's not working here. It seems like the MQTT-Connection is working, openWB can read all topics from the wbec. But if I enable the charging in openWB (2.0) wbec does just nothing.
I checked the MQTT-communication with MQTT-Explorer --> openWB / system / chargepoint / 5 / set / current = 6
So the topic for the current is set but it seems like wbec doesn't recognize it.
I updated the wbec software to the current version and applied the "common.js"-fix. Same story as discribed.
Is there a chance to see what wbec receives from the openWB mqtt topic?
Yes, you're right. I discovered yesterday in discussion with another user, that the openWB/chargepoint/X/set/current topic is not subscribed by wbec. I assume that openWB used up to now both topics simultaneously, and now only the new one.
I'll add this in the next release.
Lines 177 to 182 in 638b5a3
I played a bit around with the mqtt topics. If I replace
Lines 177 to 182 in 638b5a3
with this
snprintf_P(topic, sizeof(topic), PSTR("openWB/chargepoint/%d/set/current"), cfgMqttLp[i]);
client.subscribe(topic);
//snprintf_P(topic, sizeof(topic), PSTR("openWB/lp/%d/AConfigured"), cfgMqttLp[i]);
//client.subscribe(topic);
//snprintf_P(topic, sizeof(topic), PSTR("wbec/lp/%d/enable"), cfgMqttLp[i]);
//client.subscribe(topic);
//snprintf_P(topic, sizeof(topic), PSTR("wbec/lp/%d/maxcurrent"), cfgMqttLp[i]);
//client.subscribe(topic);
it seems like that the current in wbec is set to the correct value. I'm not sure if this is the only topic that is needed for the whole functionality but in a first testing it works fine.
I comment out the topics with "wbec/lp" because I'm not sure what they're doing. The wbec publish doesn't contain those topics (at least I didn't see them in the publish) so I think that they're needless.
hopefully this will help you a bit and maybe saves some time.
If there are other openWB topics needed I'm happy to provide support.
Hi all,
have the additional MQTT Topics for OpenWB 2.0 ("chargepoint" instead of "lp") made it into the latest release?
I used WBEC with OpenWB 1.9 and it worked. I recently updated to OpenWB v2 and I cannot get the MQTT communication up and running.
I am using WBEC v0.5.2.
When I check the MQTT Topics in ioBroker, I don't see them getting updated.
The ID in OpenWB is 9, unfortunately continuously incrementing with every new try.
Any idea? Thank you!
I had the same problem increment problem for LPs/chargepoints with openWB (I am using the stand-alone, version 2.1.4-Beta.2, release from April 29th) I simply added additional IDs for chargepoint until they ran over and started with the lowest, free single digit - then deleted all the not needed ones)
As per MQTT - ( am using the stand-alone, version 2.1.4-Beta.2 of OpenWB, release from April 29th and WBEC v1.5.2 for Pro) - I had to delete the 'old connection' and set up a new one with the requisite IP-adress, then it worked perfectly fine- Otherwise - and I am not a real pro - your configuration looks fine.
I had the same problem increment problem for LPs/chargepoints with openWB
As per MQTT - ( am using the stand-alone, version 2.1.4-Beta.2 of OpenWB, release from April 29th and WBEC v1.5.2 for Pro)
- To solve the incrementing ID issue in OpenWB 2, you just need to delete a the unnecessary components and restart the system. They will be gone.
- Longer investigations of the source code and comparison to the comments in this thread + release notes showed me, that the changes were only implemented in pro and other versions - which you are using. Lucky you.
@steff393 Is it planned to recompile the standard version as well? I have a system up and running and just miss the correct readout of the MQTT topic defining the set current...
Otherwise I need to switch back to OpenWB 1.9.
I would be very thankful and could donate some money in case you created a new release.
Thank you.