mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 08:28:46 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bf1bbc8a8 | ||
|
|
1a402e425e | ||
|
|
59ef6e88de | ||
|
|
7d4f953c89 |
14
README.md
14
README.md
@@ -59,23 +59,23 @@ ATTENTION: This requires JDK 1.8 to run
|
|||||||
ATTENTION: Due to port 80 being the default, Linux restricts this to super user. Use the instructions below.
|
ATTENTION: Due to port 80 being the default, Linux restricts this to super user. Use the instructions below.
|
||||||
|
|
||||||
```
|
```
|
||||||
java -jar ha-bridge-4.3.0.jar
|
java -jar ha-bridge-4.3.1.jar
|
||||||
```
|
```
|
||||||
### Automation on Linux systems
|
### Automation on Linux systems
|
||||||
To have this configured and running automatically there are a few resources to use. One is using Docker and a docker container has been built for this and can be gotten here: https://github.com/aptalca/docker-ha-bridge
|
To have this configured and running automatically there are a few resources to use. One is using Docker and a docker container has been built for this and can be gotten here: https://github.com/aptalca/docker-ha-bridge
|
||||||
|
|
||||||
Create the directory and make sure that ha-bridge-4.3.0.jar is in your /home/pi/habridge directory.
|
Create the directory and make sure that ha-bridge-4.3.1.jar is in your /home/pi/habridge directory.
|
||||||
```
|
```
|
||||||
pi@raspberrypi:~ $ mkdir habridge
|
pi@raspberrypi:~ $ mkdir habridge
|
||||||
pi@raspberrypi:~ $ cd habridge
|
pi@raspberrypi:~ $ cd habridge
|
||||||
|
|
||||||
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.3.0/ha-bridge-4.3.0.jar
|
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.3.1/ha-bridge-4.3.1.jar
|
||||||
```
|
```
|
||||||
Create the directory and make sure that ha-bridge-4.3.0.jar is in your /home/pi/habridge directory.
|
Create the directory and make sure that ha-bridge-4.3.1.jar is in your /home/pi/habridge directory.
|
||||||
```
|
```
|
||||||
pi@raspberrypi:~ $ mkdir habridge
|
pi@raspberrypi:~ $ mkdir habridge
|
||||||
pi@raspberrypi:~ $ cd habridge
|
pi@raspberrypi:~ $ cd habridge
|
||||||
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.3.0/ha-bridge-4.3.0.jar
|
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.3.1/ha-bridge-4.3.1.jar
|
||||||
```
|
```
|
||||||
#### System Control Setup on a pi (preferred)
|
#### System Control Setup on a pi (preferred)
|
||||||
For next gen Linux systems (this includes the Raspberry Pi), here is a systemctl unit file that you can install. Here is a link on how to do this: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
For next gen Linux systems (this includes the Raspberry Pi), here is a systemctl unit file that you can install. Here is a link on how to do this: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
||||||
@@ -95,7 +95,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.3.0.jar
|
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.3.1.jar
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -130,7 +130,7 @@ Then cut and past this, modify any locations that are not correct
|
|||||||
```
|
```
|
||||||
cd /home/pi/habridge
|
cd /home/pi/habridge
|
||||||
rm /home/pi/habridge/habridge-log.txt
|
rm /home/pi/habridge/habridge-log.txt
|
||||||
nohup java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.3.0.jar > /home/pi/habridge/habridge-log.txt 2>&1 &
|
nohup java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.3.1.jar > /home/pi/habridge/habridge-log.txt 2>&1 &
|
||||||
|
|
||||||
chmod 777 /home/pi/habridge/habridge-log.txt
|
chmod 777 /home/pi/habridge/habridge-log.txt
|
||||||
```
|
```
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.bwssystems.HABridge</groupId>
|
<groupId>com.bwssystems.HABridge</groupId>
|
||||||
<artifactId>ha-bridge</artifactId>
|
<artifactId>ha-bridge</artifactId>
|
||||||
<version>4.3.0</version>
|
<version>4.3.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>HA Bridge</name>
|
<name>HA Bridge</name>
|
||||||
|
|||||||
@@ -435,11 +435,14 @@ public class BridgeSettingsDescriptor {
|
|||||||
|
|
||||||
public void setupInternalTestUser() {
|
public void setupInternalTestUser() {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (String key : whitelist.keySet()) {
|
if(whitelist != null) {
|
||||||
if(key.equals(DEFAULT_INTERNAL_USER))
|
for (String key : whitelist.keySet()) {
|
||||||
found = true;
|
if(key.equals(DEFAULT_INTERNAL_USER)) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
newWhitelistUser(DEFAULT_INTERNAL_USER, DEFAULT_USER_DESCRIPTION);
|
newWhitelistUser(DEFAULT_INTERNAL_USER, DEFAULT_USER_DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2347,7 +2347,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.selectAll = true;
|
$scope.selectAll = true;
|
||||||
for(var x = 0; x < bridgeService.state.haldevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.domoticzdevices.length; x++) {
|
||||||
if($scope.bulk.devices.indexOf(bridgeService.state.domoticzdevices[x]) < 0)
|
if($scope.bulk.devices.indexOf(bridgeService.state.domoticzdevices[x]) < 0)
|
||||||
$scope.bulk.devices.push(bridgeService.state.domoticzdevices[x].devicename);
|
$scope.bulk.devices.push(bridgeService.state.domoticzdevices[x].devicename);
|
||||||
}
|
}
|
||||||
@@ -2469,7 +2469,7 @@ app.controller('LifxController', function ($scope, $location, $http, bridgeServi
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.selectAll = true;
|
$scope.selectAll = true;
|
||||||
for(var x = 0; x < bridgeService.state.haldevices.length; x++) {
|
for(var x = 0; x < bridgeService.state.lifxdevices.length; x++) {
|
||||||
if($scope.bulk.devices.indexOf(bridgeService.state.lifxdevices[x]) < 0)
|
if($scope.bulk.devices.indexOf(bridgeService.state.lifxdevices[x]) < 0)
|
||||||
$scope.bulk.devices.push(bridgeService.state.lifxdevices[x].devicename);
|
$scope.bulk.devices.push(bridgeService.state.lifxdevices[x].devicename);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user