dannybloe wrote:How do we get to the id of a scene or a group? It isn't part of the otherdevices_idx table but I do need it for completeness. I can still get that from the http data or you should create a table like otherdevices_groupsandscenes_idx or something like that.
How do you get them for devices? Via the http data? If yes, i propose to get them for scenes/groups also via http data.
dannybloe wrote:And.. I want to have scenes and groups split so I can create domoticz.scenes[<name>/<id>] and domoticz.groups[<name>/<id>]. So I need a way to distinguish these two. If they are all in one table then I still cannot make that distinction without using the http data.
It's ok by me to split those... If you do a http data with json.htm?type=devices&displayhidden=1&filter=all&used=true, you can look at the "Type" tag. For scenes it is "Scene" and for groups "Group"
Code: Select all
{
"Data" : "Mixed",
"Description" : "",
"Favorite" : 0,
"LastUpdate" : "2016-03-17 12:35:42",
"Name" : "Scene1",
"PlanID" : "",
"PlanIDs" : [ 0 ],
"Protected" : false,
"Status" : "Mixed",
"Type" : "Scene",
"TypeImg" : "scene",
"UsedByCamera" : false,
"XOffset" : 0,
"YOffset" : 0,
"idx" : "1"
},
{
"Data" : "Off",
"Description" : "",
"Favorite" : 0,
"LastUpdate" : "2016-02-06 16:57:47",
"Name" : "Group1",
"PlanID" : "",
"PlanIDs" : [ 0 ],
"Protected" : false,
"Status" : "Off",
"Type" : "Group",
"TypeImg" : "group",
"UsedByCamera" : false,
"XOffset" : 0,
"YOffset" : 0,
"idx" : "2"
}