Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Peak power consumption


Question

Posted

Hi,

 

Does anyone have a good scene or VD, or other tip, to capture peak power consumption per day for a device?

 

I run a VD every one minute which captures the current power consumption of the device in question and stores it if it higher then any previous value during the same day. 

But what if power consumption peaks in between runs? my VD does not capture this.

 

Does anyone have a solution to this?

 

KR

P

8 answers to this question

Recommended Posts

  • 0
Posted
2 hours ago, perjar said:

Hi,

 

Does anyone have a good scene or VD, or other tip, to capture peak power consumption per day for a device?

 

I run a VD every one minute which captures the current power consumption of the device in question and stores it if it higher then any previous value during the same day. 

But what if power consumption peaks in between runs? my VD does not capture this.

 

Does anyone have a solution to this?

 

KR

P

 

function showConsumption(energyMeterID)
    local cHM = os.date("%H:%M:%S | %y-%m-%d")
    local date = os.date("*t"os.time())
    local m = os.time {year = date.year, month = date.month, day = 01, hour = 00, min = 00, sec = 00}
    local t = os.time {year = date.year, month = date.month, day = date.day, hour = 00, min = 00, sec = 00}
    local day = os.date("*t"os.time {year = date.year, month = date.month, day = date.day}).day
    local thisMonth = date.month + 1
    local daysMonth = os.date("*t"os.time {year = date.year, month = thisMonth, day = 0}).day
    local day1Month = os.date("*t"os.time {year = date.year, month = date.month, day = 01}).day
 
    local powerMonth = api.get("/energy/" .. m .. "/now/single/devices/power/" .. energyMeterID)
    local powerToday = api.get("/energy/" .. t .. "/now/single/devices/power/" .. energyMeterID)
    local powerHour = api.get("/energy/now-3600/now/single/devices/power/" .. energyMeterID)
    local powerNow = api.get("/energy/now-1/now/single/devices/power/" .. energyMeterID)
 
    print("Now: " .. json.encode(powerNow.W) .. " W")
    print("Hour: " .. json.encode(powerHour.kWh) .. " kWh")
    print("Today: " .. json.encode(powerToday.kWh) .. " kWh")
    print("Month: " .. json.encode(powerMonth.kWh) .. " kWh")
end
 
local deviceID = 670
showConsumption(deviceID)
  • 0
Posted

 

local deviceID = 670
 
local startperiod = os.time() - 24 * 3600 -- last 24h
local endperiod = os.time()
 
local url =
    "/energy/"..tostring(startperiod).."/"..tostring(endperiod).."/summary-graph/devices/power/" .. deviceID
local events = api.get(url)
for k, v in pairs(events) do
    print(os.date('%Y-%m-%d %H:%M:%S', v[1]/1000), v[2])
end

 
  • Like 1
  • 0
Posted

Hi 10der,

 

Do you have the QuickApp version as well ( for HC 3 ) ?

 

With best regards,

Dan

 

 

 

  • 0
Posted
53 minutes ago, Dann said:

Hi 10der,

 

Do you have the QuickApp version as well ( for HC 3 ) ?

 

With best regards,

Dan

 

 

 

yes

here

Please login or register to see this attachment.

 

Please login or register to see this image.

/monthly_2020_10/image.png.28b5fe8b3d6e1637c50c059ab737fd87.png" />

 

 

annonce me about washer start - end

 

left panel

{
  conditions = { 
        {
            id = 1873,
            isTrigger = true,
            operator = "!=",
            property = "userDescription",
            type = "device",
            value = ""
        }
  },
  operator = "any"
}
 
right panel
 
print("sourceTrigger", json.encode(sourceTrigger))
 
if sourceTrigger.property == "userDescription" then
    local event = json.decode(sourceTrigger.value)
    local action = ""
    if event.event == "start" then
        action = "started."
    elseif event.event == "stop"
        action = "ended."
    end
 
    local report = "Washer " .. action
 
   -- telegram
    api.post("/devices/1818/action/sendMessage", {
        args = {report, "255464392"},
        delay = 0
    })
end
 

 

 

  • 0
Posted

Thanks 10der

I guess "1818" deviceID no. is the one of QA right ?

 

Looking forward to hear you,

 

With best regards,

Dan

 

  • 0
Posted
2 hours ago, Dann said:

Thanks 10der

I guess "1818" deviceID no. is the one of QA right ?

 

Looking forward to hear you,

 

With best regards,

Dan

 

Yes telegram 

I have posted this Qa some months ago

And btw you may used native push notifications from Fibaro instead of

But 1873 at the left it’s THIS Qa 

  • 0
Posted

Thanks 10der. ?.

 

Dan

  • 0
Posted

Hi 10der,

 

As the QA is showing the Energy consumption within the time period showed ( and this is useful info ), do you think it is possible also to indicate the peak power value within the last 24 hours ?

 

It is the request of Perjar originally and I am interested as well on such power pick value.

As usual I am talking about HC3.

 

Looking forward to hear you,

 

With BR

Dan

 

 

By pick power within last 24 hours I mean the highest instantaneously power value within the last 24 hours.

 

Dan

 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...