Here is a method using python. (you must enable the python plugin to use it)
This VC command will scrape the device list, and then call a python script to process it. You need to put the attached file into your VC\Py folder.
The python script will actually create a map table with your devices in it. Afterwards, from the map editor you can easily export the map to a payloadXML file. In future releases I will add an action to export a map to a payloadXML file so you don't have to do it manually.
Apart from being much faster than adding to a payloadXML file, by using a map we can "merge" new devices without overwriting existing ones.
the action Map.Set has an optional parameter for "overwrite". If this param is set to false, then when a key exists in the map already it will be untouched. If the key does not exist, then a new item will be created. This is handy because you might want to edit the names of your devices to make them work better as voice commands, or maybe created aliases for them (using commas) and you would not want to have to redo that editing every time you re-scanned for new devices.
<?xml version="1.0" encoding="utf-16"?>
<command id="165" name="list devices" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>Scrape</cmdType>
<cmdString>http://127.0.0.1:8081/json.htm?type=command&param=getlightswitches&&test&&test</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>PY.ExecFile</cmdType>
<cmdString>PY\dzParseData.py</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
</command>