mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 08:13:23 +00:00
Updated selections in device add or editor and updated loggin for upnp
listener and updated the readme
This commit is contained in:
36
README.md
36
README.md
@@ -76,14 +76,34 @@ Here is the table of items to use to tell Alexa what you want to do:
|
|||||||
|
|
||||||
To do this... | Say this...
|
To do this... | Say this...
|
||||||
--------------|------------
|
--------------|------------
|
||||||
Discover | <EFBFBD>Alexa, discover my devices.<2E>
|
ON Commands |
|
||||||
Turn On | <EFBFBD>Alexa, turn on the kitchen light.<2E>
|
| Alexa, turn on <Device Name>
|
||||||
Turn Off | <EFBFBD>Alexa, turn off the kitchen light.<2E>
|
| Alexa, start <Device Name>
|
||||||
Brighten | <EFBFBD>Alexa, brighten the kitchen light.<2E>
|
| Alexa, unlock <Device Name>
|
||||||
Dim | <EFBFBD>Alexa, dim the kitchen light.<2E>
|
| Alexa, open <Device Name>
|
||||||
Dim | "Alexa, Dim the lights to 40%."
|
| Alexa, boot up <Device Name>
|
||||||
Set | <EFBFBD>Alexa, set the kitchen light to 50%.<2E>
|
| Alexa, run <Device Name>
|
||||||
Set | "Alexa, Set brightness to 60%."
|
| Alexa, arm <Device Name>
|
||||||
|
OFF Commands |
|
||||||
|
| Alexa, turn off <Device Name>
|
||||||
|
| Alexa, stop <Device Name> (this one is tricky to get right)
|
||||||
|
| Alexa, stop running <Device Name> (also very tricky)
|
||||||
|
| Alexa, lock <Device Name>
|
||||||
|
| Alexa, close <Device Name>
|
||||||
|
| Alexa, shutdown <Device Name>
|
||||||
|
| Alexa, shut <Device Name>
|
||||||
|
| Alexa, disarm <Device Name>
|
||||||
|
DIM Commands |
|
||||||
|
| Alexa, brighten <Device Name> to <Position>
|
||||||
|
| Alexa, dim <Device Name> to <Position>
|
||||||
|
| Alexa, raise <Device Name> to <Position>
|
||||||
|
| Alexa, lower <Device Name> to <Position>
|
||||||
|
| Alexa, set <Device Name> to <Position>
|
||||||
|
| Alexa, turn up <Device Name> to <Position>
|
||||||
|
| Alexa, turn down <Device Name> to <Position>
|
||||||
|
|
||||||
|
To see what Alexa thinks you said, you can check in the home page for your alexa.
|
||||||
|
|
||||||
To view or remove devices that Alexa knows about, you can use the mobile app `Menu / Settings / Connected Home` or go to http://echo.amazon.com/#cards.
|
To view or remove devices that Alexa knows about, you can use the mobile app `Menu / Settings / Connected Home` or go to http://echo.amazon.com/#cards.
|
||||||
## Configuration REST API Usage
|
## Configuration REST API Usage
|
||||||
This section will describe the REST api available for configuration. The REST body examples are all formatted for easy reading, the actual body usage should be like this:
|
This section will describe the REST api available for configuration. The REST body examples are all formatted for easy reading, the actual body usage should be like this:
|
||||||
|
|||||||
@@ -46,26 +46,27 @@ public class UpnpListener {
|
|||||||
try {
|
try {
|
||||||
responseSocket = new DatagramSocket(upnpResponsePort);
|
responseSocket = new DatagramSocket(upnpResponsePort);
|
||||||
if(retryCount > 0)
|
if(retryCount > 0)
|
||||||
log.error("Upnp Response Port is in use, found port: " + upnpResponsePort);
|
log.info("Upnp Response Port issue, found open port: " + upnpResponsePort);
|
||||||
retryCount = 0;
|
|
||||||
portLoopControl = false;
|
portLoopControl = false;
|
||||||
} catch(SocketException e) {
|
} catch(SocketException e) {
|
||||||
if(retryCount == 0)
|
if(retryCount == 0)
|
||||||
log.warn("Upnp Response Port is in use, starting loop to find open port for 20 tries - port is: " + upnpResponsePort);
|
log.warn("Upnp Response Port is in use, starting loop to find open port for 20 tries - configured port is: " + upnpResponsePort);
|
||||||
if(retryCount >= 20) {
|
if(retryCount >= 20) {
|
||||||
portLoopControl = false;
|
portLoopControl = false;
|
||||||
log.error("Upnp Response Port is in use, could not find - last port tried: " + upnpResponsePort + " with message: " + e.getMessage());
|
log.error("Upnp Response Port issue, could not find open port - last port tried: " + upnpResponsePort + " with message: " + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retryCount++;
|
if(portLoopControl) {
|
||||||
upnpResponsePort++;
|
retryCount++;
|
||||||
|
upnpResponsePort++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
upnpMulticastSocket = new MulticastSocket(Configuration.UPNP_DISCOVERY_PORT);
|
upnpMulticastSocket = new MulticastSocket(Configuration.UPNP_DISCOVERY_PORT);
|
||||||
} catch(IOException e){
|
} catch(IOException e){
|
||||||
log.error("Upnp Discovery Port is in use, or restricted by admin (try running with duso or admin privs): " + Configuration.UPNP_DISCOVERY_PORT + " with message: " + e.getMessage());
|
log.error("Upnp Discovery Port is in use, or restricted by admin (try running with sudo or admin privs): " + Configuration.UPNP_DISCOVERY_PORT + " with message: " + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +74,7 @@ public class UpnpListener {
|
|||||||
try {
|
try {
|
||||||
ifs = NetworkInterface.getNetworkInterfaces();
|
ifs = NetworkInterface.getNetworkInterfaces();
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
log.error("Could not get network interfaces for thsi machine: " + e.getMessage());
|
log.error("Could not get network interfaces for this machine: " + e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<select name="device-type" id="device-type" ng-model="device.deviceType">
|
<select name="device-type" id="device-type" ng-model="device.deviceType">
|
||||||
<option value="">---Types if needed---</option> <!-- not selected / blank option -->
|
<option value="">---Types if needed---</option> <!-- not selected / blank option -->
|
||||||
|
<option value="custom">Custom</option>
|
||||||
<option value="UDP">UDP</option>
|
<option value="UDP">UDP</option>
|
||||||
<option value="TCP">TCP</option>
|
<option value="TCP">TCP</option>
|
||||||
<option value="exec">Execute Script/Program</option>
|
<option value="exec">Execute Script/Program</option>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
<div class="col-xs-8 col-sm-7">
|
<div class="col-xs-8 col-sm-7">
|
||||||
<select name="device-type" id="device-type" ng-model="device.deviceType">
|
<select name="device-type" id="device-type" ng-model="device.deviceType">
|
||||||
<option value="">---Types if needed---</option> <!-- not selected / blank option -->
|
<option value="custom">Custom</option>
|
||||||
<option value="UDP">UDP</option>
|
<option value="UDP">UDP</option>
|
||||||
<option value="TCP">TCP</option>
|
<option value="TCP">TCP</option>
|
||||||
<option value="exec">Execute Script/Program</option>
|
<option value="exec">Execute Script/Program</option>
|
||||||
|
|||||||
Reference in New Issue
Block a user