P1 power don't match extracted power in dzvents [Solved]
Moderator: leecollings
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
P1 power don't match extracted power in dzvents
Hi all,
I have domoticz 2022-2, running on a Pi and try to calculate with the power from P1, adding PV power.
I extract the power with devices('Power').actualWatt
(trigger is the power change)
and update this value, directly in a new virtual device UsedPower. No calculations made yet, for now.
Somehow the value is not equal and I can't figure why.
I cant post images yet, but in the link here without the spaces, you see the difference, and the log:
Power = 561 Watt
Used power = 621 Watt
image
h ttps://postimg. cc/vcNKfp78
image
Why does this happen? What I am doing wrong?
Thanks in advance.
I have domoticz 2022-2, running on a Pi and try to calculate with the power from P1, adding PV power.
I extract the power with devices('Power').actualWatt
(trigger is the power change)
and update this value, directly in a new virtual device UsedPower. No calculations made yet, for now.
Somehow the value is not equal and I can't figure why.
I cant post images yet, but in the link here without the spaces, you see the difference, and the log:
Power = 561 Watt
Used power = 621 Watt
image
h ttps://postimg. cc/vcNKfp78
image
Why does this happen? What I am doing wrong?
Thanks in advance.
- gizmocuz
- Posts: 2552
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: P1 power don't match extracted power in dzvents
Maybe when we see your code we could understand where it might go wrong.
What happens when you make a very small test script where you put 1234 in the UsedPower device, does this work?
Also note that the P1 usage value could change every 10 seconds
What happens when you make a very small test script where you put 1234 in the UsedPower device, does this work?
Also note that the P1 usage value could change every 10 seconds
Quality outlives Quantity!
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents
Hi gizmocuz,
I wasn't able to post code and images, but somehow now I am. See code below.
If I make Allpower 1234, this is shown in the meter.
I wasn't able to post code and images, but somehow now I am. See code below.
If I make Allpower 1234, this is shown in the meter.
Code: Select all
return
{
on =
{
devices =
{
'Power',
},
},
execute = function(domoticz, item)
local Allpower = domoticz.devices('Power').actualWatt
local Verbruik = domoticz.devices(163)
Verbruik.updateEnergy(Allpower)
end
}
- gizmocuz
- Posts: 2552
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: P1 power don't match extracted power in dzvents
Maybe 'Power' is not the right trigger here, the P1 has up to 4 different sensors it could update (low/high usage and return)
Could you try a trigger every 10 second and see if that goes better?
domoticz.devices(163).updateEnergy(Allpower)
Could you try a trigger every 10 second and see if that goes better?
domoticz.devices(163).updateEnergy(Allpower)
Quality outlives Quantity!
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents
Hi gizmocuz,
I think P1 has even 6 values:

I know how to create a minute trigger, how do I create a 10 seconds one?
Regards.
I think P1 has even 6 values:

I know how to create a minute trigger, how do I create a 10 seconds one?
Regards.
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents
I made the every minute timer now, waited to see the AllPower value change in the meter, but it's still not equal to the power meter when it updates.
- gizmocuz
- Posts: 2552
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: P1 power don't match extracted power in dzvents
That might be correct because the P1 is updating maybe every 10 seconds, and your dzVents script once in a minute
Quality outlives Quantity!
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents
No, I think the value of the P1 is updating every second. The power meter changes constantly.
But if the script runs, I thought the Allpower meter would take over the value of the Power meter, but that's not happening.
But if the script runs, I thought the Allpower meter would take over the value of the Power meter, but that's not happening.
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents
Hmm, I think it's a bigger issue. I looked at the KWH meter directly, comparing it with the values in domotics.
Can you open this dropbox link? Looks like communication between the KWH meter and domoticz is wrong, is'nt it?
The video also shows the wrong value in Allpower meter.
https://www.dropbox.com/sh/e464jmt7s9fo ... 3oiea?dl=0
Can you open this dropbox link? Looks like communication between the KWH meter and domoticz is wrong, is'nt it?
The video also shows the wrong value in Allpower meter.
https://www.dropbox.com/sh/e464jmt7s9fo ... 3oiea?dl=0
-
- Posts: 9
- Joined: Saturday 24 December 2022 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: P1 power don't match extracted power in dzvents [Solved]
I did a fresh install, now the problem seems gone.
Thx for the help!
Thx for the help!
Who is online
Users browsing this forum: No registered users and 1 guest