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


energy meters - how to get consumption for a period ?


afendikov

Recommended Posts

Hi All,

 

In last firmwares there is lot of changes with Energy Meters and calculation of energy consumption

 

How I can get now consumption for a period from main energy meter - Aeotec HEM-3?

 

With old link:

<hc3 ip>/api/energy/now-86400/now/single/devices/power/<device id>

 

I always receive json with lot's of zeros:

{

id: 1,

kWh: 0,

W: 0,

min: 0,

max: 0,

avg: 0

}

 

For Wall Plugs, Double Switches - consumption data still works:

 

{

id: 1,

kWh: 6.58,

W: 4.6,

min: 4.5,

max: 1240.1,

avg: 0

}

 

Thanks

 

 

Link to comment
Share on other sites

No how, as we are talking before in private box with @m.roszakin last FW Fibaro rewrite this function and remove caching btw 

so,probably we are should waiting a new API for this.

IMHO

Link to comment
Share on other sites

  • Topic Author
  • 23 minutes ago, 10der said:

    No how, as we are talking before in private box with @m.roszakin last FW Fibaro rewrite this function and remove caching btw 

    so,probably we are should waiting a new API for this.

    IMHO

     

    and will be available summer 2022, I think? ???

     

    • Like 1
    Link to comment
    Share on other sites

    Are you expecting instant power (W) or energy (kWh) reported by the device?

    On this API energy is calculated from power reports, so if your Aeon does not have interface "power" or is not a com.fibaro.powerMeter (from next version - 5.091) this will result with response with zeros. 

     

    Link to comment
    Share on other sites

  • Topic Author
  • Hi, @m.roszak

     

    kWh for last hour / day


    existing JSON very convenient also to understand min / max values, but as I understand, for Energy Meters it will be not available?

    Edited by afendikov
    Link to comment
    Share on other sites

    For pulling energy data from devices (interface "energy" or com.fibaro.energyMeter devices) you can use new API from Energy Panel - you can sniff it using devTools on Savings Tab.
    There is no official documentation for it yet but it won't be hard to check how it works :)

    For simple summary of Hourly, Daily, Weekly, Monthy or Yearly energy consumption from the specific device you can use /api/panels/energy?id=x 

    • Thanks 1
    Link to comment
    Share on other sites

  • Topic Author
  • @m.roszak, thank you for your support. As a temporary solution it will work

     

    Link to comment
    Share on other sites

  • Topic Author
  • On 11/9/2021 at 12:30 PM, m.roszak said:

    For pulling energy data from devices (interface "energy" or com.fibaro.energyMeter devices) you can use new API from Energy Panel - you can sniff it using devTools on Savings Tab.
    There is no official documentation for it yet but it won't be hard to check how it works :)

    For simple summary of Hourly, Daily, Weekly, Monthy or Yearly energy consumption from the specific device you can use /api/panels/energy?id=x 

     

    @m.roszak, looks like energy panel is calculating very approximate. For example, today's daily consumption:

       Data from Inverter: 19.81 kwh

       Data from Fibaro energy panel: 23.62 kwh  ( http://<ip>/api/panels/energy?id=1474 )

     

      20% difference - that's a lot :(

     

    Also - for HEM-3 there is no energy panel for total consumption

    Working solution - to calculate consumption for phase1 + phase2 + phase3

     

    total consumption is looks like snoozed - it have some calculation for Yearly consumption, but no hourly, daily, weekly:

     

    [

    {

    id: 1458,

    totalEnergy: 11.26,

    current: {

    H: 0,

    D: 0,

    W: 0,

    M: 0,

    Y: 11.26,

    costH: 0,

    costD: 0,

    costW: 0,

    costM: 0,

    costY: 20.22

    },total: {

    H: 0,

    D: 0,

    W: 0,

    M: 0,

    Y: 0,

    costH: 0,

    costD: 0,

    costW: 0,

    costM: 0,

    costY: 0

    }}

    ]

    Edited by afendikov
    • Thanks 1
    Link to comment
    Share on other sites

    Kostya. calculate it via Gafana. Do not care about Fibaro. 

    they will grudge you snow in the middle of winter 

    Link to comment
    Share on other sites

    We are not calculating energy (kWh) anymore from instant power (W) like on HC2 - this resulted in even more error as devices does not report every power change.

    For energy panel we are using accumulated kWh reported directly by the devices, so if device have a high measuring error (like HEM with clamps) there will be differences.

     

    There is nothing we can do about it.

     

    Good whole home energy meter set as main energy meter in settings (or few them if you have energy measurment per phases) will give you best results.

     

    As for your issue with lack of summary reports - need to be investigated.

    Link to comment
    Share on other sites

    Or just get it from your P1 Smart Energy Meter, if you have one. Super accurate. 
     

    Put it in the Homecenter and or use Grafana for all kinds of graphics. 

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • On 11/11/2021 at 5:38 PM, m.roszak said:

    As for your issue with lack of summary reports - need to be investigated.

    Hi @m.roszak - I think I found some.

     

    I just remove this device from "Main Energy Meters" list from Settings -> General.

     

    And it start update total reports from all phases.

     

    BTW, HEM-1 counting very accurate - 99% compares with data from Inverter. I think it's just Inverter not count his own consumption, which is ~ 60 W per hour. 

     

     

    HEM-3 still lies around 20%, trying to figure out why.

     

    I can test HEM-3 on Z-Wave 3.0 Engine, will it help to understand possible error ?

     

    Thanks

    Link to comment
    Share on other sites

    Both engines used the same zwave command class (meter) for handing reports, mechanism is different but result will be the same.

     

    Changing the engine won't make a difference in my opinion.

     

    Have you tried swaping the clamps or positioning them differenty?

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 6 hours ago, m.roszak said:

    Both engines used the same zwave command class (meter) for handing reports, mechanism is different but result will be the same.

     

    Changing the engine won't make a difference in my opinion.

     

    Have you tried swaping the clamps or positioning them differenty?

     

     

    not tried, because before 5.090 and device reconfiguration all worked like a charm

     

    and now it worked again - I just remove this device from "Main Energy Meters" list from Settings -> General.

     

     

    Link to comment
    Share on other sites

    In 5.080 whole CC Meter was upgraded (in old Zwave version) and soft-reconfiguration was needed for typical meter devices - this was in changelog.

    If reconfiguration has not been done then this may resulted with some issues there.

     

    Regards,

    Michał

    Link to comment
    Share on other sites

  • Topic Author
  • 5 hours ago, m.roszak said:

    In 5.080 whole CC Meter was upgraded (in old Zwave version) and soft-reconfiguration was needed for typical meter devices - this was in changelog.

    If reconfiguration has not been done then this may resulted with some issues there.

     

    Regards,

    Michał

    Hi,

     

    Yes, I did device reconfiguration for all HEM meters

    now on HEM-3 is 32 childs

     

    All written above is related to HEM-3 after reconfiguration

     

    Link to comment
    Share on other sites

  • Topic Author
  • On 11/14/2021 at 10:39 PM, afendikov said:

    Hi,

     

    Yes, I did device reconfiguration for all HEM meters

    now on HEM-3 is 32 childs

     

    All written above is related to HEM-3 after reconfiguration

     

    Hi @m.roszak,

     

    I did full investigation regarding HEM-3. So, in final:

     

    1) HEM-3 total consumption wasn't update ( in my case ), while I not removed HEM-3  from Fibaro HC "Main Energy Meters" list from Settings -> General. After that - works fine

     

    2) HEM-3 total consumption data - works correctly in Fibaro. Both of them - data from child ( total comsumption ) or sum of consumption phase 1 + 2+ 3

           In my case - In topics below compare HEM-3 data with my inverter data, but there is ~ 15-20% energy loss for transformation ( winter time -> lower voltage from the grid -> bigger losses )

           When I compared minute-to-minute with energy meter on the street - all data is perfectly equal

     

     

    • Thanks 1
    Link to comment
    Share on other sites

    As for point 1, setting HEM total consumption should be normally reported regardless the setting of main energy meters (this is a separate feature).
    Just to clarify, your Summary Consumption in energy panel was not working or device itself did not report energy?

    One hint, device selected as main energy meter is not visible in graphs for rooms/categories (general tab) and in savings.
    Its value is only used for calculating summary home consumption.

    On rooms/categories and in savings graphs it only shows the difference between all other energy measuring devices and main energy meter(s) in category "other".

    Example when main energy meter(s) is/are set:
    1. Summary consumption for 1 hour is 10kWh (read from main energy meter) - visible in general tab summary and savings chart
    2. Consumption for other devices summed up from this period is 7kWh
    3. On rooms/categories graph you will see consumption from all devices except main energy meter and additional "other" graph where difference between main and other sensor is calculated (3kWh)
    4. Savings graph is drawn using main energy meter reported values
    5. devices listed on specific period in savings are ordered ascending from highest consumption, on this list will be also listed "other" which is the same difference like in point 3. 

    Example when main energy meter(s) is/are NOT set:
    1. Summary consumption for 1 hour is 10kWh (sum of all reported energy from all devices) - visible in general tab summary and savings chart
    2. On rooms/categories graph you will see consumption from all devices 
    4. Savings graph is drawn using summary consumption calculated from all devices
    5. devices listed on specific period in savings are ordered ascending from highest consumption

     

    regards,
    Michał 

    Link to comment
    Share on other sites

  • Topic Author
  • Yeah, this is other issue :(

     

    I have several devices in one power chain - to be sure, that there is no fault on the hardware side.

     

    In very simple way, power scheme looks like this:

     

    HEM-3 -> Heavy Duty Switch -> HEM1 -> UPS HEM-1 ( UPS OUT ) -> Sockets

     

    HEM-3                     - Grid In

    Heavy Duty Switch - Inverter In

    HEM-1                      - Inverter Out

    HEM-1                      - UPS Battery Out

     

    And then - power devices - Sockets, Relays.

     

    Is it possible to make 3rd option in Meter Configuration:

       "Transit Device" along with Consumption and Production?

        Because as I understand, I can't just disable option "Save energy to database" ? If I do that - I will not have energy reports ?


    Please login or register to see this attachment.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 8 hours ago, m.roszak said:

    As for point 1, setting HEM total consumption should be normally reported regardless the setting of main energy meters (this is a separate feature).
    Just to clarify, your Summary Consumption in energy panel was not working or device itself did not report energy?

    When I make HEM-3 as Main Energy Meters, reports became this:

    Hour / Day Consumption = 0.

     

    Please login or register to see this attachment.

    For Energy Panel - sent to you direct message

     

    Link to comment
    Share on other sites

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...