diff --git a/pom.xml b/pom.xml index 60e0910..e7910e7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 2.0.7-hal + 2.0.7-hal-a jar HA Bridge diff --git a/src/main/resources/public/css/scrollable-table.css b/src/main/resources/public/css/scrollable-table.css index b99b843..7d17c86 100644 --- a/src/main/resources/public/css/scrollable-table.css +++ b/src/main/resources/public/css/scrollable-table.css @@ -1,5 +1,5 @@ .scrollableContainer { - height: 800px; + height: 600px; position: relative; padding-top: 35px; overflow: hidden; diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index b9adc82..244ec40 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -973,11 +973,17 @@ app.controller('VeraController', function ($scope, $location, $http, bridgeServi } } } - bridgeService.bulkAddDevice(devicesList); - $scope.clearDevice(); - bridgeService.viewDevices(); - bridgeService.viewVeraDevices(); - bridgeService.viewVeraScenes(); + bridgeService.bulkAddDevice(devicesList).then( + function () { + $scope.clearDevice(); + bridgeService.viewDevices(); + bridgeService.viewVeraDevices(); + bridgeService.viewVeraScenes(); + }, + function (error) { + bridgeService.displayWarn("Error adding Vera devices in bulk.", error) + } + ); $scope.bulk = { devices: [] }; }; @@ -1280,10 +1286,17 @@ app.controller('HueController', function ($scope, $location, $http, bridgeServic } } } - bridgeService.bulkAddDevice(devicesList); - $scope.clearDevice(); - bridgeService.viewDevices(); - bridgeService.viewHueDevices(); + bridgeService.bulkAddDevice(devicesList).then( + function () { + $scope.clearDevice(); + bridgeService.viewDevices(); + bridgeService.viewHueDevices(); + }, + function (error) { + bridgeService.displayWarn("Error adding Hue devices in bulk.", error) + } + ); + $scope.bulk = { devices: [] }; }; @@ -1389,7 +1402,7 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic var devicesList = []; for(var i = 0; i < $scope.bulk.devices.length; i++) { for(var x = 0; x < bridgeService.state.haldevices.length; x++) { - if(bridgeService.state.haldevices[x].id == $scope.bulk.devices[i]) { + if(bridgeService.state.haldevices[x].haldevicename == $scope.bulk.devices[i]) { $scope.buildDeviceUrls(bridgeService.state.haldevices[x],dim_control); devicesList[i] = { name: $scope.device.name, @@ -1408,10 +1421,16 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic } } } - bridgeService.bulkAddDevice(devicesList); - $scope.clearDevice(); - bridgeService.viewDevices(); - bridgeService.viewHalDevices(); + bridgeService.bulkAddDevice(devicesList).then( + function () { + $scope.clearDevice(); + bridgeService.viewDevices(); + bridgeService.viewHalDevices(); + }, + function (error) { + bridgeService.displayWarn("Error adding HAL devices in bulk.", error) + } + ); $scope.bulk = { devices: [] }; }; @@ -1437,7 +1456,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic $scope.imgButtonsUrl = "glyphicon glyphicon-plus"; }; - $scope.deleteDeviceByMapId = function (id, mapType) { + $scope.deleteDeviceByMapId = function (haldevicename, halname, mapType) { + var id = haldevicename + "-" + halname; $scope.bridge.mapandid = { id, mapType }; ngDialog.open({ template: 'deleteMapandIdDialog', @@ -1685,7 +1705,7 @@ app.filter('availableHalDeviceId', function(bridgeService) { if(input == null) return out; for (var i = 0; i < input.length; i++) { - if(!bridgeService.findDeviceByMapId(input[i].id, input[i].haldevicename, "halDevice")){ + if(!bridgeService.findDeviceByMapId(input[i].haldevicename + "-" + input[i].halname, input[i].halname, "halDevice")){ out.push(input[i]); } } @@ -1699,7 +1719,7 @@ app.filter('unavailableHalDeviceId', function(bridgeService) { if(input == null) return out; for (var i = 0; i < input.length; i++) { - if(bridgeService.findDeviceByMapId(input[i].id, input[i].haldevicename, "halDevice")){ + if(bridgeService.findDeviceByMapId(input[i].haldevicename + "-" + input[i].halname, input[i].halname, "halDevice")){ out.push(input[i]); } } diff --git a/src/main/resources/public/views/configuration.html b/src/main/resources/public/views/configuration.html index c1b36eb..cf88e99 100644 --- a/src/main/resources/public/views/configuration.html +++ b/src/main/resources/public/views/configuration.html @@ -1,41 +1,50 @@ - -
-
-

Current devices ({{bridge.devices.length}})

-
- - - - - - - - - - - - - - - - - - - + + + +
RowIDNameTypeTargetActions
{{$index+1}}{{device.id}}{{device.name}}{{device.deviceType}}{{device.targetDevice}} -

+

+ +
+
+

Current devices + ({{bridge.devices.length}})

+
+ + + + + + + + + + + + + + + + + + + + +
RowIDNameTypeTargetActions
{{$index+1}}{{device.id}}{{device.name}}{{device.deviceType}}{{device.targetDevice}} +

-

+

+
+
+
+
+
+

+ Bridge Device DB Backup +

+
+
+
+
+ + +
+ +
+ +
+
+ + + + + + + + + +
FilenameActions
{{backup}} + +
-
-
-
-

Bridge Device DB Backup

-
-
-
-
- +
-
- -
- -
- - - - - - - - - - - - -
FilenameActions
{{backup}} - - -
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/public/views/editdevice.html b/src/main/resources/public/views/editdevice.html index 75b599c..14eca49 100644 --- a/src/main/resources/public/views/editdevice.html +++ b/src/main/resources/public/views/editdevice.html @@ -1,211 +1,230 @@ - + -
+

Edit/Copy a device

-

This screen allows the modification of many fields the bridge uses. Please use care when - updating these fields as you may break the settings used by the bridge to call a specific end point device.

-

When copying, update the name and select the "Add Bridge Device" Button.

-
    -
  • -
    -
    - +
    +

    This screen allows the modification of many + fields the bridge uses. Please use care when updating these fields as + you may break the settings used by the bridge to call a specific end + point device.

    +

    When copying, update the name and select the "Add Bridge + Device" Button.

    +
    + +
    + -
    - -
    - -
    -
    - +
    + +
    + +
    +
    + -
    - -
    - -
    -
    -
    - +
    + +
    + +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    - -
    +
    +
    -
    - + +
    +
    +
    + -
    - -
    -
    -
    -
    - +
    + +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    +
    + -
    - -
    -
    -
    +
    +
    - -
  • -
-
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/public/views/editor.html b/src/main/resources/public/views/editor.html index 954bd96..2f35e2a 100644 --- a/src/main/resources/public/views/editor.html +++ b/src/main/resources/public/views/editor.html @@ -1,231 +1,250 @@ - + -
+

Generate a new device/scene/control point

-
    -
  • -

    You can generate on/off URLs by filling in - the Vera server URL, port, and device ID; or you can fill them out - manually in the lower section.

    +
    +

    You can generate on/off URLs by filling in + the Vera server URL, port, and device ID; or you can fill them out + manually in the lower section.

    +
    +
    +
    + - -
    - +
    + +
    +
    +
    + -
    - -
    -
    -
    - +
    + +
    -
    - -
    + - +
    + +
    +
    +
    + -
    - -
    -
    -
    - - -
    - -
    -
    -
    - - -
    - -
  • -
+
+ +
+
+
+ + +
+
-
+

Add a new device

-

This area allows you to create any http or udp call to an endpoint. You can use the default GET or select - the http verb type below and configure a payload for either on, dim or off methods. Currently, https is not supported. For Execution of - a script or program, plese fill in the path. All manually entered calls can use Json notation of array with - [{"item":"the payload"},{"item":"another payload"}] to execute multiple entries. Adding the value replacements (${intensity..byte},${intensity.percent},${intensity.math(X*1)}) - will also work.

-
    -
  • -
    -
    -
    - +
    +

    This area allows you to create any http or + udp call to an endpoint. You can use the default GET or select the + http verb type below and configure a payload for either on, dim or + off methods. Currently, https is not supported. For Execution of a + script or program, plese fill in the path. All manually entered calls + can use Json notation of array with [{"item":"the + payload"},{"item":"another payload"}] to + execute multiple entries. Adding the value replacements + (${intensity..byte},${intensity.percent},${intensity.math(X*1)}) will + also work.

    +
    + +
    +
    + -
    - -
    - -
    +
    +
    -
    -
    - + +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    - -
    +
    +
    -
    -
    - + +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    + -
    - -
    -
    -
    +
    +
    -
    -
    - +
    +
    +
    +
    +
    + -
    - -
    -
    -
    +
    +
    - -
  • -
-
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/public/views/haldevice.html b/src/main/resources/public/views/haldevice.html index 1056fce..a19fb48 100644 --- a/src/main/resources/public/views/haldevice.html +++ b/src/main/resources/public/views/haldevice.html @@ -1,118 +1,135 @@ - + -
+
-

HAL Device List ({{bridge.haldevices.length}})

+

HAL Device List + ({{bridge.haldevices.length}})

-
    -
  • -

    For any HAL 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 HAL Devices' list below will show what is already setup for your HAL.

    -

    Also, use this select menu for which type of dim - control you would like to be generated: - -

    -

    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 HAL. -

    - - - - - - - - - - - - - - - - - - -
    RowNameCategoryHALActions
    {{$index+1}} {{haldevice.haldevicename}}{{haldevice.haldevicetype}}{{haldevice.halname}} - -
    -
    -

    +

    +

    For any HAL 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 HAL Devices' list below will show what + is already setup for your HAL.

    +

    + Also, use this select menu for which type of dim control you would + like to be generated: +

    +

    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 HAL.

    +
    + + + + + + + + + + + + + + + + + + +
    RowNameCategoryHALActions
    {{$index+1}} + {{haldevice.haldevicename}}{{haldevice.haldevicetype}}{{haldevice.halname}} -

    - - -
    -

    Already Configured HAL Devices

    + ng-click="buildDeviceUrls(haldevice, device_dim_control)">Generate + Bridge Device +
    +
    + -
      -
    • - - - - - - - - - - - - - - - - - - -
      RowNameCategoryHALActions
      {{$index+1}}{{haldevice.haldevicename}}{{haldevice.haldevicetype}}{{haldevice.halname}} - -
      -
      -
    • -
-
+
+
+

+ Already Configured HAL Devices +

+
+ + + + + + + + + + + + + + + + + + +
RowNameCategoryHALActions
{{$index+1}}{{haldevice.haldevicename}}{{haldevice.haldevicetype}}{{haldevice.halname}} + +
+
+
+

Add Bridge Device for a HAL Device

-
    -
  • -
    -
    - +
    + +
    + -
    - -
    - +
    +
    -
    -
    + +
    +
    +
    @@ -125,30 +142,29 @@
    - + -
    - -
    +
    + +
    - + -
    - +
    + +
    -
    - -
  • -
+ +
- + \ No newline at end of file diff --git a/src/main/resources/public/views/harmonydevice.html b/src/main/resources/public/views/harmonydevice.html index 9d57f03..9e67286 100644 --- a/src/main/resources/public/views/harmonydevice.html +++ b/src/main/resources/public/views/harmonydevice.html @@ -1,122 +1,137 @@ - + -
+

Harmony Device List

-
    -
  • -

    For any Harmony Device and Buttons, use the build button to generate the configuration for this bridge device. You can add button presses by - selecting yoru devic and buttons and then selecting the Build Button. This will allow multiple button presses to be built for a given device. - 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 Harmony Buttons' list below will show what is already setup for your Harmony Hubs.

    - - - - - - - - - - - - - - - - - - - - - - - -
    RowNameIdHubOn ButtonOff ButtonActions
    {{$index+1}}{{harmonydevice.device.label}}{{harmonydevice.device.id}}{{harmonydevice.hub}} - - - - - -
    -
    -
  • -
-
-

Already Configured Harmony Buttons

+
+

For any Harmony Device and Buttons, use the + build button to generate the configuration for this bridge device. + You can add button presses by selecting yoru devic and buttons and + then selecting the Build Button. This will allow multiple button + presses to be built for a given device. 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 Harmony Buttons' list below will show what is already + setup for your Harmony Hubs.

-
    -
  • - - - - - - - - - - - - - - - - - - - - -
    RowNameDevice IdHubHarmony Device-Button On-Button OffActions
    {{$index+1}}{{device.name}}{{device.id}}{{device.targetDevice}}{{device.mapId}} - -
    -
    -
  • + + + + + + + + + + + + + + + + + + + + + + + +
    RowNameIdHubOn ButtonOff ButtonActions
    {{$index+1}}{{harmonydevice.device.label}}{{harmonydevice.device.id}}{{harmonydevice.hub}} + +
    +
    +
-
+
+
+

+ Already Configured Harmony Buttons +

+
+ + + + + + + + + + + + + + + + + + + + +
RowNameDevice IdHubHarmony Device-Button On-Button OffActions
{{$index+1}}{{device.name}}{{device.id}}{{device.targetDevice}}{{device.mapId}} + +
+
+
+

Add a Bridge Device for Harmony Buttons

-
    -
  • -
    -
    - +
    + +
    + -
    - -
    - +
    +
    -
    -
    + +
    +
    +
    @@ -126,10 +141,10 @@
    -
    -
    -
    +
    +
    +
    @@ -137,13 +152,12 @@
    -
    - -
  • -
+
+ +
- + \ No newline at end of file diff --git a/src/main/resources/public/views/huedevice.html b/src/main/resources/public/views/huedevice.html index 6b68ff5..6b64ff2 100644 --- a/src/main/resources/public/views/huedevice.html +++ b/src/main/resources/public/views/huedevice.html @@ -1,109 +1,125 @@ - + -
+
-

Hue Device List ({{bridge.huedevices.length}})

+

Hue Device List + ({{bridge.huedevices.length}})

-
    -
  • -

    For any Hue 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 Hue Devices' list below will show what is already setup for your Hue.

    -

    Use the check boxes by the names to use the bulk addition feature. Select your items, 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 Hue. -

    - - - - - - - - - - - - - - - - - - -
    RowNameIdHueActions
    {{$index+1}} {{huedevice.device.name}}{{huedevice.device.uniqueid}}{{huedevice.huename}} - -
    -
    -

    +

    +

    For any Hue 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 Hue Devices' list below will show what + is already setup for your Hue.

    +

    Use the check boxes by the names to use the bulk addition + feature. Select your items, 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 Hue.

    +
    + + + + + + + + + + + + + + + + + + +
    RowNameIdHueActions
    {{$index+1}} + {{huedevice.device.name}}{{huedevice.device.uniqueid}}{{huedevice.huename}} -

    - - -
    -

    Already Configured Hue Devices

    + ng-click="buildDeviceUrls(huedevice)">Generate Bridge + Device +
    +
    + -
      -
    • - - - - - - - - - - - - - - - - - - -
      RowNameIdhueActions
      {{$index+1}}{{huedevice.device.name}}{{huedevice.device.uniqueid}}{{huedevice.huename}} - -
      -
      -
    • -
-
+
+
+

+ Already Configured Hue Devices +

+
+ + + + + + + + + + + + + + + + + + +
RowNameIdhueActions
{{$index+1}}{{huedevice.device.name}}{{huedevice.device.uniqueid}}{{huedevice.huename}} + +
+
+
+

Add Bridge Device for a Hue Device

-
    -
  • -
    -
    - +
    + +
    + -
    - -
    - +
    +
    -
    -
    + +
    +
    +
    @@ -114,11 +130,10 @@
    - -
  • -
+ +
- + \ No newline at end of file diff --git a/src/main/resources/public/views/system.html b/src/main/resources/public/views/system.html index b183669..71c9b65 100644 --- a/src/main/resources/public/views/system.html +++ b/src/main/resources/public/views/system.html @@ -1,50 +1,57 @@ - + -
-
-

Bridge Settings

-
-
+
+
+

Bridge Settings

+
+
-
-
- + +
+ -
- -
- +
+
- -
+ +
+ +

- - - - + + + +

@@ -56,32 +63,41 @@ - + - + - + - + - + - - - + - + - - - + - + - + - + - + - + - + - +
Configuration Path and File
Device DB Path and File
UPNP IP Address
Web Server Port
UPNP Response Port
Vera Names and IP Addresses + +
@@ -96,19 +112,21 @@ ng-click="removeVeratoSettings(vera.name, vera.ip)">Del - - - + + -
Name
-
Harmony Names and IP Addresses + +
@@ -123,29 +141,34 @@ ng-click="removeHarmonytoSettings(harmony.name, harmony.ip)">Del - - - + + -
Name
-
Harmony Username
Harmony Password
Hue Names and IP Addresses + +
@@ -160,19 +183,21 @@ ng-click="removeHuetoSettings(hue.name, hue.ip)">Del - - - + + -
Name
-
HAL Names and IP Addresses + +
@@ -187,94 +212,108 @@ ng-click="removeHaltoSettings(hal.name, hal.ip)">Del - - - + + -
Name
-
HAL Token
Nest Username
Nest Password
Nest Temp Farenheit {{bridge.settings.farenheit}} {{bridge.settings.farenheit}}
Button Press/Call Item Loop Sleep Interval (ms)
Log Messages to Buffer
UPNP Strict Handling {{bridge.settings.upnpstrict}} {{bridge.settings.upnpstrict}}
Trace UPNP Calls {{bridge.settings.traceupnp}} {{bridge.settings.traceupnp}}
-
-
+
-
-
-

Bridge Settings Backup

-
-
-
-
- +
+
+
+

+ Bridge Settings Backup +

+
+
+ +
+ -
- -
- +
+
- - - - - - - - - - - + + + +
FilenameActions
{{backup}} - - -
+ + + + -
FilenameActions
-
+ +
{{backup}} + + +
- \ No newline at end of file + \ No newline at end of file diff --git a/src/main/resources/public/views/veradevice.html b/src/main/resources/public/views/veradevice.html index 453d834..9684b4d 100644 --- a/src/main/resources/public/views/veradevice.html +++ b/src/main/resources/public/views/veradevice.html @@ -1,126 +1,143 @@ - + -
+
-

Vera Device List ({{bridge.veradevices.length}})

+

Vera Device List + ({{bridge.veradevices.length}})

-
-
+
+
+

+ Already Configured Vera Devices +

+
+ + + + + + + + + + + + + + + + + + + + + + +
RowNameIdCategoryRoomVeraActions
{{$index+1}}{{veradevice.name}}{{veradevice.id}}{{veradevice.category}}{{veradevice.room}}{{veradevice.veraname}} + +
+
+
+

Add Bridge Device for a Vera Device

-
    -
  • -
    -
    - +
    + +
    + -
    - -
    - +
    +
    -
    -
    + +
    +
    +
    @@ -133,30 +150,29 @@
    - + -
    - -
    +
    + +
    - + -
    - +
    + +
    -
    - -
  • -
+ +
- + \ No newline at end of file diff --git a/src/main/resources/public/views/verascene.html b/src/main/resources/public/views/verascene.html index 762fb45..2619d04 100644 --- a/src/main/resources/public/views/verascene.html +++ b/src/main/resources/public/views/verascene.html @@ -1,107 +1,115 @@ - + -
+

Vera Scene List

-
    -
  • -

    For any Vera Scene, 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 Scenes' list below will show what is already setup for your Vera.

    - - - - - - - - - - - - - - - - - - - - - -
    RowNameIdRoomVeraActions
    {{$index+1}}{{verascene.name}}{{verascene.id}}{{verascene.room}}{{verascene.veraname}} - -
    -
    -
  • -
-
-

Already Configured Vera Scenes

+
+

For any Vera Scene, 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 Scenes' list below will show what + is already setup for your Vera.

-
    -
  • - - - - - - - - - - - - - - - - - - - - -
    RowNameIdRoomVeraActions
    {{$index+1}}{{verascene.name}}{{verascene.id}}{{verascene.room}}{{verascene.veraname}} - -
    -
    -
  • -
+ + + + + + + + + + + + + + + + + + + + + +
RowNameIdRoomVeraActions
{{$index+1}}{{verascene.name}}{{verascene.id}}{{verascene.room}}{{verascene.veraname}} + +
+
-
+
+
+

+ Already Configured Vera Scenes +

+
+ + + + + + + + + + + + + + + + + + + + +
RowNameIdRoomVeraActions
{{$index+1}}{{verascene.name}}{{verascene.id}}{{verascene.room}}{{verascene.veraname}} + +
+
+
+

Add a Bridge Device for a Vera scene

-
    -
  • -
    -
    - +
    + +
    + -
    - -
    - +
    +
    -
    -
    + +
    +
    +
    @@ -114,19 +122,18 @@
    - + -
    - +
    + +
    -
    - -
  • -
+ +
- + \ No newline at end of file