GitHub repository: mr-manuel/venus-os_dbus-mqtt-ev-charger
I wrote this script for myself. I'm not responsible, if you damage something using my script.
You like the project and you want to support me?
The script emulates a EV charger in Venus OS. It gets the MQTT data from a subscribed topic and publishes the information on the dbus as the service com.victronenergy.evcharger.mqtt_ev_charger
with the VRM instance 11
.
Copy or rename the config.sample.ini
to config.ini
in the dbus-mqtt-ev-charger
folder and change it as you need it.
Changed settings can be found on this MQTT path of the Venus OS broker:
N/<vrm_id>/evcharger/11/...
Login to your Venus OS device via SSH. See Venus OS:Root Access for more details.
Execute this commands to download and copy the files:
wget -O /tmp/download_dbus-mqtt-ev-charger.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-mqtt-ev-charger/master/download.sh
bash /tmp/download_dbus-mqtt-ev-charger.sh
Select the version you want to install.
Press enter for a single instance. For multiple instances, enter a number and press enter.
Example:
1
will install the driver to /data/etc/dbus-mqtt-ev-charger
.2
will install the driver to /data/etc/dbus-mqtt-ev-charger-2
.Edit the config file to fit your needs. The correct command for your installation is shown after the installation.
If you pressed enter or entered 1
during installation:
nano /data/etc/dbus-mqtt-ev-charger/config.ini
If you entered 2
during installation:
nano /data/etc/dbus-mqtt-ev-charger-2/config.ini
Install the driver as a service. The correct command for your installation is shown after the installation.
If you pressed enter or entered 1
during installation:
bash /data/etc/dbus-mqtt-ev-charger/install.sh
If you entered 2
during installation:
bash /data/etc/dbus-mqtt-ev-charger-2/install.sh
The daemon-tools should start this service automatically within seconds.
⚠️ If you have multiple instances, ensure you choose the correct one. For example:
To uninstall the default instance:
bash /data/etc/dbus-mqtt-ev-charger/uninstall.sh
To uninstall the second instance:
bash /data/etc/dbus-mqtt-ev-charger-2/uninstall.sh
⚠️ If you have multiple instances, ensure you choose the correct one. For example:
To restart the default instance:
bash /data/etc/dbus-mqtt-ev-charger/restart.sh
To restart the second instance:
bash /data/etc/dbus-mqtt-ev-charger-2/restart.sh
⚠️ If you have multiple instances, ensure you choose the correct one.
The logs can be checked with tail -n 100 -F /data/log/dbus-mqtt-ev-charger/current | tai64nlocal
The service status can be checked with svstat svstat /service/dbus-mqtt-ev-charger
This will output somethink like /service/dbus-mqtt-ev-charger: up (pid 5845) 185 seconds
If the seconds are under 5 then the service crashes and gets restarted all the time. If you do not see anything in the logs you can increase the log level in /data/etc/dbus-mqtt-ev-charger/dbus-mqtt-ev-charger.py
by changing level=logging.WARNING
to level=logging.INFO
or level=logging.DEBUG
If the script stops with the message dbus.exceptions.NameExistsException: Bus name already exists: com.victronenergy.evcharger.mqtt_ev_charger"
it means that the service is still running or another service is using that bus name.
This software supports the latest three stable versions of Venus OS. It may also work on older versions, but this is not guaranteed.