Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple and alternating messages. #9

Closed
gck303 opened this issue Oct 20, 2023 · 1 comment
Closed

Multiple and alternating messages. #9

gck303 opened this issue Oct 20, 2023 · 1 comment
Assignees

Comments

@gck303
Copy link

gck303 commented Oct 20, 2023

I am getting strange repeated messages which are alternating on/off. Not quite sure what is going on.

This is the output from whening running the script in the foreground.

Any ideas?

When I restart the script the problem goes.

Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on Device dehumidifier is too busy to take request to be set as off Device dehumidifier is too busy to take request to be set as on

@flavio-fernandes
Copy link
Owner

This means that the kasa device is being asked to change state too often and the code is explicitly throttling it.

mqtt2kasa/mqtt2kasa/main.py

Lines 104 to 109 in 17096b0

except asyncio.queues.QueueFull:
logger.warning(
f"Device {name} is too busy to take request to be set as "
f"{kasa.state_name(new_state)}"
)
return

Any chance that is happening in your environment?

The queue size is 4:

self.recv_q = asyncio.Queue(maxsize=4)

Which means, the Kasa device may be getting bombarded with requests and that seems suspicious.

Not a bug; functioning as implemented. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants