Changeset 43


Ignore:
Timestamp:
2014-09-01 06:22:15 (11 years ago)
Author:
zoot1612
Message:

Changes to script to create static json file.

Location:
branches/UI7
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/UI7/D_DenonReceiver1.json

    r36 r43  
    1         { 
    2             "flashicon": "icons/music_audio.png", 
    3             "iconText": "1", 
    4             "imgIconBody": "", 
    5             "imgIconDimmable": "", 
    6             "imgIconTurnable": "", 
    7             "imgIconMin": "", 
    8             "imgIconMax": "", 
    9             "halloIconsDir": "pics/hallo", 
    10             "inScene": "1", 
    11             "DisplayStatus": { 
    12                 "Style": "numeric", 
    13                 "Service": "urn:upnp-org:serviceId:RenderingControl1", 
    14                 "Variable": "Volume", 
    15                 "MinValue": "0", 
    16                 "MaxValue": "98" 
    17             }, 
    18             "doc_url": { 
    19                 "doc_language": 1, 
    20                 "doc_manual": 1, 
    21                 "doc_version": 1, 
    22                 "doc_platform": 0, 
    23                 "doc_page": "devices" 
    24             }, 
    25             "ToggleButton": 1, 
    26             "Tabs": [{ 
    27                 "Label": { 
    28                     "lang_tag": "tabname_control", 
    29                     "text": "Volume/Inputs" 
    30                 }, 
    31                 "Position": "0", 
    32                 "TabType": "flash", 
    33                 "SceneGroup": [ 
    34                     { 
    35                         "id": "1", 
    36                         "top": "1.5", 
    37                         "left": "0" 
    38                     }, { 
    39                         "id": "2", 
    40                         "top": "0.5", 
    41                         "left": "0" 
    42                     }, { 
    43                         "id": "3", 
    44                         "top": "2.75", 
    45                         "left": "0" 
    46                     } 
    47                 ], 
    48                 "ControlGroup": [{ 
     1{ 
     2    "default_icon": "binary_light_default.png", 
     3    "state_icons": [ 
     4        { 
     5            "img": "binary_light_off.png", 
     6            "conditions": [ 
     7                { 
     8                    "service": "urn:upnp-org:serviceId:SwitchPower1", 
     9                    "variable": "Status", 
     10                    "operator": "==", 
     11                    "value": 0, 
     12                    "subcategory_num": 0 
     13                } 
     14            ] 
     15        }, 
     16        { 
     17            "img": "binary_light_on.png", 
     18            "conditions": [ 
     19                { 
     20                    "service": "urn:upnp-org:serviceId:SwitchPower1", 
     21                    "variable": "Status", 
     22                    "operator": "==", 
     23                    "value": 1, 
     24                    "subcategory_num": 0 
     25                } 
     26            ] 
     27        } 
     28    ], 
     29    "x": "4", 
     30    "y": "4", 
     31    "inScene": "1", 
     32    "ToggleButton": 1, 
     33    "Tabs": [ 
     34        { 
     35            "Label": { 
     36                "lang_tag": "ui7_tabname_control", 
     37                "text": "Control" 
     38            }, 
     39            "Position": "0", 
     40            "TabType": "flash", 
     41            "top_navigation_tab": 1, 
     42            "ControlGroup": [ 
     43                { 
    4944                    "id": "1", 
    50                     "isSingle": "1", 
    5145                    "scenegroup": "1" 
    52                 }, { 
     46                }, 
     47                { 
    5348                    "id": "2", 
    54                     "isSingle": "1", 
    55                     "scenegroup": "1" 
    56                 }, { 
     49                    "scenegroup": "2" 
     50                }, 
     51                { 
    5752                    "id": "3", 
    58                     "isSingle": "1", 
    59                     "scenegroup": "2" 
    60                 }, { 
    61                     "id": "4", 
    62                     "isSingle": "1", 
    63                     "scenegroup": "2" 
    64                 }, { 
    65                     "id": "5", 
    6653                    "scenegroup": "3" 
    67                 }], 
    68                 "Control": [{ 
    69                     "ControlGroup": "1", 
    70                     "ControlType": "button", 
    71                     "Label": { 
    72                         "lang_tag": "cmd_off", 
    73                         "text": "Off" 
    74                     }, 
     54                } 
     55            ], 
     56            "SceneGroup": [ 
     57                { 
     58                    "id": "1", 
    7559                    "top": "0", 
    7660                    "left": "0", 
    77                     "Display": { 
    78                         "Service": "urn:upnp-org:serviceId:SwitchPower1", 
    79                         "Variable": "Status", 
    80                         "Value": "0", 
    81                         "Top": 40, 
    82                         "Left": 10, 
    83                         "Width": 70, 
    84                         "Height": 20 
    85                     }, 
    86                     "Command": { 
    87                         "Service": "urn:upnp-org:serviceId:SwitchPower1", 
    88                         "Action": "SetTarget", 
    89                         "Parameters": [{ 
    90                             "Name": "newTargetValue", 
    91                             "Value": "0" 
    92                         }] 
    93                     } 
    94                 }, { 
    95                     "ControlGroup": "2", 
    96                     "ControlType": "button", 
    97                     "Label": { 
    98                         "lang_tag": "cmd_on", 
    99                         "text": "On" 
    100                     }, 
     61                    "x": "1", 
     62                    "y": "0.5" 
     63                }, 
     64                { 
     65                    "id": "2", 
    10166                    "top": "0", 
    10267                    "left": "1", 
    103                     "Display": { 
    104                         "Service": "urn:upnp-org:serviceId:SwitchPower1", 
    105                         "Variable": "Status", 
    106                         "Value": "1", 
    107                         "Top": 40, 
    108                         "Left": 100, 
    109                         "Width": 70, 
    110                         "Height": 20 
    111                     }, 
    112                     "Command": { 
    113                         "Service": "urn:upnp-org:serviceId:SwitchPower1", 
    114                         "Action": "SetTarget", 
    115                         "Parameters": [{ 
    116                             "Name": "newTargetValue", 
    117                             "Value": "1" 
    118                         }] 
    119                     } 
    120                 }, { 
    121                     "ControlGroup": "3", 
    122                     "ControlType": "button", 
    123                     "Label": { 
    124                         "lang_tag": "cmd_off", 
    125                         "text": "Standby" 
    126                     }, 
     68                    "x": "1", 
     69                    "y": "0.5" 
     70                }, 
     71                { 
     72                    "id": "3", 
     73                    "top": "1.5", 
     74                    "left": "0", 
     75                    "x": "2", 
     76                    "y": "1.5" 
     77                } 
     78            ], 
     79                "Control": [ 
     80                { 
     81                    "ControlGroup": "1", 
     82                    "ControlType": "multi_state_button", 
    12783                    "top": "0", 
    12884                    "left": "0", 
    129                     "Display": { 
    130                         "Service": "urn:denon-com:serviceId:Receiver1", 
    131                         "Variable": "PowerStatus", 
    132                         "Value": "0", 
    133                         "Top": 10, 
    134                         "Left": 10, 
    135                         "Width": 70, 
    136                         "Height": 20 
    137                     }, 
    138                     "Command": { 
    139                         "Service": "urn:micasaverde-com:serviceId:DiscretePower1", 
    140                         "Action": "Off", 
    141                         "Parameters": [{ 
    142                             "Name": "Off", 
    143                             "Value": "0" 
    144                         }] 
    145                     } 
    146                 }, { 
    147                     "ControlGroup": "4", 
    148                     "ControlType": "button", 
    149                     "Label": { 
    150                         "lang_tag": "cmd_on", 
    151                         "text": "Main On" 
    152                     }, 
     85                    "states":[ 
     86                        { 
     87                            "Label": { 
     88                                "lang_tag": "ui7_cmd_on", 
     89                                "text": "On" 
     90                            }, 
     91                            "ControlGroup": "1", 
     92                            "Display": { 
     93                                "Service": "urn:upnp-org:serviceId:SwitchPower1", 
     94                                "Variable": "Status", 
     95                                "Value": "1" 
     96                            }, 
     97                            "Command": { 
     98                                "Service": "urn:upnp-org:serviceId:SwitchPower1", 
     99                                "Action": "SetTarget", 
     100                                "Parameters": [ 
     101                                    { 
     102                                        "Name": "newTargetValue", 
     103                                        "Value": "1" 
     104                                    } 
     105                                ] 
     106                            }, 
     107                            "ControlCode": "power_on" 
     108                        }, 
     109                        { 
     110                            "Label": { 
     111                                "lang_tag": "ui7_cmd_off", 
     112                                "text": "Off" 
     113                            }, 
     114                            "ControlGroup": "1", 
     115                            "Display": { 
     116                                "Service": "urn:upnp-org:serviceId:SwitchPower1", 
     117                                "Variable": "Status", 
     118                                "Value": "0" 
     119                            }, 
     120                            "Command": { 
     121                                "Service": "urn:upnp-org:serviceId:SwitchPower1", 
     122                                "Action": "SetTarget", 
     123                                "Parameters": [ 
     124                                    { 
     125                                        "Name": "newTargetValue", 
     126                                        "Value": "0" 
     127                                    } 
     128                                ] 
     129                            }, 
     130                            "ControlCode": "power_off" 
     131                        } 
     132                    ] 
     133                }, 
     134                { 
     135                    "ControlGroup": "2", 
     136                    "ControlType": "multi_state_button", 
    153137                    "top": "0", 
    154138                    "left": "1", 
    155                     "Display": { 
    156                         "Service": "urn:denon-com:serviceId:Receiver1", 
    157                         "Variable": "PowerStatus", 
    158                         "Value": "1", 
    159                         "Top": 10, 
    160                         "Left": 100, 
    161                         "Width": 70, 
    162                         "Height": 20 
    163                     }, 
    164                     "Command": { 
    165                         "Service": "urn:micasaverde-com:serviceId:DiscretePower1", 
    166                         "Action": "On", 
    167                         "Parameters": [{ 
    168                             "Name": "On", 
    169                             "Value": "1" 
    170                         }] 
    171                     } 
    172                 }, { 
    173                     "ControlGroup": "5", 
     139                    "states":[ 
     140                        { 
     141                            "Label": { 
     142                                "lang_tag": "ui7_cmd_on", 
     143                                "text": "On" 
     144                            }, 
     145                            "ControlGroup": "1", 
     146                            "Display": { 
     147                                "Service": "urn:denon-com:serviceId:Receiver1", 
     148                                "Variable": "PowerStatus", 
     149                                "Value": "1" 
     150                            }, 
     151                            "Command": { 
     152                                "Service": "urn:micasaverde-com:serviceId:DiscretePower1", 
     153                                "Action": "On", 
     154                                "Parameters": [ 
     155                                    { 
     156                                        "Name": "On", 
     157                                        "Value": "1" 
     158                                    } 
     159                                ] 
     160                            }, 
     161                            "ControlCode": "power_on" 
     162                        }, 
     163                        { 
     164                            "Label": { 
     165                                "lang_tag": "ui7_cmd_off", 
     166                                "text": "Standby" 
     167                            }, 
     168                            "ControlGroup": "1", 
     169                            "Display": { 
     170                                "Service": "urn:denon-com:serviceId:Receiver1", 
     171                                "Variable": "PowerStatus", 
     172                                "Value": "0" 
     173                            }, 
     174                            "Command": { 
     175                                "Service": "urn:micasaverde-com:serviceId:DiscretePower1", 
     176                                "Action": "Off", 
     177                                "Parameters": [ 
     178                                    { 
     179                                        "Name": "Off", 
     180                                        "Value": "0" 
     181                                    } 
     182                                ] 
     183                            }, 
     184                            "ControlCode": "power_off" 
     185                        } 
     186                    ] 
     187                }, 
     188                { 
     189                    "ControlGroup": "3", 
    174190                    "ControlType": "slider", 
    175191                    "top": "0", 
     
    186202                        "Left": 10, 
    187203                        "Width": 200, 
    188                         "Height": 20 
     204                        "Height": 5 
    189205                    }, 
    190206                    "Command": { 
     
    196212                        }] 
    197213                    } 
    198                 }, { 
     214                }, 
     215                { 
    199216                    "ControlType": "label", 
    200217                    "Label": { 
     
    209226                        "Height": 20 
    210227                    } 
    211                 }, { 
     228                }, 
     229                { 
    212230                    "ControlType": "variable", 
    213231                    "Display": { 
     
    219237                        "Height": 20 
    220238                    } 
    221                 }, { 
     239                }, 
     240                { 
    222241                    "ControlType": "label", 
    223242                    "Label": { 
     
    232251                        "Height": 20 
    233252                    } 
    234                 }, { 
     253                }, 
     254                { 
    235255                    "ControlType": "variable", 
    236256                    "Display": { 
     
    242262                        "Height": 20 
    243263                    } 
    244                 }, { 
     264                }, 
     265                { 
    245266                    "ControlType": "label", 
    246267                    "Label": { 
     
    255276                        "Height": 20 
    256277                    } 
    257                 }, { 
     278                }, 
     279                { 
    258280                    "ControlType": "variable", 
    259281                    "Display": { 
     
    265287                        "Height": 20 
    266288                    } 
    267                 }, { 
     289                }, 
     290                { 
    268291                    "ControlType": "label", 
    269292                    "Label": { 
     
    278301                        "Height": 20 
    279302                    } 
    280                 }, { 
     303                }, 
     304                { 
    281305                    "ControlType": "variable", 
    282306                    "Display": { 
     
    288312                        "Height": 20 
    289313                    } 
    290                 }, { 
     314                }, 
     315                { 
    291316                    "ControlType": "label", 
    292317                    "Label": { 
     
    301326                        "Height": 20 
    302327                    } 
    303                 }, { 
     328                }, 
     329                { 
    304330                    "ControlType": "variable", 
    305331                    "Display": { 
     
    311337                        "Height": 20 
    312338                    } 
    313                 }, { 
     339                }, 
     340                { 
     341                    "ControlType": "button", 
     342                    "Label": { 
     343                        "lang_tag": "command", 
     344                        "text": "Command" 
     345                    }, 
     346                    "Display": { 
     347                        "Top": 260, 
     348                        "Left": 10, 
     349                        "Width": 75, 
     350                        "Height": 20 
     351                    }, 
     352                    "Command": { 
     353                        "Service": "urn:denon-com:serviceId:Receiver1", 
     354                        "Action": "SendCommand", 
     355                        "Parameters": [ 
     356                        { 
     357                        "Name": "Command", 
     358                        "ID": "Command" 
     359                        } 
     360                        ] 
     361                    } 
     362                }, 
     363                { 
     364                    "ControlType": "input", 
     365                    "ID": "Command", 
     366                    "Display": { 
     367                        "Top": 260, 
     368                        "Left": 120, 
     369                        "Width": 100, 
     370                        "Height": 20 
     371                } 
     372                }, 
     373                { 
    314374                    "ControlType": "button", 
    315375                    "Label": { 
     
    318378                    }, 
    319379                    "Display": { 
    320                         "Top": 130, 
     380                        "Top": 40, 
    321381                        "Left": 10, 
    322382                        "Width": 70, 
     
    328388                        "Parameters": [] 
    329389                    } 
    330                 }, { 
     390                }, 
     391                { 
    331392                    "ControlType": "button", 
    332393                    "Label": { 
     
    335396                    }, 
    336397                    "Display": { 
    337                         "Top": 100, 
     398                        "Top": 10, 
    338399                        "Left": 10, 
    339400                        "Width": 70, 
     
    345406                        "Parameters": [] 
    346407                    } 
    347                 }, { 
     408                }, 
     409                { 
    348410                    "ControlType": "button", 
    349411                    "Label": { 
     
    355417                        "Variable": "Mute", 
    356418                        "Value": "0", 
    357                         "Top": 100, 
     419                        "Top": 10, 
    358420                        "Left": 100, 
    359421                        "Width": 70, 
     
    368430                        }] 
    369431                    } 
    370                 }, { 
     432                }, 
     433                { 
    371434                    "ControlType": "button", 
    372435                    "Label": { 
     
    378441                        "Variable": "Mute", 
    379442                        "Value": "1", 
    380                         "Top": 130, 
     443                        "Top": 40, 
    381444                        "Left": 100, 
    382445                        "Width": 70, 
     
    402465                "Variable": "Input", 
    403466                "Value": "CD", 
    404                 "Top": 30, 
    405                 "Left": 385, 
    406                 "Width": "70", 
    407                 "Height": "20" 
    408             },          "Command": { 
    409                 "Service": "urn:denon-com:serviceId:Receiver1", 
     467                "Top": 10, 
     468                "Left": 320, 
     469                "Width": "70", 
     470                "Height": "20" 
     471            },          "Command": { 
     472                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    410473                "Action": "Input1" 
    411474            } 
     
    421484                "Variable": "Input", 
    422485                "Value": "DVD", 
    423                 "Top": 30, 
    424                 "Left": 465, 
    425                 "Width": "70", 
    426                 "Height": "20" 
    427             },          "Command": { 
    428                 "Service": "urn:denon-com:serviceId:Receiver1", 
     486                "Top": 10, 
     487                "Left": 400, 
     488                "Width": "70", 
     489                "Height": "20" 
     490            },          "Command": { 
     491                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    429492                "Action": "Input2" 
    430493            } 
     
    440503                "Variable": "Input", 
    441504                "Value": "HDP", 
    442                 "Top": 30, 
    443                 "Left": 545, 
    444                 "Width": "70", 
    445                 "Height": "20" 
    446             },          "Command": { 
    447                 "Service": "urn:denon-com:serviceId:Receiver1", 
     505                "Top": 10, 
     506                "Left": 480, 
     507                "Width": "70", 
     508                "Height": "20" 
     509            },          "Command": { 
     510                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    448511                "Action": "Input3" 
    449512            } 
     
    459522                "Variable": "Input", 
    460523                "Value": "TV/CBL", 
    461                 "Top": 60, 
    462                 "Left": 385, 
    463                 "Width": "70", 
    464                 "Height": "20" 
    465             },          "Command": { 
    466                 "Service": "urn:denon-com:serviceId:Receiver1", 
     524                "Top": 35, 
     525                "Left": 320, 
     526                "Width": "70", 
     527                "Height": "20" 
     528            },          "Command": { 
     529                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    467530                "Action": "Input4" 
    468531            } 
     
    478541                "Variable": "Input", 
    479542                "Value": "SAT", 
    480                 "Top": 60, 
    481                 "Left": 465, 
    482                 "Width": "70", 
    483                 "Height": "20" 
    484             },          "Command": { 
    485                 "Service": "urn:denon-com:serviceId:Receiver1", 
     543                "Top": 35, 
     544                "Left": 400, 
     545                "Width": "70", 
     546                "Height": "20" 
     547            },          "Command": { 
     548                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    486549                "Action": "Input5" 
    487550            } 
     
    497560                "Variable": "Input", 
    498561                "Value": "VCR", 
    499                 "Top": 60, 
    500                 "Left": 545, 
    501                 "Width": "70", 
    502                 "Height": "20" 
    503             },          "Command": { 
    504                 "Service": "urn:denon-com:serviceId:Receiver1", 
     562                "Top": 35, 
     563                "Left": 480, 
     564                "Width": "70", 
     565                "Height": "20" 
     566            },          "Command": { 
     567                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    505568                "Action": "Input6" 
    506569            } 
     
    516579                "Variable": "Input", 
    517580                "Value": "DVR", 
    518                 "Top": 90, 
    519                 "Left": 385, 
    520                 "Width": "70", 
    521                 "Height": "20" 
    522             },          "Command": { 
    523                 "Service": "urn:denon-com:serviceId:Receiver1", 
     581                "Top": 60, 
     582                "Left": 320, 
     583                "Width": "70", 
     584                "Height": "20" 
     585            },          "Command": { 
     586                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    524587                "Action": "Input7" 
    525588            } 
     
    535598                "Variable": "Input", 
    536599                "Value": "V.AUX", 
    537                 "Top": 90, 
    538                 "Left": 465, 
    539                 "Width": "70", 
    540                 "Height": "20" 
    541             },          "Command": { 
    542                 "Service": "urn:denon-com:serviceId:Receiver1", 
     600                "Top": 60, 
     601                "Left": 400, 
     602                "Width": "70", 
     603                "Height": "20" 
     604            },          "Command": { 
     605                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    543606                "Action": "Input8" 
    544607            } 
     
    554617                "Variable": "Input", 
    555618                "Value": "TUNER", 
    556                 "Top": 90, 
    557                 "Left": 545, 
    558                 "Width": "70", 
    559                 "Height": "20" 
    560             },          "Command": { 
    561                 "Service": "urn:denon-com:serviceId:Receiver1", 
     619                "Top": 60, 
     620                "Left": 480, 
     621                "Width": "70", 
     622                "Height": "20" 
     623            },          "Command": { 
     624                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    562625                "Action": "Input9" 
    563626            } 
     
    573636                "Variable": "Input", 
    574637                "Value": "PHONO", 
    575                 "Top": 120, 
    576                 "Left": 385, 
    577                 "Width": "70", 
    578                 "Height": "20" 
    579             },          "Command": { 
    580                 "Service": "urn:denon-com:serviceId:Receiver1", 
     638                "Top": 85, 
     639                "Left": 320, 
     640                "Width": "70", 
     641                "Height": "20" 
     642            },          "Command": { 
     643                "Service": "urn:micasaverde-com:serviceId:InputSelection1", 
    581644                "Action": "Input10" 
    582645            } 
     
    592655                "Variable": "Input", 
    593656                "Value": "NET/USB", 
    594                 "Top": 120, 
    595                 "Left": 465, 
     657                "Top": 85, 
     658                "Left": 400, 
    596659                "Width": "70", 
    597660                "Height": "20" 
     
    602665    } 
    603666                ] 
    604             }, { 
     667            }, 
     668            { 
    605669                "Label": { 
    606670                    "lang_tag": "settings", 
     
    611675                "ScriptName": "shared.js", 
    612676                "Function": "simple_device" 
    613             }, { 
     677                }, 
     678                { 
    614679                "Label": { 
    615680                    "lang_tag": "advanced", 
     
    620685                "ScriptName": "shared.js", 
    621686                "Function": "advanced_device" 
    622             }, { 
     687                }, 
     688                { 
    623689                "Label": { 
    624690                    "lang_tag": "device_options", 
     
    629695                "ScriptName": "shared.js", 
    630696                "Function": "device_zwave_options" 
    631             }, { 
     697                }, 
     698                { 
    632699                "Label": { 
    633700                    "lang_tag": "logs", 
     
    638705                "ScriptName": "shared.js", 
    639706                "Function": "device_logs" 
    640             }, { 
     707                }, 
     708                { 
    641709                "Label": { 
    642710                    "lang_tag": "notifications", 
     
    678746                    "cmd_3": { 
    679747                    "label": "Set volume", 
    680                     "serviceId": "urn:denon-com:serviceId:Receiver1", 
    681                     "action": "SetVolumeTarget", 
     748                    "serviceId": "urn:upnp-org:serviceId:RenderingControl1", 
     749                    "action": "SetVolume", 
    682750                    "argumentList": { 
    683751                        "argument_1": { 
     
    690758                            "prefix": "to", 
    691759                            "suffix": "", 
    692                             "name": "Target Volume" 
     760                            "name": "Desired Volume" 
    693761                        } 
    694762                     } 
  • TabularUnified branches/UI7/L_DenonReceiver1.lua

    r41 r43  
    1 local VERSION = "0.7" 
     1local VERSION = "0.71" 
    22 
    33local SWP_SID = "urn:upnp-org:serviceId:SwitchPower1" 
     
    564564 
    565565    local zones = (MODEL[modelNumber] ~= nil) and MODEL[modelNumber].zones or manual_zones 
    566      
     566 
    567567    local setupStatus = luup.variable_get(DEN_SID, "Setup", avr_rec_dev) or "" 
    568568    if (setupStatus == "" or setupStatus == "0") then 
    569569        luup.attr_set("name", (detected_model or "AVR") .. '_' ..(g_zones[1]), avr_rec_dev) 
    570570    end 
    571      
     571 
    572572    for zone_num in zones:gmatch("%d+") do 
    573573        local autoName = g_zones[tonumber(zone_num)] 
  • TabularUnified branches/UI7/createJSON.lua

    r36 r43  
    3434    local outf = io.open( remote_path .. remote_file_json, 'w') 
    3535 
    36     local row_start = 30 
    37     local column_start = 385 
     36    local row_start = 10 
     37    local column_start = 320 
    3838    local button_width = 70 
    3939    local button_height = 20 
    40     local spacing = 10 
     40    local hspacing = 10 
     41    local vspacing = 5 
    4142------ 
     43    outf:write( '{\n' ) 
     44    outf:write( '   "default_icon": "binary_light_default.png",\n' ) 
     45    outf:write( '    "state_icons": [\n' ) 
     46    outf:write( '        {\n' ) 
     47    outf:write( '            "img": "binary_light_off.png",\n' ) 
     48    outf:write( '            "conditions": [\n' ) 
     49    outf:write( '                {\n' ) 
     50    outf:write( '                    "service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     51    outf:write( '                    "variable": "Status",\n' ) 
     52    outf:write( '                    "operator": "==",\n' ) 
     53    outf:write( '                    "value": 0,\n' ) 
     54    outf:write( '                    "subcategory_num": 0\n' ) 
     55    outf:write( '                }\n' ) 
     56    outf:write( '            ]\n' ) 
     57    outf:write( '        },\n' ) 
     58    outf:write( '        {\n' ) 
     59    outf:write( '            "img": "binary_light_on.png",\n' ) 
     60    outf:write( '            "conditions": [\n' ) 
     61    outf:write( '                {\n' ) 
     62    outf:write( '                    "service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     63    outf:write( '                    "variable": "Status",\n' ) 
     64    outf:write( '                    "operator": "==",\n' ) 
     65    outf:write( '                    "value": 1,\n' ) 
     66    outf:write( '                    "subcategory_num": 0\n' ) 
     67    outf:write( '                }\n' ) 
     68    outf:write( '            ]\n' ) 
     69    outf:write( '        }\n' ) 
     70    outf:write( '    ],\n' ) 
     71    outf:write( '   "x": "4",\n' ) 
     72    outf:write( '   "y": "4",\n' ) 
     73    outf:write( '   "inScene": "1",\n' ) 
     74    outf:write( '   "ToggleButton": 1,\n' ) 
     75    outf:write( '   "Tabs": [\n' ) 
    4276    outf:write( '       {\n' ) 
    43     outf:write( '           "flashicon": "icons\/music_audio.png",\n' ) 
    44   outf:write( '         "iconText": "1",\n' ) 
    45     outf:write( '           "imgIconBody": "",\n' ) 
    46     outf:write( '           "imgIconDimmable": "",\n' ) 
    47     outf:write( '           "imgIconTurnable": "",\n' ) 
    48     outf:write( '           "imgIconMin": "",\n' ) 
    49     outf:write( '           "imgIconMax": "",\n' ) 
    50     outf:write( '           "halloIconsDir": "pics/hallo",\n' ) 
    51     outf:write( '           "inScene": "1",\n' ) 
    52     outf:write( '           "DisplayStatus": {\n' ) 
    53     outf:write( '               "Style": "numeric",\n' ) 
    54   outf:write( '             "Service": "urn:upnp-org:serviceId:RenderingControl1",\n' ) 
    55     outf:write( '               "Variable": "Volume",\n' ) 
    56     outf:write( '               "MinValue": "0",\n' ) 
    57     outf:write( '               "MaxValue": "98"\n' ) 
     77    outf:write( '           "Label": {\n' ) 
     78    outf:write( '               "lang_tag": "ui7_tabname_control",\n' ) 
     79    outf:write( '               "text": "Control"\n' ) 
    5880    outf:write( '           },\n' ) 
    59     outf:write( '           "doc_url": {\n' ) 
    60     outf:write( '               "doc_language": 1,\n' ) 
    61     outf:write( '               "doc_manual": 1,\n' ) 
    62     outf:write( '               "doc_version": 1,\n' ) 
    63     outf:write( '               "doc_platform": 0,\n' ) 
    64     outf:write( '               "doc_page": "devices"\n' ) 
    65     outf:write( '           },\n' ) 
    66     outf:write( '           "ToggleButton": 1,\n' ) 
    67     outf:write( '           "Tabs": [{\n' ) 
    68     outf:write( '               "Label": {\n' ) 
    69     outf:write( '                   "lang_tag": "tabname_control",\n' ) 
    70     outf:write( '                   "text": "Volume/Inputs"\n' ) 
    71     outf:write( '               },\n' ) 
    72     outf:write( '               "Position": "0",\n' ) 
    73     outf:write( '               "TabType": "flash",\n' ) 
    74  
    75     outf:write( '               "SceneGroup": [\n' ) 
    76     outf:write( '                   {\n' ) 
    77     outf:write( '                       "id": "1",\n' ) 
    78     outf:write( '                       "top": "1.5",\n' ) 
    79     outf:write( '                       "left": "0"\n' ) 
    80     outf:write( '                   }, {\n' ) 
    81     outf:write( '                       "id": "2",\n' ) 
    82     outf:write( '                       "top": "0.5",\n' ) 
    83     outf:write( '                       "left": "0"\n' ) 
    84     outf:write( '                   }, {\n' ) 
    85     outf:write( '                       "id": "3",\n' ) 
    86     outf:write( '                       "top": "2.75",\n' ) 
    87     outf:write( '                       "left": "0"\n' ) 
    88     outf:write( '                   }\n' ) 
    89  
    90     outf:write( '               ],\n' ) 
    91     outf:write( '               "ControlGroup": [{\n' ) 
     81    outf:write( '           "Position": "0",\n' ) 
     82    outf:write( '           "TabType": "flash",\n' ) 
     83    outf:write( '           "top_navigation_tab": 1,\n' ) 
     84    outf:write( '           "ControlGroup": [\n' ) 
     85    outf:write( '               {\n' ) 
    9286    outf:write( '                   "id": "1",\n' ) 
    93     outf:write( '                   "isSingle": "1",\n' ) 
    9487    outf:write( '                   "scenegroup": "1"\n' ) 
    95     outf:write( '               }, {\n' ) 
     88    outf:write( '               },\n' ) 
     89    outf:write( '               {\n' ) 
    9690    outf:write( '                   "id": "2",\n' ) 
    97     outf:write( '                   "isSingle": "1",\n' ) 
    98     outf:write( '                   "scenegroup": "1"\n' ) 
    99     outf:write( '               }, {\n' ) 
     91    outf:write( '                   "scenegroup": "2"\n' ) 
     92    outf:write( '               },\n' ) 
     93    outf:write( '               {\n' ) 
    10094    outf:write( '                   "id": "3",\n' ) 
    101     outf:write( '                   "isSingle": "1",\n' ) 
    102     outf:write( '                   "scenegroup": "2"\n' ) 
    103     outf:write( '               }, {\n' ) 
    104     outf:write( '                   "id": "4",\n' ) 
    105     outf:write( '                   "isSingle": "1",\n' ) 
    106     outf:write( '                   "scenegroup": "2"\n' ) 
    107     outf:write( '               }, {\n' ) 
    108     outf:write( '                   "id": "5",\n' ) 
    10995    outf:write( '                   "scenegroup": "3"\n' ) 
    110     outf:write( '               }],\n' ) 
    111  
    112     outf:write( '               "Control": [{\n' ) 
    113     outf:write( '                   "ControlGroup": "1",\n' ) 
    114     outf:write( '                   "ControlType": "button",\n' ) 
    115     outf:write( '                   "Label": {\n' ) 
    116     outf:write( '                       "lang_tag": "cmd_off",\n' ) 
    117     outf:write( '                       "text": "Off"\n' ) 
    118     outf:write( '                   },\n' ) 
     96    outf:write( '               }\n' ) 
     97    outf:write( '           ],\n' ) 
     98    outf:write( '           "SceneGroup": [\n' ) 
     99    outf:write( '               {\n' ) 
     100    outf:write( '                   "id": "1",\n' ) 
    119101    outf:write( '                   "top": "0",\n' ) 
    120102    outf:write( '                   "left": "0",\n' ) 
    121     outf:write( '                   "Display": {\n' ) 
    122     outf:write( '                       "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
    123     outf:write( '                       "Variable": "Status",\n' ) 
    124     outf:write( '                       "Value": "0",\n' ) 
    125     outf:write( '                       "Top": 40,\n' ) 
    126     outf:write( '                       "Left": 10,\n' ) 
    127     outf:write( '                       "Width": 70,\n' ) 
    128     outf:write( '                       "Height": 20\n' ) 
    129     outf:write( '                   },\n' ) 
    130     outf:write( '                   "Command": {\n' ) 
    131     outf:write( '                       "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
    132     outf:write( '                       "Action": "SetTarget",\n' ) 
    133     outf:write( '                       "Parameters": [{\n' ) 
    134     outf:write( '                           "Name": "newTargetValue",\n' ) 
    135     outf:write( '                           "Value": "0"\n' ) 
    136     outf:write( '                       }]\n' ) 
    137     outf:write( '                   }\n' ) 
    138     outf:write( '               }, {\n' ) 
    139  
    140     outf:write( '                   "ControlGroup": "2",\n' ) 
    141     outf:write( '                   "ControlType": "button",\n' ) 
    142     outf:write( '                   "Label": {\n' ) 
    143     outf:write( '                       "lang_tag": "cmd_on",\n' ) 
    144     outf:write( '                       "text": "On"\n' ) 
    145     outf:write( '                   },\n' ) 
     103    outf:write( '                   "x": "1",\n' ) 
     104    outf:write( '                   "y": "0.5"\n' ) 
     105    outf:write( '               },\n' ) 
     106    outf:write( '               {\n' ) 
     107    outf:write( '                   "id": "2",\n' ) 
    146108    outf:write( '                   "top": "0",\n' ) 
    147109    outf:write( '                   "left": "1",\n' ) 
    148     outf:write( '                   "Display": {\n' ) 
    149     outf:write( '                       "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
    150     outf:write( '                       "Variable": "Status",\n' ) 
    151     outf:write( '                       "Value": "1",\n' ) 
    152     outf:write( '                       "Top": 40,\n' ) 
    153     outf:write( '                       "Left": 100,\n' ) 
    154     outf:write( '                       "Width": 70,\n' ) 
    155     outf:write( '                       "Height": 20\n' ) 
    156     outf:write( '                   },\n' ) 
    157     outf:write( '                   "Command": {\n' ) 
    158     outf:write( '                       "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
    159     outf:write( '                       "Action": "SetTarget",\n' ) 
    160     outf:write( '                       "Parameters": [{\n' ) 
    161     outf:write( '                           "Name": "newTargetValue",\n' ) 
    162     outf:write( '                           "Value": "1"\n' ) 
    163     outf:write( '                       }]\n' ) 
    164     outf:write( '                   }\n' ) 
    165     outf:write( '               }, {\n' ) 
    166  
    167     outf:write( '                   "ControlGroup": "3",\n' ) 
    168     outf:write( '                   "ControlType": "button",\n' ) 
    169     outf:write( '                   "Label": {\n' ) 
    170     outf:write( '                       "lang_tag": "cmd_off",\n' ) 
    171     outf:write( '                       "text": "Standby"\n' ) 
    172     outf:write( '                   },\n' ) 
     110    outf:write( '                   "x": "1",\n' ) 
     111    outf:write( '                   "y": "0.5"\n' ) 
     112    outf:write( '               },\n' ) 
     113    outf:write( '               {\n' ) 
     114    outf:write( '                   "id": "3",\n' ) 
     115    outf:write( '                   "top": "1.5",\n' ) 
     116    outf:write( '                   "left": "0",\n' ) 
     117    outf:write( '                   "x": "2",\n' ) 
     118    outf:write( '                   "y": "1.5"\n' ) 
     119    outf:write( '               }\n' ) 
     120    outf:write( '           ],\n' ) 
     121    outf:write( '               "Control": [\n' ) 
     122 
     123    outf:write( '               {\n' ) 
     124    outf:write( '                   "ControlGroup": "1",\n' ) 
     125    outf:write( '                   "ControlType": "multi_state_button",\n' ) 
    173126    outf:write( '                   "top": "0",\n' ) 
    174127    outf:write( '                   "left": "0",\n' ) 
    175     outf:write( '                   "Display": {\n' ) 
    176     outf:write( '                       "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
    177     outf:write( '                       "Variable": "PowerStatus",\n' ) 
    178     outf:write( '                       "Value": "0",\n' ) 
    179     outf:write( '                       "Top": 10,\n' ) 
    180     outf:write( '                       "Left": 10,\n' ) 
    181     outf:write( '                       "Width": 70,\n' ) 
    182     outf:write( '                       "Height": 20\n' ) 
    183     outf:write( '                   },\n' ) 
    184     outf:write( '                   "Command": {\n' ) 
    185     outf:write( '                       "Service": "urn:micasaverde-com:serviceId:DiscretePower1",\n' ) 
    186     outf:write( '                       "Action": "Off",\n' ) 
    187     outf:write( '                       "Parameters": [{\n' ) 
    188     outf:write( '                           "Name": "Off",\n' ) 
    189     outf:write( '                           "Value": "0"\n' ) 
    190     outf:write( '                       }]\n' ) 
    191     outf:write( '                   }\n' ) 
    192     outf:write( '               }, {\n' ) 
    193  
    194     outf:write( '                   "ControlGroup": "4",\n' ) 
    195     outf:write( '                   "ControlType": "button",\n' ) 
    196     outf:write( '                   "Label": {\n' ) 
    197     outf:write( '                       "lang_tag": "cmd_on",\n' ) 
    198     outf:write( '                       "text": "Main On"\n' ) 
    199     outf:write( '                   },\n' ) 
     128    outf:write( '                   "states":[\n' ) 
     129    outf:write( '                       {\n' ) 
     130    outf:write( '                           "Label": {\n' ) 
     131    outf:write( '                               "lang_tag": "ui7_cmd_on",\n' ) 
     132    outf:write( '                               "text": "On"\n' ) 
     133    outf:write( '                           },\n' ) 
     134    outf:write( '                           "ControlGroup": "1",\n' ) 
     135    outf:write( '                           "Display": {\n' ) 
     136    outf:write( '                               "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     137    outf:write( '                               "Variable": "Status",\n' ) 
     138    outf:write( '                               "Value": "1"\n' ) 
     139    outf:write( '                           },\n' ) 
     140    outf:write( '                           "Command": {\n' ) 
     141    outf:write( '                               "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     142    outf:write( '                               "Action": "SetTarget",\n' ) 
     143    outf:write( '                               "Parameters": [\n' ) 
     144    outf:write( '                                   {\n' ) 
     145    outf:write( '                                       "Name": "newTargetValue",\n' ) 
     146    outf:write( '                                       "Value": "1"\n' ) 
     147    outf:write( '                                   }\n' ) 
     148    outf:write( '                               ]\n' ) 
     149    outf:write( '                           },\n' ) 
     150    outf:write( '                           "ControlCode": "power_on"\n' ) 
     151    outf:write( '                       },\n' ) 
     152    outf:write( '                       {\n' ) 
     153    outf:write( '                           "Label": {\n' ) 
     154    outf:write( '                               "lang_tag": "ui7_cmd_off",\n' ) 
     155    outf:write( '                               "text": "Off"\n' ) 
     156    outf:write( '                           },\n' ) 
     157    outf:write( '                           "ControlGroup": "1",\n' ) 
     158    outf:write( '                           "Display": {\n' ) 
     159    outf:write( '                               "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     160    outf:write( '                               "Variable": "Status",\n' ) 
     161    outf:write( '                               "Value": "0"\n' ) 
     162    outf:write( '                           },\n' ) 
     163    outf:write( '                           "Command": {\n' ) 
     164    outf:write( '                               "Service": "urn:upnp-org:serviceId:SwitchPower1",\n' ) 
     165    outf:write( '                               "Action": "SetTarget",\n' ) 
     166    outf:write( '                               "Parameters": [\n' ) 
     167    outf:write( '                                   {\n' ) 
     168    outf:write( '                                       "Name": "newTargetValue",\n' ) 
     169    outf:write( '                                       "Value": "0"\n' ) 
     170    outf:write( '                                   }\n' ) 
     171    outf:write( '                               ]\n' ) 
     172    outf:write( '                           },\n' ) 
     173    outf:write( '                           "ControlCode": "power_off"\n' ) 
     174    outf:write( '                       }\n' ) 
     175    outf:write( '                   ]\n' ) 
     176    outf:write( '               },\n' ) 
     177 
     178    outf:write( '               {\n' ) 
     179    outf:write( '                   "ControlGroup": "2",\n' ) 
     180    outf:write( '                   "ControlType": "multi_state_button",\n' ) 
    200181    outf:write( '                   "top": "0",\n' ) 
    201182    outf:write( '                   "left": "1",\n' ) 
    202     outf:write( '                   "Display": {\n' ) 
    203     outf:write( '                       "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
    204     outf:write( '                       "Variable": "PowerStatus",\n' ) 
    205     outf:write( '                       "Value": "1",\n' ) 
    206     outf:write( '                       "Top": 10,\n' ) 
    207     outf:write( '                       "Left": 100,\n' ) 
    208     outf:write( '                       "Width": 70,\n' ) 
    209     outf:write( '                       "Height": 20\n' ) 
    210     outf:write( '                   },\n' ) 
    211     outf:write( '                   "Command": {\n' ) 
    212     outf:write( '                       "Service": "urn:micasaverde-com:serviceId:DiscretePower1",\n' ) 
    213     outf:write( '                       "Action": "On",\n' ) 
    214     outf:write( '                       "Parameters": [{\n' ) 
    215     outf:write( '                           "Name": "On",\n' ) 
    216     outf:write( '                           "Value": "1"\n' ) 
    217     outf:write( '                       }]\n' ) 
    218     outf:write( '                   }\n' ) 
    219     outf:write( '               }, {\n' ) 
    220  
    221     outf:write( '                   "ControlGroup": "5",\n' ) 
     183    outf:write( '                   "states":[\n' ) 
     184    outf:write( '                       {\n' ) 
     185    outf:write( '                           "Label": {\n' ) 
     186    outf:write( '                               "lang_tag": "ui7_cmd_on",\n' ) 
     187    outf:write( '                               "text": "On"\n' ) 
     188    outf:write( '                           },\n' ) 
     189    outf:write( '                           "ControlGroup": "1",\n' ) 
     190    outf:write( '                           "Display": {\n' ) 
     191    outf:write( '                               "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
     192    outf:write( '                               "Variable": "PowerStatus",\n' ) 
     193    outf:write( '                               "Value": "1"\n' ) 
     194    outf:write( '                           },\n' ) 
     195    outf:write( '                           "Command": {\n' ) 
     196    outf:write( '                               "Service": "urn:micasaverde-com:serviceId:DiscretePower1",\n' ) 
     197    outf:write( '                               "Action": "On",\n' ) 
     198    outf:write( '                               "Parameters": [\n' ) 
     199    outf:write( '                                   {\n' ) 
     200    outf:write( '                                       "Name": "On",\n' ) 
     201    outf:write( '                                       "Value": "1"\n' ) 
     202    outf:write( '                                   }\n' ) 
     203    outf:write( '                               ]\n' ) 
     204    outf:write( '                           },\n' ) 
     205    outf:write( '                           "ControlCode": "power_on"\n' ) 
     206    outf:write( '                       },\n' ) 
     207    outf:write( '                       {\n' ) 
     208    outf:write( '                           "Label": {\n' ) 
     209    outf:write( '                               "lang_tag": "ui7_cmd_off",\n' ) 
     210    outf:write( '                               "text": "Standby"\n' ) 
     211    outf:write( '                           },\n' ) 
     212    outf:write( '                           "ControlGroup": "1",\n' ) 
     213    outf:write( '                           "Display": {\n' ) 
     214    outf:write( '                               "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
     215    outf:write( '                               "Variable": "PowerStatus",\n' ) 
     216    outf:write( '                               "Value": "0"\n' ) 
     217    outf:write( '                           },\n' ) 
     218    outf:write( '                           "Command": {\n' ) 
     219    outf:write( '                               "Service": "urn:micasaverde-com:serviceId:DiscretePower1",\n' ) 
     220    outf:write( '                               "Action": "Off",\n' ) 
     221    outf:write( '                               "Parameters": [\n' ) 
     222    outf:write( '                                   {\n' ) 
     223    outf:write( '                                       "Name": "Off",\n' ) 
     224    outf:write( '                                       "Value": "0"\n' ) 
     225    outf:write( '                                   }\n' ) 
     226    outf:write( '                               ]\n' ) 
     227    outf:write( '                           },\n' ) 
     228    outf:write( '                           "ControlCode": "power_off"\n' ) 
     229    outf:write( '                       }\n' ) 
     230    outf:write( '                   ]\n' ) 
     231    outf:write( '               },\n' ) 
     232 
     233    outf:write( '               {\n' ) 
     234    outf:write( '                   "ControlGroup": "3",\n' ) 
    222235    outf:write( '                   "ControlType": "slider",\n' ) 
    223236    outf:write( '                   "top": "0",\n' ) 
    224237    outf:write( '                   "left": "0",\n' ) 
    225     --outf:write( '                 "ControlPair": "1",\n' ) 
    226238    outf:write( '                   "ControlHeader": "1",\n' ) 
    227  
    228239    outf:write( '                   "ID": "newTargetValue",\n' ) 
    229240    outf:write( '                   "Style": "numeric",\n' ) 
     
    236247    outf:write( '                       "Left": 10,\n' ) 
    237248    outf:write( '                       "Width": 200,\n' ) 
    238     outf:write( '                       "Height": 20\n' ) 
     249    outf:write( '                       "Height": 5\n' ) 
    239250    outf:write( '                   },\n' ) 
    240251    outf:write( '                   "Command": {\n' ) 
     
    246257    outf:write( '                       }]\n' ) 
    247258    outf:write( '                   }\n' ) 
    248     outf:write( '               }, {\n' ) 
    249  
     259    outf:write( '               },\n' ) 
     260 
     261    outf:write( '               {\n' ) 
    250262    outf:write( '                   "ControlType": "label",\n' ) 
    251263    outf:write( '                   "Label": {\n' ) 
     
    260272    outf:write( '                       "Height": 20\n' ) 
    261273    outf:write( '                   }\n' ) 
    262     outf:write( '               }, {\n' ) 
     274    outf:write( '               },\n' ) 
     275 
     276    outf:write( '               {\n' ) 
    263277    outf:write( '                   "ControlType": "variable",\n' ) 
    264278    outf:write( '                   "Display": {\n' ) 
     
    270284    outf:write( '                       "Height": 20\n' ) 
    271285    outf:write( '                   }\n' ) 
    272     outf:write( '               }, {\n' ) 
    273  
     286    outf:write( '               },\n' ) 
     287 
     288    outf:write( '               {\n' ) 
    274289    outf:write( '                   "ControlType": "label",\n' ) 
    275290    outf:write( '                   "Label": {\n' ) 
     
    284299    outf:write( '                       "Height": 20\n' ) 
    285300    outf:write( '                   }\n' ) 
    286     outf:write( '               }, {\n' ) 
     301    outf:write( '               },\n' ) 
     302 
     303    outf:write( '               {\n' ) 
    287304    outf:write( '                   "ControlType": "variable",\n' ) 
    288305    outf:write( '                   "Display": {\n' ) 
     
    294311    outf:write( '                       "Height": 20\n' ) 
    295312    outf:write( '                   }\n' ) 
    296     outf:write( '               }, {\n' ) 
    297  
     313    outf:write( '               },\n' ) 
     314 
     315    outf:write( '               {\n' ) 
    298316    outf:write( '                   "ControlType": "label",\n' ) 
    299317    outf:write( '                   "Label": {\n' ) 
     
    308326    outf:write( '                       "Height": 20\n' ) 
    309327    outf:write( '                   }\n' ) 
    310     outf:write( '               }, {\n' ) 
     328    outf:write( '               },\n' ) 
     329 
     330    outf:write( '               {\n' ) 
    311331    outf:write( '                   "ControlType": "variable",\n' ) 
    312332    outf:write( '                   "Display": {\n' ) 
     
    318338    outf:write( '                       "Height": 20\n' ) 
    319339    outf:write( '                   }\n' ) 
    320     outf:write( '               }, {\n' ) 
    321  
     340    outf:write( '               },\n' ) 
     341 
     342    outf:write( '               {\n' ) 
    322343    outf:write( '                   "ControlType": "label",\n' ) 
    323344    outf:write( '                   "Label": {\n' ) 
     
    332353    outf:write( '                       "Height": 20\n' ) 
    333354    outf:write( '                   }\n' ) 
    334     outf:write( '               }, {\n' ) 
     355    outf:write( '               },\n' ) 
     356 
     357    outf:write( '               {\n' ) 
    335358    outf:write( '                   "ControlType": "variable",\n' ) 
    336359    outf:write( '                   "Display": {\n' ) 
     
    342365    outf:write( '                       "Height": 20\n' ) 
    343366    outf:write( '                   }\n' ) 
    344     outf:write( '               }, {\n' ) 
    345  
     367    outf:write( '               },\n' ) 
     368 
     369    outf:write( '               {\n' ) 
    346370    outf:write( '                   "ControlType": "label",\n' ) 
    347371    outf:write( '                   "Label": {\n' ) 
     
    356380    outf:write( '                       "Height": 20\n' ) 
    357381    outf:write( '                   }\n' ) 
    358     outf:write( '               }, {\n' ) 
    359  
     382    outf:write( '               },\n' ) 
     383 
     384    outf:write( '               {\n' ) 
    360385    outf:write( '                   "ControlType": "variable",\n' ) 
    361386    outf:write( '                   "Display": {\n' ) 
     
    367392    outf:write( '                       "Height": 20\n' ) 
    368393    outf:write( '                   }\n' ) 
    369     outf:write( '               }, {\n' ) 
    370  
    371 --[[ 
     394    outf:write( '               },\n' ) 
     395 
     396    outf:write( '               {\n' ) 
    372397    outf:write( '                   "ControlType": "button",\n' ) 
    373398    outf:write( '                   "Label": {\n' ) 
     
    376401    outf:write( '                   },\n' ) 
    377402    outf:write( '                   "Display": {\n' ) 
    378     outf:write( '                       "Top": 230,\n' ) 
    379     outf:write( '                       "Left": 10,\n' ) 
    380     outf:write( '                       "Width": 70,\n' ) 
     403    outf:write( '                       "Top": 260,\n' ) 
     404    outf:write( '                       "Left": 10,\n' ) 
     405    outf:write( '                       "Width": 75,\n' ) 
    381406    outf:write( '                       "Height": 20\n' ) 
    382407    outf:write( '                   },\n' ) 
    383408    outf:write( '                   "Command": {\n' ) 
    384409    outf:write( '                       "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
    385     outf:write( '                       "Action": "Command",\n' ) 
    386     outf:write( '                       "Parameters": []\n' ) 
    387     outf:write( '                   }\n' ) 
    388     outf:write( '               }, {\n' ) 
    389 ]]-- 
    390  
     410    outf:write( '                       "Action": "SendCommand",\n' ) 
     411    outf:write( '                       "Parameters": [\n' ) 
     412    outf:write( '                       {\n' ) 
     413    outf:write( '                       "Name": "Command",\n' ) 
     414    outf:write( '                       "ID": "Command"\n' ) 
     415    outf:write( '                       }\n' ) 
     416    outf:write( '                       ]\n' ) 
     417 
     418    outf:write( '                   }\n' ) 
     419    outf:write( '               },\n' ) 
     420 
     421    outf:write( '               {\n' ) 
     422    outf:write( '                   "ControlType": "input",\n' ) 
     423    outf:write( '                   "ID": "Command",\n' ) 
     424    outf:write( '                   "Display": {\n' ) 
     425    outf:write( '                       "Top": 260,\n' ) 
     426    outf:write( '                       "Left": 120,\n' ) 
     427    outf:write( '                       "Width": 100,\n' ) 
     428    outf:write( '                       "Height": 20\n' ) 
     429    outf:write( '                }\n' ) 
     430    outf:write( '               },\n' ) 
     431 
     432    outf:write( '               {\n' ) 
    391433    outf:write( '                   "ControlType": "button",\n' ) 
    392434    outf:write( '                   "Label": {\n' ) 
     
    395437    outf:write( '                   },\n' ) 
    396438    outf:write( '                   "Display": {\n' ) 
    397     outf:write( '                       "Top": 130,\n' ) 
     439    outf:write( '                       "Top": 40,\n' ) 
    398440    outf:write( '                       "Left": 10,\n' ) 
    399441    outf:write( '                       "Width": 70,\n' ) 
     
    405447    outf:write( '                       "Parameters": []\n' ) 
    406448    outf:write( '                   }\n' ) 
    407     outf:write( '               }, {\n' ) 
    408  
     449    outf:write( '               },\n' ) 
     450 
     451    outf:write( '               {\n' ) 
    409452    outf:write( '                   "ControlType": "button",\n' ) 
    410453    outf:write( '                   "Label": {\n' ) 
     
    413456    outf:write( '                   },\n' ) 
    414457    outf:write( '                   "Display": {\n' ) 
    415     outf:write( '                       "Top": 100,\n' ) 
     458    outf:write( '                       "Top": 10,\n' ) 
    416459    outf:write( '                       "Left": 10,\n' ) 
    417460    outf:write( '                       "Width": 70,\n' ) 
     
    423466    outf:write( '                       "Parameters": []\n' ) 
    424467    outf:write( '                   }\n' ) 
    425     outf:write( '               }, {\n' ) 
    426  
     468    outf:write( '               },\n' ) 
     469 
     470    outf:write( '               {\n' ) 
    427471    outf:write( '                   "ControlType": "button",\n' ) 
    428472    outf:write( '                   "Label": {\n' ) 
     
    434478    outf:write( '                       "Variable": "Mute",\n' ) 
    435479    outf:write( '                       "Value": "0",\n' ) 
    436     outf:write( '                       "Top": 100,\n' ) 
     480    outf:write( '                       "Top": 10,\n' ) 
    437481    outf:write( '                       "Left": 100,\n' ) 
    438482    outf:write( '                       "Width": 70,\n' ) 
     
    447491    outf:write( '                       }]\n' ) 
    448492    outf:write( '                   }\n' ) 
    449     outf:write( '               }, {\n' ) 
    450  
     493    outf:write( '               },\n' ) 
     494 
     495    outf:write( '               {\n' ) 
    451496    outf:write( '                   "ControlType": "button",\n' ) 
    452497    outf:write( '                   "Label": {\n' ) 
     
    458503    outf:write( '                       "Variable": "Mute",\n' ) 
    459504    outf:write( '                       "Value": "1",\n' ) 
    460     outf:write( '                       "Top": 130,\n' ) 
     505    outf:write( '                       "Top": 40,\n' ) 
    461506    outf:write( '                       "Left": 100,\n' ) 
    462507    outf:write( '                       "Width": 70,\n' ) 
     
    480525        local source = (input_table[k]["source"]) 
    481526        local column_num = (k%3 == 0) and (3-1) or ((k%3)-1) 
    482         local left = (column_num*(button_width+spacing))+column_start 
    483         local top = ((math.ceil(k/3) == 1)) and row_start or ((math.ceil(k/3)) * row_start) 
     527        local left = (column_num*(button_width+hspacing))+column_start 
     528        local top = ((math.ceil(k/3) == 1)) and row_start or ((math.ceil(k/3)-1) * (button_height+vspacing)) + row_start 
    484529 
    485530        if (source ~= "") then 
     
    503548                outf:write( '               "Service": "urn:micasaverde-com:serviceId:InputSelection1",\n' ) 
    504549            else 
    505                 outf:write( '               "Service": "urn:denon-com:serviceId:Receiver1",\n' )                 
     550                outf:write( '               "Service": "urn:denon-com:serviceId:Receiver1",\n' ) 
    506551            end 
    507552            outf:write( '               "Action": "Input' .. k .. '"\n' ) 
     
    518563 
    519564    outf:write( '               ]\n' ) 
    520     outf:write( '           }, {\n' ) 
     565    outf:write( '           },\n' ) 
     566 
     567    outf:write( '           {\n' ) 
    521568------ 
    522569--[[ 
     
    550597    outf:write( '               "ScriptName": "shared.js",\n' ) 
    551598    outf:write( '               "Function": "simple_device"\n' ) 
    552     outf:write( '           }, {\n' ) 
    553 ------ 
     599    outf:write( '               },\n' ) 
     600 
     601    outf:write( '               {\n' ) 
    554602    outf:write( '               "Label": {\n' ) 
    555603    outf:write( '                   "lang_tag": "advanced",\n' ) 
     
    560608    outf:write( '               "ScriptName": "shared.js",\n' ) 
    561609    outf:write( '               "Function": "advanced_device"\n' ) 
    562     outf:write( '           }, {\n' ) 
    563 ------ 
     610    outf:write( '               },\n' ) 
     611 
     612    outf:write( '               {\n' ) 
    564613    outf:write( '               "Label": {\n' ) 
    565614    outf:write( '                   "lang_tag": "device_options",\n' ) 
     
    570619    outf:write( '               "ScriptName": "shared.js",\n' ) 
    571620    outf:write( '               "Function": "device_zwave_options"\n' ) 
    572     outf:write( '           }, {\n' ) 
    573 ------ 
     621    outf:write( '               },\n' ) 
     622 
     623    outf:write( '               {\n' ) 
    574624    outf:write( '               "Label": {\n' ) 
    575625    outf:write( '                   "lang_tag": "logs",\n' ) 
     
    580630    outf:write( '               "ScriptName": "shared.js",\n' ) 
    581631    outf:write( '               "Function": "device_logs"\n' ) 
    582     outf:write( '           }, {\n' ) 
    583 ------ 
     632    outf:write( '               },\n' ) 
     633 
     634    outf:write( '               {\n' ) 
    584635    outf:write( '               "Label": {\n' ) 
    585636    outf:write( '                   "lang_tag": "notifications",\n' ) 
  • TabularUnified branches/UI7/notes

    r36 r43  
    5858the name and it will stick, if the setup is run again this name will be reset. 
    5959 
    60  
     60---------------------------------------------------------------- 
     61Release 0.7 
     62Seperate release for UI7. 
     63Changes to JSON creation file. 
    6164---------------------------------------------------------------- 
    6265Release 0.5 
Note: See TracChangeset for help on using the changeset viewer.