[dss-developer] Scenes 11 & 12 (decrement-increment)

Jean-Marc Trinon jmt_be at mac.com
Sat Feb 20 15:00:12 CET 2016


I have been looking deeper in the implementation of the User defined Actions add-on to try to understand why scenes 11 and 12 were never presented in the UI.

If I understand correctly (not 100% sure),  the list of scenes to present in the UI comes from the getScenes function implemented in the dss-datamodel.js file.

The definition of the function starts like this:

dss.staticDataModel.getScenes = function(zoneId, groupId) {
	if (dss.staticDataModel.nameCache == null)
		dss.staticDataModel.initCaches();
	var oDeviceArray = dss.staticDataModel.getDevicesForZone(zoneId, groupId);

    var oRetArray = [];
    var sceneArray = [ 0, 5, 17, 18, 19, 1, 6, 2, 7, 3, 8, 4, 9, 32, 33, 20, 21, 22, 34, 35, 23, 24, 25, 36, 37, 26, 27, 28, 38, 39, 29, 30, 31, 67,
            64, 68, 69, 70, 72, 71, 73, 65, 76, 74, 83, 84, 85, 88, 89];
    if (groupId==1)
    	sceneArray = [ 0, 40, 5, 17, 18, 19, 1, 6, 2, 7, 3, 8, 4, 9, 32, 33, 20, 21, 22, 34, 35, 23, 24, 25, 36, 37, 26, 27, 28, 38, 39, 29, 30, 31, 67,
                                  64, 68, 69, 70, 72, 71, 73, 65, 76, 74, 83, 84, 85, 88, 89];
    if (zoneId==0)
    	if (groupId==0) {
    		sceneArray.push(90);
    		sceneArray.push(91);
    	}
    if (groupId == 2)
    {
        sceneArray.splice(5,0,56);
        sceneArray.splice(34,0,15);
    }
...


The scenes 11 and 12 are never listed in the sceneArray. So even if they are actually defined in the system, they never get presented as an option for the actions.

I understand I can probably code myself a dss-addon to enable triggers to call those scenes. But it seems like an overkill and I think it would be better for user experience if those scenes were presented as options for user defined actions and event responders.


jmt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum.digitalstrom.org/pipermail/dss-developer/attachments/20160220/f48f722e/attachment.html>


More information about the dss-developer mailing list