how can I prevent my own lib from being overwritten by a lib of the same name from the Internet?
My own lib is named “MyTimer”, which I have made available to the IDE 2.3.2. After restarting the IDE I was asked for an update, I didn't think about it any further. Afterwards my lib was overwritten with a foreign MyTimer lib. How can I prevent this? If other libs get updates you can't separate them cleanly anyway.
Is it possible to write something in the library.properties to say that this lib does not get updates from the internet? Because this is my own. Or do I have to rename my lib? Whereby you can't expect anyone to search the internet before assigning a name.
If your library is something completely different from the "MyTimer" library in Library Manager, then I think renaming your library is the most appropriate solution. I'll provide instructions you can follow to do that:
Open the library.properties file from your library in any text editor.
Change the value of the name property to any unique name. Search Arduino IDE Library Manager to make sure the name hasn't already been claimed.
Save the file.
If your library is the MyTimer library from Library Manager, but with some modification you made for your personal requirements, then it probably makes sense to leave it named "MyTimer", and if so you can use an alternative solution to prevent updates:
Open the library.properties file from your library in any text editor.
Change the value of the version property to 999.0.0
Save the file.
The 999.0.0 version number is just an arbitrary high version number. Library Manager only offers updates if there is a version with a higher number than the version of the library you have installed. It is unlikely that the maintainer of the MyTimer library will ever make a release with a version number higher than 999.0.0, so doing this effectively disables updates.
If you are planning to distribute the library to the Arduino community then it will be important to give the library a unique name, so we certainly do expect the library developers to search to see if a prospective name has already been claimed.
If you are only intending the library to be for your own personal use, not published on the Internet, then it isn't so important to choose a unique name.
Thank you very much for the explanations and solutions. I find the first solution with renaming to library.properties suitable for me. That also works.
That means the IDE update routine looks at the first folder name below libraries and compares it?