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


  • 1

Virtual Device report power consumption


lindehoff

Question

Hi,

Is it possible to report power consumption of an virtual device via LUA?

[ Added: 2013-10-06, 20:32 ]

<--bump-->

Is it possible today?

Link to comment
Share on other sites

Recommended Posts

  • 0
Guest cedriclocqueneu

Yes, it will be great ! Same thing for temp or humidity from virtual device !

Link to comment
Share on other sites

  • 0

cedriclocqueneu, Martial25, you can do that easily

Please login or register to see this image.

/emoticons/default_icon_razz.gif" alt=":-P" />

Put the code in your virtual device main loop:

Please login or register to see this code.

If you want have the same information when you open your virtual device, add a label named lblValue with no name and put the line fibaro:call(VID, "setProperty", "ui.lblValue.value", value); in your main loop...

Best regards

Jean-Christophe

Please login or register to see this attachment.

Link to comment
Share on other sites

  • 0
Guest Martial25

yes I know it;) I use for Eco device.

I wanted to have the information at the consumer panel with graphics

Thank You Jean-Christophe

Regards,

Martial

Link to comment
Share on other sites

  • 0
  • Inquirer
  • yes I know it;) I use for Eco device.

    I wanted to have the information at the consumer panel with graphics

    Thank You Jean-Christophe

    Regards,

    Martial

    Exactly, i've build a virtual device that shows my current energy consumption (1-wire + pulse counter + OW-Server) and it would be great if it could report data to HC2 so it could add up in the energy panel.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    ok

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" /> +1

    Link to comment
    Share on other sites

    • 0

    have modified lindehoff's lua code to fit my Aeon Labs Energy Meter, and has been given permission to publish the code

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Please login or register to see this code.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • If any one is intressted in the icons i use you can download them here:

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0

    Thank you this works great as a Virtual Device but stops working after a little while! I had to create a button with the code instead and create a scene to press the button everytime energy value changed and it has been perfect since!

    I noticed issues when pinging with Virtual Devices aswell I think there is an underlying issue!

    Link to comment
    Share on other sites

    • 0

    Check for spaces after the code in the rows, i did find a couple of them (cut and paste error i guess)

    Link to comment
    Share on other sites

    • 0
    Check for spaces after the code in the rows, i did find a couple of them (cut and paste error i guess)

    sorry you misunderstand, your code works. it is virtual device that fails i run this using a scene interval and device button and it is perfect.

    Link to comment
    Share on other sites

    • 0

    How to create this device? Save the code as a virtual device text and import or just past it into the main loop?

    Link to comment
    Share on other sites

    • 0

    Virtual button and paste the code there

    Add 4 labels, then press button every 5min from other scen.

    Link to comment
    Share on other sites

    • 0

    I created the device successfully and changed the code to retrieve the data from a smart reader cabel hooked up to a Vera. The only thing I don't manage is to get the dynamic icon. What is the naming scheme on it?

    I will tinker a bit more with the code and then post it here for others to use

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    you need to import the icons and right click them and get properties to see what the icon number is on fibaro

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    This seems so great!

    But I still have trouble figure out how to set up in virtual device. Could anyone print screen the setup in advance virtual device please? Thanks so much:)

    Update:

    I got it now, thanks. I was having trouble finding the Virtual Device ID.

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0
    I created the device successfully and changed the code to retrieve the data from a smart reader cabel hooked up to a Vera. The only thing I don't manage is to get the dynamic icon. What is the naming scheme on it?

    I will tinker a bit more with the code and then post it here for others to use

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Hi ROBBshop,

    Did you manage to perfect your code yet? I would really appreciate it if you posted your code here.

    Thanks.

    Link to comment
    Share on other sites

    • 0
    On 10/10/2013 at 8:42 AM, lindehoff said:

    Exactly, i've build a virtual device that shows my current energy consumption (1-wire + pulse counter + OW-Server) and it would be great if it could report data to HC2 so it could add up in the energy panel.

    Please login or register to see this attachment.

    Dear mr Lindehoff, thanks for sharing. Kind regards

    Please login or register to see this attachment.

    Edited by Hedz
    found the answer
    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
    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...