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

Jan,

I had this rule

  Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee')").start()>>>error

Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee')") >>>no error but also no log

Please advice

Link to comment
Share on other sites

  • Topic Author
  • 10 minutes ago, Sjakie said:

    Jan,

    I had this rule

      Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee')").start()>>>error

     Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee')") >>>no error but also no log

    Please advice

    This should work "Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee')").start()"

    What kind of error do you get?

    Link to comment
    Share on other sites

    Jan, unfinished string

     

     

    Rule.eval("$StookSeizoen=='Nee' => log('Stookseizoen Nee').start() >>>attempt to index a nil value

    Link to comment
    Share on other sites

    Hi Jan,

    Am I do it right?

    In HT:

    hueMap={ [12278]='ambitvlight',[12281]='lampplafondklokzijde'

     

    also in

    woonkamer={ambitvlight=12278,lampplafondklokzijde=12281,

     

    and in scene where HUE is used:

    Hue.define("ambitvlight", nil, 12278)
    Hue.define("lampplafondklokzijde", nil, 12281)

     

    Is this to combine? I guess I can delete the HUE out the woonkamer?

    Please advice

     

     

    Link to comment
    Share on other sites

    this logic seems that have been changed also

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 33 minutes ago, jompa68 said:

    this logic seems that have been changed also

    Please login or register to see this code.

     

     

    Fixed, bug in parser. pushed B11.

    Link to comment
    Share on other sites

    Tested from your post

     

    rule("log('Echo returns '%s',nodered(#echo{test='Hello'},true).data.test))")

    Got

    tokenizer failed at '},true).data.test)

     

    Also in V.2 B66 I had

    rule([[@@00:01 => remote(_myNodeRed,#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windhastighet); c= $windriktning; d=tonumber($regn); remote(_myNodeRed,#egetwetter{yttertemp=a, vindstyrka=b, vindriktning=c, regn=d})]])
     rule("#wetter =>   moln=env.event.data.clouds")

    I changed it to   

     rule("@@00:01 => nodered(#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windhastighet); c= $windriktning; d=tonumber($regn)")
     rule("@@00:01 => nodered(#egetwetter{data=yttertemp=a, vindstyrka=b, vindriktning=c, regn=d}")

     

    Wed/Jul/31,12:16:30:[10:1] Rule:6[@@00:01 => nodered(#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windha...] = "OK"

    but then it stops. 

    And how do I get back 'moln=env.event.data.clouds' from NodeRed?

    Link to comment
    Share on other sites

    nope, still error

     

    Please login or register to see this image.

    /monthly_2019_07/1927847980_Skrmavbild2019-07-31kl_12_20_31.png.80885f14cf27e029b826fccc8a227cd4.png" />

    Link to comment
    Share on other sites

  • Topic Author
  • 19 minutes ago, FrankT said:

    Tested from your post

     

    rule("log('Echo returns '%s',nodered(#echo{test='Hello'},true).data.test))")

    Got

    tokenizer failed at '},true).data.test)

     

    Also in V.2 B66 I had

    rule([[@@00:01 => remote(_myNodeRed,#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windhastighet); c= $windriktning; d=tonumber($regn); remote(_myNodeRed,#egetwetter{yttertemp=a, vindstyrka=b, vindriktning=c, regn=d})]])
     rule("#wetter =>   moln=env.event.data.clouds")

    I changed it to   

     rule("@@00:01 => nodered(#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windhastighet); c= $windriktning; d=tonumber($regn)")
     rule("@@00:01 => nodered(#egetwetter{data=yttertemp=a, vindstyrka=b, vindriktning=c, regn=d}")

     

    Wed/Jul/31,12:16:30:[10:1] Rule:6[@@00:01 => nodered(#wetter{}); a=tonumber($yttertemperatur); b= tonumber($windha...] = "OK"

    but then it stops. 

    And how do I get back 'moln=env.event.data.clouds' from NodeRed?

    Sorry, the rule was not grammatically correct. strings were wrong.

    Please login or register to see this code.

    The new rule you could do

    Please login or register to see this code.

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 33 minutes ago, jompa68 said:

    nope, still error

     

    Please login or register to see this link.

     

    It looks like _defaultNodeRed is nil in the remote call at the end ?

    Please login or register to see this code.

     

    1 hour ago, Sjakie said:

    Hi Jan,

    Am I do it right?

    In HT:

    hueMap={ [12278]='ambitvlight',[12281]='lampplafondklokzijde'

     

    also in

    woonkamer={ambitvlight=12278,lampplafondklokzijde=12281,

     

    and in scene where HUE is used:

    Hue.define("ambitvlight", nil, 12278)
    Hue.define("lampplafondklokzijde", nil, 12281)

     

    Is this to combine? I guess I can delete the HUE out the woonkamer?

    Please advice

     

     

    No keep in woonkamer because you want to address the light as woonkamer.ambitvlight in your rules.

    If you have the hueMap you can make all the Hue.defines in a loop

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    10 minutes ago, jgab said:

     

    It looks like _defaultNodeRed is nil in the remote call at the end ?

    Please login or register to see this code.

     

    Is the logic changed on postRemote to NR? i have not change anything in NR

    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, jompa68 said:

    Is the logic changed on postRemote to NR? i have not change anything in NR

    No, only changed name from _myNodeRed to _defaultNodeRed

    Have you set up _defaultNodeRed in the beginning?

    Link to comment
    Share on other sites

    Guys, what it means ? 

    [DEBUG] 13:15:29: Error in '185:manual == 0 =>||$roletakuchnia =='1'>> log('Closing');VD.SterowanieRoletami:btn=6': /opt/fibaro/scenes/392.lua:2002: no triggers found in header
    forgot add the rule :

    rule("185:manual == 0 =>||$roletakuchnia =='1'>> log('Closing');VD.SterowanieRoletami:btn=6")

    Edited by domin12
    Link to comment
    Share on other sites

    6 minutes ago, jgab said:

    No, only changed name from _myNodeRed to _defaultNodeRed

    Have you set up _defaultNodeRed in the beginning?

    yes i have.

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, jompa68 said:

    yes i have.

    Try B12 I just posted.

    Link to comment
    Share on other sites

    Please login or register to see this image.

    /monthly_2019_07/image.png.8e490048c281258fcee8204c87d6ef40.png" />

    Link to comment
    Share on other sites

  • Topic Author
  • 6 minutes ago, domin12 said:

    Guys, what it means ? 

    [DEBUG] 13:15:29: Error in '185:manual == 0 =>||$roletakuchnia =='1'>> log('Closing');VD.SterowanieRoletami:btn=6': /opt/fibaro/scenes/392.lua:2002: no triggers found in header
    forgot add the rule :

    rule("185:manual == 0 =>||$roletakuchnia =='1'>> log('Closing');VD.SterowanieRoletami:btn=6")

     

    It means I forgot to add 'manual' to the list of triggers ?- I fixed it and pushed B13.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, jompa68 said:

    Please login or register to see this link.

     

    So, somehow you give nil as first argument to remote(<arg>,<event>) 

    Rule 3 looks like below? (Mona/Johnny)

    Please login or register to see this code.

    then it's something strange with '_defaultNodeRed'

    Can you try to log it?

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Jan ,

    there is no function called _copy any longer ? 

    how could i change this function to get proper working :

    Please login or register to see this code.

     

    Edited by domin12
    Link to comment
    Share on other sites

    Please login or register to see this image.

    /monthly_2019_07/470882230_Skrmavbild2019-07-31kl_13_39_38.png.bfd26355434eb27441887879f3e5bdca.png" />

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