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

    Sorry it was't zero but Zero in the way of empty value.

    Can you post the rule with the "empty value" that caused the error for you? 

    It seems to be a non-obvious error... and I get no clue from @systemfel's rule.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, systemfel said:

    i think ther  is a problem whit the timers  This has workt before 

     

    ---- Tänder inte belysningen om det är mer än 18 lux 
    rule([[$Rum2_Dorr=='Open' & Rorelse_Rum2:breached & Lux_rum2:lux > 18 & $Rum2_auto_Tak=='Automatisk' & $Styrning=='On' => 
    log('Variabel Tak är Close Rum2 '); $Rum2_Dorr='Close';
    wait(00:00:03); log('Cassandra är nu Hemma'); $Cassandra='Hemma'
    log('Tänder inte belysningen i Rum2 Lux värdet är %s',Lux_rum2:lux)');
    ]])
     
     
    error 
    [2022-11-20] [15:06:11] [ERROR] [QUICKAPP936]: in Rule:240[$Rum2_Dorr=='Open' & Rorelse_Rum2:safe & $Rum2_auto_Tak=='Automatisk' & $Styrning=='On' => ...]: ./include/EventRunner.lua:1781: ./include/EventRunner.lua:1143: attempt to index a nil value (field 'timers')

    What version are you running?

    Link to comment
    Share on other sites

    I have the same problém (ER4 v0.92)

     

    rule("HT.Venku_Vchod.PIR12V2SchodyVchodV:breached & (sunset-01:00..23:35) & HT.Venku_Garaz.Garazvenku:isOff & HT.Venku_Vychod.VYCHOD_1_Osvit:value<20 => log('HUE světla před vraty garáží budou zapnuty v době (sunset..23:35) po dobu 2 minut.', HT.Venku_Garaz.Garazvenku:value=90,HT.Venku_Garaz.Garazvenku:isOn, wait(00:02); HT.Venku_Garaz.Garazvenku:last>=00:02, HT.Venku_Garaz.Garazvenku:off)")

     

    This bug occurred in v0.92

     

    Error:

    in Rule:242[HT.Venku_Vchod.PIR12V2SchodyVchodV:breached & (sunset-01:00..23:35) & HT.Venku_G...]: ./include/EventRunner.lua:1781: ./include/EventRunner.lua:1143: attempt to index a nil value (field 'timers')

    ./include/EventRunner.lua:1137: attempt to index a nil value (field 'timers')

    Link to comment
    Share on other sites

    I want to point my ptz camera to a specific position when a motion sensor is breached. This is the rule I use:

     

    Please login or register to see this code.

    It doesn't sent the url to the camera when breached. the log doesn't has an error, instead ig returns:
     

    [false]>>'Rule:4[motion:breached => http.get('http://192.168.1.108/cgi-bin/ptz....]'

     

    The url works fine if I paste it into a browser.

     

    Where am I going wrong??

    Link to comment
    Share on other sites

    Jan, I hve had 2 rules with error

    Please login or register to see this code.

    This rule for other week number are running 10 weeks without any error but today it show error. One of the GV's was empty.

    Second same error but I can't remember which rule exactly.

     

    Please login or register to see this code.

    Regretley I created  later a backup so I can't see it anymore.

     

    Jan I can do a roll back 2 days to see if error is there also present? I need to save 6 QA's text before to do, just let me know.

    Edited by Sjakie
    add second rule
    Link to comment
    Share on other sites

    Please login or register to see this code.

    Jan,

    rule error:

    Please login or register to see this code.

    The post is executing if I do separately without any error

    Please login or register to see this code.

    Please login or register to see this code.

    I tried a few things but I can't resolve this error

    Edited by Sjakie
    removed one rule
    Link to comment
    Share on other sites

    Good morning. Ian, tell me what kind of error it is? It happened after the controller crashed...

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    Tokenizer failed you have some invisible character(s) in that rule.

    Also possible if you use rule("      and you have spaces in

    Post your rule?

     

     

     

    Edited by Sjakie
    Link to comment
    Share on other sites

  • Topic Author
  • 57 minutes ago, fastvd said:

    Good morning. Ian, tell me what kind of error it is? It happened after the controller crashed...

     

    Please login or register to see this attachment.

    It seems to be some invisible characters. The error comes from ER don't understanding the "words" of your rules. That is usually when invisible chars snuck into the code.

    I will see if I can come up with some mechanism to kill automatically...

    • Like 1
    Link to comment
    Share on other sites

    1 minute ago, jgab said:

    It seems to be some invisible characters. The error comes from ER don't understanding the "words" of your rules. That is usually when invisible chars snuck into the code.

    I will see if I can come up with some mechanism to kill automatically...

    You once created this scene for me, for similary issue

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Please login or register to see this code.

    Jan,

     

     

    Good news, I fixed the timers error in 0.94.

    The bad news is that I have fixed a lot of other things in ER4+fibaroExtra that could have introduced new bugs.

    Try v0.94 and let me know.

    /J

    2 minutes ago, ChristianSogaard said:

    You once created this scene for me, for similary issue

    Please login or register to see this code.

     

    Yes, and I will incorporate that in my rule parser.

    Link to comment
    Share on other sites

  • Topic Author
  • 16 hours ago, emielstroeve said:

    I want to point my ptz camera to a specific position when a motion sensor is breached. This is the rule I use:

     

    Please login or register to see this code.

    It doesn't sent the url to the camera when breached. the log doesn't has an error, instead ig returns:
     

    [false]>>'Rule:4[motion:breached => http.get('http://192.168.1.108/cgi-bin/ptz....]'

     

    The url works fine if I paste it into a browser.

     

    Where am I going wrong??

    The log you show says [fals] and that is when the rule is triggered but the test (motion:breached) is false, 

    so this log is from when the sensor turns safe - and then the action (http.get) should not run.

    Try just

    Please login or register to see this code.

    to see if the call is done.

    Just now, jgab said:

    The log you show says [fals] and that is when the rule is triggered but the test (motion:breached) is false, 

    so this log is from when the sensor turns safe - and then the action (http.get) should not run.

    Try just

    Please login or register to see this code.

    to see if the call is done.

    I'm also wondering if you need some credentials (logins) to call this url? The browser can remember previous credentials you typed into the browser.

    Link to comment
    Share on other sites

    thanks, but doesn't work either... I do need a user:password in the url, perhaps that's a problem? 

     

    this is the rule:

    Please login or register to see this code.

     

    http.get('http://user:[email protected]/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=3&arg3=0&arg4=0') = {"data":"","headers":{"CONTENT-LENGTH":"0","Connection":"close","Set-Cookie":"secure; HttpOnly","WWW-Authenticate":"Digest realm="Login to 10ea14149c49d01cf364a5a205d22ae7", qop="auth", nonce="440765063", opaque="c466d6f16664c0a02e7ac17b9392dfaa9df52326""},"status":401}

    Link to comment
    Share on other sites

  • Topic Author
  • Try

    Please login or register to see this code.

    where you replace <user> and <pwd> with the correct credentials

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, jgab said:

    Try

    Please login or register to see this code.

    where you replace <user> and <pwd> with the correct credentials

    Sorry, and remove user:password from the url

    rule("http.get('http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=3&arg3=0&arg4=0',{user=<user>,pwd=<pwd>})")

    Link to comment
    Share on other sites

    no difference.... still the status=401, even if I remove credentials in the beginning of the rule.

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • Is it an https? browser usually auto upgrades to https.

    Please login or register to see this code.

     

    It also seems to be a WWW-Authenticate model. 

    I'm not familiar with that. It seems to be some challenge/response model. Maybe someone else in the forum knows?

    Link to comment
    Share on other sites

    Jan, is it possible to have a kind of auto update button on your QA updater.

    If press button he will update all relevant QA's.

    In case it goes wrong we can go back to the last working version.

    Than it will be a very user friendly Updater.

    Thanks in advance

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