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



jgab

Recommended Posts

Hi @jgab

 

I see two now one more issues i my setup.

First i this error 

Please login or register to see this code.

 

for

Please login or register to see this code.

 

second - I dont see any pust messages on my phone anymore. is running on Beta FW - is syntax new or should i look somewhere else ? 

I'm still using User = 2

 

Please login or register to see this attachment.

 

Edited by ChristianSogaard
P
Link to comment
Share on other sites

1 hour ago, ChristianSogaard said:

Hi again

 

I see two more issues i my setup.

First i this error 

Please login or register to see this code.

 

for

Please login or register to see this code.

 

second - I dont see any pust messages on my phone anymore. is running on Beta FW - is syntax new or should i look somewhere else ? 

I'm still using User = 2

 

Please login or register to see this attachment.

 

not your username

Try it with your device ID

my notifications arrive well

Please login or register to see this image.

/monthly_2021_07/258682086_2021-07-19175521.png.a1fd0b39496beac91578c5e9f3e2c3d1.png" />

Edited by minsad79
  • Like 1
Link to comment
Share on other sites

13 minutes ago, minsad79 said:

not your username

Try it with your device ID

my notifications arrive well

Please login or register to see this link.

Thank you this works  - this is working. strange i need to change it from the user to the device

Edited by ChristianSogaard
P
Link to comment
Share on other sites

  • Topic Author
  • The alarm error is confirmed It happens when you disarm the whole house?

    Seems to be same problem as @Sjakie has.

    I'm looking into it.

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • Pushed v0.5fix69 that fixes the problem with disarming the whole house.

    • Thanks 1
    Link to comment
    Share on other sites

    Jan, hereby

    Please login or register to see this code.

    //Sjakie

    Yes if arm complete complex>> I dont use it often.

    I discoverd that it contained an error is fixed now so it can be used.

    Thanks,

    //Sjakie

    Link to comment
    Share on other sites

    Note:

    If I now arm / dis arm comlex result>>>NO error!!

    Thanks,

    //Sjakie

    @

    Please login or register to see this link.

    rd

    I am using device ID since months for push messages. Fibaro doest know what they do with pushmessages.

    //Sjakie

    • Thanks 1
    Link to comment
    Share on other sites

    Hi,

     

    Can You please tell me why from some time for this rule i got such an error?

     

    rule("trueFor(00:10,ruchpiwnica:safe) & drzwipiwnica:isOff & 3:alarm.armed == false => fibaro.alarm(3,'arm');log('Automatyczne uzbrojenie alarmu w piwnicy');again()").start()

     

    [21.07.2021] [23:09:37] [ERROR] [QUICKAPP453]: Error in 'trueFor(00:10,ruchpiwnica:safe) & drzwipiwnica:isOff & 3:alarm.armed == false => fibaro.alarm(3,'arm');log('Automatyczne uzbrojenie alarmu w piwnicy');again()': ./include/EventRunner.lua:2035: attempt to concatenate a nil value (upvalue 'pn')

    [21.07.2021] [23:09:37] [ERROR] [QUICKAPP453]: main() error:./include/EventRunner.lua:2346: Main() ERROR:./include/EventRunner.lua:2181: ./include/EventRunner.lua:2035: attempt to concatenate a nil value (upvalue 'pn')

    Link to comment
    Share on other sites

  • Topic Author
  • 9 hours ago, michal85pl said:

    Hi,

     

    Can You please tell me why from some time for this rule i got such an error?

     

    rule("trueFor(00:10,ruchpiwnica:safe) & drzwipiwnica:isOff & 3:alarm.armed == false => fibaro.alarm(3,'arm');log('Automatyczne uzbrojenie alarmu w piwnicy');again()").start()

     

    [21.07.2021] [23:09:37] [ERROR] [QUICKAPP453]: Error in 'trueFor(00:10,ruchpiwnica:safe) & drzwipiwnica:isOff & 3:alarm.armed == false => fibaro.alarm(3,'arm');log('Automatyczne uzbrojenie alarmu w piwnicy');again()': ./include/EventRunner.lua:2035: attempt to concatenate a nil value (upvalue 'pn')

    [21.07.2021] [23:09:37] [ERROR] [QUICKAPP453]: main() error:./include/EventRunner.lua:2346: Main() ERROR:./include/EventRunner.lua:2181: ./include/EventRunner.lua:2035: attempt to concatenate a nil value (upvalue 'pn')

    Well, it's actually a bug.

    I'm trying to make a trigger out of "3:alarm.armed" and fail. The reason is that <id>:alarm is not really meant to be used as a trigger. In any case I have fixed it in the next version so it doesn't generate an error.

    So what should you use?

     

    The below tests should be used an work as triggers. Note the semantic when applied to one partition and a list of partitions:


    <id>:armed return true if partition id is armed

    {<id1>,<id2>,...}:armed return true if any partitions in list is armed
    {<id1>,<id2>,...}:allArmed returns true if all partitions in list is armed
    <id>:disarmed return true if partition is disarmed
    {<id1>,<id2>,...}:disarmed return true if all partitions in list is disarmed
    {<id1>,<id2>,...}:anyDisarmed return true if any partition in list is disarmed
    <id>:alarmBreached return true if partition is breached
    {<id1>,<id2>,...}:alarmBreached return true if partition is breached
    <id>:alarmSafe return true if partition safe
    {<id1>,<id2>,...}:alarmSafe return true if all partitions in list is safe
    {<id1>,<id2>,...}:allAlarmBreached return true if all partitions in list is breached
    {<id1>,<id2>,...}:anyAlarmSafe returns true if any partition in list is safe
    <id>:willArm returns true if partitions will arm soon
    {<id1>,<id2>,...}:willArm returns true if any partition in list will arm soon
    {<id1>,<id2>,...}:allWillArm returns true if all partitions will arm soon

     

    Also there are some actions (can not be used as rule triggers)

    <id>:alarm=true  arm partition

    <id>:armed=true  arm partition, same as previous

    <id>:alarm=false  disarm partition

    <id>:armed=false disarm partition, same as previous

    <id>:alarm=watch start to watch alarm being activated - will generate 'willArm' events

    <id>:alarm=unwatch start to watch alarm being activated - will generate 'willArm' events

     

    So your rule should be written

     

    rule("trueFor(00:10,ruchpiwnica:safe) & drzwipiwnica:isOff & 3:armed==false => 3:armed=true;  log('Automatyczne uzbrojenie alarmu w piwnicy');again()").start()

     

    Note that you can also use just 3:disarmed instead of 3:armed==false

    Edited by jgab
    • Thanks 1
    Link to comment
    Share on other sites

    Jan, is there a possibility that if I use  trueFor(00:00:30,......) it can count  down in debug the seconds?

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 12 minutes ago, Sjakie said:

    Jan, is there a possibility that if I use  trueFor(00:00:30,......) it can count  down in debug the seconds?

    //Sjakie

    No, that's not how trueFor works. The rule is only called when the expression changes value or when the time is up. There is no second timer ticking.

    Link to comment
    Share on other sites

    Ok, thanks.

    Can it be done with wait? To see a count down in debug?

    //Sjakie

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • It depends on how you want to use it. together with trueFor it's difficult as it can restart if condition becomes false.

     

    Just creating a timer is easy

    Ex.

    rule([[#countDown{val='$val>0'} & !stopCountDown => log('Count down %s',val); post(#countDown{val=val-1},1) end

            ]])

     

    Ex. rule("wait(2); stopCountDown=false; post(#countDown{val=10})") -- Start count down

    Ex. rule("wait(5); stopCountDown=true") -- Stop count down early

    Link to comment
    Share on other sites

    Jan, thanks but I will forget it because trueFor is the best option.

    I have an error in setting Sonos parser error and illegal assignement

    Please login or register to see this code.

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 42 minutes ago, Sjakie said:

    Jan, thanks but I will forget it because trueFor is the best option.

    I have an error in setting Sonos parser error and illegal assignement

    Please login or register to see this code.

    //Sjakie

     

    Well, I had another look at the trueFor code and I think I found a way to do it.

    I pushed fix71 with the new feature.

    In short it works like this

    Please login or register to see this code.

    If you save the rule in a global lua variable ('r' in this example) you can define an event trigger

    #trueFor{rule=r} => ...

    that will trigger whenever the rule's trueFor start watching the expression, stops, and expires.

    Every time the trueFor expression becomes true it will start to watch the expression for the given time.

    If the expression turns false before time expired it will stop

    If the expression is true for the given time it will 'expire' and run the action.

    The #trueFor event will fire when it starts, stops, and expires.

    The expire event will look like

    #trueFor{rule=r,stop=true,expired=true} so you can test on either stop or expired.

    You can try the example above to get a feel for how it works.

     

    Ex. here is a rule to count down while the trueFor is true...

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    Jan, I am doing it wrong I dont see nothing in debug

    I have fix 71

    create GV standard variable r value

    Please login or register to see this code.

    Please advice

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Jan, I am doing it wrong I dont see nothing in debug

    I have fix 71

    create GV standard variable r value

    Please login or register to see this code.

    Please advice

    //Sjakie

     

    Please login or register to see this code.

    r should be a Lua global

    Link to comment
    Share on other sites

    • 2 weeks later...

    Jan, my QA location was on fix 64, after update fix71 I get parser error.

    Please login or register to see this code.

    Please advise,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Please login or register to see this code.

     

    ?

    Link to comment
    Share on other sites

    Jan, thanks!

     

    Please login or register to see this code.

    this rule gives wrong debug, should be partition 26

    Please login or register to see this attachment.

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