mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Merge branch 'master' into targetV4.1.0
This commit is contained in:
29
README.md
29
README.md
@@ -33,28 +33,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.
|
||||||
|
|
||||||
```
|
```
|
||||||
<<<<<<< HEAD
|
|
||||||
java -jar ha-bridge-4.1.0.jar
|
java -jar ha-bridge-4.1.0.jar
|
||||||
=======
|
|
||||||
java -jar ha-bridge-4.0.3.jar
|
|
||||||
>>>>>>> refs/remotes/origin/master
|
|
||||||
```
|
```
|
||||||
### 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
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
Create the directory and make sure that ha-bridge-4.1.0.jar is in your /home/pi/habridge directory.
|
Create the directory and make sure that ha-bridge-4.1.0.jar is in your /home/pi/habridge directory.
|
||||||
=======
|
|
||||||
Create the directory and make sure that ha-bridge-4.0.3.jar is in your /home/pi/habridge directory.
|
|
||||||
>>>>>>> refs/remotes/origin/master
|
|
||||||
```
|
```
|
||||||
pi@raspberrypi:~ $ mkdir habridge
|
pi@raspberrypi:~ $ mkdir habridge
|
||||||
pi@raspberrypi:~ $ cd habridge
|
pi@raspberrypi:~ $ cd habridge
|
||||||
<<<<<<< HEAD
|
|
||||||
|
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.1.0/ha-bridge-4.1.0.jar
|
||||||
|
|
||||||
|
Create the directory and make sure that ha-bridge-4.1.0.jar is in your /home/pi/habridge directory.
|
||||||
|
```
|
||||||
|
pi@raspberrypi:~ $ mkdir habridge
|
||||||
|
pi@raspberrypi:~ $ cd habridge
|
||||||
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.1.0/ha-bridge-4.1.0.jar
|
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.1.0/ha-bridge-4.1.0.jar
|
||||||
=======
|
|
||||||
pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v4.0.3/ha-bridge-4.0.3.jar
|
|
||||||
>>>>>>> refs/remotes/origin/master
|
|
||||||
```
|
```
|
||||||
#### 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
|
||||||
@@ -73,11 +68,8 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
<<<<<<< HEAD
|
|
||||||
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.1.0.jar
|
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.1.0.jar
|
||||||
=======
|
|
||||||
ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.0.3.jar
|
|
||||||
>>>>>>> refs/remotes/origin/master
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -112,11 +104,8 @@ 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
|
||||||
<<<<<<< HEAD
|
|
||||||
nohup java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.1.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.1.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.0.3.jar > /home/pi/habridge/habridge-log.txt 2>&1 &
|
|
||||||
>>>>>>> refs/remotes/origin/master
|
|
||||||
chmod 777 /home/pi/habridge/habridge-log.txt
|
chmod 777 /home/pi/habridge/habridge-log.txt
|
||||||
```
|
```
|
||||||
Exit and save the file with ctrl-X and follow the prompts and then execute on the command line:
|
Exit and save the file with ctrl-X and follow the prompts and then execute on the command line:
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -217,4 +217,4 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
@@ -47,6 +47,7 @@ public class HTTPHome implements Home {
|
|||||||
|
|
||||||
String anUrl = BrightnessDecode.calculateReplaceIntensityValue(anItem.getItem().getAsString(),
|
String anUrl = BrightnessDecode.calculateReplaceIntensityValue(anItem.getItem().getAsString(),
|
||||||
intensity, targetBri, targetBriInc, false);
|
intensity, targetBri, targetBriInc, false);
|
||||||
|
|
||||||
anUrl = TimeDecode.replaceTimeValue(anUrl);
|
anUrl = TimeDecode.replaceTimeValue(anUrl);
|
||||||
String aBody = null;
|
String aBody = null;
|
||||||
if(anItem.getHttpBody()!= null && !anItem.getHttpBody().isEmpty()) {
|
if(anItem.getHttpBody()!= null && !anItem.getHttpBody().isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user