Add a rules engine so I can be notified when I forget to close my garage door.

This commit is contained in:
MarkBryanMilligan
2021-07-15 23:34:15 -05:00
parent de50645a2c
commit 3d5cd6500f
81 changed files with 2044 additions and 231 deletions

View File

@@ -532,7 +532,6 @@ public class CollectionUtils {
return list;
}
public static <T> void edit(Iterable<T> _coll, IEditor<T> _editor) {
if ((_coll == null) || (_editor == null))
return;

View File

@@ -1,8 +1,11 @@
package com.lanternsoftware.util;
public abstract class LanternFiles {
public static final String SOURCE_PATH = "C:\\lantern\\wc\\opensource\\LanternPowerMonitor\\";
public static final String OPS_PATH = "D:\\zwave\\";
// public static final String OPS_PATH = "D:\\zwave\\linux\\";
// public static final String OPS_PATH = "/opt/tomcat/";
public static final String SOURCE_PATH = "C:\\lantern\\LanternPowerMonitor\\";
// public static final String OPS_PATH = "D:\\zwave\\";
// public static final String OPS_PATH = "D:\\zwave\\localhost\\";
// public static final String OPS_PATH = "D:\\zwave\\mark4770\\";
// public static final String OPS_PATH = "D:\\zwave\\prod\\";
// public static final String OPS_PATH = "D:\\zwave\\prodremote\\";
public static final String OPS_PATH = "/opt/tomcat/";
}

View File

@@ -17,6 +17,8 @@ import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;
import com.lanternsoftware.util.LanternFiles;
import com.lanternsoftware.util.ResourceLoader;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,6 +78,10 @@ public class AESTool {
System.out.println(builder.toString());
}
public static AESTool authTool() {
return new AESTool(ResourceLoader.loadFile(LanternFiles.OPS_PATH + "authKey.dat"));
}
/**
* @param _btKey the encoded form of a {@link SecretKey} object. See the {@link SecretKey#getEncoded()} method.
*/