Skip to content

Instantly share code, notes, and snippets.

@dkoneill
Created November 27, 2024 19:10
Show Gist options
  • Select an option

  • Save dkoneill/b3889c87f07c9e83be53e509304c61a6 to your computer and use it in GitHub Desktop.

Select an option

Save dkoneill/b3889c87f07c9e83be53e509304c61a6 to your computer and use it in GitHub Desktop.
Add Ubiquiti icons to drawio

ubiquiti-drawio

Draw.io library for Ubiquiti networks

The SVG shapes were retrieved from the a Unifi CloudKey Gen 2+ stored in cd /mnt/.rwfs/data/usr/lib/ulp-go/swai/static/media

Usage

  1. Go to draw.io and create a new diagram.

  2. Then go to File -> Open Library From -> Url...

  3. Enter https://github.com/donhector/ubiquiti-drawio/raw/main/Ubiquiti.xml as the URL

  4. Click Open

NOTE: Depending on your connection, this might take a while (the library is around 40Mb) so be patient.

You should see the new library loaded in draw.io:

Screenshot of library loaded

Now you can drag and drop the Ubiquiti shapes into your diagram.

Building your own library

Creating a new library in draw.io is also straight forward. This is how I created it:

  1. In the console admini at unifi.ui.com enable ssh access to the console and set a password. The user is 'root'
  2. ssh root@console_ip_address and login
  3. Collect the SVG icons cd /mnt/.rwfs/data/usr/lib/ulp-go/swai/static/media tar cf /tmp/unifi-icons.tar . scp /tmp/unifi-icons.tar machine_of_your_choice:~/Downloads (On your local system, assuming a bash like shell) cd ~/Downloads tar xf unifi-icons.tar
  4. Open draw.io
  5. Go to File -> New Library -> Device...
  6. Give your library a name. ie: MyLib.xml
  7. Click Add images
  8. Drag and drop desired images into the dialog (those can be .svg files no problem).
  9. Keep adding images until you are done
  10. Click Save

That will import the MyLib library into the draw.io UI and will also download it as an xml file to your computer (ie: MyLib.xml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment