mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Updated upnp response listener code. Updated hue api. Updated input
areas for urls to be textareas to handle long strings. Added sorting to all lists.
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.bwssystems.HABridge</groupId>
|
<groupId>com.bwssystems.HABridge</groupId>
|
||||||
<artifactId>ha-bridge</artifactId>
|
<artifactId>ha-bridge</artifactId>
|
||||||
<version>0.3.5</version>
|
<version>0.4.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>HA Bridge</name>
|
<name>HA Bridge</name>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class HueMulator {
|
|||||||
|
|
||||||
|
|
||||||
public HueMulator(DeviceRepository aDeviceRepository){
|
public HueMulator(DeviceRepository aDeviceRepository){
|
||||||
httpClient = HttpClients.createMinimal();
|
httpClient = HttpClients.createDefault();
|
||||||
mapper = new ObjectMapper(); //armzilla: work around Echo incorrect content type and breaking mapping. Map manually
|
mapper = new ObjectMapper(); //armzilla: work around Echo incorrect content type and breaking mapping. Map manually
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
repository = aDeviceRepository;
|
repository = aDeviceRepository;
|
||||||
|
|||||||
@@ -63,14 +63,8 @@ public class UpnpListener {
|
|||||||
DatagramPacket packet = new DatagramPacket(buf, buf.length);
|
DatagramPacket packet = new DatagramPacket(buf, buf.length);
|
||||||
upnpMulticastSocket.receive(packet);
|
upnpMulticastSocket.receive(packet);
|
||||||
String packetString = new String(packet.getData());
|
String packetString = new String(packet.getData());
|
||||||
|
log.debug("Got SSDP packet from " + packet.getAddress().getHostAddress() + ":" + packet.getPort() + " body : " + packetString);
|
||||||
if(isSSDPDiscovery(packetString)){
|
if(isSSDPDiscovery(packetString)){
|
||||||
try {
|
|
||||||
Thread.sleep(3000);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
log.error("could not sleep");
|
|
||||||
}
|
|
||||||
log.debug("Got SSDP Discovery packet from " + packet.getAddress().getHostAddress() + ":" + packet.getPort());
|
|
||||||
sendUpnpResponse(responseSocket, packet.getAddress(), packet.getPort());
|
sendUpnpResponse(responseSocket, packet.getAddress(), packet.getPort());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,7 +85,8 @@ public class UpnpListener {
|
|||||||
protected boolean isSSDPDiscovery(String body){
|
protected boolean isSSDPDiscovery(String body){
|
||||||
// log.debug("Check if this is a MAN ssdp-discover packet for a upnp basic device: " + body);
|
// log.debug("Check if this is a MAN ssdp-discover packet for a upnp basic device: " + body);
|
||||||
//Only respond to discover request for upnp basic device from echo, the others are for the wemo
|
//Only respond to discover request for upnp basic device from echo, the others are for the wemo
|
||||||
if(body != null && body.startsWith("M-SEARCH * HTTP/1.1") && body.contains("MAN: \"ssdp:discover\"")&& body.contains("ST: urn:schemas-upnp-org:device:basic:1")){
|
// other check: && body.contains("ST: urn:schemas-upnp-org:device:basic:1")
|
||||||
|
if(body != null && body.startsWith("M-SEARCH * HTTP/1.1") && body.contains("MAN: \"ssdp:discover\"")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||||
<li><a href="http://www.bwssystems.com" target="_blank">Developed by BWS Systems</a></li>
|
<li><a href="http://www.bwssystems.com" target="_blank">Developed by BWS Systems</a></li>
|
||||||
<li><a href="http://www.amazon.com/echo" target="_blank">Amazon Echo</a></li>
|
<li><a href="http://www.amazon.com/echo" target="_blank">Amazon Echo</a></li>
|
||||||
<li><a href="#">HA Bridge Version 0.3.5</a></li>
|
<li><a href="#">HA Bridge Version 0.4.0</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -207,6 +207,12 @@ app.controller('ViewingController', function ($scope, $location, bridgeService,
|
|||||||
$scope.BridgeSettings = bridgeService.BridgeSettings;
|
$scope.BridgeSettings = bridgeService.BridgeSettings;
|
||||||
bridgeService.viewDevices();
|
bridgeService.viewDevices();
|
||||||
$scope.bridge = bridgeService.state;
|
$scope.bridge = bridgeService.state;
|
||||||
|
$scope.predicate = 'name';
|
||||||
|
$scope.reverse = true;
|
||||||
|
$scope.order = function(predicate) {
|
||||||
|
$scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
|
||||||
|
$scope.predicate = predicate;
|
||||||
|
};
|
||||||
$scope.deleteDevice = function (device) {
|
$scope.deleteDevice = function (device) {
|
||||||
bridgeService.deleteDevice(device.id);
|
bridgeService.deleteDevice(device.id);
|
||||||
};
|
};
|
||||||
@@ -233,7 +239,13 @@ app.controller('AddingController', function ($scope, bridgeService, BridgeSettin
|
|||||||
bridgeService.viewVeraScenes();
|
bridgeService.viewVeraScenes();
|
||||||
$scope.bridge = bridgeService.state;
|
$scope.bridge = bridgeService.state;
|
||||||
$scope.device = bridgeService.state.device;
|
$scope.device = bridgeService.state.device;
|
||||||
|
$scope.predicate = 'name';
|
||||||
|
$scope.reverse = true;
|
||||||
|
$scope.order = function(predicate) {
|
||||||
|
$scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
|
||||||
|
$scope.predicate = predicate;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.buildUrlsUsingDevice = function () {
|
$scope.buildUrlsUsingDevice = function () {
|
||||||
if ($scope.vera.base.indexOf("http") < 0) {
|
if ($scope.vera.base.indexOf("http") < 0) {
|
||||||
$scope.vera.base = "http://" + $scope.vera.base;
|
$scope.vera.base = "http://" + $scope.vera.base;
|
||||||
|
|||||||
@@ -71,6 +71,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.sortorder:after {
|
||||||
|
content: '\25b2';
|
||||||
|
}
|
||||||
|
.sortorder.reverse:after {
|
||||||
|
content: '\25bc';
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h2 class="panel-title">Current devices</h2>
|
<h2 class="panel-title">Current devices</h2>
|
||||||
@@ -78,13 +87,19 @@
|
|||||||
<table class="table table-bordered table-striped table-hover">
|
<table class="table table-bordered table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>
|
||||||
<th>Name</th>
|
<a href="" ng-click="order('id')">ID</a>
|
||||||
<th>Type</th>
|
<span class="sortorder" ng-show="predicate === 'id'" ng-class="{reverse:reverse}"></span></th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('name')">Name</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span></th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('deviceType')">Type</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'deviceType'" ng-class="{reverse:reverse}"></span></th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr ng-repeat="device in bridge.devices">
|
<tr ng-repeat="device in bridge.devices | orderBy:predicate:reverse">
|
||||||
<td>{{device.id}}</td>
|
<td>{{device.id}}</td>
|
||||||
<td>{{device.name}}</td>
|
<td>{{device.name}}</td>
|
||||||
<td>{{device.deviceType}}</td>
|
<td>{{device.deviceType}}</td>
|
||||||
|
|||||||
@@ -25,26 +25,32 @@
|
|||||||
Update Device</button>
|
Update Device</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
||||||
URL </label>
|
URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-on-url"
|
<textarea class="form-control" id="device-on-url"
|
||||||
ng-model="device.onUrl" placeholder="URL to turn device on">
|
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.onUrl)">Test</button>
|
ng-click="testUrl(device.onUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label"
|
<label class="col-xs-12 col-sm-2 control-label"
|
||||||
for="device-off-url">Off URL </label>
|
for="device-off-url">Off URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-off-url"
|
<textarea class="form-control" id="device-off-url"
|
||||||
ng-model="device.offUrl" placeholder="URL to turn device off">
|
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.offUrl)">Test</button>
|
ng-click="testUrl(device.offUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -42,11 +42,13 @@
|
|||||||
<input type="text" class="form-control" id="vera-id"
|
<input type="text" class="form-control" id="vera-id"
|
||||||
ng-model="vera.id" placeholder="ID">
|
ng-model="vera.id" placeholder="ID">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
<button type="submit" ng-click="buildUrlsUsingDevice()"
|
<button type="submit" ng-click="buildUrlsUsingDevice()"
|
||||||
class="col-xs-4 col-sm-2 btn btn-success">Generate Device
|
class="col-xs-2 col-sm-2 col-xs-offset-2 col-sm-offset-2 btn btn-success">Generate Device
|
||||||
URLs</button>
|
URLs</button>
|
||||||
<button type="submit" ng-click="buildUrlsUsingScene()"
|
<button type="submit" ng-click="buildUrlsUsingScene()"
|
||||||
class="col-xs-4 col-sm-2 btn btn-success">Generate Scene
|
class="col-xs-2 col-sm-2 col-xs-offset-2 col-sm-offset-2 btn btn-success">Generate Scene
|
||||||
URLs</button>
|
URLs</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<form class="form-horizontal" ng-submit="addDevice()">
|
<form class="form-horizontal" ng-submit="addDevice()">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
|
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@@ -70,28 +73,35 @@
|
|||||||
</div>
|
</div>
|
||||||
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary">
|
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary">
|
||||||
Add Device</button>
|
Add Device</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
||||||
URL </label>
|
URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-on-url"
|
<textarea class="form-control" id="device-on-url"
|
||||||
ng-model="device.onUrl" placeholder="URL to turn device on">
|
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.onUrl)">Test</button>
|
ng-click="testUrl(device.onUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label"
|
<label class="col-xs-12 col-sm-2 control-label"
|
||||||
for="device-off-url">Off URL </label>
|
for="device-off-url">Off URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-off-url"
|
<textarea class="form-control" id="device-off-url"
|
||||||
ng-model="device.offUrl" placeholder="URL to turn device off">
|
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.offUrl)">Test</button>
|
ng-click="testUrl(device.offUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h2 class="panel-title">Vera Device List</h2>
|
<h2 class="panel-title">Vera Device List</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
.sortorder:after {
|
||||||
|
content: '\25b2';
|
||||||
|
}
|
||||||
|
.sortorder.reverse:after {
|
||||||
|
content: '\25bc';
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<p class="text-muted">You can select a Vera device and generate
|
<p class="text-muted">You can select a Vera device and generate
|
||||||
@@ -17,14 +25,26 @@
|
|||||||
<table class="table table-bordered table-striped table-hover">
|
<table class="table table-bordered table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>
|
||||||
<th>Id</th>
|
<a href="" ng-click="order('name')">Name</a>
|
||||||
<th>Category</th>
|
<span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span>
|
||||||
<th>Room</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('id')">Id</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'id'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('category')">Category</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'category'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('room')">Room</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'room'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr ng-repeat="veradevice in bridge.veradevices">
|
<tr ng-repeat="veradevice in bridge.veradevices | orderBy:predicate:reverse">
|
||||||
<td>{{veradevice.name}}</td>
|
<td>{{veradevice.name}}</td>
|
||||||
<td>{{veradevice.id}}</td>
|
<td>{{veradevice.id}}</td>
|
||||||
<td>{{veradevice.category}}</td>
|
<td>{{veradevice.category}}</td>
|
||||||
@@ -58,26 +78,32 @@
|
|||||||
Add Device</button>
|
Add Device</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
||||||
URL </label>
|
URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-on-url"
|
<textarea class="form-control" id="device-on-url"
|
||||||
ng-model="device.onUrl" placeholder="URL to turn device on">
|
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.onUrl)">Test</button>
|
ng-click="testUrl(device.onUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label"
|
<label class="col-xs-12 col-sm-2 control-label"
|
||||||
for="device-off-url">Off URL </label>
|
for="device-off-url">Off URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-off-url"
|
<textarea class="form-control" id="device-off-url"
|
||||||
ng-model="device.offUrl" placeholder="URL to turn device off">
|
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.offUrl)">Test</button>
|
ng-click="testUrl(device.offUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h2 class="panel-title">Vera Scene List</h2>
|
<h2 class="panel-title">Vera Scene List</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<style type="text/css">
|
||||||
|
.sortorder:after {
|
||||||
|
content: '\25b2';
|
||||||
|
}
|
||||||
|
.sortorder.reverse:after {
|
||||||
|
content: '\25bc';
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<p class="text-muted">You can select a Vera scene and generate
|
<p class="text-muted">You can select a Vera scene and generate
|
||||||
@@ -17,13 +25,22 @@
|
|||||||
<table class="table table-bordered table-striped table-hover">
|
<table class="table table-bordered table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>
|
||||||
<th>Id</th>
|
<a href="" ng-click="order('name')">Name</a>
|
||||||
<th>Room</th>
|
<span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('id')">Id</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'id'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="" ng-click="order('room')">Room</a>
|
||||||
|
<span class="sortorder" ng-show="predicate === 'room'" ng-class="{reverse:reverse}"></span>
|
||||||
|
</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr ng-repeat="verascene in bridge.verascenes">
|
<tr ng-repeat="verascene in bridge.verascenes | orderBy:predicate:reverse">
|
||||||
<td>{{verascene.name}}</td>
|
<td>{{verascene.name}}</td>
|
||||||
<td>{{verascene.id}}</td>
|
<td>{{verascene.id}}</td>
|
||||||
<td>{{verascene.room}}</td>
|
<td>{{verascene.room}}</td>
|
||||||
@@ -56,26 +73,32 @@
|
|||||||
Add Scene</button>
|
Add Scene</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
|
||||||
URL </label>
|
URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-on-url"
|
<textarea class="form-control" id="device-on-url"
|
||||||
ng-model="device.onUrl" placeholder="URL to turn device on">
|
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.onUrl)">Test</button>
|
ng-click="testUrl(device.onUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
<label class="col-xs-12 col-sm-2 control-label"
|
<label class="col-xs-12 col-sm-2 control-label"
|
||||||
for="device-off-url">Off URL </label>
|
for="device-off-url">Off URL </label>
|
||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<input type="text" class="form-control" id="device-off-url"
|
<textarea class="form-control" id="device-off-url"
|
||||||
ng-model="device.offUrl" placeholder="URL to turn device off">
|
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix visible-xs"></div>
|
||||||
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
<button class="col-xs-4 col-sm-2 btn btn-success" type="button"
|
||||||
ng-click="testUrl(device.offUrl)">Test</button>
|
ng-click="testUrl(device.offUrl)">Test</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user