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
  • Posted
    5 minutes ago, Sjakie said:

    Jan,

    Error:

    fix 10 no such funtion print??????

    //Sjakie

    Sorry about that - function moved - fixed.

    Pushed v0.5fix11

    Posted

    Jan,

    Is it me or....................Murphy

     

    Toilet light there is NO listing at all of this rule?????

    Util.defTriggerVar("openVanBuitenDeurToilet",false)

    rule([[toilet.deur:breached =>
        || toilet.pir:safe >> openVanBuitenDeurToilet=true
        || toilet.pir:breached >> openVanBuitenDeurToilet=false
                ]])

    rule("openVanBuitenDeurToilet==true => print(MyTAG, 'greenyellow','deftrigger openVanBuitenDeurToilet true')")
    rule("openVanBuitenDeurToilet==false => print(MyTAG, 'greenyellow','deftrigger openVanBuitenDeurToilet false')")

    rule("openVanBuitenDeurToilet==true => toilet.spotToilet:on; post(#toiletBezet);  $Toilet='Bezet'; log('TRIGGER:%s',tjson(env.event)); print(MyTAG, 'aqua','#toiletBezet1 - post')")

    rule("openVanBuitenDeurToilet==false => toilet.spotToilet:off; post(#toiletVrij); $Toilet='Vrij'; log('TRIGGER:%s',tjson(env.event)); print(MyTAG, 'aqua','#toiletVrij2 - post')")

     

     

    [02.09.2020] [15:56:04] [DEBUG] [QUICKAPP540]: [true]>>'Rule:1[@{catch,05:00} => Util.checkForUpdates()]'
    [02.09.2020] [15:56:57] [DEBUG] [QUICKAPP540]: [true]>>'Rule:6[toilet.deur:breached => log('deur - open') ]'
    [02.09.2020] [15:56:57] [TRACE] [QUICKAPP540]: deur - open
    [02.09.2020] [15:56:57] [DEBUG] [QUICKAPP540]: [false]>>'Rule:7[toilet.deur:safe => log('deur - dicht') ]'
    [02.09.2020] [15:56:57] [DEBUG] [QUICKAPP540]: [true]>>'Rule:8[toilet.deur:breached =>...]'
    [02.09.2020] [15:56:57] [DEBUG] [QUICKAPP540]: [true]>>'Rule:4[toilet.pir:breached => log('pir - beweging') ]'
    [02.09.2020] [15:56:57] [TRACE] [QUICKAPP540]: pir - beweging
    [02.09.2020] [15:56:57] [DEBUG] [QUICKAPP540]: [false]>>'Rule:5[toilet.pir:safe => log('pir - veilig') ]'
    [02.09.2020] [15:56:59] [DEBUG] [QUICKAPP540]: [false]>>'Rule:6[toilet.deur:breached => log('deur - open') ]'
    [02.09.2020] [15:56:59] [DEBUG] [QUICKAPP540]: [true]>>'Rule:7[toilet.deur:safe => log('deur - dicht') ]'
    [02.09.2020] [15:56:59] [TRACE] [QUICKAPP540]: deur - dicht
    [02.09.2020] [15:56:59] [DEBUG] [QUICKAPP540]: [false]>>'Rule:8[toilet.deur:breached =>...]'

    Posted

    Jan,

     

    is  it me??I open 3 scenes and all show empty

    Please login or register to see this attachment.

    Posted
    48 minutes ago, jgab said:

    Sorry about that - function moved - fixed.

    Pushed v0.5fix11

    Thanks Jan

    Error still valid

     

     --Nodered.connect("http://12.10.79.152:1880/ER_HC3")
     --rule("Nodered.post({type='echo1',value='Hello'},true).value")
     --rule("Nodered.post({type='echo1',value=42})")
     --rule("#echo1 => log('ECHO:%s',env.event.value)")
     --rule("log('Synchronous call:%s',Nodered.post({type='echo1',value=42},true))")

    Please login or register to see this attachment.

    Please login or register to see this attachment.

  • Topic Author
  • Posted
    14 minutes ago, minsad79 said:

    Thanks Jan

    Error still valid

     

     --Nodered.connect("http://12.10.79.152:1880/ER_HC3")
     --rule("Nodered.post({type='echo1',value='Hello'},true).value")
     --rule("Nodered.post({type='echo1',value=42})")
     --rule("#echo1 => log('ECHO:%s',env.event.value)")
     --rule("log('Synchronous call:%s',Nodered.post({type='echo1',value=42},true))")

    Surprisingly hard bug to fix.

    ...but I think I got it now - pushed v0.5fix12

    ...and I have tried your Nodered code and it works

    Posted

    Jan,

    HC3 restarted, automativc repair, restore latest version>> hehe

    I see the rules again but the toilet is still NOT showing the deftrigger part.

    Any idea it was functioning this morning and now the whole first floor is in HC3, perhaps I will regret.

    Sorry to bother you now you  are very busy.

    Please advice,

    //Sjakie

    Posted

    Jan,

    The first error of 64 is Telegram

    Telegram.msg(TID,'%s = %s, %s',idname(id),id:armed & 'armed' | 'disarmed',id:safe & 'safe' | 'breached') end;
     
     Must I replace it with push message?
    //Sjakie
    Posted

    the second :

     

    Rule.eval([[#startDisarming & armFlag == 'arming' => 
        armFlag = 'disarming';
        log('violet','#doDisarming 45 sec delay - post'); cancel(aRef); aRef = post(#doDisarming,+/00:00:00)]]) 
     
    in Rule:6[#startDisarming & armFlag == 'arming' => ...]: {"msg":"Error executing instruction:'[\"cancel\",1]'","err":".\/include\/Toolbox_events.lua:103: Bad timer reference:nil","src":"Rule:6[#startDisarming & armFlag == 'arming' => ...]","ERR":true}
     
    //Sjakie
     
    Posted

    Hello,

    I'm trying to move my scenes / triggers from "StateWatcher" to "EventRunner4".

     

    rule ("trueFor (00: 01, motion:safe) & light1:on | trueFor (00: 01, motion:safe) & light2:on | trueFor (00:01, motion:safe) & light3:on => alllights:off ")

     

    1. Why does it make all the lights go on and off every minute?
    2. Why, if I turn on the light remotely (without appearing within the range of the motion sensor), the rule does not activate?

  • Topic Author
  • Posted

    Welcome! 

    Split it up in several rules. Having "or" | in the left hand side of the rule (the head) is not advised. Especially together with. trueFor....

     

    :on is the command to turn on. a light, :isOn is the check if a lights is on.

     

    I think what you want to say is that if the motion is safe for 1 minute and any of the lights are on turn off all lights - is that correct?

     

    rule("alllights = {light1,light2,light3}")                                                         -- setup variable with all lights

    rule("trueFor(00:01, motion:safe) & alllights:isOn => alllights:off")     --  :isOn for a list of lights is true if any lights is on.

     

    Is this what you want? Otherwise let me know and we fix it.

    Posted
    16 minut temu, jgab napisał:

    Welcome! 

    Split it up in several rules. Having "or" | in the left hand side of the rule (the head) is not advised. Especially together with. trueFor....

     

    :on is the command to turn on. a light, :isOn is the check if a lights is on.

    "isOn" was the KEY :)

     

    18 minut temu, jgab napisał:

    I think what you want to say is that if the motion is safe for 1 minute and any of the lights are on turn off all lights - is that correct?

    Yes that's correct.

     

    24 minuty temu, jgab napisał:

    rule("alllights = {light1,light2,light3}")                                                         

    rule("trueFor(00:01, motion:safe) & alllights:isOn => alllights:off")

    It works great now :) but with "or" in this case worked as well

    Posted

    1. Maybe this is a stupid question, but I don't see in the examples how to trigger a scene with a rule? Or maybe I can control the heating directly from "EventRunner4"?
    2. How to make the light turn off after 1 minute in such a rule?
    rule ("door: open & light: isOff & sunset..sunrise & (luxpp: lux <20) & motion: safe => light: on")

  • Topic Author
  • Posted
    13 minutes ago, michal85pl said:

    1. Maybe this is a stupid question, but I don't see in the examples how to trigger a scene with a rule? Or maybe I can control the heating directly from "EventRunner4"?

    2. How to make the light turn off after 1 minute in such a rule?
    rule ("door: open & light: isOff & sunset..sunrise & (luxpp: lux <20) & motion: safe => light: on")

     

    1. <sceneID>:start

    Please login or register to see this code.

    unfortunately we can't send parameters to scenes as we could on the HC2.

    I think you should be able to do all the heat control in ER4. What are the fibaro.calls etc that you. want to do?

    Btw. fibaro functions can be used in ER4 rules.

    rule("@sunset => fibaro.call(heaterID,.......)")

     

    2.  

    To test if a door is open use :breached (:open opens a shutter/blinds, same as fibaro.call(id,"open") )

    You write several rules. One that turn on. Another that watches for the condition when to turn off

    rule("door:breached & light: isOff & sunset..sunrise & luxpp: lux <20 & motion: safe => light:on")

    Ex.

    rule("trueFor(00:01,light:on & motion:safe) & sunset..sunrise  => light:off"). -- sometimes you don't want the extra conditions (ex.- sunset..sunrise) as you always want to turn off the light is there is no motion.

     

    Posted
    1 godzinę temu, jgab napisał:

    unfortunately we can't send parameters to scenes as we could on the HC2.

    I think you should be able to do all the heat control in ER4. What are the fibaro.calls etc that you. want to do?

    Btw. fibaro functions can be used in ER4 rules.

    rule("@sunset => fibaro.call(heaterID,.......)")

     

    1. I want to set heating shedule for "normal" operation when conditions are met (outside temp / closed windows / selected month range) or just start scene to do it when outside temp is below 15

    2. respectively if temp is higher than 15, set heating schedule to 4 degrees until canceled

    1 godzinę temu, jgab napisał:

    To test if a door is open use :breached (:open opens a shutter/blinds, same as fibaro.call(id,"open") )

     

    Yes, i know...my mistake, but for example, my door/window sensor reports on/off state instead safe/breached

     

    My idea is to create a delay effect like in the scene... the light is turned on (after meeting the conditions) and then turned off after 1 minute but regardless of all conditions

     

  • Topic Author
  • Posted
    5 hours ago, michal85pl said:

     

    1. I want to set heating shedule for "normal" operation when conditions are met (outside temp / closed windows / selected month range) or just start scene to do it when outside temp is below 15

    2. respectively if temp is higher than 15, set heating schedule to 4 degrees until canceled

     

    Yes, i know...my mistake, but for example, my door/window sensor reports on/off state instead safe/breached

     

    My idea is to create a delay effect like in the scene... the light is turned on (after meeting the conditions) and then turned off after 1 minute but regardless of all conditions

     

    1. Yes, you could add the fibaro calls to set the schedule in the action part of the rule. Just like you would have done in a scene. I don't have any heating devices so I don't know what the appropriate calls are. But testing on temp/month/closed windows etc is easily done in the rule head.

    2. yes see 1.

     

    :breached is an synonym for :isOn - just makes it easier to read the rule and understand that it concerns a sensors. (:safe is synonym for :isOff). I assume that fibaro.getValue(sensorID,"value") returns true/false ?

     

    To always turn off a light 1minute after it's turned on, no matter what

    rule("trueFor(00:01,light:isOn) => light:off")

    Posted (edited)

    Hello

    i have question, how to send push message to a specific user/phone ?

    this below sent messages to my phone in both cases:

      rule("@@00:01 => 73:msg=log('pushaaaaaaaa')")
      rule("@@00:01 => 20:msg=log('pushzzzzzzzzzz')")
     
    will be gratfull for any help
     

     

    Edited by domin12
  • Topic Author
  • Posted
    1 hour ago, domin12 said:

    Hello

    i have question, how to send push message to a specific user/phone ?

    this below sent messages to my phone in both cases:

      rule("@@00:01 => 73:msg=log('pushaaaaaaaa')")
      rule("@@00:01 => 20:msg=log('pushzzzzzzzzzz')")
    will be gratfull for any help

    I have to admit that I only used it with my own phone and that worked after a fix last week.

    You know that the id is the user id on the HC3 and not the phone id as it was on the HC2?

    Posted (edited)
    5 minut temu, jgab napisał:

    I have to admit that I only used it with my own phone and that worked after a fix last week.

    You know that the id is the user id on the HC3 and not the phone id as it was on the HC2?

     

    Yes, I know, I also tried with the phone id when the user id didn't work. It doesn't matter what I give as the ID (must be existing phone id or user id), always get this push message on my phone

    Edited by domin12
  • Topic Author
  • Posted
    6 minutes ago, domin12 said:

     

    Yes, I know, I also tried with the phone id when the user id didn't work. It doesn't matter what I give as the ID (must be existing phone id or user id), always get this push message on my phone

    Strange. What happens if you try to push using the fibaro api?

    -------------------

    fibaro.alert(alert_type, user_ids, notification_content)

    Send custom notification.

    • alert_type – one of the notification types: “email”, “sms” or “push”
    • user_ids – list of user identifiers to send the notification to
    • notification_content – content of the notification to send

    Examples:
    Send notification with “Test notification” content using email to users with id 2, 3 and 4.

     

    1
    fibaro.alert("push", {2,3,4}, "Test notification")

     

     

    Posted

    Hi Guys

     

    First attempt at using Event Runner. 

     

    Could someone let me know if the below makes sense or ive missed something? 

     

    Also do you need to set the parameters to use sunrise & sunset or is that something that is already set?

     

    dblight = 359
    dbfan = 362 
    dbhum = 599
    dblux = 598
    dbmotion = 397 
     
      Util.defvars(HT)
      Util.reverseMapDef(HT)
     
    rule("dbmotion:breached => 06:00..18:00 >> dblight:value=30, 18:00..6:00 >> dblight:value=70")
    rule("trueFor(00:01,dbmotion:safe) => dblight:off")

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