yup thats the one 
json is indeed the most unfamiliar thing. from what i recall this button is created like u said and uses this serviceid to make the action… same as you would do a http request
something like this http:///port_3480/data_request?id=action&DeviceNum=112&serviceId=urn:upnp-org:serviceId:VSwitch1&action=SetTarget&newTargetValue=
so it needs an implementation file for these serviceid to tell what the serviceid must do when it is called.
im out of it for a while so you might want to look at a similar plugin for that.
edit:
ok so far i found this
implementation :
[code]
function thisfunction(variable,variable)
functionitself
return (datafunction)
end;
lug_startup
urn:micasaverde-com:serviceId:servicename
name for action
local command = “somecommand”
luup functioncall
luup.call_delay(“othercommand”)
d_device.json would be
"imgIconBody": "",
"imgIconDimmable": "",
"imgIconTurnable": "",
"imgIconMin": "",
"imgIconMax": "",
"state_icons": [],
"halloIconsDir": "pics/hallo",
"x": "3",
"y": "4",
"inScene": "1",
"DisplayStatus": {},
"doc_url": {
"doc_language": 1,
"doc_manual": 1,
"doc_version": 1,
"doc_platform": 0,
"doc_page": "devices"
},
"Tabs": [
{
"Label": {
"lang_tag": "tabname_control",
"text": "Control"
},
"Position": "0",
"TabType": "flash",
"SceneGroup": [
{
"id": "1",
"top": "0.25",
"left": "0",
"x": "3",
"y": "1"
},
{
"id": "2",
"top": "1",
"left": "0",
"x": "3",
"y": "3"
}
],
"ControlGroup": [
{
"id": "1",
"type": "info",
"scenegroup": "1"
},
{
"id": "2",
"scenegroup": "2",
"isSingle": "1"
}
],
"Control": [
{
"ControlGroup": "2",
"ControlType": "button",
"top": "0",
"left": "0",
"Label": {
"lang_tag": "cmd_languagetag",
"text": "Play"
},
"Display": {
"Service": "urn:upnp-org:serviceId:servicename",
"Variable": "variable",
"Value": "value",
"Top": 30,
"Left": 30,
"Width": 50,
"Height": 20
},
"Command": {
"Service": "urn:micasaverde-com:serviceId:servicename",
"Action": "doaction",
"Parameters": []
}
},
[/code]
so
D_device tells what should be in the device popup screen and the device on vera UI … what function should be run when pressing button
I_implentation tells what functions and services are used
S_services tells what should be used as servicestates and in scene advanced… if variable is changed then update button for it on the UI
L_lua own made lua script to run stuff
confusing if u ask me…
check here http://forum.micasaverde.com/index.php/topic,13532.0.html for some more explanation on plugin creating