As a fellow Homey app developer, I was looking through the code as I am planning to support a Modbus TCP device as well, to see if there are any leads or ideas that I could use in my app.
I noticed that on every processResult you are calling addCapability on all capabilities, but this is really putting a lot of burden on the Homey device itself.
As a fellow Homey app developer, I was looking through the code as I am planning to support a Modbus TCP device as well, to see if there are any leads or ideas that I could use in my app.
I noticed that on every
processResult
you are callingaddCapability
on all capabilities, but this is really putting a lot of burden on the Homey device itself.Check out: https://apps.developer.homey.app/guides/how-to-breaking-changes#adding-capabilities
I understand that you just want to add a capability once you have received data for it, but maybe these calls can be guarded?