I have written a Java utility to scan serial ports and identify connected arduino devices. This is a command line utility. It’s main purpose is to query each serial port, receive a unique response from an arduino, then modify the binding file Bridge serialPort setting to that arduino. After the binding file is modified OpenHAB can start with the correct serial port mapping.
Mainly this is for systems using more than one arduino, where the order of cold boot startup can alter which serial port USB mapping an arduino is on. I have tested this on Windows and Linux with two arduino connected, though there should not be an upper limit (hardware providing).
Were can I upload the .jar file (and supporting settings file) to?
I have the utility ready for the community. It is a .jar file packaged in a .zip file (supporting files for documentation etc). How do I upload the ZIP file? The upload filter precludes a zip file, only allows some file extensions.
I could rename the .zip to .pdf or something, which would allow the upload, and then the end user would have to rename it back to .zip to expand the archive, but this seems silly
I did not create an addon. This is a standalone application meant to be run just before OpenHAB starts from a reboot of the host computer. I query each USB port (via a serial port) for a unique identifier, then map that identifier to the binding file Bridge statement, and modify the Bridge serialPort parameter value.
Small advice, if you need to share a bunch of scripts then you can create github repository and upload it there. Github gives you possibility to generate “zip” or “tar.gz” link which takes most recent version of repository contents and stream them to caller.