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

@jgab i got Error: socket hang up in NR when it tries to connect to ZBS. Ip and port is right

how can i set ZBS to run only "live" and not speedtime?

Edited by jompa68
Link to comment
Share on other sites

  • Topic Author
  • In the beginning of main(). Set _System.speed(false) or comment it out

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • Pushed v3 B23

    -Problem parsing array refs. Ex "a.b[1].c" created error. Fixed.

    -nodered() had problem since _NODEREDTIMEOUT was declared local and turned out to be nil - so nodered() timed out immediately . Fixed.

     

    Link to comment
    Share on other sites

    Hello Jan,

    Hue is again a problem

    See below Fibaro call

    only eetkamer (not hue) and hue woonkamer.plafondklokzijde  are switched on.

    Did you already the nil value included in an update?

    Thanks for your support

     

    Please login or register to see this image.

    /monthly_2019_08/image.png.9135aced84e7bd19207420a72576a6ce.png" />

    and the scene restarts very frequent

    Link to comment
    Share on other sites

  • Topic Author
  • 7 hours ago, Sjakie said:

    Hello Jan,

    Hue is again a problem

    See below Fibaro call

    only eetkamer (not hue) and hue woonkamer.plafondklokzijde  are switched on.

    Did you already the nil value included in an update?

    Thanks for your support

     

    Please login or register to see this link.

    and the scene restarts very frequent

     

    The fibaro:calls to switch them on is logged (21:51:02) and they are not nil (because then you wouldn't see the names of the variables in the call).

    I wonder if the Hue bridge have issues with rapid commands ? 

    I tried with my Hue lights (only 3) but I can call them in the same command without problem.

    What you can do is set _debugFlags.hue=true and you get logs when the Hue bridge is called. That way we can determine if the commands are sent to the Hue bridge.

    Link to comment
    Share on other sites

    @jgab Thanks for new features in v3 !

     

    I have issue with following:

     

      rule("@{03:20,catch} => Util.checkVersion()") -- Check for new version every morning at 3:20
      rule("#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))")
     

    error in ZBS:

     Error in '#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))': EventRunnerTimers.lua:1288: Parser error char 83 (')') in expression '#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))' (EventRunnerTimers.lua:1031: attempt to index a nil value)

     

    Line 1286:    --for i,v in ipairs(tokens.stream) do print(v.type, v.value, v.from, v.to) end
    Line 1287:    local stat,res = pcall(function() return self.postParse(gRule(tokens)) end)
    Line 1288:>>>    if not stat then local t=tokens.last() error(string.format("Parser error char %s ('%s') in expression '%s' (%s)",t.from+1,str:sub(t.from+1,t.to),str,res)) end
    Line 1289:    return res
    Line 1290:  end

     

    Link to comment
    Share on other sites

    I found reason: ')'

     

    so you could correct it also in your v3 example

     

      --rule("@{06:00,catch} => Util.checkVersion()") -- Check for new version every morning at 6:00
      --rule("#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))")
     

    Edited by petrkl12
    Link to comment
    Share on other sites

  • Topic Author
  • 8 minutes ago, petrkl12 said:

    @jgab Thanks for new features in v3 !

     

    I have issue with following:

     

      rule("@{03:20,catch} => Util.checkVersion()") -- Check for new version every morning at 3:20
      rule("#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))")
     

    error in ZBS:

     Error in '#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))': EventRunnerTimers.lua:1288: Parser error char 83 (')') in expression '#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix))' (EventRunnerTimers.lua:1031: attempt to index a nil value)

     

    Line 1286:    --for i,v in ipairs(tokens.stream) do print(v.type, v.value, v.from, v.to) end
    Line 1287:    local stat,res = pcall(function() return self.postParse(gRule(tokens)) end)
    Line 1288:>>>    if not stat then local t=tokens.last() error(string.format("Parser error char %s ('%s') in expression '%s' (%s)",t.from+1,str:sub(t.from+1,t.to),str,res)) end
    Line 1289:    return res
    Line 1290:  end

     

     

    Sorry, an extra parenthesis snuck in at the end of the expression (after "event.fix)"

    Please login or register to see this code.

    Oops, you were faster than me :-) 

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • Pushed v3 B24

    -minor fixes.

    -"Autorescheduling" of daily timers ("dailys") are back.

    Ex.

    Please login or register to see this code.

    We schedule for 00:00, 09:00, and 10:00

    tomorrow at 06:00 we set $Test to 08:00 that will trigger a reschedule of the rule and it will run at 08:00 and 10:00 already tomorrow,

    In the old model dailys were only scheduled at midnight so the new time 08:00 would not take affect until the day after tomorrow.

    Small detail but I believe the rules will behave more "intuitively" these ways.

    Link to comment
    Share on other sites

    @jgab this gives wrong value in V3

    Please login or register to see this code.

    was it os.date? and midnight is now also changed?

    Link to comment
    Share on other sites

  • Topic Author
  • 7 minutes ago, jompa68 said:

    @jgab this gives wrong value in V3

    Please login or register to see this code.

    was it os.date? and midnight is now also changed?

     

    No they haven't changed - you get an error?

    3 minutes ago, jgab said:

     

    No they haven't changed - you get an error?

     

    Btw, you don't need time() now for globals as the value is auto converted to a seconds

    Please login or register to see this code.

    Maybe we should have a builtin HM(t) function that makes osdate('%H:%M',midnight+t)

    Edited by jgab
    Link to comment
    Share on other sites

    in ZBS the time looks weird.

    Please login or register to see this code.

    Please login or register to see this code.

     

    and when time is ended it give this error

    Please login or register to see this code.

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 15 minutes ago, jompa68 said:

    in ZBS the time looks weird.

    Please login or register to see this code.

    Please login or register to see this code.

     

     

    Yes, it's the auto conversion thing. If the global contains a time string like "00:04", $global will return that in seconds -> 240.

    Please login or register to see this code.

    "$coffeeTimer -= 60" is the same as "$coffeeTimer = $coffeeTimer - 60"

    I think you can avoid _kick with the .start() option.

    Oh, if you use $coffeeTimer in a VD you have seconds and need to convert it to H:M for display.

    Edited by jgab
    Link to comment
    Share on other sites

    Hello @jgab

    Found another error in my ER , could You look at it on free time , thanks

     

    Debug:

    Please login or register to see this code.

    This is VD 1053

    Please login or register to see this image.

    /monthly_2019_08/image.png.3a8e9b9160e02d77142f0be49abb9808.png" />

     

    ER 2144 line :

    image.png.2862fad0a408e0e1cb55a1912bd4dbe5.png

     

    ER 976 line :

    image.png.633f88ab4b83a428a8f22f50eab14a2d.png

    Link to comment
    Share on other sites

  • Topic Author
  • 12 minutes ago, domin12 said:

    Hello @jgab

    Found another error in my ER , could You look at it on free time , thanks

     

    Debug:

    Please login or register to see this code.

     

     

    Fixed in v3 B25. I'm a bit more strict what actions are allowed on deviceIDs and I take the actions from the deviceID structure where Fibaro lists available actions.

    For VDs, only "setSlider" and "setLabel" were listed. not 'setProperty'. Oh well, I allow 'setProperty' per default now.

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

    @jgab not good. It stills same error like above in some co function and timer steps over 24h and starts counting from that

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 11 minutes ago, jompa68 said:

    @jgab not good. It stills same error like above in some co function and timer steps over 24h and starts counting from that

     

     

    What a mess!

    Why "fibaro:get(Kok.kafferyggaren,"value")="true",1564026080"

    Seems like Kok.kafferyggaren is set to 'true' and not a deviceID ? sorry read wrong.

    I creates an error inside the 'trueFor' that is ugly - I will add a better way to capture errors there.

    Edited by jgab
    Link to comment
    Share on other sites

    What is wrong with this publish rule? 

    Please login or register to see this code.

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 9 minutes ago, jompa68 said:

    What is wrong with this publish rule? 

    Please login or register to see this code.

    Please login or register to see this code.

     

     

    That rule doesn't seem to have anything to do with the error. Can you show more of the rules?

    I'm working on the coffee machine...

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