core: Unable to add the nVent RAYCHEM SENZ integration

The problem

Since a couple of days I am unable to add the nVent RAYCHEM SENZ integration to Home Assistant. Because of #83274 I had to remove the integration and re-add it only to be greeted with an error message. I have since tried several time over the last couple of days with no luck.

account-link.nabucasa.com responds with this: image

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

nVent RAYCHEM SENZ

Link to integration documentation on our website

https://www.home-assistant.io/integrations/senz

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

This message is what appears in the log when #83274 hits, requiring the user to re-add the integration to get back on track:

2024-01-22 20:58:28.982 ERROR (MainThread) [homeassistant.components.senz] Error requesting email@example.com data: 500, message='Internal Server Error', url=URL('https://account-link.nabucasa.com/refresh_token/senz')

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 12
  • Comments: 27

Most upvoted comments

No, the 7 days is simply because it took me 7 days each time to report it to NVent.

They’ve been great. I was told that during recent maintenance the old rate limits were accidentally reinstated. They were corrected today.

This is a common problem for a lot of us.

There are usage limits for the API but strange thing is that this hits many users are at the same time though we all have different used IDs. Looks more like Home Assistant users are treated as one or the limits are not reset as they should.

Or are we all channeled via account-link.nabucasa.com?

https://api.senzthermostat.nvent.com/#burstratelimits

Current limits These limits are defined as a per user and per client basis. Which means a single user combined with a specific client id, has these specific limits. That means if a client ids user hits the limit, he is blocked out for the rest of that period, but it does not affect the other users of that client id.

Per second 50 Per 30 minutes 750 Per 12 hours 20,000 Per 7 days 250,000

Http Responses: When the rate limits are hit, the RestAPI will return HttpCode 429 - Too many requests.

Now it’s again possible to add the integration. And like last time, 7 days after it stopped working.

I found a way to get this working without going through the stupid home assistant nabucasa cloud.

  1. Request your own client id by going to the website https://www.nvent.com/en-gb/support/contact-us select country U.S. to get quicker response
  2. You’ll get a mail, then fill in the information requested and send it back. Once you got a client id time to modify your home assistant.
  3. Comment the default_config from the configuration.yaml #default_config
  4. Add your Raychem credentials by going to Settings -> Integrations and click on the three dots in the top right corner and choose Application credentials. Choose nVent RAYCHEM SENZ choose a nam for the application credentials and fill in your client ID and secret
  5. Go back to Integrations and add your Entry and you should be able to use your own credentials.

Also manual did a test with this so there is definitely a rate limiting of 99999 for 7 days for the API, api.senzthermostat.nvent.com.

< X-Rate-Limit-Limit: 7d < X-Rate-Limit-Remaining: 99997 < X-Rate-Limit-Reset: 2024-03-13T14:15:09.1776935Z

Interesting that it has been exactly one month again, between when the rate limit issue was fixed and now it has reoccured.

That’s the same timeframe the refresh token issue was always seen, is this just a coincidence.

I now suspect both issues are within the SENZ API itself.

I guess we coud change the 30 seconds to 60 within the integration, so effectively halve the rate once everyone updates. It won’t be an instant fix however, it’ll take a while for everyone to update.

That can be changed in Automation, instructions here:

https://www.home-assistant.io/common-tasks/general/

Disable the default polling (usually 30 s) in the System Options for the Integration (behind the 3 dots in upper right corner):

image

Set up a new automation to run at desired intervals:

  • 60s in this example
  • it’s sufficient to set it up for one entity though you may have multiple thermostats

image

image

2024-01-30 17:36:35.665 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.161 seconds (success: True) 2024-01-30 17:37:35.664 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.159 seconds (success: True) 2024-01-30 17:38:35.720 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.213 seconds (success: True) 2024-01-30 17:39:35.694 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.187 seconds (success: True) 2024-01-30 17:40:35.687 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.183 seconds (success: True) 2024-01-30 17:41:35.687 DEBUG (MainThread) [homeassistant.components.senz] Finished fetching email@example.com data in 0.180 seconds (success: True)