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

Lua expertise needed...


Question

Posted (edited)

I would like to have help with a scene folkes! My Idea is to use a Netatmo welcome to know whos home and not and start different scenes for different people... Ive a plug to my homealarm with a tv in and a fibaroplug before that so every time i turn on the alarm the system flags everyone as away... So my plan is to measure the Fibaro plug for ”0” = everyone is away.... fibaroplug goes to >1 = someone comes home... The netatmo sets a variable that a special person is home (This is already working)... person goes into the kitschen and the movingsensor picks up the person in the right rom to start up a scene or tts... ive tried this in a blockscene but its not working.... anyone with ideas for lua?

Edited by pettzon

18 answers to this question

Recommended Posts

  • 1
Posted

Try to "

Please login or register to see this link.

" , no Lua knowledge required....

Let me know if you need help to configure All-in-One Scene?

  • 0
  • Inquirer
  • Posted

    Ok.... i will check it out... cheers!

    • 0
  • Inquirer
  • Posted

     Ok... I got the All in one scene up n running.... I want this to happen...

    1. IF Alarmplug (ID94) has w=0

    2. AND Alarmplug THEN goes to w>1

    3. AND the variable "Pettzon_Status = 1

    4. AND the variable "Manuela_Status = 0

    5. AND MovingSensor(ID7) is breached

    6. THEN execute a scene or other choice...

    • 0
    Posted

    Maybe something like this:

    Please login or register to see this spoiler.

    It is combination of VD and scene that supports any number of Netatmo Welcome cameras and household members and guests. it is possible to disable/enable individual or all cameras and can get more than 2000 events. Picture of the event is available only on browsers not mobile app, but still can be useful for checking events when picture was taken. For now available only UHAS version, but I can always make standalone one if there is interest from users. :-)

    • Like 1
    • 0
    Posted
    On 1/5/2020 at 9:26 PM, pettzon said:

     Ok... I got the All in one scene up n running.... I want this to happen...

    1. IF Alarmplug (ID94) has w=0

    2. AND Alarmplug THEN goes to w>1

    3. AND the variable "Pettzon_Status = 1

    4. AND the variable "Manuela_Status = 0

    5. AND MovingSensor(ID7) is breached

    6. THEN execute a scene or other choice...

    Just to clarify few points,what do you mean:

    AND Alarmplug THEN goes to w>1 (what goes to w>1)

     

    In addition I didnt understand  your conditions

    1. IF Alarmplug (ID94) has w=0

    2. AND Alarmplug THEN goes to w>1 (is end of if?)

    3. AND the variable "Pettzon_Status = 1

    • 0
    Posted
    2 hours ago, Sankotronic said:

    Maybe something like this:

    Please login or register to see this spoiler.

    Awesome @Sankotronic, i’m interested!

    • 0
  • Inquirer
  • Posted (edited)

    Ok... My scenario is this... I'm going out and turn on the alarm. (The power of the fibaroplug ID94 goes down to "0") =condition 1.

     

    This is so the system knows that the house is empty. Then I come home and turn off the alarm so fibaroplug ID94 power goes up to >1watt = condition 2.

     

    The system now knows that someone's home. In the hallway the netatmo sees me and change the Pettzon_status to "1" = condition 3. What I mean is that the only thing the condition 3 should do is react from 0 to 1... My camera is already changing the variable Pettzon_status. 

     

    Now the house know it's only me home. When I go out in the kitchen the motionsensor sees me "ID7" = condition 4.

    And finally starts for an example a scene ID47... 

     

    I hope I could explain this properly and thanks for helping me... 

    Edited by pettzon
    • 0
    Posted
    9 hours ago, Sankotronic said:

    Maybe something like this:

    Please login or register to see this spoiler.

     

    Hi @Sankotronic

     

    this looks very great, is this VD somewhere in the forum available for download?

    • 0
    Posted
    13 hours ago, pettzon said:

    Ok... My scenario is this... I'm going out and turn on the alarm. (The power of the fibaroplug ID94 goes down to "0") =condition 1.

     

    This is so the system knows that the house is empty. Then I come home and turn off the alarm so fibaroplug ID94 power goes up to >1watt = condition 2.

     

    The system now knows that someone's home. In the hallway the netatmo sees me and change the Pettzon_status to "1" = condition 3. What I mean is that the only thing the condition 3 should do is react from 0 to 1... My camera is already changing the variable Pettzon_status. 

     

    Now the house know it's only me home. When I go out in the kitchen the motionsensor sees me "ID7" = condition 4.

    And finally starts for an example a scene ID47... 

     

    I hope I could explain this properly and thanks for helping me... 

    So, as I understand and to summarize, you need to run scene ID47

    if ID7 breached and Pettzon_status=1 and D94 power>1 end

    right?

    in this case here is the action line

    jM={

    {0,"7",{state="value=true",trueAct={"_47","startScene","","{&Pettzon_status:value=1|@94:power>1}"}}},

    }

    • 0
  • Inquirer
  • Posted

    cag014@

     

    Almost....  ID94 has to be "0" before it goes to ">1"... Its "0" when the alarm is on and the house its empty... This is to sequre that Pettzon comes home to an empty house...

    • 0
    Posted

    Just to make sure we're on same page... when you're saying ID92 =0 or 1,you mean the switch is on/off or you refer to the switch actual  power?

     

    • 0
  • Inquirer
  • Posted (edited)

    Sorry cag014@... Yes! I meant that the power of ID94 is 0 watt and >1 watt

    Edited by pettzon
    • 0
  • Inquirer
  • Posted

    Cag014@ I just have to say that im beginning to understand that this scene is really really sharp... :)

    • 0
    Posted (edited)

    I have used 10 seconds from last change of power to indicate power change from 0 to >1. Change it according to your needs.

    Here are two solutions

    1. If your power switch have stable power reading (could be configured by device parameters) we can assume that last power change was from 0 to >1.

    jM={

    {0,"7",{state="value=true",trueAct={"_47","startScene","","{&Pettzon_status:value=1|@94:power>1|@94:powerModified<10}"}}},

    }

    2. If we cannot rely on power reading stability, then define AOS local variable for power changes identification

    global4local= {false,gVarName="",varArray={alarmPwr="0"}}  

    jM={

    {0,"94",{state="power=0",trueAct={"alarmPwr","setGlobal","0"},falseAct={"alarmPwr","setGlobal","1"}}},

    {0,"7",{state="value=true",trueAct={"_47","startScene","","{&Pettzon_status:value=1|&alarmPwr:value=1|&alarmPwr:valueModified<10}"}}},

    }

    Edited by cag014
    • 0
  • Inquirer
  • Posted

    Thanks.... I will try it when im home from work but it seems that i run into some trouble... It seems like the scene doesnt like "Pettzon_status" It seems that it cant find the global... It only askes for "Pettzon"... Its the underscore that gives hell right?

    • 0
    Posted
    10 hours ago, pettzon said:

    Thanks.... I will try it when im home from work but it seems that i run into some trouble... It seems like the scene doesnt like "Pettzon_status" It seems that it cant find the global... It only askes for "Pettzon"... Its the underscore that gives hell right?

    You're absolutely correct...

    New version coming soon and will be fixed.

    • 0
  • Inquirer
  • Posted

    Cag014@

     

    Ah! It seems to work but ive two questions... I only want this scene to work once and reset and start over everytime the power on ID94 goes to "0" (Im leaving house). and the other question is how i implement "setSlider" in all-of-one scene?

     

    Thanks for a great scene and your help.

    • 0
    Posted

    1.

    It is works just one time, I mean the startScene ID47 should be executed only one time. But if the power value changes all the time, the scene will be triggered on every motion sensor breach.

    What option you're using, with or without variable?

    2.

    setSlider not supported in this release, but you can use pressButton and there to set slider or  to do it in the scene ID47 that triggered by motion.

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