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

QuickApp energy meter, Joule to kWh


Question

Posted

Please login or register to see this code.

Please login or register to see this code.

 

Please login or register to see this code.

 

Please login or register to see this code.

 

Please login or register to see this code.

Thanks

 

 

Please login or register to see this attachment.

4 answers to this question

Recommended Posts

  • 0
Posted

I am not sure, if I got you correclty.

 

You have a quickapp that listens to your energymeter values in every 10 sec? So i assume it is a loop that calls the energymeter device by hub.getValue(energymeterID, value) -- here value can be power, or whatever you are listening to

 

and using 

Please login or register to see this code.

 

will always save the value_in_joule into the quickapp device's value property. So when it is once saved, you can test it by hub.getValue(self.id, value), or you can see it in dashboard when pressing preview button..

The question is, when and how is your updateProperty function called...Is it inside some event listener function that reacts to every change of your energymeter change?

If so the newly recieved value will overwrite the value property and will not add up..It will just update..If you want to sum them up, you do

 

Please login or register to see this code.

 

  • 0
  • Inquirer
  • Posted

    Thanks for answer.

    Please login or register to see this code.

    Please login or register to see this code.

    • 0
    Posted
    27 minutes ago, PasqualeOK said:

    Thanks for answer.

    Please login or register to see this code.

    Please login or register to see this code.

    I am still a bit confused, what you want to achieve, but lets try...

     

    So your incoming values are in Wh right? These values are stored in your energy metere type quickapp value property

    Energy meter type device will always keep data in kWh, so whatever value you store in it, it will be handled as kWh..

    So the overall Fibaro energy panel will always consider values of this device as kWh..whatever value you will have there...

    So if your data are coming in Wh, you should convert them to kWh, using the formula: 1 watt hour = 0.001 kWh.

     

    Your other part of the question:

    "The value after 2 hours changes, becoming 11702360. If I understand correctly, the data is updated"

     

    Well this is what i dont get..Data are coming from some device into your energy meter type quickapp right (from some resource)?..If so, your energy meter type quickapp should handle the update..that is something you should write into it, as i wrote you..

    The enery meter type quickapp is still only a quickapp...it will do nothing on itself..you need to write the code in it, that will update its values according to incoming values..

    So you need to write the code 

     

    Please login or register to see this code.

    and that value should be in kWh, to be correctly handled in FIbaro energy panel

     

     

     

     

    • Like 1
    • 0
  • Inquirer
  • Posted

    Please login or register to see this code.

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