You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current approach of calling sys.exit() when a failure happens makes it impossible to use the library as part of an other project (e.g. home assistant integration)
Workaround of monkey patching that method does also not fully work as then the code flow continues and does not abort.
Yes, definitely agreed. I'm curious what you think of the proposed refactoring in the comments on #579 -- I believe that'd also make it easier to update these cases. I haven't been able to devote much time to this library for the last few months, but hopefully I can devote some time in the next couple weeks.
The general direction of #579 sound like a very needed improvement. There should be a clear split between mesh interface/connection/transport implementation and then the code that exposes this functionality as a cli (rendering)
I also needed async support and focused on getting it working for long running connection, something that I didn't see in reach with the current code base & design decisions.
I found it actually quite hard to get a good abstractions and where to put what functionality, and the protobuf protocol itself is not helping, it is clearly visible that everything has grown organically. It would require quite some design work to build an interface/abstraction that abstract away all the messy detail of the protobuf protocol.
The current approach of calling
sys.exit()
when a failure happens makes it impossible to use the library as part of an other project (e.g. home assistant integration)Workaround of monkey patching that method does also not fully work as then the code flow continues and does not abort.
Example:
https://github.com/meshtastic/python/blob/master/meshtastic/mesh_interface.py#L444
The text was updated successfully, but these errors were encountered: