mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
189 lines
7.2 KiB
HTML
189 lines
7.2 KiB
HTML
<ul class="nav nav-pills" role="tablist">
|
|
<li role="presentation"><a href="#">Bridge Devices</a></li>
|
|
<li role="presentation"><a href="#/system">Bridge Control</a></li>
|
|
<li role="presentation"><a href="#/logs">Logs</a></li>
|
|
<li role="presentation" class="active"><a href="#/veradevices">Vera
|
|
Devices</a></li>
|
|
<li role="presentation"><a href="#/verascenes">Vera Scenes</a></li>
|
|
<li ng-if="bridge.showHarmony" role="presentation"><a
|
|
href="#/harmonyactivities">Harmony Activities</a></li>
|
|
<li ng-if="bridge.showHarmony" role="presentation"><a
|
|
href="#/harmonydevices">Harmony Devices</a></li>
|
|
<li ng-if="bridge.showNest" role="presentation"><a href="#/nest">Nest</a></li>
|
|
<li ng-if="bridge.showHue" role="presentation"><a
|
|
href="#/huedevices">Hue Devices</a></li>
|
|
<li ng-if="bridge.showHal" role="presentation"><a
|
|
href="#/haldevices">HAL Devices</a></li>
|
|
<li ng-if="bridge.showMqtt" role="presentation"><a href="#/mqttmessages">MQTT Messages</a></li>
|
|
<li ng-if="bridge.showHass" role="presentation"><a href="#/hassdevices">HomeAssistant Devices</a></li>
|
|
<li role="presentation"><a href="#/editor">Manual Add</a></li>
|
|
</ul>
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h2 class="panel-title">Vera Device List
|
|
({{bridge.veradevices.length}})</h2>
|
|
</div>
|
|
<div class="panel-body">
|
|
<p class="text-muted">For any Vera Device, use the action buttons
|
|
to generate the device addition information below automatically. Then
|
|
you can modify the name to anything you want that will be the keyword
|
|
for Alexa. Click the 'Add Bridge Device' to finish that selection
|
|
setup. The 'Already Configured Vera Devices' list below will show
|
|
what is already setup for your Vera.</p>
|
|
<p>
|
|
Also, use this select menu for which type of dim control you would
|
|
like to be generated: <select name="device-dim-control"
|
|
id="device-dim-control" ng-model="device_dim_control">
|
|
<option value="">none</option>
|
|
<option value="${intensity.byte}">Pass-thru Value</option>
|
|
<option value="${intensity.percent}">Percentage</option>
|
|
<option value="${intensity.math(X*1)}">Custom Math</option>
|
|
</select>
|
|
</p>
|
|
<p>Use the check boxes by the names to use the bulk addition
|
|
feature. Select your items and dim control type if wanted, then click
|
|
bulk add below. Your items will be added with on and off or dim and
|
|
off if selected with the name of the device from the Vera.</p>
|
|
</div>
|
|
<scrollable-table watch="bridge.veradevices">
|
|
<table class="table table-bordered table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Row</th>
|
|
<th sortable-header col="name"><span><input type="checkbox" name="selectAll"
|
|
value="{{selectAll}}"
|
|
ng-checked="selectAll"
|
|
ng-click="toggleSelectAll()"> Name</span></th>
|
|
<th sortable-header col="id">Id</th>
|
|
<th sortable-header col="category">Category</th>
|
|
<th sortable-header col="room">Room</th>
|
|
<th sortable-header col="veraname">Vera</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tr
|
|
ng-repeat="veradevice in bridge.veradevices | availableVeraDeviceId">
|
|
<td>{{$index+1}}</td>
|
|
<td><input type="checkbox" name="bulk.devices[]"
|
|
value="{{veradevice.id}}"
|
|
ng-checked="bulk.devices.indexOf(veradevice.id) > -1"
|
|
ng-click="toggleSelection(veradevice.id)">
|
|
{{veradevice.name}}</td>
|
|
<td>{{veradevice.id}}</td>
|
|
<td>{{veradevice.category}}</td>
|
|
<td>{{veradevice.room}}</td>
|
|
<td>{{veradevice.veraname}}</td>
|
|
<td>
|
|
<button class="btn btn-success" type="submit"
|
|
ng-click="buildDeviceUrls(veradevice, device_dim_control)">Generate
|
|
Bridge Device</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</scrollable-table>
|
|
<div class="panel-footer">
|
|
<button class="btn btn-success" type="submit"
|
|
ng-click="bulkAddDevices(device_dim_control)">Bulk Add
|
|
({{bulk.devices.length}})</button>
|
|
</div>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h2 class="panel-title">
|
|
Already Configured Vera Devices <a ng-click="toggleButtons()"><span
|
|
class={{imgButtonsUrl}} aria-hidden="true"></span></a></a>
|
|
</h2>
|
|
</div>
|
|
<scrollable-table ng-if="buttonsVisible" watch="bridge.veradevices">
|
|
<table class="table table-bordered table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Row</th>
|
|
<th sortable-header col="name">Name</th>
|
|
<th sortable-header col="id">Id</th>
|
|
<th sortable-header col="category">Category</th>
|
|
<th sortable-header col="room">Room</th>
|
|
<th sortable-header col="veraname">Vera</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tr
|
|
ng-repeat="veradevice in bridge.veradevices | unavailableVeraDeviceId">
|
|
<td>{{$index+1}}</td>
|
|
<td>{{veradevice.name}}</td>
|
|
<td>{{veradevice.id}}</td>
|
|
<td>{{veradevice.category}}</td>
|
|
<td>{{veradevice.room}}</td>
|
|
<td>{{veradevice.veraname}}</td>
|
|
<td>
|
|
<button class="btn btn-danger" type="submit"
|
|
ng-click="deleteDeviceByMapId(veradevice.id, 'veraDevice')">Delete</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</scrollable-table>
|
|
</div>
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h2 class="panel-title">Add Bridge Device for a Vera Device</h2>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form class="form-horizontal">
|
|
<div class="form-group">
|
|
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
|
|
</label>
|
|
|
|
<div class="col-xs-8 col-sm-7">
|
|
<input type="text" class="form-control" id="device-name"
|
|
ng-model="device.name" placeholder="Device Name">
|
|
</div>
|
|
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
|
|
ng-click="addDevice()">Add Bridge Device</button>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
|
URL </label>
|
|
|
|
<div class="col-xs-8 col-sm-7">
|
|
<textarea rows="3" class="form-control" id="device-on-url"
|
|
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
|
|
</div>
|
|
<button class="btn btn-danger" ng-click="clearDevice()">
|
|
Clear Device</button>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<label class="col-xs-12 col-sm-2 control-label"
|
|
for="device-dim-url">Dim URL </label>
|
|
|
|
<div class="col-xs-8 col-sm-7">
|
|
<textarea rows="3" class="form-control" id="device-dim-url"
|
|
ng-model="device.dimUrl" placeholder="URL to dim device"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<label class="col-xs-12 col-sm-2 control-label"
|
|
for="device-off-url">Off URL </label>
|
|
|
|
<div class="col-xs-8 col-sm-7">
|
|
<textarea rows="3" class="form-control" id="device-off-url"
|
|
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script type="text/ng-template" id="deleteMapandIdDialog">
|
|
<div class="ngdialog-message">
|
|
<h2>Device Map and Id?</h2>
|
|
<p>{{mapandid.mapType}} with {{mapandid.id}}</p>
|
|
<p>Are you Sure?</p>
|
|
</div>
|
|
<div class="ngdialog-buttons mt">
|
|
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
|
|
</div>
|
|
</script> |