n8henrie / fauxmo

Emulated Belkin WeMo devices that work with the Amazon Echo
https://n8henrie.com/2016/02/fauxmo-home-automation-with-the-amazon-echo-raspberry-pi-and-homeassistant/
Other
377 stars 78 forks source link

Running fauxmo with hundreds of devices #112

Closed neodesc closed 2 years ago

neodesc commented 2 years ago

My Issue

I've been running fauxmo with the command line plugin for a couple of years now with no issues. However I'm adding a lot more devices (~250) in the config.json file now and its not working anymore: device unresponsive. The Echo discovers them correctly but it just can't use them most of the time.

WHYT

Reducing my list of devices. Managed to get it from over 900 to ~250. It works great with 50 but I need 250 because my KNX devices are not alexa compatible and I need a "commandline device" for each real device property. For instance a blind has 10 positions + its slates.


Please make sure you've taken these steps before submitting a new issue:

n8henrie commented 2 years ago

Wow!

I'm blown away that you're using this with so many devices.

I'll need to think about it, but honestly this part makes me think it might be an issue on the Echo side (emphasis mine):

The Echo discovers them correctly but it just can't use them most of the time.

Because fauxmo is all asyncio based, I would think it could handle hundreds of devices without issue.

I'll almost certainly need some debug output. Can you capture and post a verbose / debug log during a failed attempt to trigger a device?

n8henrie commented 2 years ago

Bump.

This issue is pending a response and is blocked until I have more info. To keep the issue list groomed, I will often close these stalled issues if they go a prolonged time without a response. In this case, I will give it another week or so.

n8henrie commented 2 years ago

@neodesc You might try the dev branch; I've added a few lines to support running on uvloop, which has much better performance than the built-in event loop. It might make a difference in your case of being able to handle hundreds of devices.

$ source venv/bin/activate
$ python -m pip install uvloop
$ python -m pip install git+git://github.com/n8henrie/fauxmo.git@dev
neodesc commented 2 years ago

Hi Nathan,

I’ve been using your regular main code. Figured out as long as I have less than 200 devices everything works just fine.

I’ll keep the dev branch in mind though for possible future setups. Thank you very much for your help :)

On Fri, 4 Mar 2022 at 18:02 Nathan Henrie @.***> wrote:

@neodesc https://github.com/neodesc You might try the dev branch; I've added a few lines to support running on uvloop https://github.com/MagicStack/uvloop, which has much better performance than the built-in event loop. It might make a difference in your case of being able to handle hundreds of devices.

$ source venv/bin/activate $ python -m pip install uvloop $ python -m pip install @.***

— Reply to this email directly, view it on GitHub https://github.com/n8henrie/fauxmo/issues/112#issuecomment-1059342628, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5CNIHTWCSLQ4KIWFDMDBTU6I6ZVANCNFSM5LDU7SBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>