Open fnolting opened 2 months ago
Hi @fnolting , first of all, kudos 👍You have made absolutely interesting changes, well done. I'm analysing your solution and I just have one doubt that I would like discuss with you. You provided a dedicated TCP listening port for each IMEI, IMHO it might be more interesting to provide the same TCP port for all IMEIs, as Silence does. This would avoid having to open several TCP ports in port-forwarding.. what do you think about?
Thanks!
Thanks, I'm glad you like my changes. I'm pretty sure it's possible to have "multithreaded" or "asynchronous" tasks on one shared TCP port by using the threading module in combination with the socketserver module. However, I've never tried that and it would need some trial and error, I guess ;)
I'm pretty new to github and pull requests, so I was struggling a bit regarding changes to the readme.md (it should remain original, of course) so I rebased and dropped the commits regarding the readme.md and force-pushed the master branch.
Added the functionality to handle and process multiple IMEI numbers at the same time. A separate thread is started for each IMEI included in the configuration.json file. The log output has been modified so that it is clear which thread (or which IMEI / vehicle) triggered which log line. Error handling was improved in helpers/logger.py if file logging is enabled and the "logs" directory doesn't exist yet. Furthermore, I translated the Italian comments to English and deleted some whitespace in the code.