This is documentation for myself in hope of helping others. I do not accept any responsibility. Follow the instruction at your own risk. I tested it with Ubuntu 18.04 and it worked. This was also a practice for myself to automate something in Linux.
My freebuds 3 had a very low volume on Ubuntu 18.04 until I saw this answer. So running the following command 4 times resolved the issue
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_<mac_address_of_headphones> org.bluez.MediaControl1.VolumeUp
Just note that the mac address should be seperated with _
underscore rather than :
which you may find in the bluetooth settings.