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

VD not refreshing result of an API call


Question

Posted
Hi all
 
This is doing my head in. I have got a Nest Thermostat and got it connected with HC2 via Fibaro's plugin.
 
The issue with the plugin is that when temperature is changed manually on Nest, it doesn't seem to update straight away. I have to open an actual device(plugin) in HC2 for values to refresh.
 
However, it appears that values are being refreshed when I access it via Fibaro's API (

Please login or register to see this link.

) in the browser.
 
I have therefore created a VD with following code:
 

Please login or register to see this code.

It seems to work for about half an hour and then it stops. Nothing appears in the debug window.

 

I can still access json string in the browser which appears to update with no problem.

 

Any help would be much appreciated.

2 answers to this question

Recommended Posts

  • 0
Posted

As I see, this is written in the main loop of VD.

Since HC2 executes the code every ~3 seconds, it may create a lot of instances  after several executions and I believe HC2 starts to kill the them.

May I suggest to add delay at the end of the code, let say about 30 seconds at least

Please login or register to see this code.

Please try it

  • 0
  • Inquirer
  • Posted

    As I see, this is written in the main loop of VD.

    Since HC2 executes the code every ~3 seconds, it may create a lot of instances  after several executions and I believe HC2 starts to kill the them.

    May I suggest to add delay at the end of the code, let say about 30 seconds at least

    Please login or register to see this code.

    Please try it

     

    that makes sense and would explain its behavior. I have also checked my IFTTTs log and it looks like I have exceeded the limit for API calls...

     

    thanks for your help.

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