question

back2basic avatar image
back2basic asked

Home Wizzard Energy P1 meter in VenusOS

Hello community,

Inspired by the dbus-shelly-3em-smartmeter from @fabian-lauer, I created dbus-Home-Wizzard-Energy-P1 for users that have a Home Wizzard Energy P1 meter (wifi). I'm currently waiting for my Multiplus to test it in a ESS system, the P1 data show correctly in VenusOS.

Link to repository: https://github.com/back2basic/dbus-Home-Wizzard-Energy-P1
Here are some screenshots from my setup:


screenshot-2023-10-21-at-114258.png
screenshot-2023-10-21-at-114316.png
screenshot-2023-10-21-at-114341.png
How to install: (once installed it auto starts on reboot)

wget https://github.com/back2basic/dbus-Home-Wizzard-Energy-P1/archive/refs/heads/main.zip
unzip main.zip "dbus-Home-Wizzard-Energy-P1-main/*" -d /data
mv /data/dbus-Home-Wizzard-Energy-P1-main /data/dbus-Home-Wizzard-Energy-P1
chmod a+x /data/dbus-Home-Wizzard-Energy-P1/install.sh
/data/dbus-Home-Wizzard-Energy-P1/install.sh
rm main.zip

After install edit the file:

nano /data/dbus-Home-Wizzard-Energy-P1/config.ini

change the IP for Host
change Phases to 3 if you have a 3 phase system


How to remove:

/data/dbus-Home-Wizzard-Energy-P1/uninstall.sh
rm -rf /data/dbus-Home-Wizzard-Energy-P1
Venus OSEnergy Meterpower meter
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

marc-heide avatar image marc-heide commented ·

Thank you verry much! knipsel.jpg

0 Likes 0 ·
knipsel.jpg (16.5 KiB)
14 Answers
meyo084 avatar image
meyo084 answered ·

Hi! , thanks for sharing this, would realy like to start using this as well.. could you please write some instructions how to start using this?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

meyo084 avatar image
meyo084 answered ·

Thanks! Wil try this next week!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

home3131 avatar image
home3131 answered ·

Hi! , thanks for sharing this. This is really a solution I was looking for. I'm a complete newbie on the BUS part and how to connect. I support the above question for a little more detailed install instructions. Venus OS and my Victron MPPT and Smart shunt are running perfectly. Would love to add the AC site through my Homewizard P1.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

home3131 avatar image home3131 commented ·

I don't know how to report a small error in the code.

When 3 Phase is entered Phases are shown but all display the same power value of L1.

This part in the dbus-Home-Wizzard-Energy-P1.py file is the problem

self._dbusservice['/Ac/L1/Power'] = meter_data['active_power_l1_w']

self._dbusservice['/Ac/L2/Power'] = meter_data['active_power_l1_w']

self._dbusservice['/Ac/L3/Power'] = meter_data['active_power_l1_w']

These 3 lines all point to .... _power_l1_w

I changed this to

self._dbusservice['/Ac/L1/Power'] = meter_data['active_power_l1_w']

self._dbusservice['/Ac/L2/Power'] = meter_data['active_power_l2_w'

self._dbusservice['/Ac/L3/Power'] = meter_data['active_power_l3_w']


Everything works perfectly. (Change and reboot)

0 Likes 0 ·
back2basic avatar image back2basic home3131 commented ·
thxx for the comment, I'll change to code on github for that.
1 Like 1 ·
ldream avatar image
ldream answered ·

Hello a question i am new to this i changed the host to my network do i have to fill in the username and password i use for my homewizard P1 Thanks

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

meyo084 avatar image meyo084 commented ·
Hi, no this is not needed.. seems a left over of the Shelly fork..
0 Likes 0 ·
meyo084 avatar image
meyo084 answered ·

Hi, iam using this driver wich for the energy grid metering works perfectly but somehow my energy consumtion history in VRM got periods of time when there is no consumption data.. does any one else has this same behaviour?

1704718070910.png


1704718070910.png (36.9 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

meyo084 avatar image meyo084 commented ·

Already found the reason for this problem, @back2basic the of AC Forward and AC Reverse vallues of the are divided by 1000. This results in a wrong value. Do you know the reason for this? I removed the divider from the code wich solves my problem..


self._dbusservice['/Ac/Energy/Forward'] = (meter_data['total_power_import_kwh']/1000)

self._dbusservice['/Ac/Energy/Reverse'] = (meter_data['total_power_export_kwh']/1000)


Ive no reason is known, could you please change this and publish a new version on git?


Thanks!

0 Likes 0 ·
andre0001 avatar image
andre0001 answered ·

Hi,

Today I started using this code and it behaves slightly different then expected.
Loading and installing the code worked fine. After configuring the INI file (host IP) and rebooting VenusOS, HomeWizzard is visible in the menu. Unfortunately it does not show any power on the main page, in the red AC input tile.

As in the attached image; it does show total power in the menu...

Other info that might be relevant;
Single phase setup.
There is no MPII connected in my setup YET.
1x SMA inverter connected via Modbus, 2x Hoymiles connected via dbus-openDTU.
PV inverters are directly connected to grid. Configured in VenusOS as connected to ACout1 (otherwise they did not show up)


Have I done something wrong?
What do I need to do to visualize the HomeWizzard power sensor on the front page?

homewizzard-venusos.png


5 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

andre0001 avatar image andre0001 commented ·

Problem found. I'm not a programmer, so took some time to get to this point..

Logfile was flooded with following, indicating that there was no active_voltage_l1.

2024-03-22 18:40:17,533 root CRITICAL Error at _update
Traceback (most recent call last):
  File "/data/dbus-Home-Wizzard-Energy-P1/dbus-home-wizzard-energy-p1.py", line 172, in _update
    self._dbusservice['/Ac/L1/Voltage'] = meter_data['active_voltage_l1_v']
KeyError: 'active_voltage_l1_v'

Following message is reported by Home Wizzard, indeed, without voltage_l1_v:

{"wifi_ssid":"xxxxxx","wifi_strength":90,"smr_version":42,"meter_model":"Landis + Gyr xxxxxx","unique_id":"xxxxxx","active_tariff":2,"total_power_import_kwh":xxxxx.xxx,"total_power_import_t1_kwh":xxxx.xxx,"total_power_import_t2_kwh":xxxx.xxx,"total_power_export_kwh":xxxx.xx,"total_power_export_t1_kwh":xxxx.xxx,"total_power_export_t2_kwh":xxxx.xxxx,"active_power_w":289,"active_power_l1_w":289,"active_current_l1_a":2,"voltage_sag_l1_count":0,"voltage_swell_l1_count":0,"any_power_fail_count":1,"long_power_fail_count":0,"total_gas_m3":5663.558,"gas_timestamp":240322190000,"gas_unique_id":"xxxxxxx","external":[{"unique_id":"xxxxxxx","type":"gas_meter","timestamp":240322190000,"value":xxxx.xxx,"unit":"m3"}]}

Commented out the active_voltage_l1 line in "dbus-home-wizzard-energy-p1.py" and restarted VenusOS (restart.sh does not work either)

# self._dbusservice['/Ac/L1/Voltage'] = meter_data['active_voltage_l1_v']

VenusOS portal now shows the power in the red AC input tile! Great!!

Unfortunately still other errors in the log to work on.

2024-03-22 19:04:16,430 root CRITICAL Error at _update
Traceback (most recent call last):
  File "/data/dbus-Home-Wizzard-Energy-P1/dbus-home-wizzard-energy-p1.py", line 183, in _update
    # self._dbusservice['/Ac/L1/Energy/Forward'] = (meter_data['total_power_import_kwh'])
  File "/opt/victronenergy/dbus-systemcalc-py/ext/velib_python/vedbus.py", line 157, in __setitem__
    self._dbusobjects[path].local_set_value(newvalue)
KeyError: '/Ac/L1/Energy/Forward'
0 Likes 0 ·
dutchsolarfreak avatar image dutchsolarfreak andre0001 commented ·

@Andre0001 Did you contacted HomeWizard regarding the missing active_voltage_l1_v value in the JSON? I know the dbus-driver is not made or supported by HomeWizard but from my point of view active_voltage_l1_v should always be in the JSON. So to me this seems to be a bug in the HomeWizard P1 meter firmware.

0 Likes 0 ·
Show more comments
voort4444 avatar image
voort4444 answered ·

Hi, love this possibility, but I run into a problem;

The kWh used today, as displayed in the console is not correct. It keeps showing around the 0.79 but fluctuates a little bit...although my Homewizard energy app shows i have allready consumed 3.6kWh today..the data is allready wrongy shown in the databrowser (electrical.grid.40.energy.forward).
When i look at te api/telegram I do think I see what values are combine to come to the 0.79kWh:

1-0:1.8.1(000463.122*kWh)
1-0:1.8.2(000333.216*kWh)

I guess this is "low" and "high" tarif usage combined?

I have a dsmr 5 energymeter, is this something that can be changed in code somewhere (do-able for a coding -noob?)

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

voort4444 avatar image voort4444 commented ·

Does anyone have an idea what could be happening in my case? and how I can resolve that?

0 Likes 0 ·
rpallagi avatar image
rpallagi answered ·

I have a problem. There is a log file as follows and the console shows no values at the meter. What could be the problem?img-0144.pngimg-0142.pngimg-0143.png


img-0144.png (279.4 KiB)
img-0142.png (278.3 KiB)
img-0143.png (384.2 KiB)
2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

dutchsolarfreak avatar image dutchsolarfreak commented ·

Assuming it worked before:

I would recommend to remove the homewizard PI1 meter from your meter, wait a few seconds and plug it in again.

If required reboot your GX device.


0 Likes 0 ·
erwinhut avatar image erwinhut dutchsolarfreak commented ·

1719739007405.png

1719739049533.png

Same problem here...

0 Likes 0 ·
1719739007405.png (23.4 KiB)
1719739049533.png (24.0 KiB)
janhein avatar image
janhein answered ·

Hello,
I'm new to VenusOS.
I have installed the "dbus-Home-Wizzard-Energy-P1" following the install steps.
Changed the fases to 3 and changed the host to IP number 192.168.0.36 (IP number from of P1 homewizard) in the config file.


schermafbeelding-2024-07-03-141600.png

I reboot the system. (RaspberryPi 4)

But the "dbus-Home-Wizzard-Energy-P1" will not show up on the display.

schermafbeelding-2024-07-03-142138.png

Can somebody help me, and see what I'm doing wrong?

With kind regards,
Jan Hein



1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

dutchsolarfreak avatar image dutchsolarfreak commented ·

What is the output when you run the dbus-home-wizzard-energy-p1.py script manually from the cli?


0 Likes 0 ·
michel-hensgens avatar image
michel-hensgens answered ·

Works perfect! only issue i encounter is that when i want to change the L1Postion = 1 to 3 nothing happens. My inverter is connected to the L3, and the systems is reading L1 for refrence

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jack-verheul avatar image
jack-verheul answered ·

Does this also work for a home wizard energy meter as pv inverter?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

alnkike avatar image
alnkike answered ·

Hello if someone is also interested i made it for the Smart Meter Gateway.

Thank you

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

vanwalsum avatar image
vanwalsum answered ·

Very interested! I have 3 Home Wizard keh meters on my solar, would like to use it directly on VRM. Now I use it by MQTT driver per Home Assistant.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

alnkike avatar image
alnkike answered ·

dbus-home-wizzard-energy-p1.zip

Here is the 2 file that you need to change from the original file.

https://smartgateways.nl/en/product/smart-meter-wifi-gateway/

That's the smart meter that i use.




2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)

Energy Meter Selection Guide

Additional resources still need to be added for this topic