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

Eletric Load Management


Swordpirat

Question

Hi all,

it's possible configure hc2 witch wall plug or similar to switch off with priority schedule some device when global eletric charge is > to 3,2 KW?

with lua i can monitoring with aperometric clamp global absorption and execute switch off action but....

how can i set device priority ?

ca i set random priority?

es:

global consumption 3,4kw

wall plug 1= 1,4kw

wall plug 2= 1,5,kw

wal plug 3= 0,6 Kw

the priority is plug 2(hight charge), plug 1(med charge) , plug 3 (lower charge)

and the sistem must switch off plug 2...

it's possible?

sorry for my bad english...

Please login or register to see this image.

/emoticons/default_icon_redface.gif" alt=":oops:" />

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Swordpirat, in LUA yes

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Swordpirat, in LUA yes

    Ok, i need use bubblesort algoritm?

    Link to comment
    Share on other sites

    • 0

    you can do that in loop and always turn off device with max W

    example on fast from memory

    Please login or register to see this code.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • you can do that in loop and always turn off device with max W

    example on fast from memory

    Please login or register to see this code.

    why in a loop?

    i call scene only if amperometric clamps dedect > 3,2 Kw...

    if i take this scene active in a loop everytime the

    device with max Kw switch off...

    Link to comment
    Share on other sites

    • 0

    let say you got that situation

    wallplug 1 1.8kw

    wallplug 2 1.8kw

    wallplug 3 1.7kw

    then you will first turn off 1.8kw but 1.8kw +1.7 is still more then 3.2kw

    your lua scene will start again when you will get new value sensor for amperometric clamps, but if you do that in loop you will get that effect fast

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • let say you got that situation

    wallplug 1 1.8kw

    wallplug 2 1.8kw

    wallplug 3 1.7kw

    then you will first turn off 1.8kw but 1.8kw +1.7 is still more then 3.2kw

    your lua scene will start again when you will get new value sensor for amperometric clamps, but if you do that in loop you will get that effect fast

    ok!

    like this...

    while (amperometric clamps value) > 3.2 do

    local wallplug1 = fibaro:getValue(1655, "valueSensor")

    local wallplug2 = fibaro:getValue(1655, "valueSensor")

    local wallplug3 = fibaro:getValue(1655, "valueSensor")

    local max = (math.max(wallplug1,wallplug2,wallplug3));

    fibaro:debug (max);

    if (wallplug1 == max)

    then

    --turnoff wallplug1

    elseif(wallplug2 == max)

    then

    --turnoff wallplug2

    else

    --turnoff wallplug3

    end

    end

    Link to comment
    Share on other sites

    • 0

    use 3200 not 3.2

    --turnoff wallplug2 use command to turnoff device and on begin add %%autostart

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • let say you got that situation

    wallplug 1 1.8kw

    wallplug 2 1.8kw

    wallplug 3 1.7kw

    then you will first turn off 1.8kw but 1.8kw +1.7 is still more then 3.2kw

    your lua scene will start again when you will get new value sensor for amperometric clamps, but if you do that in loop you will get that effect fast

    ok!

    like this...

    while (amperometric clamps value) > 3.2 do

    local wallplug1 = fibaro:getValue(1655, "valueSensor")

    local wallplug2 = fibaro:getValue(1655, "valueSensor")

    local wallplug3 = fibaro:getValue(1655, "valueSensor")

    local max = (math.max(wallplug1,wallplug2,wallplug3));

    fibaro:debug (max);

    if (wallplug1 == max)

    then

    --turnoff wallplug1

    elseif(wallplug2 == max)

    then

    --turnoff wallplug2

    else

    --turnoff wallplug3

    end

    end

    I try but...i can view only debug message in console...it seems script interrupt before "if (wallplug1 == max) ....."

    some ideas?

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