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

alleviate HC2 pressure for high number of API calls


AutoFrank

Question

HI,

I am implementing an OpenRemote interface and may have come across an issue.

 

All sensors in OR poll constantly according to what has been has been configured

A sensor in OR is a way to read back the status of any device. The polling rate for a switch needs to be 1 second so you can see the status has changed when it is clicked.

This creates a possible problem

Multiply x 100 devices and you get a lot of API calls just to keep OR functional. I have noticed an increasing use of memory since I started implementing OR

 

This surfaces two issues in my mind

 

Do we know how many API calls (per second, per minute) that the HC can hanndle

If I am close to the threshold or prove that it is becomming an issue, would a slave HCl alleviate this stress ?

 

Thanks

Frank 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

pull (or polling) is never a good strategy in these cases. I would go for a script that fires on device change then notifies OpenRemote

Link to comment
Share on other sites

  • 0
  • Inquirer
  • pull (or polling) is never a good strategy in these cases. I would go for a script that fires on device change then notifies OpenRemote

     

    thanks  - unfortunately polling in central to the way the OR works if you want feedback to the panel

    I have a lot of their sensors (that leverage polling) running and no adverse effects yet. I'm also using prime numbers in the polling intervals to prevent a lot of concurrent api calls

     

    I was just wondering if any had pushed close to the API request limit of the HC2

     

    -F

    Link to comment
    Share on other sites

    • 0

    I am no expert and lacks insight to the system to deep dive analyse its behaviours.

     

    Based on observations over 1+ year, I believe Home Center 2 itself is more than capable to handle a high volume to API calls (been using ImperiHome w/o issue). The crucial part to consider is the load on the 'z-wave traffic/layer' where I found the z-wave layer to be the bottleneck for almost all the teething issues (such as delayed scenes).

     

    Most times when scenes get delayed, it seems there is some other command/traffic on the z-wave layer pending to timeout or finish, then suddenly a series of scenes get actioned on. Example: I have three separate smart light scenes for each aisle, common bathroom and kitchen but has dependencies among them. When I walk down the aisle and if the common bathroom and kitchen lights are off, it lights up the aisle's light. Once I step into either common bathroom or kitchen, it will switch off the aisle's light if it is on. Based on this interdependent light scenes, I have observed that when there is a delay in scenes, it usually pause for xx seconds (or sometimes up to 1-2 mins) before the sequence of how lights supposed to switch on or off being actioned on suddenly. That is an indication where z-wave layer is busy, subsequent scenes get queued in the order they are supposed to but just not being actioned on due to z-wave layer still pending prior command to complete or timeout and get killed.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I am no expert and lacks insight to the system to deep dive analyse its behaviours.

     

    Based on observations over 1+ year, I believe Home Center 2 itself is more than capable to handle a high volume to API calls (been using ImperiHome w/o issue). The crucial part to consider is the load on the 'z-wave traffic/layer' where I found the z-wave layer to be the bottleneck for almost all the teething issues (such as delayed scenes).

     

    Most times when scenes get delayed, it seems there is some other command/traffic on the z-wave layer pending to timeout or finish, then suddenly a series of scenes get actioned on. Example: I have three separate smart light scenes for each aisle, common bathroom and kitchen but has dependencies among them. When I walk down the aisle and if the common bathroom and kitchen lights are off, it lights up the aisle's light. Once I step into either common bathroom or kitchen, it will switch off the aisle's light if it is on. Based on this interdependent light scenes, I have observed that when there is a delay in scenes, it usually pause for xx seconds (or sometimes up to 1-2 mins) before the sequence of how lights supposed to switch on or off being actioned on suddenly. That is an indication where z-wave layer is busy, subsequent scenes get queued in the order they are supposed to but just not being actioned on due to z-wave layer still pending prior command to complete or timeout and get killed.

     

     

    thanks chaicka
     
    I hope you're right and what I have built using OpenRemote seems good.
    I'll be writing a post on it as soon as it is presentable.

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />
    I also came across a sonos http api (that host in the same place as the Openremote controller) and it give a huge amount of control over the zones, down grouping and ungrouping.
    check out NODE SONOS HTTP API at the following url if you're interested

    Please login or register to see this link.

     
     
    Rgds
    -F
    Link to comment
    Share on other sites

    • 0

    Cool... even has experimental support for Apple Music.

     

    The power of coding... 

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

     

    Thanks Frank.

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