Using P1-device form Dutch Homewizard
Moderators: leecollings, remb0
- waltervl
- Posts: 6676
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Using P1-device form Dutch Homewizard
Seems the eraser3 plugin has an issue after some firmware update in the home wizard. Gettevan forked the plugin and fixed it:
https://github.com/gettevan/HomeWizard-Wifi-p1-plugin
https://github.com/gettevan/HomeWizard-Wifi-p1-plugin
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
fdemees
- Posts: 30
- Joined: Sunday 29 March 2020 17:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Belgium, close to Brussels
- Contact:
Re: Using P1-device form Dutch Homewizard
Thank you ! The fork from Gettevan works just right ! my problem is solved !
I am a bit puzzled about the multiplication by 10 when the data is imported from the JSON in float() instead of int()...
Domoticz on Rpi 3B+, ZigbeeforDomoticz, Sonoff Zigbee coordinator, several Sonoff/ESPEasy/Tasmota, IPX800, several Zigbee things, Ksenia Lares
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Using P1-device form Dutch Homewizard
You mean the *1000 and then Int()?
Domoticz want the values in Wh:
Domoticz want the values in Wh:
Electricity P1 smart meter
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
USAGE1= integer, total cumulative energy usage meter tariff 1 in Wh.
USAGE2= integer, total cumulative energy usage meter tariff 2 in Wh.
RETURN1= integer, total cumulative energy return meter tariff 1 in Wh.
RETURN2= integer, total cumulative energy return meter tariff 2 in Wh.
CONS= actual usage power (Watt)
PROD= actual return power (Watt)
USAGE and RETURN are total cumulative counters (they should only count up).
For USAGE and RETURN supply the data in total Wh with no decimal point.
(So if your meter displays f.i. USAGE1= 523,66 KWh you need to send 523660)
Domoticz will calculate the today values based on the delta's in the total cumulative energy of today.
-
fdemees
- Posts: 30
- Joined: Sunday 29 March 2020 17:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Belgium, close to Brussels
- Contact:
Re: Using P1-device form Dutch Homewizard
The telegram shows:
Code: Select all
1-0:1.7.0(00.387*kW)Code: Select all
"active_power_w":387.000Domoticz on Rpi 3B+, ZigbeeforDomoticz, Sonoff Zigbee coordinator, several Sonoff/ESPEasy/Tasmota, IPX800, several Zigbee things, Ksenia Lares
-
rini52
- Posts: 44
- Joined: Friday 10 June 2022 23:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.2
- Location: NL
- Contact:
Re: Using P1-device form Dutch Homewizard
this is what I used:
https://github.com/etmmvdp/HomeWizard-B ... /tree/main
and never had a problem. You create some sensors and of you go.
Added some summary scripts and never had a problem
Regards Rini
see:
viewtopic.php?t=43321
https://github.com/etmmvdp/HomeWizard-B ... /tree/main
and never had a problem. You create some sensors and of you go.
Added some summary scripts and never had a problem
Regards Rini
see:
viewtopic.php?t=43321
- Attachments
-
- Screenshot from 2025-12-01 17-28-55.png (51.6 KiB) Viewed 106 times
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
- waltervl
- Posts: 6676
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Using P1-device form Dutch Homewizard
This is the Homewizard Battery plugin , not the P1 device plugin.rini52 wrote: Monday 01 December 2025 14:39 this is what I used:
https://github.com/etmmvdp/HomeWizard-B ... /tree/main
and never had a problem. You create some sensors and of you go.
Added some summary scripts and never had a problem
Regards Rini
see:
viewtopic.php?t=43321
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
rini52
- Posts: 44
- Joined: Friday 10 June 2022 23:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2025.2
- Location: NL
- Contact:
Re: Using P1-device form Dutch Homewizard
apologies 
Domoticz running on Pi-4, Ubuntu(amd64), Synology Nas and VM
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
Hardware: RFXCOM, RFLINK, P1-smartmeter-HomeWizard, Z2M Sonoff dongle(20+ devices), Esp8266 (counters), Eaton_3S ups
-
candrian
- Posts: 3
- Joined: Thursday 23 March 2023 7:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Using P1-device form Dutch Homewizard
I am using a python script to connect the P1 dongle to the native domoticz P1 driver (with LAN interface):
It's basically a server waiting for connection from domoticz. When connected, it polls the dongle and pushes telegrams to the domoticz P1 driver.
The poll period should be shorter (here: 5s) than the P1 update rate defined in domoticz (mine: 10s)
It's running outside domoticz, so I use a bash script to start/stop together with domoticz:
Have fun!
Calin
It's basically a server waiting for connection from domoticz. When connected, it polls the dongle and pushes telegrams to the domoticz P1 driver.
The poll period should be shorter (here: 5s) than the P1 update rate defined in domoticz (mine: 10s)
Code: Select all
#!/usr/bin/python
import socket
import urllib.request
import time
p1ip = "192.168.1.99" # Address of P1 dongle - assigned in DHCP server (router)
domoPort = 9595 # The port defined in Domoticz P1 configuration
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("localhost", domoPort))
s.listen()
while True:
c, a = s.accept()
print("Connected to " + str(a))
while True:
time.sleep(5) # Poll period
try:
tg = urllib.request.urlopen("http://" + p1ip + "/api/v1/telegram").read()
#print(tg)
try:
c.send(tg)
except:
break # Probably lost connection, go back to listening
except:
pass # P1 dongle not responding, just keep trying
print("Connection lost")
try:
c.close()
except:
pass
Code: Select all
#!/usr/bin/bash
case $1 in
start)
kill "$(cat /tmp/p1hw.pid 2>/dev/null)" 2>/dev/null
python3 /home/pi/p1hw_server/p1hw.py >/dev/null 2>&1 &
echo $! > /tmp/p1hw.pid
;;
stop)
kill "$(cat /tmp/p1hw.pid 2>/dev/null)" 2>/dev/null
rm /tmp/p1hw.pid 2>/dev/null
;;
esac
Calin
- waltervl
- Posts: 6676
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: Using P1-device form Dutch Homewizard
I think using the python plugin would be the easiest option as Domoticz will do the communication for you. No need to worry about keeping another service up and manipulate a Domoticz hardware gateway.
https://github.com/gettevan/HomeWizard-Wifi-p1-plugin
https://github.com/gettevan/HomeWizard-Wifi-p1-plugin
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Using P1-device form Dutch Homewizard
Didn't simply changing that setting to 5 seconds instead of 10 work for you?candrian wrote: Thursday 01 January 2026 17:52 The poll period should be shorter (here: 5s) than the P1 update rate defined in domoticz (mine: 10s)
-
candrian
- Posts: 3
- Joined: Thursday 23 March 2023 7:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Using P1-device form Dutch Homewizard
I was transitioning from wired P1 to WIFI P1, so I didn't want a new plugin creating another set of devices and risk losing the history.waltervl wrote: Thursday 01 January 2026 23:09 I think using the python plugin would be the easiest option as Domoticz will do the communication for you. No need to worry about keeping another service up and manipulate a Domoticz hardware gateway.
https://github.com/gettevan/HomeWizard-Wifi-p1-plugin
I did try (a bit) to do the same (what I do outside) inside a plugin, but it would need multithreading inside the plugin and it's too cumbersome.
What is needed in fact is a version of the built-in P1 with LAN that is able to send a HTTP GET every x seconds, not just wait for telegrams to come by themselves. Maybe I'll start looking in the C sources.
My solution has successive sampling points, all adding to the latency:jvdz wrote: Friday 02 January 2026 9:56 Didn't simply changing that setting to 5 seconds instead of 10 work for you?
- The meter itself samples every 1s and sends a telegram.
- The WIFI dongle gets all telegrams, but only sends the last one when asked.
- My "service" polls every 5s - it will get a telegram maybe 1s old and will push it to Domoticz.
- Domoticz samples every 10s, meaning it skips telegrams until the sampling point. When it will choose one, it can be 5s old from my service.
Conclusion: For a wired P1 Domoticz can be off by 1s, for my new solution it can be off by 6s.
Yeah, many choices are possible, depending on what you expect from the system. I was always targeting 10s cycle time in Domoticz and I can live with 6s latency.
But clearly the service poll time should be <= domoticz poll time, otherwise domoticz will use several times the same telegram.
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Using P1-device form Dutch Homewizard
but the plugin does have a parameter you can change in the code:
and when you use the "P1-WiFi-Gateway" hardware, you can change the frequency in the hardware setup page.
Code: Select all
#Plugin variables
pluginInterval = 10 #in seconds
dataInterval = 60 #in seconds
dataIntervalCount = 0
use_p1_device = False
-
candrian
- Posts: 3
- Joined: Thursday 23 March 2023 7:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Using P1-device form Dutch Homewizard
You're right! It seems to have a mode to feed data in the P1 device(s) (or some other device, I'm not sure).jvdz wrote: Friday 02 January 2026 11:55 but the plugin does have a parameter you can change in the code:and when you use the "P1-WiFi-Gateway" hardware, you can change the frequency in the hardware setup page.Code: Select all
#Plugin variables pluginInterval = 10 #in seconds dataInterval = 60 #in seconds dataIntervalCount = 0 use_p1_device = False
There are several HoWiz P1 plugins floating around, I didn't look closely to the one called "battery something"... The others don't have that.
However (!) it only transfers power data - not gas and water. (From browsing plugin.py, I wish things were better documented)
Coming back to your remarks, the frequency is not the issue here - all solutions can adjust it. My goal was to pass the original telegram to the built-in P1 driver, to allow full decoding and mapping to devices, including gas and water.
Who is online
Users browsing this forum: No registered users and 1 guest