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

Posted

@jgab

in newest version there is error:

Please login or register to see this code.

 

  • Topic Author
  • Posted
    3 minutes ago, petrkl12 said:

    @jgab

    in newest version there is error:

    Please login or register to see this code.

     

    How does the header look like?

    Posted
    1 minute ago, jgab said:

    How does the header look like?

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    3 minutes ago, petrkl12 said:

    Please login or register to see this code.

     

    ...and it happens to me too -but not every run! Very interesting!

  • Topic Author
  • Posted
    51 minutes ago, jgab said:

    ...and it happens to me too -but not every run! Very interesting!

    Fixed in v0.175 - not very interesting just a stupid cache bug in my code,

    Posted
    36 minutes ago, jgab said:

    Fixed in v0.175 - not very interesting just a stupid cache bug in my code,

    Error is not there but QA hue is not starting - 

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    2 hours ago, petrkl12 said:

    Error is not there but QA hue is not starting - 

    Please login or register to see this code.

     

    Another bug squashed, v 0.177

    You can turn on your 'GlobalLogs'  to see how far it gets.

    You can also add some debug flags to see what's going on

    Please login or register to see this code.

     

    Posted
    55 minutes ago, jgab said:

    Another bug squashed, v 0.177

    You can turn on your 'GlobalLogs'  to see how far it gets.

    You can also add some debug flags to see what's going on

    Please login or register to see this code.

     

    hmm it still doesn't work ... In your enviroment QA Hue is working?

  • Topic Author
  • Posted
    9 minutes ago, petrkl12 said:

    hmm it still doesn't work ... In your enviroment QA Hue is working?

    Yes it runs very well. Both from the Lua files you provided me and directly by downloading the fqa from the HC3

    Where does it stop if you turn on your GlobalLogs and 

    Please login or register to see this code.

    ?

    Posted
    2 minutes ago, jgab said:

    Yes it runs very well. Both from the Lua files you provided me and directly by downloading the fqa from the HC3

    Where does it stop if you turn on your GlobalLogs and 

     

    Please login or register to see this code.

    ?

    it never stoped :) 

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    26 minutes ago, petrkl12 said:

    it never stoped :) 

     

    The log is a bit noisy.

    If you do

        hc3_emulator.debug = {http=true, api=true, timersSched=false, trigger=false}

    and run.

    For me it takes 10s for the first startup sequence (you do a wait for 10s).

    Then it takes another 25s until it goes into a loop polling,sensors groups, and lights.

     

    I can see in you logs that the last of interest that happened is

    Please login or register to see this code.

     

    When I run that log is the one before:

    Please login or register to see this code.

     

    after that it goes into a loop polling,sensors groups, and lights.

    That last HueSwitchStandard download runs some 3s after the HueLightSensorStandard download for me.

    Unfortunately you cut it 2s afterwards. 

     

    Btw. The QA that sends the TICK event you should get rid of - I know I used it in the past but it's not necessary anymore when poling for triggers,

    Posted
    19 minutes ago, jgab said:

    The log is a bit noisy.

    If you do

        hc3_emulator.debug = {http=true, api=true, timersSched=false, trigger=false}

    and run.

    For me it takes 10s for the first startup sequence (you do a wait for 10s).

    Then it takes another 25s until it goes into a loop polling,sensors groups, and lights.

     

    new log

    Please login or register to see this code.

     

    20 minutes ago, jgab said:

    Btw. The QA that sends the TICK event you should get rid of - I know I used it in the past but it's not necessary anymore when poling for triggers,

    this is from your ER4 - how to stop it? I thought that I have latest version ...

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

    new log

    Please login or register to see this code.

     

    This is my log. After it downloads SwitchStandard it goes into a loop polling the hub. (and logs httpRequest...)

    If you set GlobalLogs=true in your QA do you see if the download of the SwitchStandard succeeds

     

    13 minutes ago, petrkl12 said:

    this is from your ER4 - how to stop it? I thought that I have latest version ...

    Yes, later version (if you enable online patching) don't send TICKS

    Posted (edited)

    I know where is problem:

      local ll=self:getVariable("Logs")

     

    it returrns ="" but I have in local variables value "Yes" from hc3_emulator.resources = {UI = 523, quickVars = 523}
     

    Please login or register to see this code.

     

    Edited by petrkl12
  • Topic Author
  • Posted

    Just pushed v.181 to GitHub of

    Please login or register to see this link.

     

    It tries to be backward compatible with the old model of invoking the emulator - but it also supports loading several QAs and run them in parallell.

     

    It's starting to come together. I just run

    • GEA 7.20
    • Sonos Zone Player 1.3.8
    • EventRunner4 v0.5fix46
    • HueMain.fqa 2.55

    At the same time...and they run quickly - faster then the HC3. On the other hand I have a MacBook Pro ;-)

    They are all pretty demanding QAs so that was the reason to try them out all at once.

     

    Please login or register to see this code.

    Some unpacked, and some directly from the .fqa. There is the possibility to injects arguments like quickVars or name or id  before launching QAs.

     

    There is also some decent support for Scenes and conditions.

    • Like 2
    Posted

    @jgab

    Thanks for new SDK version

    Hue Main is starting up to 100% and than it should start to compare values from Hue bridges but there is only a lot of timers.

    Can be problem that settimeout is working differently than in fibaro?

    Please login or register to see this code.

     

  • Topic Author
  • Posted

    I really try to mimic the HC3 timer behaviour so lets see if its something else.

    Are you running the latest v.182? 

    You can set emulator.debug = { timersWarn = 0.750 } to make it only warn if timers are later then 700ms. Default now is .500s

    You seem to have a similar repeating behaviour. Ex. 

    Please login or register to see this code.

    They are all happening during the same second 12:38:36, and they are all ~700ms late - however that's not a big worry in itself. (the one on line 252 seems to start the sequence)

    The setTimeout called at QA_Hue_F_HueInfo.lua,line:1066 is responsible for 6 of the timers each second. Are they polling the Hue hub or other QAs? 

    Does it scale or will you poll more stuff each second for more lights or hubs?

    I would also set a breakpoint in 1066 inside the scheduled function and see if it does what's expected with the result.

     

    Posted

    It works now,

    newest version helped

    thanks

     

    Posted (edited)

    How to stop these timers debug info at all?

    [33mWARN [0m|: Late timer:0.129s [32m<Timer:0182 fun:01693430 exp:16:57:53:408>[0m

     

    Edited by petrkl12
  • Topic Author
  • Posted
    23 minutes ago, petrkl12 said:

    How to stop these timers debug info at all?

    [33mWARN [0m|: Late timer:0.129s [32m<Timer:0182 fun:01693430 exp:16:57:53:408>[0m

     

     

    hc3_emulator.debug.timersWarn = false.

    You can change it at runtime with

    if _debugFlags then _debigFlags.timersWarn = true end

    Please login or register to see this code.

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