bosch-thermostat / bosch-thermostat-client-python

Python3 asyncio package to talk to Bosch thermostat devices.
Apache License 2.0
23 stars 20 forks source link

Timeouts -> temporary banned from the server #14

Closed marcomsousa closed 3 years ago

marcomsousa commented 3 years ago

Please add User-Agent in XMPP calls.

After some time, this integration start to give timeout, and the CT100 lost conection to the server. (are they temporary banned the device) This problem are fixed after disable this integration a full day.

This problem could be one or the this two issues:

  1. We should add the User-Agent: NefitEasy when we are sending messages:

All other bosch integration are using User-Agent: NefitEasy

  1. Or/And we are requesting data too frequently, can we define the frequently?
pszafer commented 3 years ago

I will add User-Agent.

how many sensors do you have enabled?

pszafer commented 3 years ago

update: user agent is send with every request https://github.com/bosch-thermostat/bosch-thermostat-client-python/blob/0716131651edbfe9ebb8d0a1106f35362c9b83dd/bosch_thermostat_client/connectors/nefit.py#L26

marcomsousa commented 3 years ago

Seeing other integration, it seams that we can get most of the sensors with only one GET call:

/ecus/rrc/uiStatus

(not OutdoorTemperature, and maybe other data)

https://github.com/robertklep/nefit-easy-commands https://github.com/robertklep/nefit-easy-commands/blob/master/lib/commands/status.js

pszafer commented 3 years ago
/ecus/rrc/uiStatus

is nefit only. If I have to switch to that I'd need to make 2 separate libraries - one for Nefit devices and one for IVT devices. You might try to enable debug log of aioxmpp to check why and if you are really being banned from server.

pszafer commented 3 years ago

Now xmpp part of the lib is staying connected all the time while HA is running. I think this will fix this issue.

marcomsousa commented 3 years ago

3 days running without any ban, thanks.