You need to know the ip and port where geckodriver is running. And as soon as geckodriver starts up, you can get the session ID from the driver instance.
You can get the IP address and port as indicated here
For example: if ip and port are
local: 15874
and session ID 1e53412a-05eb-40a9-8a7b-bb8dd6fd75ab
json
http://localhost:15874/session/1e53412a-05eb-40a9-8a7b-bb8dd6fd75ab/moz/addon/install
{
"path":"xxyy.xpi",
"temporary":true
}