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

Wall plug - Babysitter - Time counter ? Help Fibaro


Question

Guest Dennis
Posted

How do i use the time counter in the wall plug ?

What code do i need in lua?

"So after 2 hours en using more than 50 watt then do ..."

Some one with a lua code or knows a way to use this time counter?

Thx

[ Added: 2013-07-30, 15:02 ]

so nobody knows how this works?

9 answers to this question

Recommended Posts

  • 0
Guest DennisNL
  • Inquirer
  • Posted

    +1

    • 0
    Posted

    Dennis, .......

    you can do that by LUA scene

    if WP >= 50W

    then

    --loop to check

    variable = 0

    for variable , 60, 1 do

    if Wp >= 50W then

    variable = variable +1

    if variable == 60 then

    send push to admin

    end

    sleep 60s

    else

    variable = 60

    end

    --

    end

    • 0
    Posted

    I think the only way to do that is with

    fibaro:sleep(60*1000);

    When you turn on your plug, the scene start with that code. And after this time he does you action.

    • 0
    Guest Dennis
  • Inquirer
  • Posted
    Dennis, .......

    you can do that by LUA scene

    if WP >= 50W

    then

    --loop to check

    variable = 0

    for variable , 60, 1 do

    if Wp >= 50W then

    variable = variable +1

    if variable == 60 then

    send push to admin

    end

    sleep 60s

    else

    variable = 60

    end

    --

    end

    ok thx, can you write me that short code in lua please ?

    so that its works like the "Time Counter" from your website

    Please login or register to see this attachment.

    • 0
    Posted

    Andrew, that is very insteresting.

    So in that way, the code do one loop by second???

    [ Added: 2013-07-30, 16:44 ]

    Dennis,

    Yes but you are not going to receive a push with yes or no for the moment.

    • 0
    Guest dsilletti
  • Inquirer
  • Posted
    Andrew, that is very insteresting.

    So in that way, the code do one loop by second???

    I think a loop every minute to check if the device is on with more than 50W, then increase the minute counter, if the minute counter arrive to 60 (1h) then send the push...

    • 0
    Posted

    Yes exactly, must change my eyes

    Please login or register to see this image.

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

    That is very insteresting

    • 0
    Guest Dennis
  • Inquirer
  • Posted
    Andrew, that is very insteresting.

    So in that way, the code do one loop by second???

    I think a loop every minute to check if the device is on with more than 50W, then increase the minute counter, if the minute counter arrive to 60 (1h) then send the push...

    Great info! Thx,

    Can you make me a loop code for this ?

    • 0
    Posted

    Question about plug, does resetmeter function like rgb device is working for wallplug??

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