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


Recommended Posts

  • Topic Author
  • On 1/10/2020 at 7:40 AM, Sjakie said:

    Jan,

    thanks

    I checked it also sorry I forget to mention it " telefoonlader sjaak" was off.

    For in case I forget to switch off I get a telegram and a repeated voice message.

    Thats why its so strange.

    //Sjakie

     

    Well, the rule is pretty straightforward and it would not execute if  " telefoonlader sjaak" was off. Could it be something wrong with telegram?

    Add this to the rule and see what happens 23:00 tonight...

    Rule.eval([[once(23:00..02:00,n/03:00 & hoofdslaapkamer.ladertelefoonsjaak:isOn) =>

                        log('Activating alarm. Time is %s and ladertelefoonsjaak=%s",osdate('%X'),hoofdslaapkamer.ladertelefoonsjaak:isOn);

                       ....

    Link to comment
    Share on other sites

    Thanks Jan,

    Telegram? >>No I dont think so, alarm was enabled.

    fyi : Jan I modified all my device names in the format nnnNnnnnN

    I have two rules with "hoofdSlaapKamer.laderTelefoonSjaak:isOn"

     

    Rule.eval([[(23:00..23:59 | 00:01..02:00 & hoofdSlaapKamer.laderTelefoonSjaak:isOn) | $LocatieGezin=="Vakantie" | hal.locatieGezin:isOff =>
            remote(1613,#stekkersOff); remote(1614,#stekkersOff); remote(1617,#stekkersOff); remote(1630,#stekkersOff); remote(1641,#stekkersOff);
            remote(1760,#stekkersOff); post(#stekkersOff);
            log('TRIGGER:%s',tjson(env.event)); log1('violet','StekkersOff - post')
                      ]])

    >>>>>>$LocatieGezin=="Vakantie" | hal.locatieGezin:isOff <<<< not a trigger at this moment

     

    Rule.eval([[once(23:00..02:00,n/03:00 & hoofdSlaapKamer.laderTelefoonSjaak:isOn) => Arm the house.

     

    Last night ONLY the rule of "Stekkers" was executed.

    Note:

    Both devices Wall plug and the door sensor with errors this week are Neo Coolcam >>>I ordered on for hand two Fibaro devices

    I will add your advice and am curious what the out come will be.

    Thanks for your support

    have a nice weekend,

    //Sjakie

     

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    Jan I did something wrong I guess.

    Rule.eval([[once(23:00..02:00,n/03:00 & hoofdSlaapKamer.laderTelefoonSjaak:isOn) =>
          log('Activating alarm. Time is %s and laderTelefoonSjaak=%s",osdate('%X'),hoofdSlaapKamer.laderTelefoonSjaak:isOn')
                            ]])

    Please login or register to see this image.

    /monthly_2020_01/image.png.f506af5cf4c8cb6f7a1c85804cf0ea13.png" />

    Link to comment
    Share on other sites

  • Topic Author
  • 8 hours ago, Sjakie said:

    Jan I did something wrong I guess.

    Rule.eval([[once(23:00..02:00,n/03:00 & hoofdSlaapKamer.laderTelefoonSjaak:isOn) =>
          log('Activating alarm. Time is %s and laderTelefoonSjaak=%s",osdate('%X'),hoofdSlaapKamer.laderTelefoonSjaak:isOn')
                            ]])

    Please login or register to see this link.

     

    Some mismatched string quotes - this works

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Thanks Jan,

    is implemented.

    Question:

    If I switch on/off with HUE app I cant see it in debug window HC2

    I would like something as

    Rule.eval([[woonKamer.spotSjaak:isOn =>
     log('spot Sjaak - aan, the value of the brightness')            ]])

    Is this possible and how too do it?

    Thanks in advance,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Question:

    If I switch on/off with HUE app I cant see it in debug window HC2

    I would like something as

    Rule.eval([[woonKamer.spotSjaak:isOn =>
     log('spot Sjaak - aan, the value of the brightness')            ]])

    Is this possible and how too do it?

    Please login or register to see this code.

    The :value of a Hue lamp will return the brightness (modulated to 0..99), emulating a fibaro dimmer... (0 if it's off)

    In the example it monitors the lamp every 1000ms. If you don't need so frequent updates you can increase it to 2000 or 3000 as monitoring many Hue devices frequently will put a strain on the HC2 and the Hue bridge. Also, if you have Hue VDs in the HC2 they will poll the bridge too adding to the load.

    Edited by jgab
    Link to comment
    Share on other sites

    Thanks Jan!!!

    Looks great!!!

    One thing I dont understand if I switch on a few lights it gives in debug with color posting lamp is On.

    If I switch spotSjaak on it will start the yellow color in debug.

    Is that because spotSjaak is as last in the row of HUE,monitor?

    Rule.eval("Hue.monitor(woonKamer.spotBeeldLinks,1000)")
    Rule.eval("Hue.monitor(woonKamer.lampPlafondTvZijde,1000)")
    Rule.eval("Hue.monitor(woonKamer.spotSjaak,1000)")

    When I add this also to another scene with off course other names it will continuous loop the hue api

    Please advice,

    //Sjaak

     

     

    Please login or register to see this image.

    /monthly_2020_01/image.png.9c03d9a0cb4963c7b31685d92784bdd5.png" />

    Link to comment
    Share on other sites

    Jan,

    Error

    Please login or register to see this image.

    /monthly_2020_01/image.png.919c29e7e7d58782d6ecee710eb5f455.png" />

    all triggers are off

     

    Link to comment
    Share on other sites

    Jan,

    the rule is:

    Rule.eval([[once(23:00..02:00,n/03:00 & hoofdSlaapKamer.laderTelefoonSjaak:isOn) | $LocatieGezin=="Vakantie" | hal.locatieGezin:isOff =>
            remote(1613,#stekkersOff); remote(1614,#stekkersOff); remote(1617,#stekkersOff); remote(1630,#stekkersOff); remote(1641,#stekkersOff);
            remote(1760,#stekkersOff); post(#stekkersOff);
            log('TRIGGER:%s',tjson(env.event)); log1('violet','StekkersOff - remote'); log1('violet','StekkersOff - post')
                      ]])

    This will switch off all relevant wall plugs.

    weird is

    Scene 1617 NO post StekkersOff

    Please login or register to see this image.

    /monthly_2020_01/image.png.b4b6b4cc5f92d251b3d3c0111f5d6008.png" />

    1614 also NO post

    image.png.43c9f72d1b52bbc20a5d5d3037252c02.png

     

    This I dont understand.

    Can you see something strange??

    //Sjakie

     

    Link to comment
    Share on other sites

    Jan,

    This I use in the bath room

    BUT the light goes out wif we take a shower, what I di wrong?

    If shower door (doucheDeur) is closed person is in bath room despite some other rule will tell person out.

    What to do to prioritize the doucheDeur closed?

    Please advice

    //Sjakie

    ---------------------------------------------------------------------------------------------
    Rule.eval("log3('lightgreen','BADKAMER')")
    Rule.eval("log4('magenta','Person in or out')") --trigger dakraam=467, deur=603, spotbadk1=12331, bewegingssensor=834, luxsensor=836, humidity=837,
    --------------------------------------------------    

    Util.defTriggerVar("openVanBuitenDeurBadkamer",false)

    rule([[badkamer.deur:breached =>
        || badkamer.bewegingssensor:safe >> openVanBuitenDeurBadkamer=true
        || badkamer.bewegingssensor:breached >> openVanBuitenDeurBadkamer=false
        ]])


    rule("openVanBuitenDeurBadkamer==true => post(#bathroomOn); remote(1641, #bathroomOn); log('TRIGGER:%s',tjson(env.event)); log1('violet','bathroomOn - post')")
    rule("openVanBuitenDeurBadkamer==false => post(#bathroomOff); remote(1641, #bathroomOff); log('TRIGGER:%s',tjson(env.event)); log1('violet','bathroomOff - post')")

     

    Rule.eval([[#nightLight =>
            badkamer.spotbadk1:on; badkamer.spotbadk2:on; badkamer.spotbadk3:on; badkamer.peerbadk:on;
            {badkamer.spotbadk1, badkamer.spotbadk2, badkamer.spotbadk3, badkamer.peerbadk}:value={bri=60, transitiontime=100, col=35};
            log('TRIGGER:%s',tjson(env.event)); log2('orange','nachtlicht  - post')
                ]])

    Rule.eval([[#dayLight =>
            badkamer.spotbadk1:on; badkamer.spotbadk2:on; badkamer.spotbadk3:on; badkamer.peerbadk:on;
            {badkamer.spotbadk1, badkamer.spotbadk2, badkamer.spotbadk3, badkamer.peerbadk}:value={bri=255, transitiontime=100, col=35};
            log('TRIGGER:%s',tjson(env.event)); log2('orange','daglicht - aan')
                ]])

    --Bathroom, uses a local flag (inBathroom)
      rule("trueFor(00:10,badkamer.bewegingssensor:safe & badkamer.deur:value) => !inBathroom & post(#bathroomOff); log('TRIGGER:%s',tjson(env.event)); log2('orange','bathroomOff - post')")
      rule("badkamer.bewegingssensor:breached => badkamer.deur:safe & inBathroom=true; post(#bathroomOn); log('TRIGGER:%s',tjson(env.event)); log2('orange','bathroomOn - post')")
      rule("badkamer.deur:breached => inBathroom=false; log2('orange','inbathroomfalse ');log('TRIGGER:%s',tjson(env.event))")
      rule("badkamer.deur:safe & badkamer.bewegingssensor:last<=3 => inBathroom=true; log('TRIGGER:%s',tjson(env.event)); log2('orange','inBathroom=true')")
      rule("badkamer.doucheDeur:safe => badkamer.deur:safe & inBathroom=true; post(#bathroomOn); log('TRIGGER:%s',tjson(env.event)); log2('orange','bathroomOn - post')")

     

        Rule.eval([[#bathroomOn & hoofdslaapkamer.ladertelefoonsjaak:isOff =>
            post(#dayLight);
            remote(1641, #bathroomOn);
            log('TRIGGER:%s',tjson(env.event)); log2('orange','badkamer vol licht en ventilatie post - aan')
                ]])

        Rule.eval([[#bathroomOn & hoofdslaapkamer.ladertelefoonsjaak:isOn =>
            post(#nightLight);
            remote(1641, #bathroomOn);
            log('TRIGGER:%s',tjson(env.event)); log2('orange','badkamer gedimd licht en ventilatie post - aan')
                ]])

           Rule.eval([[#bathroomOff =>
            {badkamer.spotbadk1, badkamer.spotbadk2, badkamer.spotbadk3, badkamer.peerbadk}:value={bri=0, transitiontime=100, col=35};
            wait(00:03); badkamer.spotbadk1:off; badkamer.spotbadk2:off; badkamer.spotbadk3:off; badkamer.peerbadk:off;
            remote(1641, #bathroomOff);
            log('TRIGGER:%s',tjson(env.event)); log2('orange','badkamer licht - uit')
                ]])

     

     

     

     

    Link to comment
    Share on other sites

    • 2 weeks later...

    Jan,

    Can Siri works with Event Runner?

    If I follow Fibaro install it stops on my IPhone I dont have the short cuts option.

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

    Good morning Jan,

     

    Rule.eval([[woonkamer.gordijnvoor:isOpen & 05:00...09:15 => 
            remote(1614,#morninglightsOff,+/00:01:03); 
            log('TRIGGER:%s',tjson(env.event)); log5('brown','morninglightsOff na 1 min - post')
                        ]])

    Generates this error

    Please login or register to see this image.

    /monthly_2020_02/image.png.57a33abc27181071f5d3f878299ed1d0.png" />

     

    1614 is the scene ID of my scene livingroomlight

    image.png.deee9db50a6ffbc6b5d855bc2c1d655f.png

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 38 minutes ago, Sjakie said:

    Good morning Jan,

     

    Rule.eval([[woonkamer.gordijnvoor:isOpen & 05:00...09:15 => 
            remote(1614,#morninglightsOff,+/00:01:03); 
            log('TRIGGER:%s',tjson(env.event)); log5('brown','morninglightsOff na 1 min - post')
                        ]])

    Generates this error

    Please login or register to see this link.

     

    1614 is the scene ID of my scene livingroomlight

    Please login or register to see this link.

    Please advice,

    //Sjakie

     

    Hi, 'remote' only takes 2 arguments, id and event - there is no third argument delay time

    Maybe in the future I could add it but for now do:

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, Sjakie said:

    Jan,

    Thanks

    Because ER implements a "stack machine", if there are too many or few arguments to a function it creates a mess as I don't normally check that I get the right number of arguments (for efficiency)

     

    Link to comment
    Share on other sites

    Jan, no problem with the wait in front my problem is solved.

    What about Siri? Are you using it?

    Is it that ER ist recognice as shortcut? There are a few LUA scenes for support GV.

    or my IPhone 11 pro is different? Because no shortcut in the process of installing >>in this case I must contact IPhone

    Please advice

    Link to comment
    Share on other sites

  • Topic Author
  • I’m not so familiar with Siri and fibaro? I’ve seen that Siri can turn on switches - and then ER rules can react on those switches changing state. Can Siri start scenes? If so, then the scene can send an event to the ER scene. 

     

    Link to comment
    Share on other sites

    Morning Jan,

    The rule:

        Rule.eval([[once(voortuin.luxsensor:lux > 25 & achtertuin.luxsensor:lux > 10 & 05:30..09:00) & $StookSeizoen=='Ja' =>
            remote(1617, #morningCurtainWinter);
            log('TRIGGER:%s',tjson(env.event)); log5('brown','Sensor lux voor- achtertuin #morningCurtainWinter - remote')
                ]])

    The action is correct

    Please login or register to see this image.

    /monthly_2020_02/image.png.9c3e911963f77f170ed561ae14848c1d.png" />

    The receiving ER scene does not get the remote!!

    image.png.210304281faed5238e6c2593139a9e36.png

    Please advice

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 5 hours ago, Sjakie said:

    Morning Jan,

    The rule:

        Rule.eval([[once(voortuin.luxsensor:lux > 25 & achtertuin.luxsensor:lux > 10 & 05:30..09:00) & $StookSeizoen=='Ja' =>
            remote(1617, #morningCurtainWinter);
            log('TRIGGER:%s',tjson(env.event)); log5('brown','Sensor lux voor- achtertuin #morningCurtainWinter - remote')
                ]])

    The action is correct

    Please login or register to see this link.

    Please login or register to see this link.

    The receiving ER scene does not get the remote!!

    Please login or register to see this link.

    Please advice

    //Sjakie

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

     

    I can't see anything wrong (except that the event doesn't arrive). Is it always like this? If you just run

    Rule.eval(" remote(1617, #morningCurtainWinter)")

    it arrives?

    Link to comment
    Share on other sites

    Jan,

    Its since  a few weeks.

    For the main things such as curtains and lights  there is a backup.

    If one rule doest do the job another will take it over and on the log show me that this rule is skipped.

    Other rules in both scenes works great.

     

    Rule.eval(" remote(1617, #morningCurtainWinter)")>>>>>arrives tested 4 times

     

    Jan please check also my post of 12th January also with another rule NO post!>>> This I solved by making that rule in each scene.

    Please advice,

    //Sjakie

     

    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
    Reply to this topic...

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