Add config flag for hubs to post to self-hosted server with a self-signed SSL certificate.

Support Raspberry Pi 2B by handling missing BLE controller and supporting 32-bit pigpio.
This commit is contained in:
Mark Milligan
2022-11-06 18:21:54 -06:00
parent a8236cebc1
commit 07765061bd
11 changed files with 176 additions and 38 deletions

View File

@@ -76,7 +76,6 @@ public class ZWaveApp {
private HttpPool pool;
private SwitchScheduleTask nextScheduleTask;
private final Map<Integer, Double> sensors = new HashMap<>();
private final Object ZWAVE_MUTEX = new Object();
private ExecutorService executor = null;
public void start() {
@@ -559,17 +558,15 @@ public class ZWaveApp {
if (_sw.isSourceUrlValid())
return DaoSerializer.getDouble(DaoSerializer.parse(pool.executeToString(new HttpGet(_sw.getSourceUrl()))), "temp");
else if (_sw.isZWaveThermostat() && config.isMySwitch(_sw)) {
synchronized (ZWAVE_MUTEX) {
synchronized (sensors) {
controller.send(new MultilevelSensorGetRequest((byte) _sw.getNodeId()));
try {
sensors.wait(3000);
} catch (InterruptedException _e) {
_e.printStackTrace();
}
Double temp = sensors.get(_sw.getNodeId());
return (temp == null) ? 0.0 : temp;
synchronized (sensors) {
controller.send(new MultilevelSensorGetRequest((byte) _sw.getNodeId()));
try {
sensors.wait(3000);
} catch (InterruptedException _e) {
_e.printStackTrace();
}
Double temp = sensors.get(_sw.getNodeId());
return (temp == null) ? 0.0 : temp;
}
}
return 0.0;