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


  • 0

Sensibo Quick App stops running


Weider

Question

I have very little knowledge about QAs, so I might be wrong but...

 

So I've downloaded the Sensibo Quick App from the market place and have noticed it stops running after a while. I have to restart HC3 or reinstall the quick app. 

I don't think it's the issue is in the quick app code, but something in HC3 that just stops the main loop.

 

Anyone using this quick app that might have a solution or some insight on how to solve the issue? The developer is non-responsive on the market place and I don't know any other way to contact him.

 

Edited by Weider
Added outro
Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • 5 hours ago, SmartHomeEddy said:

    Someone in this post contacted them

     

     

     

    That's the newest version, and the one I'm using that has problems. 

    Link to comment
    Share on other sites

    • 0
    37 minutes ago, Weider said:

    That's the newest version, and the one I'm using that has problems. 


    isn’t it possible to switch to the newer version? 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 hours ago, SmartHomeEddy said:


    isn’t it possible to switch to the newer version? 

    I might have written that a bit awkward. I already have the newest version. It has problems with the following error from log:


     

    Please login or register to see this code.

     

    I also noticed if I just click the "Edit" button in the Quick app "Edit & preview" it starts working again right away which is really strange. Like it wakes up.

     

    Please login or register to see this attachment.

    Edited by Weider
    Link to comment
    Share on other sites

    • 0
    16 hours ago, Weider said:

    I also noticed if I just click the "Edit" button in the Quick app "Edit & preview" it starts working again right away which is really strange.

     

    no that's ok, clicking on Edit button restarts the QuickApp.

    Link to comment
    Share on other sites

    • 0

    This looks like the QuickApp code that is logging an error in a http request

    Please login or register to see this code.

    Maybe the  best-before-that has expired and something changed on the server side - protocol?

    Edited by jgab
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 10/1/2021 at 1:10 PM, tinman said:

     

    no that's ok, clicking on Edit button restarts the QuickApp.

    Ok. Any idea if I can run a scene that will periodically restart the QuickApp?

     

    On 10/1/2021 at 2:41 PM, jgab said:

    This looks like the QuickApp code that is logging an error in a http request

    Please login or register to see this code.

    Maybe the  best-before-that has expired and something changed on the server side - protocol?

    I was googling around a bit and couldn't find anything information to expand my search on this matter.

     

     

     

     

    I'm thinking that the following error below is when it crashes. When it tries to get the status of the unit from the API and doesn't get a response fast enough. No idea if LUA code has a TRY block to try and prevent the crash.

    Please login or register to see this code.

    Edited by Weider
    Link to comment
    Share on other sites

    • 0
    1 hour ago, Weider said:

    Ok. Any idea if I can run a scene that will periodically restart the QuickApp?

     

    I was googling around a bit and couldn't find anything information to expand my search on this matter.

     

     

     

     

    I'm thinking that the following error below is when it crashes. When it tries to get the status of the unit from the API and doesn't get a response fast enough. No idea if LUA code has a TRY block to try and prevent the crash.

    Please login or register to see this code.

    Can you edit the QA code on the HC3? Search for the string "Software caused connection abort" and see where it's used.

     

    There will probably also be a 

    self:debug("error:",err)

    somewhere in the code, probably inside an error handler in a net.HTTPClient request.

    Edited by jgab
    Link to comment
    Share on other sites

    • 0

    Well, I peaked at the QA and the messages

    Please login or register to see this code.

    are error messages that comes back when the QA makes http requests to the sensibo device. 

    However, the the setTimeout loop that is used to continuously query  the device is not called when there is an error from the http request.

    Please login or register to see this code.

    is only called from the success handler and not the error handler

    ...so the QA will "stop". A restart will make it go again until you get the next error from the http request.

     

    It's a pretty easy fix to make it retry even in case of error (the self:STATE() loop) but it's not my QA and code...

    (self:TEMP() is another loop that dies on http error)

     

    However, you can also ask yourself why you get these errors from the device? Have you upgraded its firmware recently?

    "Operation canceled" I have seen from devices that get too many requests quickly (ex. the Hue bridge), so some kind of flow control could help..

     

    btw, the coder seems to make every http request in it's own setTimeout thread which will cause "parallel" outstanding requests (reason you see burst of errors) instead of running the sequentially that's a bit easier on devices...

     

    Edited by jgab
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 18 minutes ago, jgab said:

    Can you edit the QA code on the HC3? Search for the string "Software caused connection abort" and see where it's used.

     

    There will probably also be a 

    self:debug("error:",err)

    somewhere in the code, probably inside an error handler in a net.HTTPClient request.

    It's a system error it seems, I can't find it in the code.

    There are 32 instances of self:debug("error:",err), but they're all a part of the HTTPClient request as by default.

     

    I did try once to take the HC3 offline (changing the default gateway to wrong IP) and I did get that error Software caused connection abort, so it is connected with the endpoint not responding. 

    BUT this didn't crash the QuickApp. I think it' get's stuck somewhere, hangs, and doesn't continue until restarted. But I can't figure out where. 

    But the code is using way to manny HTTP requests I think. Over 30 requests in this whole file.

     

     

    Link to comment
    Share on other sites

    • 0
    8 minutes ago, Weider said:

    It's a system error it seems, I can't find it in the code.

    There are 32 instances of self:debug("error:",err), but they're all a part of the HTTPClient request as by default.

     

    I did try once to take the HC3 offline (changing the default gateway to wrong IP) and I did get that error Software caused connection abort, so it is connected with the endpoint not responding. 

    BUT this didn't crash the QuickApp. I think it' get's stuck somewhere, hangs, and doesn't continue until restarted. But I can't figure out where. 

    But the code is using way to manny HTTP requests I think. Over 30 requests in this whole file.

     

     

     

    So the reason is in my previous post - kind of poorly written QA.

    "Software caused connection abort" seems to be an endpoint message - you don't get that if you call out into void..

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • So basically the fix is to call the function again when the error is thrown.

     

    I have extremely little knowledge of LUA code and QuickApps. I'll try to figure out how to call the method or function, or whatever this is using. I don't even know how this thing loops -.-

     

    EDIT:

     

    Seems as that just calling self:TEMP() and self:STATE() after error worked.

    I got the error twice now in a row, 3rd time it went through.

     

    Hopefully this was it.

     

    I'll let you know in the morning. But thanks for pointing me in the right direction and giving me enough info to work with :D

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

    • 0
  • Inquirer
  • So after just under 24 hours I haven't had a single issue. 

     

    Problem solved, as it seems. If anything changes I'll write it here.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Also if anyone is having trouble with  Fan mode not showing up correctly.

     

     

     

    Change "modefant" to "modefanf"  on line 519

    Also, since the fan mode doesn't have temperature value in the Json and the way the code parses the data you have to replace 

            Temp1 = string.match(status2, "targetTemperature%d%d")
            Temp2 = string.sub(Temp1, 18, -1)
            Temp3 = tonumber(Temp2)

    starting on line 495 with (we're setting Temp2 to "0" so the tonumber doesn't fail, but we're not using any temperature in the fan mode so it's fine.)

            Temp1 = string.match(status2, "targetTemperature%d%d")
            if (Temp1) then
            Temp2 = string.sub(Temp1, 18, -1)
            else Temp2 = "0"
            end
            Temp3 = tonumber(Temp2)
    Edited by Weider
    Link to comment
    Share on other sites

    • 0

    my sensibo is working fine

    3 sensibos

    working fine

    Try re-installing the quick app

     

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 12 hours ago, minsad79 said:

    my sensibo is working fine

    3 sensibos

    working fine

    Try re-installing the quick app

     

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

    I tried reinstalling and it worked for a day or two then died again. I have 12 Sensibos runing atm.

    I think the problem is in the API, sometimes it doesn't respond it seems. Who's the culprit I have no idea, might be you're connected to a different API since you're from Korea, or maybe there's something on the route to their API that's dropping packets or something.

    In any case, I've solved that problem by restarting the loop when it fails, should be in there anyways as a part of defensive programming.

    But I'm not the only one having this issue.

     

    Can you try setting one of your ACs to FAN only mode, set it in the Sensibo app, not fibaro, and let me know if it updates to FAN in fibaro.

     

     

    EDIT: 

     

    For some reason my quickapps always hang on the HTTPClient, no idea why. I have to recall the functions in every error to bypass this, for this reason a lot of times it takes quite a bit of time to actually get a command or update through, because it's retrying a lot.

    Edited by Weider
    Link to comment
    Share on other sites

    • 0

    Hi,

     

     Has anyone been successful  to stabilize the SensiboQA?  I  would like to find a solution to be allowed to use all other sensors.  It is a bit  boring (and not smart) only using the native sensibo app in my phone.

     

     In case anyone of you solved it,  What did you edit?  or would it be possible to  get a copy of your QA?

     

    Rest regards

    Håkan

    Edited by Håkan Enhager
    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
    Answer this question...

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