Merge branch 'master' into NewConnectors3.1

Conflicts:
	src/main/java/com/bwssystems/HABridge/BridgeSettings.java
This commit is contained in:
Admin
2017-03-16 15:18:39 -05:00
30 changed files with 2260 additions and 1368 deletions

View File

@@ -37,7 +37,7 @@ THe Harmony Hub Path looks like this:
**FAQ: Please look here for the current FAQs! https://github.com/bwssytems/ha-bridge/wiki/HA-Bridge-FAQs** **FAQ: Please look here for the current FAQs! https://github.com/bwssytems/ha-bridge/wiki/HA-Bridge-FAQs**
In the cases of systems that require authorization and/or have API's that cannot be handled in the current method, a module may need to be built. The Harmony Hub is such a module and so is the Nest module. The Bridge has helpers to build devices for the gateway for the Logitech Harmony Hub, Vera, Vera Lite or Vera Edge, Nest and the ability to proxy all of your real Hue bridges behind this bridge. In the cases of systems that require authorization and/or have API's that cannot be handled in the current method, a module may need to be built. The Harmony Hub is such a module and so is the Nest module. The Bridge has helpers to build devices for the gateway for the Logitech Harmony Hub, Vera, Vera Lite or Vera Edge, Nest, Somfy Tahoma and the ability to proxy all of your real Hue bridges behind this bridge.
Alternatively the Bridge supports custom calls as well using http/https/udp and tcp such as the LimitlessLED/MiLight bulbs using the UDP protocol. Binary data is supported with UDP/TCP. Alternatively the Bridge supports custom calls as well using http/https/udp and tcp such as the LimitlessLED/MiLight bulbs using the UDP protocol. Binary data is supported with UDP/TCP.
@@ -239,7 +239,7 @@ The server defaults to running on port 80. To override what the default is, spec
#### UPNP Response Port #### UPNP Response Port
The upnp response port that will be used. The default is 50000. The upnp response port that will be used. The default is 50000.
#### Vera Names and IP Addresses #### Vera Names and IP Addresses
Provide IP Addresses of your Veras that you want to utilize with the bridge. Also, give a meaningful name to each one so it is easy to decipher in the helper tab. When these names and IP's are given, the bridge will be able to control the devices or scenes by the call it receives and send it to the target Vera and device/scene you configure. Provide IP Addresses of your Veras that you want to utilize with the bridge. Also, give a meaningful name to each one so it is easy to decipher in the helper tab. When these names and IP's are given, the bridge will be able to control the devices or scenes by the call it receives and send it to the target Vera and device/scene you configure. Note you have to 'turn on' a window to open it, and 'turn off' to close.
#### Harmony Names and IP Addresses #### Harmony Names and IP Addresses
Provide IP Addresses of your Harmony Hubs that you want to utilize with the bridge. Also, give a meaningful name to each one so it is easy to decipher in the helper tab. When these names and IP's are given, the bridge will be able to control the activity or buttons by the call it receives and send it to the target Harmony Hub and activity/button you configure. Also, an option of webhook can be called when the activity changes on the harmony hub that will send an HTTP GET call to the the address of your choosing. This can contain the replacement variables of ${activity.id} and/or ${activity.label}. Example : http://192.168.0.1/activity/${activity.id}/${activity.label} OR http://hook?a=${activity.label} Provide IP Addresses of your Harmony Hubs that you want to utilize with the bridge. Also, give a meaningful name to each one so it is easy to decipher in the helper tab. When these names and IP's are given, the bridge will be able to control the activity or buttons by the call it receives and send it to the target Harmony Hub and activity/button you configure. Also, an option of webhook can be called when the activity changes on the harmony hub that will send an HTTP GET call to the the address of your choosing. This can contain the replacement variables of ${activity.id} and/or ${activity.label}. Example : http://192.168.0.1/activity/${activity.id}/${activity.label} OR http://hook?a=${activity.label}
#### Hue Names and IP Addresses #### Hue Names and IP Addresses
@@ -258,6 +258,10 @@ The user name of the home.nest.com account for the Nest user. This needs to be g
The password for the user name of the home.nest.com account for the Nest user. This needs to be given if you are using the Nest features. The password for the user name of the home.nest.com account for the Nest user. This needs to be given if you are using the Nest features.
#### Nest Temp Fahrenheit #### Nest Temp Fahrenheit
This setting allows the value being sent into the bridge to be interpreted as Fahrenheit or Celsius. The default is to have Fahrenheit. This setting allows the value being sent into the bridge to be interpreted as Fahrenheit or Celsius. The default is to have Fahrenheit.
#### Somfy Tahoma Username
The user name used to login to www.tahomalink.com. This needs to be provided if you're using the Somfy Tahoma features (for connecting to IO Homecontrol used by Velux among others). There is no need to give any IP address or host information as this contacts your cloud account
#### Somfy Tahoma Password
The password associated with the Somfy Tahoma username above
#### Button Press/Call Item Loop Sleep Interval (ms) #### Button Press/Call Item Loop Sleep Interval (ms)
This setting is the time used in between button presses when there is multiple buttons in a button device. It also controls the time between multiple items in a custom device call. This is defaulted to 100ms and the number represents milliseconds (1000 milliseconds = 1 second). This setting is the time used in between button presses when there is multiple buttons in a button device. It also controls the time between multiple items in a custom device call. This is defaulted to 100ms and the number represents milliseconds (1000 milliseconds = 1 second).
#### Log Messages to Buffer #### Log Messages to Buffer
@@ -308,7 +312,7 @@ The Add/Edit tab will show you the fields to fill in for the above in a form, wh
The format of the item can be the default HTTP request which executes the URLs formatted as `http://<your stuff here>` as a GET. Other options to this are to select the HTTP Verb and add the data type and add a body that is passed with the request. Secure https is supported as well, just use `https://<your secure call here>`. When using POST and PUT, you have the ability to specify the body that will be sent with the request as well as the application type for the http call. The format of the item can be the default HTTP request which executes the URLs formatted as `http://<your stuff here>` as a GET. Other options to this are to select the HTTP Verb and add the data type and add a body that is passed with the request. Secure https is supported as well, just use `https://<your secure call here>`. When using POST and PUT, you have the ability to specify the body that will be sent with the request as well as the application type for the http call.
The valid device types are: "custom", "veraDevice", "veraScene", "harmonyActivity", "harmonyButton", "nestHomeAway", "nestThermoSet", "hueDevice", "halDevice", The valid device types are: "custom", "veraDevice", "veraScene", "harmonyActivity", "harmonyButton", "nestHomeAway", "nestThermoSet", "hueDevice", "halDevice",
"halButton", "halHome", "halThermoSet", "mqttMessage", "cmdDevice", "hassDevice", "tcpDevice", "udpDevice", "httpDevice", "domoticzDevice" "halButton", "halHome", "halThermoSet", "mqttMessage", "cmdDevice", "hassDevice", "tcpDevice", "udpDevice", "httpDevice", "domoticzDevice", "somfyDevice"
Filter Ip example: Filter Ip example:
``` ```

View File

@@ -46,6 +46,7 @@ public class BridgeSettings extends BackupHandler {
public void buildSettings() { public void buildSettings() {
String addressString = null; String addressString = null;
String theVeraAddress = null; String theVeraAddress = null;
String theSomfyAddress = null;
String theHarmonyAddress = null; String theHarmonyAddress = null;
String configFileProperty = System.getProperty("config.file"); String configFileProperty = System.getProperty("config.file");
if(configFileProperty == null) { if(configFileProperty == null) {
@@ -103,6 +104,23 @@ public class BridgeSettings extends BackupHandler {
} }
} }
theBridgeSettings.setHarmonyAddress(theHarmonyList); theBridgeSettings.setHarmonyAddress(theHarmonyList);
theSomfyAddress = System.getProperty("somfy.address");
IpList theSomfyList = null;
if(theSomfyAddress != null) {
try {
theSomfyList = new Gson().fromJson(theSomfyAddress, IpList.class);
} catch (Exception e) {
try {
theSomfyList = new Gson().fromJson("{devices:[{name:default,ip:" + theSomfyAddress + "}]}", IpList.class);
} catch (Exception et) {
log.error("Cannot parse somfy.address, not set with message: " + e.getMessage(), e);
theSomfyList = null;
}
}
}
theBridgeSettings.setSomfyAddress(theSomfyList);
theBridgeSettings.setUpnpStrict(Boolean.parseBoolean(System.getProperty("upnp.strict", "true"))); theBridgeSettings.setUpnpStrict(Boolean.parseBoolean(System.getProperty("upnp.strict", "true")));
theBridgeSettings.setTraceupnp(Boolean.parseBoolean(System.getProperty("trace.upnp", "false"))); theBridgeSettings.setTraceupnp(Boolean.parseBoolean(System.getProperty("trace.upnp", "false")));
theBridgeSettings.setButtonsleep(Integer.parseInt(System.getProperty("button.sleep", Configuration.DEFAULT_BUTTON_SLEEP))); theBridgeSettings.setButtonsleep(Integer.parseInt(System.getProperty("button.sleep", Configuration.DEFAULT_BUTTON_SLEEP)));
@@ -148,6 +166,7 @@ public class BridgeSettings extends BackupHandler {
theBridgeSettings.setMqttconfigured(theBridgeSettings.isValidMQTT()); theBridgeSettings.setMqttconfigured(theBridgeSettings.isValidMQTT());
theBridgeSettings.setHassconfigured(theBridgeSettings.isValidHass()); theBridgeSettings.setHassconfigured(theBridgeSettings.isValidHass());
theBridgeSettings.setDomoticzconfigured(theBridgeSettings.isValidDomoticz()); theBridgeSettings.setDomoticzconfigured(theBridgeSettings.isValidDomoticz());
theBridgeSettings.setSomfyconfigured(theBridgeSettings.isValidSomfy());
// Lifx is either configured or not, so it does not need an update. // Lifx is either configured or not, so it does not need an update.
if(serverPortOverride != null) if(serverPortOverride != null)
theBridgeSettings.setServerPort(serverPortOverride); theBridgeSettings.setServerPort(serverPortOverride);

View File

@@ -49,6 +49,9 @@ public class BridgeSettingsDescriptor {
private String hubversion; private String hubversion;
private IpList domoticzaddress; private IpList domoticzaddress;
private boolean domoticzconfigured; private boolean domoticzconfigured;
private IpList somfyaddress;
private boolean somfyconfigured;
private boolean lifxconfigured; private boolean lifxconfigured;
public BridgeSettingsDescriptor() { public BridgeSettingsDescriptor() {
@@ -57,6 +60,7 @@ public class BridgeSettingsDescriptor {
this.traceupnp = false; this.traceupnp = false;
this.nestconfigured = false; this.nestconfigured = false;
this.veraconfigured = false; this.veraconfigured = false;
this.somfyconfigured = false;
this.harmonyconfigured = false; this.harmonyconfigured = false;
this.hueconfigured = false; this.hueconfigured = false;
this.halconfigured = false; this.halconfigured = false;
@@ -102,9 +106,15 @@ public class BridgeSettingsDescriptor {
public IpList getVeraAddress() { public IpList getVeraAddress() {
return veraaddress; return veraaddress;
} }
public IpList getSomfyAddress() {
return somfyaddress;
}
public void setVeraAddress(IpList veraAddress) { public void setVeraAddress(IpList veraAddress) {
this.veraaddress = veraAddress; this.veraaddress = veraAddress;
} }
public void setSomfyAddress(IpList somfyAddress) {
this.somfyaddress = somfyAddress;
}
public IpList getHarmonyAddress() { public IpList getHarmonyAddress() {
return harmonyaddress; return harmonyaddress;
} }
@@ -138,9 +148,15 @@ public class BridgeSettingsDescriptor {
public boolean isVeraconfigured() { public boolean isVeraconfigured() {
return veraconfigured; return veraconfigured;
} }
public boolean isSomfyconfigured() {
return somfyconfigured;
}
public void setVeraconfigured(boolean veraconfigured) { public void setVeraconfigured(boolean veraconfigured) {
this.veraconfigured = veraconfigured; this.veraconfigured = veraconfigured;
} }
public void setSomfyconfigured(boolean somfyconfigured) {
this.somfyconfigured = somfyconfigured;
}
public boolean isHarmonyconfigured() { public boolean isHarmonyconfigured() {
return harmonyconfigured; return harmonyconfigured;
} }
@@ -344,6 +360,14 @@ public class BridgeSettingsDescriptor {
return false; return false;
return true; return true;
} }
public Boolean isValidSomfy() {
if(this.getSomfyAddress() == null || this.getSomfyAddress().getDevices().size() <= 0)
return false;
List<NamedIP> devicesList = this.getSomfyAddress().getDevices();
if(devicesList.get(0).getIp().contains(Configuration.DEFAULT_ADDRESS))
return false;
return true;
}
public Boolean isValidLifx() { public Boolean isValidLifx() {
return this.isLifxconfigured(); return this.isLifxconfigured();
} }

View File

@@ -1,84 +1,86 @@
package com.bwssystems.HABridge; package com.bwssystems.HABridge;
import java.util.ArrayList; import java.util.ArrayList;
public class DeviceMapTypes { public class DeviceMapTypes {
public final static String[] CUSTOM_DEVICE = { "custom", "Custom"}; public final static String[] CUSTOM_DEVICE = { "custom", "Custom"};
public final static String[] VERA_DEVICE = { "veraDevice", "Vera Device"}; public final static String[] VERA_DEVICE = { "veraDevice", "Vera Device"};
public final static String[] VERA_SCENE = { "veraScene", "Vera Scene"}; public final static String[] VERA_SCENE = { "veraScene", "Vera Scene"};
public final static String[] HARMONY_ACTIVITY = { "harmonyActivity", "Harmony Activity"}; public final static String[] HARMONY_ACTIVITY = { "harmonyActivity", "Harmony Activity"};
public final static String[] HARMONY_BUTTON = { "harmonyButton", "Harmony Button"}; public final static String[] HARMONY_BUTTON = { "harmonyButton", "Harmony Button"};
public final static String[] NEST_HOMEAWAY = { "nestHomeAway", "Nest Home Status"}; public final static String[] NEST_HOMEAWAY = { "nestHomeAway", "Nest Home Status"};
public final static String[] NEST_THERMO_SET = { "nestThermoSet", "Nest Thermostat"}; public final static String[] NEST_THERMO_SET = { "nestThermoSet", "Nest Thermostat"};
public final static String[] HUE_DEVICE = { "hueDevice", "Hue Device"}; public final static String[] HUE_DEVICE = { "hueDevice", "Hue Device"};
public final static String[] HAL_DEVICE = { "halDevice", "HAL Device"}; public final static String[] HAL_DEVICE = { "halDevice", "HAL Device"};
public final static String[] HAL_BUTTON = { "halButton", "HAL Button"}; public final static String[] HAL_BUTTON = { "halButton", "HAL Button"};
public final static String[] HAL_HOME = { "halHome", "HAL Home Status"}; public final static String[] HAL_HOME = { "halHome", "HAL Home Status"};
public final static String[] HAL_THERMO_SET = { "halThermoSet", "HAL Thermostat"}; public final static String[] HAL_THERMO_SET = { "halThermoSet", "HAL Thermostat"};
public final static String[] MQTT_MESSAGE = { "mqttMessage", "MQTT Message"}; public final static String[] MQTT_MESSAGE = { "mqttMessage", "MQTT Message"};
public final static String[] EXEC_DEVICE_COMPAT = { "exec", "Execute Script/Program"}; public final static String[] EXEC_DEVICE_COMPAT = { "exec", "Execute Script/Program"};
public final static String[] CMD_DEVICE = { "cmdDevice", "Execute Command/Script/Program"}; public final static String[] CMD_DEVICE = { "cmdDevice", "Execute Command/Script/Program"};
public final static String[] HASS_DEVICE = { "hassDevice", "HomeAssistant Device"}; public final static String[] HASS_DEVICE = { "hassDevice", "HomeAssistant Device"};
public final static String[] TCP_DEVICE = { "tcpDevice", "TCP Device"}; public final static String[] TCP_DEVICE = { "tcpDevice", "TCP Device"};
public final static String[] TCP_DEVICE_COMPAT = { "TCP", "TCP Device"}; public final static String[] TCP_DEVICE_COMPAT = { "TCP", "TCP Device"};
public final static String[] UDP_DEVICE = { "udpDevice", "UDP Device"}; public final static String[] UDP_DEVICE = { "udpDevice", "UDP Device"};
public final static String[] UDP_DEVICE_COMPAT = { "UDP", "UDP Device"}; public final static String[] UDP_DEVICE_COMPAT = { "UDP", "UDP Device"};
public final static String[] HTTP_DEVICE = { "httpDevice", "HTTP Device"}; public final static String[] HTTP_DEVICE = { "httpDevice", "HTTP Device"};
public final static String[] DOMOTICZ_DEVICE = { "domoticzDevice", "Domoticz Device"}; public final static String[] DOMOTICZ_DEVICE = { "domoticzDevice", "Domoticz Device"};
public final static String[] LIFX_DEVICE = { "lifxDevice", "LIFX Device"}; public final static String[] SOMFY_DEVICE = { "somfyDevice", "Somfy Device"};
public final static String[] LIFX_DEVICE = { "lifxDevice", "LIFX Device"};
public final static int typeIndex = 0;
public final static int displayIndex = 1; public final static int typeIndex = 0;
public final static int displayIndex = 1;
ArrayList<String[]> deviceMapTypes;
ArrayList<String[]> deviceMapTypes;
public DeviceMapTypes() {
super(); public DeviceMapTypes() {
deviceMapTypes = new ArrayList<String[]>(); super();
deviceMapTypes.add(CMD_DEVICE); deviceMapTypes = new ArrayList<String[]>();
deviceMapTypes.add(DOMOTICZ_DEVICE); deviceMapTypes.add(CMD_DEVICE);
deviceMapTypes.add(HAL_DEVICE); deviceMapTypes.add(DOMOTICZ_DEVICE);
deviceMapTypes.add(HAL_HOME); deviceMapTypes.add(HAL_DEVICE);
deviceMapTypes.add(HAL_THERMO_SET); deviceMapTypes.add(HAL_HOME);
deviceMapTypes.add(HAL_BUTTON); deviceMapTypes.add(HAL_THERMO_SET);
deviceMapTypes.add(HARMONY_ACTIVITY); deviceMapTypes.add(HAL_BUTTON);
deviceMapTypes.add(HARMONY_BUTTON); deviceMapTypes.add(HARMONY_ACTIVITY);
deviceMapTypes.add(HASS_DEVICE); deviceMapTypes.add(HARMONY_BUTTON);
deviceMapTypes.add(HTTP_DEVICE); deviceMapTypes.add(HASS_DEVICE);
deviceMapTypes.add(HUE_DEVICE); deviceMapTypes.add(HTTP_DEVICE);
deviceMapTypes.add(LIFX_DEVICE); deviceMapTypes.add(HUE_DEVICE);
deviceMapTypes.add(MQTT_MESSAGE); deviceMapTypes.add(LIFX_DEVICE);
deviceMapTypes.add(NEST_HOMEAWAY); deviceMapTypes.add(MQTT_MESSAGE);
deviceMapTypes.add(NEST_THERMO_SET); deviceMapTypes.add(NEST_HOMEAWAY);
deviceMapTypes.add(TCP_DEVICE); deviceMapTypes.add(NEST_THERMO_SET);
deviceMapTypes.add(UDP_DEVICE); deviceMapTypes.add(TCP_DEVICE);
deviceMapTypes.add(VERA_DEVICE); deviceMapTypes.add(UDP_DEVICE);
deviceMapTypes.add(VERA_SCENE); deviceMapTypes.add(VERA_DEVICE);
} deviceMapTypes.add(VERA_SCENE);
public static int getTypeIndex() { deviceMapTypes.add(SOMFY_DEVICE);
return typeIndex; }
} public static int getTypeIndex() {
public static int getDisplayIndex() { return typeIndex;
return displayIndex; }
} public static int getDisplayIndex() {
public ArrayList<String[]> getDeviceMapTypes() { return displayIndex;
return deviceMapTypes; }
} public ArrayList<String[]> getDeviceMapTypes() {
return deviceMapTypes;
public Boolean validateType(String type) { }
if(type == null || type.trim().isEmpty())
return false; public Boolean validateType(String type) {
for(String[] mapType : deviceMapTypes) { if(type == null || type.trim().isEmpty())
if(type.trim().contentEquals(mapType[typeIndex])) return false;
return true; for(String[] mapType : deviceMapTypes) {
} if(type.trim().contentEquals(mapType[typeIndex]))
if(type.trim().contentEquals(EXEC_DEVICE_COMPAT[typeIndex])) return true;
return true; }
if(type.trim().contentEquals(TCP_DEVICE_COMPAT[typeIndex])) if(type.trim().contentEquals(EXEC_DEVICE_COMPAT[typeIndex]))
return true; return true;
if(type.trim().contentEquals(UDP_DEVICE_COMPAT[typeIndex])) if(type.trim().contentEquals(TCP_DEVICE_COMPAT[typeIndex]))
return true; return true;
return false; if(type.trim().contentEquals(UDP_DEVICE_COMPAT[typeIndex]))
} return true;
return false;
}
} }

View File

@@ -15,6 +15,7 @@ import com.bwssystems.HABridge.plugins.http.HTTPHome;
import com.bwssystems.HABridge.plugins.hue.HueHome; import com.bwssystems.HABridge.plugins.hue.HueHome;
import com.bwssystems.HABridge.plugins.lifx.LifxHome; import com.bwssystems.HABridge.plugins.lifx.LifxHome;
import com.bwssystems.HABridge.plugins.mqtt.MQTTHome; import com.bwssystems.HABridge.plugins.mqtt.MQTTHome;
import com.bwssystems.HABridge.plugins.somfy.SomfyHome;
import com.bwssystems.HABridge.plugins.tcp.TCPHome; import com.bwssystems.HABridge.plugins.tcp.TCPHome;
import com.bwssystems.HABridge.plugins.udp.UDPHome; import com.bwssystems.HABridge.plugins.udp.UDPHome;
import com.bwssystems.HABridge.plugins.vera.VeraHome; import com.bwssystems.HABridge.plugins.vera.VeraHome;
@@ -88,6 +89,10 @@ public class HomeManager {
aHome = new DomoticzHome(bridgeSettings); aHome = new DomoticzHome(bridgeSettings);
homeList.put(DeviceMapTypes.DOMOTICZ_DEVICE[DeviceMapTypes.typeIndex], aHome); homeList.put(DeviceMapTypes.DOMOTICZ_DEVICE[DeviceMapTypes.typeIndex], aHome);
resourceList.put(DeviceMapTypes.DOMOTICZ_DEVICE[DeviceMapTypes.typeIndex], aHome); resourceList.put(DeviceMapTypes.DOMOTICZ_DEVICE[DeviceMapTypes.typeIndex], aHome);
//setup the Somfy configuration if available
aHome = new SomfyHome(bridgeSettings);
homeList.put(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex], aHome);
resourceList.put(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex], aHome);
//setup the Lifx configuration if available //setup the Lifx configuration if available
aHome = new LifxHome(bridgeSettings); aHome = new LifxHome(bridgeSettings);
resourceList.put(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex], aHome); resourceList.put(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex], aHome);

View File

@@ -260,7 +260,13 @@ public class DeviceResource {
return homeManager.findResource(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex]).getItems(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex]); return homeManager.findResource(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex]).getItems(DeviceMapTypes.LIFX_DEVICE[DeviceMapTypes.typeIndex]);
}, new JsonTransformer()); }, new JsonTransformer());
get (API_CONTEXT + "/map/types", "application/json", (request, response) -> { get (API_CONTEXT + "/somfy/devices", "application/json", (request, response) -> {
log.debug("Get somfy devices");
response.status(HttpStatus.SC_OK);
return homeManager.findResource(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex]).getItems(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex]);
}, new JsonTransformer());
get (API_CONTEXT + "/map/types", "application/json", (request, response) -> {
log.debug("Get map types"); log.debug("Get map types");
return new DeviceMapTypes().getDeviceMapTypes(); return new DeviceMapTypes().getDeviceMapTypes();
}, new JsonTransformer()); }, new JsonTransformer());

View File

@@ -0,0 +1,67 @@
package com.bwssystems.HABridge.plugins.somfy;
public class SomfyDevice {
private String id;
private String room;
private String category;
private String somfyname;
private String name;
private String deviceUrl;
private String deviceType;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setRoom(String room) {
this.room = room;
}
public String getRoom() {
return room;
}
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
public void setSomfyname(String somfyname) {
this.somfyname = somfyname;
}
public String getSomfyname() {
return somfyname;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setDeviceUrl(String deviceUrl) {
this.deviceUrl = deviceUrl;
}
public String getDeviceUrl() {
return deviceUrl;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getDeviceType() {
return deviceType;
}
}

View File

@@ -0,0 +1,118 @@
package com.bwssystems.HABridge.plugins.somfy;
import com.bwssystems.HABridge.BridgeSettingsDescriptor;
import com.bwssystems.HABridge.DeviceMapTypes;
import com.bwssystems.HABridge.Home;
import com.bwssystems.HABridge.NamedIP;
import com.bwssystems.HABridge.api.CallItem;
import com.bwssystems.HABridge.dao.DeviceDescriptor;
import com.bwssystems.HABridge.hue.MultiCommandUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
/**
* Support for Somfy Tahoma hub which allows control of IO Homecontrol devices such as Velux windows.
* Currently supports 'turn on' for open window, and 'turn off' for close.
*
* Known issues:
* //TODO - Fix bug on UI where bulk update seems to add the single device twice if 'update' is clicked (this is a general bug with Vera too I think)
* Enhancements:
* //TODO - support 'dimming' for partial window opening.
*
*/
public class SomfyHome implements Home {
private static final Logger log = LoggerFactory.getLogger(SomfyHome.class);
private Map<String, SomfyInfo> somfys;
private Boolean validSomfy;
public SomfyHome(BridgeSettingsDescriptor bridgeSettings) {
createHome(bridgeSettings);
}
public SomfyInfo getSomfyHandler(String somfyName) {
return somfys.get(somfyName);
}
public List<SomfyDevice> getDevices() {
log.debug("consolidating devices for somfy");
Iterator<String> keys = somfys.keySet().iterator();
ArrayList<SomfyDevice> deviceList = new ArrayList<>();
while(keys.hasNext()) {
String key = keys.next();
List<SomfyDevice> devices = somfys.get(key).getSomfyDevices();
deviceList.addAll(devices);
}
return deviceList;
}
@Override
public Object getItems(String type) {
if(validSomfy) {
if(type.equalsIgnoreCase(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex]))
return getDevices();
}
return null;
}
@Override
public String deviceHandler(CallItem anItem, MultiCommandUtil aMultiUtil, String lightId, int intensity, Integer targetBri, Integer targetBriInc, DeviceDescriptor device, String body) {
String responseString = null;
if (!validSomfy) {
log.warn("Should not get here, no somfy hub available");
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId
+ "\",\"description\": \"Should not get here, no somfy hub available\", \"parameter\": \"/lights/"
+ lightId + "state\"}}]";
} else {
if (anItem.getType() != null && anItem.getType().trim().equalsIgnoreCase(DeviceMapTypes.SOMFY_DEVICE[DeviceMapTypes.typeIndex])) {
log.debug("executing HUE api request to change activity to Somfy: " + anItem.getItem().toString());
String jsonToPost = anItem.getItem().toString();
SomfyInfo somfyHandler = getSomfyHandler(device.getTargetDevice());
if(somfyHandler == null) {
log.warn("Should not get here, no Somfy configured");
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId
+ "\",\"description\": \"Should not get here, no somfy configured\", \"parameter\": \"/lights/"
+ lightId + "state\"}}]";
} else {
try {
somfyHandler.execApply(jsonToPost);
} catch (Exception e) {
log.warn("Error posting request to Somfy");
responseString = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId
+ "\",\"description\": \"Error posting request to SomfyTahoma\", \"parameter\": \"/lights/" + lightId + "state\"}}]";
}
}
}
}
return responseString;
}
@Override
public Home createHome(BridgeSettingsDescriptor bridgeSettings) {
validSomfy = bridgeSettings.isValidSomfy();
log.info("Somfy Home created." + (validSomfy ? "" : " No Somfys configured."));
if(validSomfy) {
somfys = new HashMap<>();
Iterator<NamedIP> theList = bridgeSettings.getSomfyAddress().getDevices().iterator();
while (theList.hasNext()) {
NamedIP aSomfy = theList.next();
somfys.put(aSomfy.getName(), new SomfyInfo(aSomfy, aSomfy.getName()));
}
}
return this;
}
@Override
public void closeHome() {
somfys = null;
}
}

View File

@@ -0,0 +1,116 @@
package com.bwssystems.HABridge.plugins.somfy;
import com.bwssystems.HABridge.NamedIP;
import com.bwssystems.HABridge.api.NameValue;
import com.bwssystems.HABridge.plugins.http.HTTPHandler;
import com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup.Device;
import com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup.GetSetup;
import com.google.gson.Gson;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
public class SomfyInfo {
private static final Logger log = LoggerFactory.getLogger(SomfyInfo.class);
private final String somfyName;
private final NamedIP namedIP;
private HTTPHandler httpClient;
private static final String CONNECT_HOST = "https://www.tahomalink.com/";
private static final String BASE_URL = CONNECT_HOST + "enduser-mobile-web/externalAPI/";
private static final String BASE_URL_ENDUSER = CONNECT_HOST + "enduser-mobile-web/enduserAPI/";
public SomfyInfo(NamedIP namedIP, String somfyName) {
super();
this.somfyName = somfyName;
this.namedIP = namedIP;
}
private void initHttpClient() throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException {
if(httpClient==null) {
httpClient = new HTTPHandler();
}
}
public List<SomfyDevice> getSomfyDevices() {
List<SomfyDevice> somfyDevices = new ArrayList<>();
try {
login(namedIP.getUsername(), namedIP.getPassword());
GetSetup setupData = getSetup();
for(Device device : setupData.getSetup().getDevices()) {
somfyDevices.add(mapDeviceToSomfyDevice(device));
}
} catch (Exception e) {
log.error("Could not get Somfy devices", e);
}
return somfyDevices;
}
public void login(String username, String password) throws Exception {
initHttpClient();
NameValue[] httpHeader = getHttpHeaders();
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("userId", username));
nvps.add(new BasicNameValuePair("userPassword", password));
log.debug("Making SOMFY http login call");
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(nvps);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
urlEncodedFormEntity.writeTo(bos);
String body = bos.toString();
String response = httpClient.doHttpRequest(BASE_URL + "json/login",HttpPost.METHOD_NAME, "application/x-www-form-urlencoded", body,httpHeader);
log.debug(response);
}
private NameValue[] getHttpHeaders() {
NameValue userAgentHeader = new NameValue();
userAgentHeader.setName("User-Agent");
userAgentHeader.setValue("mine");
return new NameValue[]{userAgentHeader};
}
public GetSetup getSetup() throws IOException {
NameValue[] httpHeader = getHttpHeaders();
log.info("Making SOMFY http setup call");
String response = httpClient.doHttpRequest(BASE_URL + "json/getSetup", HttpGet.METHOD_NAME, "", "", httpHeader );
log.debug(response);
GetSetup setupData = new Gson().fromJson(response, GetSetup.class);
return setupData;
}
public void execApply(String jsonToPost) throws Exception {
login(namedIP.getUsername(), namedIP.getPassword());
log.info("Making SOMFY http exec call");
String response = httpClient.doHttpRequest(BASE_URL_ENDUSER + "exec/apply", HttpPost.METHOD_NAME, "application/json;charset=UTF-8", jsonToPost, getHttpHeaders());
log.info(response);
}
protected SomfyDevice mapDeviceToSomfyDevice(Device device) {
SomfyDevice somfyDevice = new SomfyDevice();
somfyDevice.setId(device.getOid());
somfyDevice.setCategory(device.getUiClass());
somfyDevice.setRoom("");
somfyDevice.setSomfyname(somfyName);
somfyDevice.setName(device.getLabel());
somfyDevice.setDeviceUrl(device.getDeviceURL());
somfyDevice.setDeviceType(device.getWidget());
return somfyDevice;
}
}

View File

@@ -0,0 +1,69 @@
package com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Device {
@SerializedName("label")
@Expose
private String label;
@SerializedName("deviceURL")
@Expose
private String deviceURL;
@SerializedName("widget")
@Expose
private String widget;
@SerializedName("oid")
@Expose
private String oid;
@SerializedName("uiClass")
@Expose
private String uiClass;
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getDeviceURL() {
return deviceURL;
}
public void setDeviceURL(String deviceURL) {
this.deviceURL = deviceURL;
}
public String getWidget() {
return widget;
}
public void setWidget(String widget) {
this.widget = widget;
}
public String getOid() {
return oid;
}
public void setOid(String oid) {
this.oid = oid;
}
public String getUiClass() {
return uiClass;
}
public void setUiClass(String uiClass) {
this.uiClass = uiClass;
}
}

View File

@@ -0,0 +1,21 @@
package com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class GetSetup {
@SerializedName("setup")
@Expose
private Setup setup;
public Setup getSetup() {
return setup;
}
public void setSetup(Setup setup) {
this.setup = setup;
}
}

View File

@@ -0,0 +1,35 @@
package com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Setup {
@SerializedName("id")
@Expose
private String id;
@SerializedName("devices")
@Expose
private List<Device> devices = null;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<Device> getDevices() {
return devices;
}
public void setDevices(List<Device> devices) {
this.devices = devices;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -44,6 +44,11 @@ app.config (function ($locationProvider, $routeProvider) {
controller: 'HassController' controller: 'HassController'
}).when ('/domoticzdevices', { }).when ('/domoticzdevices', {
templateUrl: 'views/domoticzdevice.html', templateUrl: 'views/domoticzdevice.html',
controller: 'DomoticzController'
}).when('/somfydevices', {
templateUrl: 'views/somfydevice.html',
controller: 'SomfyController'
}).otherwise ({
controller: 'DomoticzController' controller: 'DomoticzController'
}).when ('/lifxdevices', { }).when ('/lifxdevices', {
templateUrl: 'views/lifxdevice.html', templateUrl: 'views/lifxdevice.html',
@@ -75,7 +80,7 @@ String.prototype.replaceAll = function (search, replace)
app.service ('bridgeService', function ($http, $window, ngToast) { app.service ('bridgeService', function ($http, $window, ngToast) {
var self = this; var self = this;
this.state = {base: "./api/devices", bridgelocation: ".", systemsbase: "./system", huebase: "./api", configs: [], backups: [], devices: [], device: {}, mapandid: [], type: "", settings: [], myToastMsg: [], logMsgs: [], loggerInfo: [], mapTypes: [], olddevicename: "", logShowAll: false, isInControl: false, showVera: false, showHarmony: false, showNest: false, showHue: false, showHal: false, showMqtt: false, showHass: false, showDomoticz: false, showLifx: false, habridgeversion: ""}; this.state = {base: "./api/devices", bridgelocation: ".", systemsbase: "./system", huebase: "./api", configs: [], backups: [], devices: [], device: {}, mapandid: [], type: "", settings: [], myToastMsg: [], logMsgs: [], loggerInfo: [], mapTypes: [], olddevicename: "", logShowAll: false, isInControl: false, showVera: false, showHarmony: false, showNest: false, showHue: false, showHal: false, showMqtt: false, showHass: false, showDomoticz: false, showSomfy: false, showLifx: false, habridgeversion: ""};
this.displayWarn = function(errorTitle, error) { this.displayWarn = function(errorTitle, error) {
var toastContent = errorTitle; var toastContent = errorTitle;
@@ -272,6 +277,11 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
return; return;
} }
this.updateShowSomfy = function () {
this.state.showSomfy = self.state.settings.somfyconfigured;
return;
}
this.updateShowLifx = function () { this.updateShowLifx = function () {
this.state.showLifx = self.state.settings.lifxconfigured; this.state.showLifx = self.state.settings.lifxconfigured;
return; return;
@@ -289,6 +299,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
self.updateShowMqtt(); self.updateShowMqtt();
self.updateShowHass(); self.updateShowHass();
self.updateShowDomoticz(); self.updateShowDomoticz();
self.updateShowSomfy();
self.updateShowLifx(); self.updateShowLifx();
}, },
function (error) { function (error) {
@@ -471,6 +482,20 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
); );
}; };
this.viewSomfyDevices = function () {
if(!this.state.showSomfy)
return;
return $http.get(this.state.base + "/somfy/devices").then(
function (response) {
self.state.somfydevices = response.data;
},
function (error) {
self.displayWarn("Get Somfy Devices Error: ", error);
}
);
};
this.viewLifxDevices = function () { this.viewLifxDevices = function () {
if (!this.state.showLifx) if (!this.state.showLifx)
return; return;
@@ -1050,6 +1075,25 @@ app.controller ('SystemController', function ($scope, $location, $http, $window,
} }
} }
}; };
$scope.addSomfytoSettings = function (newsomfyname, newsomfyip, newsomfyusername, newsomfypassword) {
if($scope.bridge.settings.somfyaddress == null) {
$scope.bridge.settings.somfyaddress = { devices: [] };
}
var newSomfy = {name: newsomfyname, ip: newsomfyip, username: newsomfyusername, password: newsomfypassword }
$scope.bridge.settings.somfyaddress.devices.push(newSomfy);
$scope.newsomfyname = null;
$scope.newsomfyip = null;
$scope.newsomfyusername = null;
$scope.newsomfypassword = null;
};
$scope.removeSomfytoSettings = function (somfyname, somfyip) {
for(var i = $scope.bridge.settings.somfyaddress.devices.length - 1; i >= 0; i--) {
if($scope.bridge.settings.somfyaddress.devices[i].name === somfyname && $scope.bridge.settings.somfyaddress.devices[i].ip === somfyip) {
$scope.bridge.settings.somfyaddress.devices.splice(i, 1);
}
}
};
$scope.bridgeReinit = function () { $scope.bridgeReinit = function () {
bridgeService.reinit(); bridgeService.reinit();
}; };
@@ -2426,6 +2470,134 @@ app.controller('LifxController', function ($scope, $location, $http, bridgeServi
}; };
}); });
app.controller('SomfyController', function ($scope, $location, $http, bridgeService, ngDialog) {
$scope.bridge = bridgeService.state;
$scope.device = bridgeService.state.device;
$scope.device_dim_control = "";
$scope.bulk = { devices: [] };
$scope.selectAll = false;
$scope.somfy = {base: "http://", port: "3480", id: ""};
bridgeService.viewDevices(); //Needs this if you're navigating to the 'somfy' page directly without going to the home page first..
bridgeService.viewSomfyDevices();
$scope.imgButtonsUrl = "glyphicon glyphicon-plus";
$scope.buttonsVisible = false;
$scope.comparatorUniqueId = bridgeService.compareUniqueId;
$scope.clearDevice = function () {
bridgeService.clearDevice();
$scope.device = bridgeService.state.device;
};
$scope.buildDeviceUrls = function (somfydevice, dim_control, buildonly) {
//TODO - support partial window opening - add back 'dim_control' second param in here, and in somfydevice.html
dimpayload = "";
onpayload = "{\"label\":\"Label that is ignored probably\",\"actions\":[{\"deviceURL\":\""+ somfydevice.deviceUrl+"\",\"commands\":[{\"name\":\"open\",\"parameters\":[]}]}]}";
offpayload = "{\"label\":\"Label that is ignored probably\",\"actions\":[{\"deviceURL\":\""+ somfydevice.deviceUrl+"\",\"commands\":[{\"name\":\"close\",\"parameters\":[]}]}]}";
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, somfydevice.id, somfydevice.name, somfydevice.somfyname, "switch", "somfyDevice", null, null);
$scope.device = bridgeService.state.device;
if (!buildonly) {
bridgeService.editNewDevice($scope.device);
$location.path('/editdevice');
}
};
$scope.bulkAddDevices = function(dim_control) {
var devicesList = [];
$scope.clearDevice();
for(var i = 0; i < $scope.bulk.devices.length; i++) {
for(var x = 0; x < bridgeService.state.somfydevices.length; x++) {
if(bridgeService.state.somfydevices[x].id === $scope.bulk.devices[i]) {
$scope.buildDeviceUrls(bridgeService.state.somfydevices[x],dim_control, true);
devicesList[i] = {
name: $scope.device.name,
mapId: $scope.device.mapId,
mapType: $scope.device.mapType,
deviceType: $scope.device.deviceType,
targetDevice: $scope.device.targetDevice,
onUrl: $scope.device.onUrl,
dimUrl: $scope.device.dimUrl,
offUrl: $scope.device.offUrl,
headers: $scope.device.headers,
httpVerb: $scope.device.httpVerb,
contentType: $scope.device.contentType,
contentBody: $scope.device.contentBody,
contentBodyDim: $scope.device.contentBodyDim,
contentBodyOff: $scope.device.contentBodyOff
};
$scope.clearDevice();
}
}
}
bridgeService.bulkAddDevice(devicesList).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewSomfyDevices();
},
function (error) {
bridgeService.displayWarn("Error adding Somfy devices in bulk.", error)
}
);
$scope.bulk = { devices: [] };
$scope.selectAll = false;
};
$scope.toggleSelection = function toggleSelection(deviceId) {
var idx = $scope.bulk.devices.indexOf(deviceId);
// is currently selected
if (idx > -1) {
$scope.bulk.devices.splice(idx, 1);
if($scope.bulk.devices.length === 0 && $scope.selectAll)
$scope.selectAll = false;
}
// is newly selected
else {
$scope.bulk.devices.push(deviceId);
$scope.selectAll = true;
}
};
$scope.toggleSelectAll = function toggleSelectAll() {
if($scope.selectAll) {
$scope.selectAll = false;
$scope.bulk = { devices: [] };
}
else {
$scope.selectAll = true;
for(var x = 0; x < bridgeService.state.somfydevices.length; x++) {
if($scope.bulk.devices.indexOf(bridgeService.state.somfydevices[x]) < 0 && !bridgeService.findDeviceByMapId(bridgeService.state.somfydevices[x].id, bridgeService.state.somfydevices[x].somfyname, "somfyDevice"))
$scope.bulk.devices.push(bridgeService.state.somfydevices[x].id);
}
}
};
$scope.toggleButtons = function () {
$scope.buttonsVisible = !$scope.buttonsVisible;
if($scope.buttonsVisible)
$scope.imgButtonsUrl = "glyphicon glyphicon-minus";
else
$scope.imgButtonsUrl = "glyphicon glyphicon-plus";
};
$scope.deleteDevice = function (device) {
$scope.bridge.device = device;
ngDialog.open({
template: 'deleteDialog',
controller: 'DeleteDialogCtrl',
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
};
});
app.controller('EditController', function ($scope, $location, $http, bridgeService) { app.controller('EditController', function ($scope, $location, $http, bridgeService) {
bridgeService.viewMapTypes(); bridgeService.viewMapTypes();
$scope.bridge = bridgeService.state; $scope.bridge = bridgeService.state;
@@ -2717,6 +2889,23 @@ app.filter('configuredLifxItems', function (bridgeService) {
} }
}); });
app.filter('configuredSomfyDevices', function (bridgeService) {
return function(input) {
var out = [];
if(input === undefined || input === null || input.length === undefined)
return out;
for (var i = 0; i < input.length; i++) {
if(bridgeService.deviceContainsType(input[i], "somfyDevice")){
out.push(input[i]);
}
}
return out;
}
});
app.controller('VersionController', function ($scope, bridgeService) { app.controller('VersionController', function ($scope, bridgeService) {
$scope.bridge = bridgeService.state; $scope.bridge = bridgeService.state;
}); });

View File

@@ -1,145 +1,146 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="#!/">Bridge <li role="presentation" class="active"><a href="#!/">Bridge
Devices</a></li> Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h1 class="panel-title">Current devices ({{bridge.devices.length}})</h1> <div class="panel-heading">
</div> <h1 class="panel-title">Current devices ({{bridge.devices.length}})</h1>
<div class="panel-body"> </div>
<div class="panel-body">
<p>
<button class="btn btn-primary" type="submit" ng-click="renumberDevices()">Renumber Devices</button> <p>
</p> <button class="btn btn-primary" type="submit" ng-click="renumberDevices()">Renumber Devices</button>
</p>
<scrollable-table watch="bridge.devices">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.devices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="id" comparator-fn="comparatorUniqueId">ID</th> <th>Row</th>
<th sortable-header col="name">Name</th> <th sortable-header col="id" comparator-fn="comparatorUniqueId">ID</th>
<th sortable-header col="deviceType">Type</th> <th sortable-header col="name">Name</th>
<th sortable-header col="targetDevice">Target</th> <th sortable-header col="deviceType">Type</th>
<th sortable-header col="inactive">Inactive</th> <th sortable-header col="targetDevice">Target</th>
<th sortable-header col="noState">No State</th> <th sortable-header col="inactive">Inactive</th>
<th>Actions</th> <th sortable-header col="noState">No State</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr ng-repeat="device in bridge.devices"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="device in bridge.devices">
<td>{{device.id}}</td> <td>{{$index+1}}</td>
<td>{{device.name}}</td> <td>{{device.id}}</td>
<td>{{device.deviceType}}</td> <td>{{device.name}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.deviceType}}</td>
<td>{{device.inactive}}</td> <td>{{device.targetDevice}}</td>
<td>{{device.noState}}</td> <td>{{device.inactive}}</td>
<td> <td>{{device.noState}}</td>
<p> <td>
<button class="btn btn-info" type="submit" <p>
ng-click="testUrl(device, 'on')">Test ON</button> <button class="btn btn-info" type="submit"
<button class="btn btn-info" type="submit" ng-click="testUrl(device, 'on')">Test ON</button>
ng-click="testUrl(device, 'dim')">Test Dim</button> <button class="btn btn-info" type="submit"
<button class="btn btn-info" type="submit" ng-click="testUrl(device, 'dim')">Test Dim</button>
ng-click="testUrl(device, 'off')">Test OFF</button> <button class="btn btn-info" type="submit"
<button class="btn btn-warning" type="submit" ng-click="testUrl(device, 'off')">Test OFF</button>
ng-click="editDevice(device)">Edit/Copy</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit/Copy</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h1 class="panel-title"> <div class="panel-heading">
Bridge Device DB Backup <a ng-click="toggleBk()"><span <h1 class="panel-title">
class={{imgBkUrl}} aria-hidden="true"></span></a> Bridge Device DB Backup <a ng-click="toggleBk()"><span
</h1> class={{imgBkUrl}} aria-hidden="true"></span></a>
</div> </h1>
<div ng-if="visibleBk" class="panel-body"> </div>
<p>Control your backups from this area. Use the default name by hitting backup or specify your own.</p> <div ng-if="visibleBk" class="panel-body">
<form class="form-horizontal"> <p>Control your backups from this area. Use the default name by hitting backup or specify your own.</p>
<div class="form-group"> <form class="form-horizontal">
<label class="col-xs-12 col-sm-2 control-label" for="backup-name">Backup <div class="form-group">
File Name</label> <label class="col-xs-12 col-sm-2 control-label" for="backup-name">Backup
File Name</label>
<div class="col-xs-8 col-sm-7">
<input id="backup-name" class="form-control" type="text" <div class="col-xs-8 col-sm-7">
ng-model="optionalbackupname" placeholder="Optional"> <input id="backup-name" class="form-control" type="text"
</div> ng-model="optionalbackupname" placeholder="Optional">
<button type="submit" class="btn btn-primary" </div>
ng-click="backupDeviceDb(optionalbackupname)">Backup <button type="submit" class="btn btn-primary"
Device DB</button> ng-click="backupDeviceDb(optionalbackupname)">Backup
</div> Device DB</button>
</form> </div>
<table class="table table-bordered table-striped table-hover"> </form>
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Filename</th> <tr>
<th>Actions</th> <th>Filename</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr ng-repeat="backup in bridge.backups"> </thead>
<td>{{backup}}</td> <tr ng-repeat="backup in bridge.backups">
<td> <td>{{backup}}</td>
<button class="btn btn-danger" type="submit" <td>
ng-click="restoreBackup(backup)">Restore</button> <button class="btn btn-danger" type="submit"
<button class="btn btn-warning" type="submit" ng-click="restoreBackup(backup)">Restore</button>
ng-click="deleteBackup(backup)">Delete</button> <button class="btn btn-warning" type="submit"
</td> ng-click="deleteBackup(backup)">Delete</button>
</tr> </td>
</table> </tr>
</div> </table>
</div> </div>
</div>
<script type="text/ng-template" id="valueDialog">
<div class="ngdialog-message"> <script type="text/ng-template" id="valueDialog">
<h2>Select value</h2> <div class="ngdialog-message">
<p> <h2>Select value</h2>
<input type="radio" ng-model="valueType" value="percentage" ng-change="changeScale()"> Percentage <p>
<input type="radio" ng-model="valueType" value="raw" ng-change="changeScale()"> Raw <input type="radio" ng-model="valueType" value="percentage" ng-change="changeScale()"> Percentage
</p> <input type="radio" ng-model="valueType" value="raw" ng-change="changeScale()"> Raw
<p> </p>
<rzslider rz-slider-model="slider.value" rz-slider-options="slider.options"></rzslider> <p>
</p> <rzslider rz-slider-model="slider.value" rz-slider-options="slider.options"></rzslider>
</div> </p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-primary" ng-click="setValue()">Set</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-primary" ng-click="setValue()">Set</button>
</script> </div>
<script type="text/ng-template" id="deleteDialog"> </script>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteDialog">
<h2>Device to Delete?</h2> <div class="ngdialog-message">
<p>{{device.name}}</p> <h2>Device to Delete?</h2>
<p>Are you Sure?</p> <p>{{device.name}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteDevice(device)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteDevice(device)">Delete</button>
</script> </div>
</script>

View File

@@ -18,6 +18,7 @@
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li role="presentation" class="active"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li role="presentation" class="active"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul> </ul>

View File

@@ -20,6 +20,7 @@
<li ng-if="bridge.showHass" role="presentation"><a <li ng-if="bridge.showHass" role="presentation"><a
href="#!/hassdevices">HomeAssistant Devices</a></li> href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
<li role="presentation" class="active"><a href="#!/editdevice">Add/Edit</a></li> <li role="presentation" class="active"><a href="#!/editdevice">Add/Edit</a></li>
</ul> </ul>

View File

@@ -1,178 +1,179 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li role="presentation" class="active"><a href="#!/haldevices">HAL <li role="presentation" class="active"><a href="#!/haldevices">HAL
Devices</a></li> Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">HAL Device List <div class="panel-heading">
({{bridge.haldevices.length}})</h2> <h2 class="panel-title">HAL Device List
</div> ({{bridge.haldevices.length}})</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any HAL Device, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then <p class="text-muted">For any HAL Device, use the build action buttons
you can modify the name to anything you want that will be the keyword to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
for the Echo or Google Home. Also, you can go back to any helper tab and click a build you can modify the name to anything you want that will be the keyword
action button to add another item for a multi-command. After you are for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to finish that selection action button to add another item for a multi-command. After you are
setup. The 'Already Configured HAL Devices' list below will show what done in the edit tab, click the 'Add Bridge Device' to finish that selection
is already setup for your HAL.</p> setup. The 'Already Configured HAL Devices' list below will show what
<p class="text-muted"> is already setup for your HAL.</p>
Also, use this select menu for which type of dim control you would <p class="text-muted">
like to be generated: <select name="device-dim-control" Also, use this select menu for which type of dim control you would
id="device-dim-control" ng-model="device_dim_control"> like to be generated: <select name="device-dim-control"
<option value="">none</option> id="device-dim-control" ng-model="device_dim_control">
<option value="${intensity.byte}">Pass-thru Value</option> <option value="">none</option>
<option value="${intensity.percent}">Percentage</option> <option value="${intensity.byte}">Pass-thru Value</option>
<option value="${intensity.decimal_percent}">Decimal Percentage</option> <option value="${intensity.percent}">Percentage</option>
<option value="${intensity.math(X*1)}">Custom Math</option> <option value="${intensity.decimal_percent}">Decimal Percentage</option>
</select> <option value="${intensity.math(X*1)}">Custom Math</option>
</p> </select>
<p class="text-muted">Use the check boxes by the names to use the bulk addition </p>
feature. Select your items and dim control type if wanted, then click <p class="text-muted">Use the check boxes by the names to use the bulk addition
bulk add below. Your items will be added with on and off or dim and feature. Select your items and dim control type if wanted, then click
off if selected with the name of the device from the HAL.</p> bulk add below. Your items will be added with on and off or dim and
<scrollable-table watch="bridge.haldevices"> off if selected with the name of the device from the HAL.</p>
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.haldevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name"> <th>Row</th>
<span><input type="checkbox" name="selectAll" <th sortable-header col="name">
value="{{selectAll}}" <span><input type="checkbox" name="selectAll"
ng-checked="selectAll" value="{{selectAll}}"
ng-click="toggleSelectAll()"> Name</span></th> ng-checked="selectAll"
<th sortable-header col="category">Category</th> ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="halname">HAL</th> <th sortable-header col="category">Category</th>
<th>On Button</th> <th sortable-header col="halname">HAL</th>
<th>Off Button</th> <th>On Button</th>
<th>Build Actions</th> <th>Off Button</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr ng-repeat="haldevice in bridge.haldevices"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="haldevice in bridge.haldevices">
<td><input type="checkbox" name="bulk.devices[]" <td>{{$index+1}}</td>
value="{{haldevice.haldevicename}}" <td><input type="checkbox" name="bulk.devices[]"
ng-checked="bulk.devices.indexOf(haldevice.haldevicename) > -1" value="{{haldevice.haldevicename}}"
ng-click="toggleSelection(haldevice.haldevicename)"> ng-checked="bulk.devices.indexOf(haldevice.haldevicename) > -1"
{{haldevice.haldevicename}}</td> ng-click="toggleSelection(haldevice.haldevicename)">
<td>{{haldevice.haldevicetype}}</td> {{haldevice.haldevicename}}</td>
<td>{{haldevice.halname}}</td> <td>{{haldevice.haldevicetype}}</td>
<td> <td>{{haldevice.halname}}</td>
<select name="button-on" id="button-on" ng-model="button_on"> <td>
<option ng-repeat="aButtonOn in haldevice.buttons.DeviceElements" <select name="button-on" id="button-on" ng-model="button_on">
value="{{aButtonOn}}">{{aButtonOn.DeviceName}}</option> <option ng-repeat="aButtonOn in haldevice.buttons.DeviceElements"
</select> value="{{aButtonOn}}">{{aButtonOn.DeviceName}}</option>
</td> </select>
<td> </td>
<select name="button-off" id="button-off" ng-model="button_off"> <td>
<option ng-repeat="aButtonOff in haldevice.buttons.DeviceElements" <select name="button-off" id="button-off" ng-model="button_off">
value="{{aButtonOff}}">{{aButtonOff.DeviceName}}</option> <option ng-repeat="aButtonOff in haldevice.buttons.DeviceElements"
</select> value="{{aButtonOff}}">{{aButtonOff.DeviceName}}</option>
</td> </select>
<td> </td>
<button ng-if="haldevice.haldevicetype != 'Home' && haldevice.haldevicetype != 'HVAC' && haldevice.haldevicetype != 'IrData'" class="btn btn-success" type="submit" <td>
ng-click="buildDeviceUrls(haldevice, device_dim_control, false)">Build Item</button> <button ng-if="haldevice.haldevicetype != 'Home' && haldevice.haldevicetype != 'HVAC' && haldevice.haldevicetype != 'IrData'" class="btn btn-success" type="submit"
<button ng-if="haldevice.haldevicetype == 'Home'" class="btn btn-success" type="submit" ng-click="buildDeviceUrls(haldevice, device_dim_control, false)">Build Item</button>
ng-click="buildHALHomeUrls(haldevice, false)">Build Home/Away</button> <button ng-if="haldevice.haldevicetype == 'Home'" class="btn btn-success" type="submit"
<button ng-if="haldevice.haldevicetype == 'IrData'" class="btn btn-success" type="submit" ng-click="buildHALHomeUrls(haldevice, false)">Build Home/Away</button>
ng-click="buildButtonUrls(haldevice, button_on, button_off, false)">Build <button ng-if="haldevice.haldevicetype == 'IrData'" class="btn btn-success" type="submit"
A Button</button> ng-click="buildButtonUrls(haldevice, button_on, button_off, false)">Build
<ul ng-if="haldevice.haldevicetype == 'HVAC'" class="list-group"> A Button</button>
<li class="list-group-item"> <ul ng-if="haldevice.haldevicetype == 'HVAC'" class="list-group">
<p> <li class="list-group-item">
<button class="btn btn-success" type="submit" <p>
ng-click="buildHALHeatUrls(haldevice, false)">Heat</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildHALHeatUrls(haldevice, false)">Heat</button>
ng-click="buildHALCoolUrls(haldevice, false)">Cool</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildHALCoolUrls(haldevice, false)">Cool</button>
ng-click="buildHALAutoUrls(haldevice, false)">Auto</button> <button class="btn btn-success" type="submit"
</p> ng-click="buildHALAutoUrls(haldevice, false)">Auto</button>
<p> </p>
<button class="btn btn-success" type="submit" <p>
ng-click="buildHALOffUrls(haldevice, false)">Off</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildHALOffUrls(haldevice, false)">Off</button>
ng-click="buildHALFanUrls(haldevice, false)">Fan</button> <button class="btn btn-success" type="submit"
</p> ng-click="buildHALFanUrls(haldevice, false)">Fan</button>
</li> </p>
</ul> </li>
</td> </ul>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
<div class="panel-footer"> </scrollable-table>
<button class="btn btn-success" type="submit" <div class="panel-footer">
ng-click="bulkAddDevices(device_dim_control)">Bulk Add <button class="btn btn-success" type="submit"
({{bulk.devices.length}})</button> ng-click="bulkAddDevices(device_dim_control)">Bulk Add
</div> ({{bulk.devices.length}})</button>
</div> </div>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured HAL Devices <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a></a> Already Configured HAL Devices <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<div ng-if="buttonsVisible" class="panel-body">
<scrollable-table watch="bridge.haldevices">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.haldevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="category">Category</th> <th sortable-header col="name">Name</th>
<th sortable-header col="halname">HAL</th> <th sortable-header col="category">Category</th>
<th>Map Id</th> <th sortable-header col="halname">HAL</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredHalItems"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredHalItems">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.deviceType}}</td> <td>{{device.name}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.deviceType}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</script> </div>
</script>

View File

@@ -1,112 +1,113 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li role="presentation" class="active"><a <li role="presentation" class="active"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li role="presentation"><a href="#!/harmonydevices">Harmony <li role="presentation"><a href="#!/harmonydevices">Harmony
Devices</a></li> Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Harmony Activity List</h2> <div class="panel-heading">
</div> <h2 class="panel-title">Harmony Activity List</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Harmony Activity, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. <p class="text-muted">For any Harmony Activity, use the build action buttons
Then you can modify the name to anything you want that to generate the item addition information into the ha-bridge device and this will put you into the edit screen.
will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build Then you can modify the name to anything you want that
action button to add another item for a multi-command. After you are will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to action button to add another item for a multi-command. After you are
finish that selection setup. The 'Already Configured Activities' list done in the edit tab, click the 'Add Bridge Device' to
below will show what is already setup for your Harmony Hubs.</p> finish that selection setup. The 'Already Configured Activities' list
below will show what is already setup for your Harmony Hubs.</p>
<scrollable-table watch="bridge.harmonyactivities">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.harmonyactivities">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="label" comparator-fn="comparatorLabel">Name</th> <th>Row</th>
<th sortable-header col="id" comparator-fn="comparatorNumber">Id</th> <th sortable-header col="label" comparator-fn="comparatorLabel">Name</th>
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th> <th sortable-header col="id" comparator-fn="comparatorNumber">Id</th>
<th>Build Actions</th> <th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="harmonyactivity in bridge.harmonyactivities"> <tr
<td>{{$index+1}}</td> ng-repeat="harmonyactivity in bridge.harmonyactivities">
<td>{{harmonyactivity.activity.label}}</td> <td>{{$index+1}}</td>
<td>{{harmonyactivity.activity.id}}</td> <td>{{harmonyactivity.activity.label}}</td>
<td>{{harmonyactivity.hub}}</td> <td>{{harmonyactivity.activity.id}}</td>
<td> <td>{{harmonyactivity.hub}}</td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildActivityUrls(harmonyactivity)">Build Item</button> <button class="btn btn-success" type="submit"
</td> ng-click="buildActivityUrls(harmonyactivity)">Build Item</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Activities <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a> Already Configured Activities <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.harmonyactivities"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.harmonyactivities">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">Hub</th> <th sortable-header col="name">Name</th>
<th>Map Id</th> <th sortable-header col="targetDevice">Hub</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredHarmonyActivities"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredHarmonyActivities">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>

View File

@@ -1,131 +1,132 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li role="presentation"><a href="#!/harmonyactivities">Harmony <li role="presentation"><a href="#!/harmonyactivities">Harmony
Activities</a></li> Activities</a></li>
<li role="presentation" class="active"><a href="#!/harmonydevices">Harmony <li role="presentation" class="active"><a href="#!/harmonydevices">Harmony
Devices</a></li> Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Harmony Device List</h2> <div class="panel-heading">
</div> <h2 class="panel-title">Harmony Device List</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Harmony Device and Buttons, use the <div class="panel-body">
build action buttons <p class="text-muted">For any Harmony Device and Buttons, use the
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then you can modify the name build action buttons
to anything you want that will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then you can modify the name
action button to add another item for a multi-command. After you are to anything you want that will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the action button to add another item for a multi-command. After you are
'Add Bridge Device' to finish that selection setup. The 'Already done in the edit tab, click the
Configured Harmony Buttons' list below will show what is already 'Add Bridge Device' to finish that selection setup. The 'Already
setup for your Harmony Hubs.</p> Configured Harmony Buttons' list below will show what is already
setup for your Harmony Hubs.</p>
<scrollable-table watch="bridge.harmonydevices">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.harmonydevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="label" comparator-fn="comparatorLabel">Name</th> <th>Row</th>
<th sortable-header col="id" comparator-fn="comparatorNumber">Id</th> <th sortable-header col="label" comparator-fn="comparatorLabel">Name</th>
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th> <th sortable-header col="id" comparator-fn="comparatorNumber">Id</th>
<th>On Button</th> <th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
<th>Off Button</th> <th>On Button</th>
<th>Build Actions</th> <th>Off Button</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr ng-repeat="harmonydevice in bridge.harmonydevices"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="harmonydevice in bridge.harmonydevices">
<td>{{harmonydevice.device.label}}</td> <td>{{$index+1}}</td>
<td>{{harmonydevice.device.id}}</td> <td>{{harmonydevice.device.label}}</td>
<td>{{harmonydevice.hub}}</td> <td>{{harmonydevice.device.id}}</td>
<td><select name="device-ctrlon" id="device-ctrlon" <td>{{harmonydevice.hub}}</td>
ng-model="devicectrlon"> <td><select name="device-ctrlon" id="device-ctrlon"
<optgroup ng-repeat="ctrlon in harmonydevice.device.controlGroup" ng-model="devicectrlon">
label="{{ctrlon.name}}"> <optgroup ng-repeat="ctrlon in harmonydevice.device.controlGroup"
<option ng-repeat="funcon in ctrlon.function" label="{{ctrlon.name}}">
value="{{funcon.action}}">{{funcon.label}}</option> <option ng-repeat="funcon in ctrlon.function"
</optgroup> value="{{funcon.action}}">{{funcon.label}}</option>
</select></td> </optgroup>
<td><select name="device-ctrloff" id="device-ctrloff" </select></td>
ng-model="devicectrloff"> <td><select name="device-ctrloff" id="device-ctrloff"
<optgroup ng-repeat="ctrloff in harmonydevice.device.controlGroup" ng-model="devicectrloff">
label="{{ctrloff.name}}"> <optgroup ng-repeat="ctrloff in harmonydevice.device.controlGroup"
<option ng-repeat="funcoff in ctrloff.function" label="{{ctrloff.name}}">
value="{{funcoff.action}}">{{funcoff.label}}</option> <option ng-repeat="funcoff in ctrloff.function"
</optgroup> value="{{funcoff.action}}">{{funcoff.label}}</option>
</select></td> </optgroup>
<td> </select></td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildButtonUrls(harmonydevice, devicectrlon, devicectrloff)">Build <button class="btn btn-success" type="submit"
A Button</button> ng-click="buildButtonUrls(harmonydevice, devicectrlon, devicectrloff)">Build
</td> A Button</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Harmony Buttons <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a> Already Configured Harmony Buttons <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.harmonydevices"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.harmonydevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">Hub</th> <th sortable-header col="name">Name</th>
<th>Harmony Device-Button On-Button Off</th> <th sortable-header col="targetDevice">Hub</th>
<th>Actions</th> <th>Harmony Device-Button On-Button Off</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredHarmonyButtons | orderBy:predicate:reverse"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredHarmonyButtons | orderBy:predicate:reverse">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>

View File

@@ -18,6 +18,7 @@
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</a></li> <li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</a></li>
<li role="presentation" class="active"><a href="#!/hassdevices">HomeAssistant Devices</a></li> <li role="presentation" class="active"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul> </ul>

View File

@@ -1,127 +1,128 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li role="presentation" class="active"><a href="#!/huedevices">Hue <li role="presentation" class="active"><a href="#!/huedevices">Hue
Devices</a></li> Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Hue Device List <div class="panel-heading">
({{bridge.huedevices.length}})</h2> <h2 class="panel-title">Hue Device List
</div> ({{bridge.huedevices.length}})</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Hue Device, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then <p class="text-muted">For any Hue Device, use the build action buttons
you can modify the name to anything you want that will be the keyword to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
for the Echo or Google Home. Also, you can go back to any helper tab and click a build you can modify the name to anything you want that will be the keyword
action button to add another item for a multi-command. After you are for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to finish that selection action button to add another item for a multi-command. After you are
setup. The 'Already Configured Hue Devices' list below will show what done in the edit tab, click the 'Add Bridge Device' to finish that selection
is already setup for your Hue.</p> setup. The 'Already Configured Hue Devices' list below will show what
<p class="text-muted">Use the check boxes by the names to use the bulk addition is already setup for your Hue.</p>
feature. Select your items, then click bulk add below. Your items <p class="text-muted">Use the check boxes by the names to use the bulk addition
will be added with on, off and dim with the feature. Select your items, then click bulk add below. Your items
name of the device from the Hue.</p> will be added with on, off and dim with the
<scrollable-table watch="bridge.huedevices"> name of the device from the Hue.</p>
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.huedevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name"><span><input type="checkbox" name="selectAll" <th>Row</th>
value="{{selectAll}}" <th sortable-header col="name"><span><input type="checkbox" name="selectAll"
ng-checked="selectAll" value="{{selectAll}}"
ng-click="toggleSelectAll()"> Name</span></th> ng-checked="selectAll"
<th sortable-header col="id">Id</th> ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="huename">Hue</th> <th sortable-header col="id">Id</th>
<th>Build Actions</th> <th sortable-header col="huename">Hue</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr ng-repeat="huedevice in bridge.huedevices"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="huedevice in bridge.huedevices">
<td><input type="checkbox" name="bulk.devices[]" <td>{{$index+1}}</td>
value="{{huedevice.device.uniqueid}}" <td><input type="checkbox" name="bulk.devices[]"
ng-checked="bulk.devices.indexOf(huedevice.device.uniqueid) > -1" value="{{huedevice.device.uniqueid}}"
ng-click="toggleSelection(huedevice.device.uniqueid)"> ng-checked="bulk.devices.indexOf(huedevice.device.uniqueid) > -1"
{{huedevice.device.name}}</td> ng-click="toggleSelection(huedevice.device.uniqueid)">
<td>{{huedevice.device.uniqueid}}</td> {{huedevice.device.name}}</td>
<td>{{huedevice.huename}}</td> <td>{{huedevice.device.uniqueid}}</td>
<td> <td>{{huedevice.huename}}</td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildDeviceUrls(huedevice, false)">Build Item</button> <button class="btn btn-success" type="submit"
</td> ng-click="buildDeviceUrls(huedevice, false)">Build Item</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
<div class="panel-footer"> </scrollable-table>
<button class="btn btn-success" type="submit" <div class="panel-footer">
ng-click="bulkAddDevices()">Bulk Add <button class="btn btn-success" type="submit"
({{bulk.devices.length}})</button> ng-click="bulkAddDevices()">Bulk Add
</div> ({{bulk.devices.length}})</button>
</div> </div>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Hue Devices <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a></a> Already Configured Hue Devices <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.huedevices"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.huedevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">hue</th> <th sortable-header col="name">Name</th>
<th>Map Id</th> <th sortable-header col="targetDevice">hue</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredHueItems"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredHueItems">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</script> </div>
</script>

View File

@@ -12,6 +12,7 @@
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation" class="active"><a href="#!/lifxdevices">LIFX Devices</a></li> <li role="presentation" class="active"><a href="#!/lifxdevices">LIFX Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul> </ul>

View File

@@ -1,89 +1,90 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation" class="active"><a href="#!/logs">Logs</a></li> <li role="presentation" class="active"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h1 class="panel-title">Log Messages</h1> <div class="panel-heading">
</div> <h1 class="panel-title">Log Messages</h1>
<div class="panel-body"> </div>
<p> <div class="panel-body">
<button class="btn btn-primary" type="submit" ng-click="updateLogs()">Update <p>
Log</button> <button class="btn btn-primary" type="submit" ng-click="updateLogs()">Update
</p> Log</button>
<scrollable-table watch="bridge.logMsgs"> </p>
<table class="table table-striped table-bordered table-hover"> <scrollable-table watch="bridge.logMsgs">
<thead> <table class="table table-striped table-bordered table-hover">
<tr> <thead>
<th sortable-header col="time">Time</th> <tr>
<th sortable-header col="level">Level</th> <th sortable-header col="time">Time</th>
<th sortable-header col="message">Message</th> <th sortable-header col="level">Level</th>
<th sortable-header col="component">Component</th> <th sortable-header col="message">Message</th>
</tr> <th sortable-header col="component">Component</th>
</thead> </tr>
<tr ng-repeat="logMessage in bridge.logMsgs"> </thead>
<td>{{logMessage.time}}</td> <tr ng-repeat="logMessage in bridge.logMsgs">
<td>{{logMessage.level}}</td> <td>{{logMessage.time}}</td>
<td>{{logMessage.message}}</td> <td>{{logMessage.level}}</td>
<td>{{logMessage.component}}</td> <td>{{logMessage.message}}</td>
</tr> <td>{{logMessage.component}}</td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h1 class="panel-title"> <div class="panel-heading">
Logging Configuration <a ng-click="toggle()"><span <h1 class="panel-title">
class={{imgUrl}} aria-hidden="true"></a> Logging Configuration <a ng-click="toggle()"><span
</h1> class={{imgUrl}} aria-hidden="true"></a>
</div> </h1>
<div ng-if="visible" class="panel-body"> </div>
<p> <div ng-if="visible" class="panel-body">
<button class="btn btn-primary" type="submit" <p>
ng-click="updateLoggers()">Update Log Levels</button> <button class="btn btn-primary" type="submit"
Show All Loggers <input type="checkbox" ng-model="bridge.logShowAll" ng-click="updateLoggers()">Update Log Levels</button>
ng-change="reloadLoggers()" ng-true-value=true ng-false-value=false> Show All Loggers <input type="checkbox" ng-model="bridge.logShowAll"
{{bridge.logShowAll}} ng-change="reloadLoggers()" ng-true-value=true ng-false-value=false>
</p> {{bridge.logShowAll}}
<scrollable-table watch="bridge.loggerInfo"> </p>
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.loggerInfo">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th sortable-header col="logLevel">Log Level</th> <tr>
<th sortable-header col="loggerName">Component</th> <th sortable-header col="logLevel">Log Level</th>
<th>New Log Level</th> <th sortable-header col="loggerName">Component</th>
</tr> <th>New Log Level</th>
</thead> </tr>
<tr ng-repeat="logInfo in bridge.loggerInfo"> </thead>
<td>{{logInfo.logLevel.substr(0,logInfo.logLevel.indexOf("_"))}}</td> <tr ng-repeat="logInfo in bridge.loggerInfo">
<td>{{logInfo.loggerName}}</td> <td>{{logInfo.logLevel.substr(0,logInfo.logLevel.indexOf("_"))}}</td>
<td><select name="new-log-level" id="new-log-level" <td>{{logInfo.loggerName}}</td>
ng-change="addToUpdate(logInfo)" ng-model="logInfo.newLogLevel"> <td><select name="new-log-level" id="new-log-level"
<option ng-repeat="alevel in levels" value="{{alevel}}">{{alevel.substr(0,alevel.indexOf("_"))}}</option> ng-change="addToUpdate(logInfo)" ng-model="logInfo.newLogLevel">
</select></td> <option ng-repeat="alevel in levels" value="{{alevel}}">{{alevel.substr(0,alevel.indexOf("_"))}}</option>
</tr> </select></td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div>
</div> </div>

View File

@@ -1,117 +1,118 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a href="#!/veradevices">Vera Devices</a></li> <li ng-if="bridge.showVera" role="presentation"><a href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a href="#!/verascenes">Vera Scenes</a></li> <li ng-if="bridge.showVera" 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="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a href="#!/harmonydevices">Harmony Devices</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.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.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.showHal" role="presentation"><a href="#!/haldevices">HAL Devices</a></li>
<li role="presentation" class="active"><a href="#!/mqttmessages">MQTT Messages</a></li> <li role="presentation" class="active"><a href="#!/mqttmessages">MQTT Messages</a></li>
<li ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li> <li ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">MQTT Messages</h2> <div class="panel-heading">
</div> <h2 class="panel-title">MQTT Messages</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any MQTT Broker, use the <div class="panel-body">
build action buttons <p class="text-muted">For any MQTT Broker, use the
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. build action buttons
You can add topic and content in the text areas provided to generate the item addition information into the ha-bridge device and this will put you into the edit screen.
then selecting the publish generation. Then you can modify the name You can add topic and content in the text areas provided
to anything you want that will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build then selecting the publish generation. Then you can modify the name
action button to add another item for a multi-command. After you are to anything you want that will be the keyword for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the action button to add another item for a multi-command. After you are
'Add Bridge Device' to finish that selection setup. The 'Already done in the edit tab, click the
Configured MQTT Publish messages' list below will show what is already 'Add Bridge Device' to finish that selection setup. The 'Already
setup for your MQTT Brokers.</p> Configured MQTT Publish messages' list below will show what is already
setup for your MQTT Brokers.</p>
<scrollable-table watch="bridge.mqttbrokers">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.mqttbrokers">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">ClientID</th> <th>Row</th>
<th sortable-header col="ip">IP</th> <th sortable-header col="name">ClientID</th>
<th>Topic</th> <th sortable-header col="ip">IP</th>
<th>Content</th> <th>Topic</th>
<th>Build Actions</th> <th>Content</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr ng-repeat="mqttbroker in bridge.mqttbrokers"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="mqttbroker in bridge.mqttbrokers">
<td>{{mqttbroker.clientId}}</td> <td>{{$index+1}}</td>
<td>{{mqttbroker.ip}}</td> <td>{{mqttbroker.clientId}}</td>
<td> <td>{{mqttbroker.ip}}</td>
<textarea rows="2" class="form-control" id="mqtt-topic" <td>
ng-model="mqtttopic" placeholder="The MQTT Topic"></textarea> <textarea rows="2" class="form-control" id="mqtt-topic"
</td> ng-model="mqtttopic" placeholder="The MQTT Topic"></textarea>
<td> </td>
<textarea rows="2" class="form-control" id="mqtt-content" <td>
ng-model="mqttcontent" placeholder="The MQTT Message Content"></textarea> <textarea rows="2" class="form-control" id="mqtt-content"
</td> ng-model="mqttcontent" placeholder="The MQTT Message Content"></textarea>
<td> </td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildMQTTPublish(mqttbroker, mqtttopic, mqttcontent)">Build <button class="btn btn-success" type="submit"
publish Message</button> ng-click="buildMQTTPublish(mqttbroker, mqtttopic, mqttcontent)">Build
</td> publish Message</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured MQTT Messages <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a> Already Configured MQTT Messages <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.mqttbrokers"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.mqttbrokers">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="nameclientid">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">ClientID</th> <th sortable-header col="nameclientid">Name</th>
<th>Map Id</th> <th sortable-header col="targetDevice">ClientID</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredMqttMsgs | orderBy:predicate:reverse"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredMqttMsgs | orderBy:predicate:reverse">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>

View File

@@ -1,133 +1,134 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/veradevices">Vera Devices</a></li> href="#!/veradevices">Vera Devices</a></li>
<li ng-if="bridge.showVera" role="presentation"><a <li ng-if="bridge.showVera" role="presentation"><a
href="#!/verascenes">Vera Scenes</a></li> href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li role="presentation" class="active"><a href="#!/nest">Nest</a></li> <li role="presentation" class="active"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Nest Items List</h2> <div class="panel-heading">
</div> <h2 class="panel-title">Nest Items List</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Nest Item, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then <p class="text-muted">For any Nest Item, use the build action buttons
you can modify the name to anything you want that will be the keyword to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
for the Echo or Google Home. Also, you can go back to any helper tab and click a build you can modify the name to anything you want that will be the keyword
action button to add another item for a multi-command. After you are for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to finish that selection action button to add another item for a multi-command. After you are
setup. The 'Already Configured Nest Items' list below will show what done in the edit tab, click the 'Add Bridge Device' to finish that selection
is already setup for your Nest.</p> setup. The 'Already Configured Nest Items' list below will show what
is already setup for your Nest.</p>
<scrollable-table watch="bridge.nestitems">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.nestitems">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="type">Type</th> <th sortable-header col="name">Name</th>
<th sortable-header col="location">Location</th> <th sortable-header col="type">Type</th>
<th>Build Actions</th> <th sortable-header col="location">Location</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="nestitem in bridge.nestitems | orderBy:predicate:reverse"> <tr
<td>{{$index+1}}</td> ng-repeat="nestitem in bridge.nestitems | orderBy:predicate:reverse">
<td>{{nestitem.name}}</td> <td>{{$index+1}}</td>
<td>{{nestitem.type}}</td> <td>{{nestitem.name}}</td>
<td>{{nestitem.location}}</td> <td>{{nestitem.type}}</td>
<td> <td>{{nestitem.location}}</td>
<ul class="list-group"> <td>
<li ng-if="nestitem.type ==='Home' " class="list-group-item"> <ul class="list-group">
<button class="btn btn-success" type="submit" <li ng-if="nestitem.type ==='Home' " class="list-group-item">
ng-click="buildNestHomeUrls(nestitem)">Home/Away</button> <button class="btn btn-success" type="submit"
</li> ng-click="buildNestHomeUrls(nestitem)">Home/Away</button>
<li ng-if="nestitem.type ==='Thermostat' " class="list-group-item"> </li>
<p> <li ng-if="nestitem.type ==='Thermostat' " class="list-group-item">
<button class="btn btn-success" type="submit" <p>
ng-click="buildNestTempUrls(nestitem)">Temp</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildNestTempUrls(nestitem)">Temp</button>
ng-click="buildNestHeatUrls(nestitem)">Heat</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildNestHeatUrls(nestitem)">Heat</button>
ng-click="buildNestCoolUrls(nestitem)">Cool</button> <button class="btn btn-success" type="submit"
</p> ng-click="buildNestCoolUrls(nestitem)">Cool</button>
<p> </p>
<button class="btn btn-success" type="submit" <p>
ng-click="buildNestRangeUrls(nestitem)">Range</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildNestRangeUrls(nestitem)">Range</button>
ng-click="buildNestOffUrls(nestitem)">Off</button> <button class="btn btn-success" type="submit"
<button class="btn btn-success" type="submit" ng-click="buildNestOffUrls(nestitem)">Off</button>
ng-click="buildNestFanUrls(nestitem)">Fan</button> <button class="btn btn-success" type="submit"
</p> ng-click="buildNestFanUrls(nestitem)">Fan</button>
</li> </p>
</ul> </li>
</td> </ul>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Nest Items <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a> Already Configured Nest Items <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.nestitems"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.nestitems">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="id">Location</th> <th sortable-header col="name">Name</th>
<th>Map Id</th> <th sortable-header col="id">Location</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr ng-repeat="device in bridge.devices | configuredNestItems | orderBy:predicate:reverse"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="device in bridge.devices | configuredNestItems | orderBy:predicate:reverse">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>

View File

@@ -0,0 +1,143 @@
<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"><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 ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation" class="active"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Somfy Device List
({{bridge.somfydevices.length}})</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Somfy Device, use the build action buttons
to generate the item addition information into the ha-bridge device
and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword
for the Echo or Google Home. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured Somfy Devices' list below will show
what is already setup for your Somfy.</p>
<!-- TODO - dim support for partial window opening.. --<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, then click
bulk add below. Your items will be added with the name of the device from the Somfy Tahoma.</p>
</div>
<scrollable-table watch="bridge.somfydevices">
<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" comparator-fn="comparatorUniqueId">Id</th>
<th sortable-header col="category">Category</th>
<th sortable-header col="room">Room</th>
<th sortable-header col="somfyname">Somfy</th>
<th>Build Actions</th>
</tr>
</thead>
<tr
ng-repeat="somfydevice in bridge.somfydevices">
<td>{{$index+1}}</td>
<td><input type="checkbox" name="bulk.devices[]"
value="{{somfydevice.id}}"
ng-checked="bulk.devices.indexOf(somfydevice.id) > -1"
ng-click="toggleSelection(somfydevice.id)">
{{somfydevice.name}}</td>
<td>{{somfydevice.id}}</td>
<td>{{somfydevice.category}}</td>
<td>{{somfydevice.room}}</td>
<td>{{somfydevice.somfyname}}</td>
<td>
<!--TODO - taken device_dim_control out of here since not yet used-->
<button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(somfydevice)">Build Item</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>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
Already Configured Somfy Devices <a ng-click="toggleButtons()"><span
class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</h2>
</div>
<div ng-if="buttonsVisible" class="panel-body">
<scrollable-table watch="bridge.devices">
<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="targetDevice">Somfy</th>
<th>Map Id</th>
<th>Actions</th>
</tr>
</thead>
<tr
ng-repeat="device in bridge.devices |configuredSomfyDevices">
<td>{{$index+1}}</td>
<td>{{device.name}}</td>
<td>{{device.targetDevice}}</td>
<td>{{device.mapId}}</td>
<td>
<p>
<button class="btn btn-warning" type="submit"
ng-click="editDevice(device)">Edit</button>
<button class="btn btn-danger" type="submit"
ng-click="deleteDevice(device)">Delete</button>
</p>
</td>
</tr>
</table>
</scrollable-table>
</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>

View File

@@ -19,6 +19,7 @@
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul> </ul>
@@ -363,6 +364,46 @@
</tr> </tr>
</table></td> </table></td>
</tr> </tr>
<tr>
<td>Somfy Names and IP Addresses</td>
<td><table
class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Name</th>
<th>IP/hostname</th>
<th>Username</th>
<th>Password </th>
<th>Manage</th>
</tr>
</thead>
<tr ng-repeat="somfy in bridge.settings.somfyaddress.devices">
<td>{{somfy.name}}</td>
<td>{{somfy.ip}}</td>
<td>{{somfy.username}}</td>
<td ng-if="somfy.password">*******</td>
<td ng-if="!somfy.password"> </td>
<td><button class="btn btn-danger" type="submit"
ng-click="removeSomfytoSettings(somfy.name, somfy.ip)">Del</button></td>
</tr>
<tr>
<td><input id="bridge-settings-next-somfy-name"
class="form-control" type="text" ng-model="newsomfyname"
placeholder="A Somfy"></td>
<td><input id="bridge-settings-next-somfy-ip"
class="form-control" type="text" ng-model="newsomfyip"
placeholder="https://www.tahomalink.com"></td>
<td><input id="bridge-settings-next-somfy-username"
class="form-control" type="text" ng-model="newsomfyusername"
placeholder="Somfy username"></td>
<td><input id="bridge-settings-next-somfy-password"
class="form-control" type="password" ng-model="newsomfypassword"
placeholder="Somfy password"></td>
<td><button class="btn btn-success" type="submit"
ng-click="addSomfytoSettings(newsomfyname, newsomfyip, newsomfyusername, newsomfypassword)">Add</button></td>
</tr>
</table></td>
</tr>
<tr> <tr>
<td>Nest Username</td> <td>Nest Username</td>
<td><input id="bridge-settings-nestuser" class="form-control" <td><input id="bridge-settings-nestuser" class="form-control"

View File

@@ -1,143 +1,144 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li role="presentation" class="active"><a href="#!/veradevices">Vera <li role="presentation" class="active"><a href="#!/veradevices">Vera
Devices</a></li> Devices</a></li>
<li role="presentation"><a href="#!/verascenes">Vera Scenes</a></li> <li role="presentation"><a href="#!/verascenes">Vera Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Vera Device List <div class="panel-heading">
({{bridge.veradevices.length}})</h2> <h2 class="panel-title">Vera Device List
</div> ({{bridge.veradevices.length}})</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Vera Device, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device <p class="text-muted">For any Vera Device, use the build action buttons
and this will put you into the edit screen. Then to generate the item addition information into the ha-bridge device
you can modify the name to anything you want that will be the keyword and this will put you into the edit screen. Then
for the Echo or Google Home. Also, you can go back to any helper tab and click a build you can modify the name to anything you want that will be the keyword
action button to add another item for a multi-command. After you are for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to finish that selection action button to add another item for a multi-command. After you are
setup. The 'Already Configured Vera Devices' list below will show done in the edit tab, click the 'Add Bridge Device' to finish that selection
what is already setup for your Vera.</p> setup. The 'Already Configured Vera Devices' list below will show
<p class="text-muted"> what is already setup for your Vera.</p>
Also, use this select menu for which type of dim control you would <p class="text-muted">
like to be generated: <select name="device-dim-control" Also, use this select menu for which type of dim control you would
id="device-dim-control" ng-model="device_dim_control"> like to be generated: <select name="device-dim-control"
<option value="">none</option> id="device-dim-control" ng-model="device_dim_control">
<option value="${intensity.byte}">Pass-thru Value</option> <option value="">none</option>
<option value="${intensity.percent}">Percentage</option> <option value="${intensity.byte}">Pass-thru Value</option>
<option value="${intensity.decimal_percent}">Decimal Percentage</option> <option value="${intensity.percent}">Percentage</option>
<option value="${intensity.math(X*1)}">Custom Math</option> <option value="${intensity.decimal_percent}">Decimal Percentage</option>
</select> <option value="${intensity.math(X*1)}">Custom Math</option>
</p> </select>
<p class="text-muted">Use the check boxes by the names to use the bulk addition </p>
feature. Select your items and dim control type if wanted, then click <p class="text-muted">Use the check boxes by the names to use the bulk addition
bulk add below. Your items will be added with on and off or dim and feature. Select your items and dim control type if wanted, then click
off if selected with the name of the device from the Vera.</p> bulk add below. Your items will be added with on and off or dim and
<scrollable-table watch="bridge.veradevices"> off if selected with the name of the device from the Vera.</p>
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.veradevices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name"><span><input type="checkbox" name="selectAll" <th>Row</th>
value="{{selectAll}}" <th sortable-header col="name"><span><input type="checkbox" name="selectAll"
ng-checked="selectAll" value="{{selectAll}}"
ng-click="toggleSelectAll()"> Name</span></th> ng-checked="selectAll"
<th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th> ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="category">Category</th> <th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th>
<th sortable-header col="room">Room</th> <th sortable-header col="category">Category</th>
<th sortable-header col="veraname">Vera</th> <th sortable-header col="room">Room</th>
<th>Build Actions</th> <th sortable-header col="veraname">Vera</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="veradevice in bridge.veradevices"> <tr
<td>{{$index+1}}</td> ng-repeat="veradevice in bridge.veradevices">
<td><input type="checkbox" name="bulk.devices[]" <td>{{$index+1}}</td>
value="{{veradevice.id}}" <td><input type="checkbox" name="bulk.devices[]"
ng-checked="bulk.devices.indexOf(veradevice.id) > -1" value="{{veradevice.id}}"
ng-click="toggleSelection(veradevice.id)"> ng-checked="bulk.devices.indexOf(veradevice.id) > -1"
{{veradevice.name}}</td> ng-click="toggleSelection(veradevice.id)">
<td>{{veradevice.id}}</td> {{veradevice.name}}</td>
<td>{{veradevice.category}}</td> <td>{{veradevice.id}}</td>
<td>{{veradevice.room}}</td> <td>{{veradevice.category}}</td>
<td>{{veradevice.veraname}}</td> <td>{{veradevice.room}}</td>
<td> <td>{{veradevice.veraname}}</td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildDeviceUrls(veradevice, device_dim_control, false)">Build Item</button> <button class="btn btn-success" type="submit"
</td> ng-click="buildDeviceUrls(veradevice, device_dim_control, false)">Build Item</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
<div class="panel-footer"> </scrollable-table>
<button class="btn btn-success" type="submit" <div class="panel-footer">
ng-click="bulkAddDevices(device_dim_control)">Bulk Add <button class="btn btn-success" type="submit"
({{bulk.devices.length}})</button> ng-click="bulkAddDevices(device_dim_control)">Bulk Add
</div> ({{bulk.devices.length}})</button>
</div> </div>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Vera Devices <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a></a> Already Configured Vera Devices <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.devices"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.devices">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">Vera</th> <th sortable-header col="name">Name</th>
<th>Map Id</th> <th sortable-header col="targetDevice">Vera</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredVeraDevices"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredVeraDevices">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>

View File

@@ -1,112 +1,113 @@
<ul class="nav nav-pills" role="tablist"> <ul class="nav nav-pills" role="tablist">
<li role="presentation"><a href="#!/">Bridge Devices</a></li> <li role="presentation"><a href="#!/">Bridge Devices</a></li>
<li role="presentation"><a href="#!/system">Bridge Control</a></li> <li role="presentation"><a href="#!/system">Bridge Control</a></li>
<li role="presentation"><a href="#!/logs">Logs</a></li> <li role="presentation"><a href="#!/logs">Logs</a></li>
<li role="presentation"><a href="#!/veradevices">Vera Devices</a></li> <li role="presentation"><a href="#!/veradevices">Vera Devices</a></li>
<li role="presentation" class="active"><a href="#!/verascenes">Vera <li role="presentation" class="active"><a href="#!/verascenes">Vera
Scenes</a></li> Scenes</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonyactivities">Harmony Activities</a></li> href="#!/harmonyactivities">Harmony Activities</a></li>
<li ng-if="bridge.showHarmony" role="presentation"><a <li ng-if="bridge.showHarmony" role="presentation"><a
href="#!/harmonydevices">Harmony Devices</a></li> href="#!/harmonydevices">Harmony Devices</a></li>
<li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li> <li ng-if="bridge.showNest" role="presentation"><a href="#!/nest">Nest</a></li>
<li ng-if="bridge.showHue" role="presentation"><a <li ng-if="bridge.showHue" role="presentation"><a
href="#!/huedevices">Hue Devices</a></li> href="#!/huedevices">Hue Devices</a></li>
<li ng-if="bridge.showHal" role="presentation"><a <li ng-if="bridge.showHal" role="presentation"><a
href="#!/haldevices">HAL Devices</a></li> href="#!/haldevices">HAL Devices</a></li>
<li ng-if="bridge.showMqtt" role="presentation"><a href="#!/mqttmessages">MQTT Messages</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 ng-if="bridge.showHass" role="presentation"><a href="#!/hassdevices">HomeAssistant Devices</a></li>
<li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li> <li ng-if="bridge.showDomoticz" role="presentation"><a href="#!/domoticzdevices">Domoticz Devices</a></li>
<li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li> <li ng-if="bridge.showSomfy" role="presentation"><a href="#!/somfydevices">Somfy Devices</a></li>
<li role="presentation"><a href="#!/editdevice">Add/Edit</a></li> <li ng-if="bridge.showLifx" role="presentation"><a href="#!/lifxdevices">LIFX Devices</a></li>
</ul> <li role="presentation"><a href="#!/editdevice">Add/Edit</a></li>
</ul>
<div class="panel panel-default">
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title">Vera Scene List</h2> <div class="panel-heading">
</div> <h2 class="panel-title">Vera Scene List</h2>
<div class="panel-body"> </div>
<p class="text-muted">For any Vera Scene, use the build action buttons <div class="panel-body">
to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then <p class="text-muted">For any Vera Scene, use the build action buttons
you can modify the name to anything you want that will be the keyword to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
for the Echo or Google Home. Also, you can go back to any helper tab and click a build you can modify the name to anything you want that will be the keyword
action button to add another item for a multi-command. After you are for the Echo or Google Home. Also, you can go back to any helper tab and click a build
done in the edit tab, click the 'Add Bridge Device' to finish that selection action button to add another item for a multi-command. After you are
setup. The 'Already Configured Vera Scenes' list below will show what done in the edit tab, click the 'Add Bridge Device' to finish that selection
is already setup for your Vera.</p> setup. The 'Already Configured Vera Scenes' list below will show what
is already setup for your Vera.</p>
<scrollable-table watch="bridge.verascenes">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.verascenes">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th> <th sortable-header col="name">Name</th>
<th sortable-header col="room">Room</th> <th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th>
<th sortable-header col="veraname">Vera</th> <th sortable-header col="room">Room</th>
<th>Build Actions</th> <th sortable-header col="veraname">Vera</th>
</tr> <th>Build Actions</th>
</thead> </tr>
<tr ng-repeat="verascene in bridge.verascenes"> </thead>
<td>{{$index+1}}</td> <tr ng-repeat="verascene in bridge.verascenes">
<td>{{verascene.name}}</td> <td>{{$index+1}}</td>
<td>{{verascene.id}}</td> <td>{{verascene.name}}</td>
<td>{{verascene.room}}</td> <td>{{verascene.id}}</td>
<td>{{verascene.veraname}}</td> <td>{{verascene.room}}</td>
<td> <td>{{verascene.veraname}}</td>
<button class="btn btn-success" type="submit" <td>
ng-click="buildSceneUrls(verascene)">Build Item</button> <button class="btn btn-success" type="submit"
</td> ng-click="buildSceneUrls(verascene)">Build Item</button>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<div class="panel panel-default"> </div>
<div class="panel-heading"> <div class="panel panel-default">
<h2 class="panel-title"> <div class="panel-heading">
Already Configured Vera Scenes <a ng-click="toggleButtons()"><span <h2 class="panel-title">
class={{imgButtonsUrl}} aria-hidden="true"></span></a> Already Configured Vera Scenes <a ng-click="toggleButtons()"><span
</h2> class={{imgButtonsUrl}} aria-hidden="true"></span></a>
</div> </h2>
<div ng-if="buttonsVisible" class="panel-body"> </div>
<scrollable-table watch="bridge.verascenes"> <div ng-if="buttonsVisible" class="panel-body">
<table class="table table-bordered table-striped table-hover"> <scrollable-table watch="bridge.verascenes">
<thead> <table class="table table-bordered table-striped table-hover">
<tr> <thead>
<th>Row</th> <tr>
<th sortable-header col="name">Name</th> <th>Row</th>
<th sortable-header col="targetDevice">Vera</th> <th sortable-header col="name">Name</th>
<th>Map Id</th> <th sortable-header col="targetDevice">Vera</th>
<th>Actions</th> <th>Map Id</th>
</tr> <th>Actions</th>
</thead> </tr>
<tr </thead>
ng-repeat="device in bridge.devices | configuredVeraScenes"> <tr
<td>{{$index+1}}</td> ng-repeat="device in bridge.devices | configuredVeraScenes">
<td>{{device.name}}</td> <td>{{$index+1}}</td>
<td>{{device.targetDevice}}</td> <td>{{device.name}}</td>
<td>{{device.mapId}}</td> <td>{{device.targetDevice}}</td>
<td> <td>{{device.mapId}}</td>
<p> <td>
<button class="btn btn-warning" type="submit" <p>
ng-click="editDevice(device)">Edit</button> <button class="btn btn-warning" type="submit"
<button class="btn btn-danger" type="submit" ng-click="editDevice(device)">Edit</button>
ng-click="deleteDevice(device)">Delete</button> <button class="btn btn-danger" type="submit"
</p> ng-click="deleteDevice(device)">Delete</button>
</td> </p>
</tr> </td>
</table> </tr>
</scrollable-table> </table>
</div> </scrollable-table>
</div> </div>
<script type="text/ng-template" id="deleteMapandIdDialog"> </div>
<div class="ngdialog-message"> <script type="text/ng-template" id="deleteMapandIdDialog">
<h2>Device Map and Id?</h2> <div class="ngdialog-message">
<p>{{mapandid.mapType}} with {{mapandid.id}}</p> <h2>Device Map and Id?</h2>
<p>Are you Sure?</p> <p>{{mapandid.mapType}} with {{mapandid.id}}</p>
</div> <p>Are you Sure?</p>
<div class="ngdialog-buttons mt"> </div>
<button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button> <div class="ngdialog-buttons mt">
</div> <button type="button" class="ngdialog-button ngdialog-button-error" ng-click="deleteMapandId(mapandid)">Delete</button>
</div>
</script> </script>