Parallel execution with Selenium Grid

I have a simple task.
I need to execute many different tests on two emulators.
So, i have: 1 PC, 2 Android emulators (emulator-5554 and emulator-5556), Selenium grid and two instances of Appium.
I understand, that i need somhow to link every Appium to different emulator.
I tried many capabilities in default config, but still it launched at emulator-5554
“browserName”: “android”,
“maxInstances”: 1,
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“host”: “test-mobile1”,
“port”: 4626,
“maxSession”: 1,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “***”

I cant set UDID in desired capabilities, because i dont know which emulator/appium is free right in a moment.
I read, that many versions ago, i could launch appium server from command line with udid parameter. But i use latest version and dont understand how to do it now.