Hi,
this might be interesting to some of you. I wrote a simple service which polls data from the OpenEVSE (EV Charger, mqtt/json) and puts the data on dbus.
Hi,
this might be interesting to some of you. I wrote a simple service which polls data from the OpenEVSE (EV Charger, mqtt/json) and puts the data on dbus.
Yes, need root access and ssh active.
Cerbo : https://youtu.be/L9BHSJEpTD8?t=158
Putty ssh, install dbus-evsecharger:
wget https://github.com/JuWorkshop/dbus-evsecharger/archive/refs/heads/main.zip
unzip main.zip "dbus-evsecharger-main/*" -d /data
mv /data/dbus-evsecharger-main /data/dbus-evsecharger
chmod a+x /data/dbus-evsecharger/install.sh
/data/dbus-evsecharger/install.sh
rm main.zip
Thanks of you i was able to install the script and work great!!
The only wrong info is the EVSE in shown in critical load side, but in real it is connected to ACin1 side.
Fantastic script !!
You can change the position by adding this around line 58 of dbus-evsecharger.py
self._dbusservice.add_path('/Position', 0) # normaly only needed for pvinverter
Tanks for your support.
If i append this line at the end of object definition ( as shown ) , my PV inverter ( in ACin ) stop to work and also the Open EVSE do not work.
self._dbusservice.add_path('/ProductId', 0xFFFF) #
self._dbusservice.add_path('/ProductName', productname)
self._dbusservice.add_path('/CustomName', productname)
self._dbusservice.add_path('/FirmwareVersion', int(data['divert_update']))
self._dbusservice.add_path('/HardwareVersion', 2)
self._dbusservice.add_path('/Serial', data['comm_success'])
self._dbusservice.add_path('/Connected', 1)
self._dbusservice.add_path('/UpdateIndex', 0)
self._dbusservice.add_path('/DeviceInstance', deviceinstance)
self._dbusservice.add_path('/Position', 0) # normaly only needed for pvinverter
Hmm, maybe this just works for Inverters then. I assumed it would work here too. There's are what the values ordinarily equate to.
I've installed this on my system and can see the data - thanks. The only thing that I can change via the settings is the "Enable Charging". when I try to change the "Charging Current" it doesn't let me change it. Also, the "Position" is shown as "Unknown". If I Change this to "AC Output" and then levee the menu, when I come back it shows "Unknown" again.
Have I messed up the installation somehow?
Thanks
I fork it and made some changes in order to work with new openevse firmware
https://github.com/ayasystems/dbus-evsecharger/
Please check it, it works with ESP32 and firmware 4.1.x
I do not have an OpenEVSE charger but an OpenWB wallbox.
It's easy to read the needed data using mqtt (only a few lines of code) - but I'm not an Python expert to merge these lines into your code.
This is the code to read from OpenWB:
import paho.mqtt.client as mqtt def on_connect(client, userdata, flags, rc): if rc == 0: print("Connected to MQTT Broker!") else: print("Failed to connect, return code %d\n", rc) def on_message(client, userdata, msg): if "openWB/lp/1/VPhase1" in (msg.topic): temp = float(msg.payload) print("L1 Power: ", temp) if "openWB/lp/1/VPhase2" in (msg.topic): temp = float(msg.payload) print("L2 Power: ", temp) if "openWB/lp/1/VPhase3" in (msg.topic): temp = float(msg.payload) print("L3 Power: ", temp) if "openWB/lp/1/kWhCounter" in (msg.topic): temp = float(msg.payload) print("Energy consumed by charger: ", temp) if "openWB/global/WAllChargePoints oder openWB/lp/1/W" in (msg.topic): temp = float(msg.payload) print("Total Power: ", temp) if "openWB/config/get/sofort/lp/1/current" in (msg.topic): temp = float(msg.payload) print("Charge Current: ", temp) if "openWB/lp/1/boolPlugStat" in (msg.topic): temp = float(msg.payload) print("Plugin Status: ", temp) if "openWB/lp/1/boolChargeStat" in (msg.topic): temp = float(msg.payload) print("Ladestatus: ", temp) client = mqtt.Client() client.on_message = on_message client.on_connect = on_connect client.connect("192.168.178.20", 1883) client.subscribe("openWB/#") client.loop_forever()
It would be great to get some help to adopt this script to work with an OpenWB.
@adahmen Where I can find openwb source code?
@ea4gkq - What exactly do you mean?
The whole solution is available here: https://www.openwb.de
The code is available here: https://github.com/snaptec/openWB
@ju@workshop Ju, what do you suggest to do before upgrade the Cerbo GX firmware ( when your application are installed ) ?
Thanks,
Fabrizio
Hi All,
Im trying to use this code (actually the https://github.com/ayasystems/dbus-evsecharger version as I have wifi v5.02) and having some problems with it not working. Wondering how I can find the log files to troubleshoot.
Many thanks!
Mike.
Victron Venus OS Open Source intro page
Venus OS GitHub (please do not post to this)
51 People are following this question.