Page 1 of 2

Question about energy usage

Posted: Thursday 05 July 2018 4:55
by rednas
Hello,

Not directly related to Domoticz, but has to do with the results I get from Domoticz.
Image
Can someone explain why there is almost no usage during the day? (Is the usage subtracted from the return? Then why are there still bumps?)
And as soon as there is no return anymore, the usage increases.
I hope someone can help me explain what is going on.

Thanks!

Re: Question about energy usage

Posted: Thursday 05 July 2018 9:34
by gordonb3
The return is what you are not using. That part never passes your meter. The "bumps" will likely be because you either used more at that particular time or you did not generate (enough) power part of the 5 minute time frame that every point represents.

Of topic: I'm somewhat amazed by graphs posted here by some users. Running two freezers and a separate fridge in the house I'm probably not the best energy saver, but with a maximum below 300 Watts I can't see you do any cooking, laundry or running a dishwasher. How do you do that?

Re: Question about energy usage

Posted: Thursday 05 July 2018 11:21
by freijn
I was curious as well and made a simple script.

'Generated by solar' - 'overload back to grid' = 'power consumed by house'.

Re: Question about energy usage

Posted: Thursday 05 July 2018 16:55
by rednas
gordonb3 wrote: Thursday 05 July 2018 9:34 The return is what you are not using. That part never passes your meter.
Is it? So it is not possible to see what my solar panels are delivering?
gordonb3 wrote: Thursday 05 July 2018 9:34 Of topic: I'm somewhat amazed by graphs posted here by some users. Running two freezers and a separate fridge in the house I'm probably not the best energy saver, but with a maximum below 300 Watts I can't see you do any cooking, laundry or running a dishwasher. How do you do that?
Haha, I am currently not at home. And it is a new house.

Re: Question about energy usage

Posted: Thursday 05 July 2018 18:34
by gajotnt
What kind of meter are you using to get that return value?
I have adquired 3 solar panels, and during the day i get negative values (giving energy to the power company) and that kind of meter would be awesome

Re: Question about energy usage

Posted: Thursday 05 July 2018 21:34
by gordonb3
rednas wrote: Thursday 05 July 2018 16:55
gordonb3 wrote: Thursday 05 July 2018 9:34 The return is what you are not using. That part never passes your meter.
Is it? So it is not possible to see what my solar panels are delivering?
Not from reading the P1 datagrams. As explained by @freijn you'll have to combine the data from the inverter to deduce the in house usage.
rednas wrote: Thursday 05 July 2018 16:55
gordonb3 wrote: Thursday 05 July 2018 9:34 Of topic: I'm somewhat amazed by graphs posted here by some users. Running two freezers and a separate fridge in the house I'm probably not the best energy saver, but with a maximum below 300 Watts I can't see you do any cooking, laundry or running a dishwasher. How do you do that?
Haha, I am currently not at home. And it is a new house.
Right, that makes sense.

Re: Question about energy usage

Posted: Thursday 05 July 2018 22:03
by rednas
So if I'm correct, the P1 only shows "usage minus returns" as usage and "returns minus usage" as returns?

Re: Question about energy usage

Posted: Thursday 05 July 2018 22:28
by freijn
Not sure if I do understand your statement, but the P1 shows the current to/from the Grid.

if +100 you are using 100 watts from the grid
if -100 you are returning 100 watts to the grid.

You solar panels are connected to inside power of your house.
All switched on equipment start consuming the power from your solar first.
If the solar is generating more power that the house requires your P1 will show minus.
For example Solar generates 1000 watts, washing machine eats 600, lamp eats 5 then you still have 395 watts left and the P1 will show -395
if your solar generates 200 and the washingmachine eats 600, the P1 will show 400.

Is the above you are looking for?

Frank

Re: Question about energy usage

Posted: Thursday 05 July 2018 23:16
by rednas
Alright, so during the times where I use more power than is generated, the P1 doesn't record returns? If I would like to know my returns I have to connect my converter to Domoticz?

Re: Question about energy usage

Posted: Thursday 05 July 2018 23:50
by gajotnt
You have to use a sonoff pow or a pzem to record what the solar panels are generating

Re: Question about energy usage

Posted: Friday 06 July 2018 8:52
by freijn
rednas wrote: Thursday 05 July 2018 23:16 Alright, so during the times where I use more power than is generated, the P1 doesn't record returns? If I would like to know my returns I have to connect my converter to Domoticz?
That is correct. The P1 is only between the grid and not inside your house.

Doesn't your solar have any type of communication/reporting ?

I have grabbed some libraries and every time I get an update from the P1 ( 3 sec) I grab the solar numbers as well and do the calculations.

Re: Question about energy usage

Posted: Friday 06 July 2018 18:43
by rednas
I am currently looking into it to report to Domoticz from my solar panels!
Will get back asap.

Re: Question about energy usage

Posted: Saturday 07 July 2018 18:34
by rednas
freijn wrote: Friday 06 July 2018 8:52 I have grabbed some libraries and every time I get an update from the P1 ( 3 sec) I grab the solar numbers as well and do the calculations.
Is it possible to show the code you use to grab the solar numbers and the calculations?

Re: Question about energy usage

Posted: Saturday 07 July 2018 21:34
by freijn
Not sure which code you are looking for.

This is the code to calc house consumption.

Code: Select all

----------------------------------------------------------------------------------------------------------
-- Script parameters
----------------------------------------------------------------------------------------------------------
Debug = "NO"                    -- Turn debugging on ("YES") or off ("NO")
 
----------------------------------------------------------------------------------------------------------
-- Grid Power calculation    GridPower - Solar Power  and store in Uservariable
----------------------------------------------------------------------------------------------------------
local solarflag
local var5
local var6
local powercount
local consume

commandArray = {}

powersensor = "Power"
if (devicechanged[powersensor]) then
    if Debug=="YES" then
        print( " ####Power debug device changed: "..devicechanged[powersensor])
    end
    commandArray['Variable:TEST']=tostring(devicechanged[powersensor])
    var1,var2,var3,var4,var5,var6 = string.match(otherdevices_svalues['Power'], "(%d+%.*%d*);(%d+%.*%d*);(%d+%.*%d*);(%d+%.*%d*);(%d+%.*%d*);(%d+%.*%d*)")
    if Debug=="YES" then
        print( " ####Power debug var5: "..var5)
        print( " ####Power debug var6: "..var6)
    end
    solarflag="0"  
    if (var5 == "0") then 
    -- solar is feeding the grid
        powercount = tonumber(var6)
        solarflag="1"
    else
        powercount = tonumber(var5)
    end
    if Debug=="YES" then
        print( " ####Powercount after solarflag: "..powercount)
        print( " ####solarflag: "..solarflag)
    end
    commandArray['Variable:GridPowerVar']= tostring (powercount)
    commandArray['Variable:SolarPowerFlag']= solarflag

    -- store value in variable for later use in other scpt 
    --commandArray['Variable:GridPowerVar']= tostring(powercount)

-- testing stuff
--commandArray['Variable:SolarPowerVar']= tostring (1100)
--solarflag =1 


   -- get solar power from var and make number
  --commandArray['Variable:SolarPowerVar']= "12"
  
  -- print ( "solarwaarde "..commandArray['Variable:SolarPowerVar'])
   -- for i, v in pairs(otherdevices) do print(i, v) end
   
   solarsensor = "SolarEdge kWh"
   Solarvar1, var2 = string.match(otherdevices_svalues[solarsensor], "(%d+%.*%d*);(%d+%.*%d*)")
   Sol = tostring (Solarvar1)
  
  -- solarcount = commandArray['Variable:SolarPowerVar']
  if Debug=="YES" then
    print("####solarcount read from Var : "..Sol)
  end
  
  if ( solarflag == "1") then  
    consume = Solarvar1 - powercount
  else    
    consume = Solarvar1 + powercount
  end 

 if Debug=="YES" then
    print( " ####solarcount : "..Solarvar1)
    print( " ####powercount : "..powercount)
    print( " ####solarflag  : "..solarflag)
    print( " ####consume : "..consume)
 end

   
 ttidx = otherdevices_idx['PowerConsumtion']
 commandArray['UpdateDevice'] = ttidx..'|0|'..consume
  
  
end 
return commandArray

Re: Question about energy usage

Posted: Wednesday 18 July 2018 7:39
by stuiow
I have a similar question now i am generating PV energy.
My aeon meter (that monitors off grid consumption) behaves not how i expected it too.
When i am generating more energy i am using, this shows up as postive on the aeon meter (so it looks like i am pulling pwoer off the grid).
Does the aeonlabs HEM not go into negative figures?

Without fixing that meter, i can't do what ip plain which is , take my solar edge generating figure then take my consumption figures and then have another meter giving my a net import/export figure.

Re: Question about energy usage

Posted: Wednesday 18 July 2018 11:42
by gajotnt
If it shows positive, must be because it doesnt defirentiate the direction of the current :(

Re: Question about energy usage

Posted: Wednesday 18 July 2018 13:15
by stuiow
After snooping around the settings for that meter, I have found a setting that allows the device to log both consumed and exported, so all is well now.


Sent from my SM-G955F using Tapatalk


Re: Question about energy usage

Posted: Monday 30 July 2018 16:23
by rednas
freijn wrote: Saturday 07 July 2018 21:34 Not sure which code you are looking for.

This is the code to calc house consumption.
I finally have my solar panels reporting to Domoticz. This happens every 5 minutes. I also have my P1 meter report every 5 seconds.
If I would use your code, then it would run every 5 seconds with the solar data which updates every 5 minutes, right?
Would this give realistic data?

Re: Question about energy usage

Posted: Monday 30 July 2018 20:45
by freijn
rednas wrote: Monday 30 July 2018 16:23
I finally have my solar panels reporting to Domoticz. This happens every 5 minutes. I also have my P1 meter report every 5 seconds.
If I would use your code, then it would run every 5 seconds with the solar data which updates every 5 minutes, right?
Would this give realistic data?
Hi Rednas

unfortunately not :-( I have had that the solar reported a huge number then a dark cloud arrived and my P1 produced a huge number getting power from the grid.

Either you decrease the 5 min snap shot to lower or you trigger the calculation only when you receive the new solar values.
Only this way you get 5 min snap shots of your house consumption which is as you can imagine not very realistic view.

Re: Question about energy usage

Posted: Monday 03 June 2019 13:28
by margan
Hopening this thread it's in life.... I'm trying to use this P1 function to read electrical info from an esp8266 device connected to an appliance .
I actually read the values I need on a domoticz window but only as a subset of number in a single window/device.
How can I split these infos to see 3 or for different "windows"/devices, for each read data: voltage, amp, instant power in watt ?