Python plugin: Wallbox EV charger

Python and python framework

Moderator: leecollings

Post Reply
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Python plugin: Wallbox EV charger

Post by Lokonli »

I've created a plugin for integration of the Wallbox EV charger into Domoticz.

The plugin uses the Wallbox API.

See:
https://github.com/lokonli/domoticz-wallbox

Verstuurd vanaf mijn SM-A526B met Tapatalk

User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

Cewl.
Happy with this charger ??
I'm looking at the 'Copper SB' as the others seem to have wifi range issues.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
forkboy
Posts: 13
Joined: Saturday 20 January 2018 13:12
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Wallbox EV charger

Post by forkboy »

Thanks, great plugin :D .

Just installed it without too much problems, and seems to work great!
Minor comment which I just noticed, The device "Charging current" should be power in kW instead of current in Ampere; at least the metric corresponds to that in the Wallbox app.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

Works like a charm with Walbox Copper.

Anyone successful with integrating Walbox with OCCP 1.6 in Node-Red for example?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

forkboy wrote: Sunday 16 July 2023 20:16 Thanks, great plugin :D .

Just installed it without too much problems, and seems to work great!
Minor comment which I just noticed, The device "Charging current" should be power in kW instead of current in Ampere; at least the metric corresponds to that in the Wallbox app.
Updated the plugin a bit:

Code: Select all

https://github.com/sincze/domoticz-wallbox
Wallbox-New.png
Wallbox-New.png (113.08 KiB) Viewed 2297 times
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

Found this trick.
https://github.com/jagheterfredrik/wallbox-pwn

together with:
https://github.com/jagheterfredrik/wallbox-mqtt-bridge

It allows you to obtain full control and all data locally from the Wallbox without breaking the Cloud functionality.
It publishes data to MQTT every second.
Wallbox-Local.png
Wallbox-Local.png (70.5 KiB) Viewed 1643 times
We could add this to a separate plugin or use something like a ShellyTeacher4Domo kinda approach to automatically create these devices in Domoticz.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: Wallbox EV charger

Post by waltervl »

Or use the mqttmapper plugin. I think this would be the easiest way.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

waltervl wrote: Friday 12 April 2024 9:29 Or use the mqttmapper plugin. I think this would be the easiest way.
Again, your knowledge (walking wiki) always seems to amaze me. Thanks for the tip!!
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
tarmacalastair
Posts: 94
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Python plugin: Wallbox EV charger

Post by tarmacalastair »

Hello,

Interesting topic. I've looked at the two versions of the plugin mentioned in this topic:
Which one should I use? I've just tried installing them both (to folders wallbox and wallbox1) and I can't see work out what the differences are!
Thanks
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

tarmacalastair wrote: Wednesday 17 April 2024 21:27 Hello,

Interesting topic. I've looked at the two versions of the plugin mentioned in this topic:
Which one should I use? I've just tried installing them both (to folders wallbox and wallbox1) and I can't see work out what the differences are!
Thanks
Hi tarmacalastair
https://github.com/lokonli/domoticz-wallbox is leading.
I forked it (to create pull requests for improvements) and if agreed upon lokonli merges them in his release.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
tarmacalastair
Posts: 94
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Python plugin: Wallbox EV charger

Post by tarmacalastair »

Ah great, thanks for explaining.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
edwinh81
Posts: 5
Joined: Wednesday 27 December 2017 17:20
Target OS: Linux
Domoticz version: 2024.4
Location: NLD
Contact:

Re: Python plugin: Wallbox EV charger

Post by edwinh81 »

I started using this plugin earlier this week.
Was very excited at first but over first days it broke on me and I cannot find the reason for it.
The domoticz log says:
2024-06-21 20:27:52.257 Error: wallbox: (Wallbox) failed to load 'plugin.py', Python Path used was '/opt/domoticz/userdata/plugins/wallbox/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'.
2024-06-21 20:27:52.268 Error: wallbox: Traceback (most recent call last):
2024-06-21 20:27:52.269 Error: wallbox: File "/opt/domoticz/userdata/plugins/wallbox/plugin.py", line 66, in <module>
2024-06-21 20:27:52.269 Error: wallbox: from wallbox import Wallbox, Statuses
2024-06-21 20:27:52.269 Error: wallbox: ModuleNotFoundError: No module named 'wallbox'
I cannot find any errors in the plugin.py file from the original. Any suggestions?

Running domoticz 2024.4 in docker.
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

It seems docker does not know wallbox.
Probably the docker was renewed??

How did you install the plugin in the docker?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
edwinh81
Posts: 5
Joined: Wednesday 27 December 2017 17:20
Target OS: Linux
Domoticz version: 2024.4
Location: NLD
Contact:

Re: Python plugin: Wallbox EV charger

Post by edwinh81 »

I cannot really reproduce how I did it.
I adapted the installation like described on github a little.

I kicked the pip install line again with a commandline and it works again for now.

Do you have any advice on what would be a proper way to do it in docker?
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Python plugin: Wallbox EV charger

Post by sincze »

I created a customstart.sh. So everytime my Domoticz container is re-created the wallbox is re-installed.
https://www.domoticz.com/wiki/Docker#cu ... _container

The plugin itself is maintained as this is mounted into the docker.

Code: Select all

#!/bin/bash

if [ -f /opt/domoticz/FIRSTRUN ]; then true
else
echo 'Installing Wallbox'
pip install -r /opt/domoticz/userdata/plugins/wallbox/requirements.txt
echo 'Creating FIRSTRUN file so script can check on next run'
touch /opt/domoticz/FIRSTRUN
cd /opt/domoticz || return
fi
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
edwinh81
Posts: 5
Joined: Wednesday 27 December 2017 17:20
Target OS: Linux
Domoticz version: 2024.4
Location: NLD
Contact:

Re: Python plugin: Wallbox EV charger

Post by edwinh81 »

Thank you!
Far as I can see now this did the trick for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests