Athom.API MaxListenersExceededWarning

I created my own homeautomation Dashboard for a touchpanel and integrated the Home.Ink webapp into it. I rebuild the HTML css style to Tailwind CSS. When I add more Devices to my favorites list in Homey the athom.api responds with ‘MaxListenersExceededWarning’. This is a known Node.JS warning.

I am using the API that is being used in Homey.Ink. This is version 2.1.185. I found out that the API versioning goes to 2.1.220 but this one also has the same warning. Is there any one from Athom or Homey who can look into this error in the API? We should be able to add about 20 devices without generating this error in the browser console.

Thanks for any response.

Error example in Chrome:

Dark example of my Dashboard:

Warnings aren’t errors. When more than 10 event listeners are attached to an event handler, you are warned about it to prevent recursively adding more listeners (which is a common cause for memory leaks).

If you get this warning during the setup phase of your app, don’t worry about it.

I guess that because the code cannot distinguish between adding more than 10 listeners on purpose or by accident, Athom has decided not to disable the warnings being generated (well, to be honest, I don’t think they really thought about it at all and just left it to the default).

You can possibly disable it yourself by setting EventEmitter.defaultMaxListeners.

I can’t set it on client side. This should be done by Athom themself in the homey api.
I know it is a warning but it is not nice that this is appearing. This also happens on their website if you have enough devices added to your favorites list. We will just leave as it is.

The athom-api.min.js file (which runs client-side) exposes HomeyAPI.defaultMaxListeners which you may be able to change.