Skip to content
Snippets Groups Projects
Commit f95b8479 authored by Elisa Giglio's avatar Elisa Giglio
Browse files

modificato path che vada bene sulla BB

parent d652cf0d
No related branches found
No related tags found
No related merge requests found
Showing
with 12 additions and 9 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
{"soglia":30,"stato":0,"valore":0,"tempoAllarme":"2022-11-19T10:25:14.275028"} {"soglia":30,"stato":0,"valore":0,"tempoAllarme":"2022-11-20T18:55:59.768946"}
\ No newline at end of file \ No newline at end of file
...@@ -50,8 +50,11 @@ public class Antifurto { ...@@ -50,8 +50,11 @@ public class Antifurto {
private static String mqttDomain; private static String mqttDomain;
private static String mqttSubdomain; private static String mqttSubdomain;
private final String CONF_FILE = "../res/CONF/conf.json"; public static final String PATH_BB = "/home/debian/CONFIG/antifurto";
public static final String CONF_ZONA = "../res/CONF/zona.json";
private final String CONF_FILE = PATH_BB + "/res/CONF/conf.json";
public static final String CONF_ZONA = PATH_BB + "/res/CONF/zona.json";
public Antifurto(Automa automa) throws JSONException, IOException, MqttException { public Antifurto(Automa automa) throws JSONException, IOException, MqttException {
this.automa = automa; this.automa = automa;
...@@ -108,9 +111,9 @@ public class Antifurto { ...@@ -108,9 +111,9 @@ public class Antifurto {
MqttConnectOptions options = new MqttConnectOptions(); MqttConnectOptions options = new MqttConnectOptions();
options.setCleanSession(false); options.setCleanSession(false);
if(brokerUrl.contains("luci.local")) { // devo connettermi al mosquitto della beaglebone if(brokerUrl.contains("luci.local")) { // devo connettermi al mosquitto della beaglebone
caFilePath = "../certificates/beaglebone/caGruppo2.crt"; caFilePath = PATH_BB + "/certificates/beaglebone/caGruppo2.crt";
clientCrtFilePath = "../certificates/beaglebone/clientGruppo2.crt"; clientCrtFilePath = PATH_BB + "/certificates/beaglebone/clientGruppo2.crt";
clientKeyFilePath = "../certificates/beaglebone/clientGruppo2.key"; clientKeyFilePath = PATH_BB + "/certificates/beaglebone/clientGruppo2.key";
options.setUserName("gruppo2"); options.setUserName("gruppo2");
options.setPassword("funziona".toCharArray()); options.setPassword("funziona".toCharArray());
......
...@@ -12,9 +12,9 @@ public class Automa { ...@@ -12,9 +12,9 @@ public class Automa {
private int statoAttuale; private int statoAttuale;
private String statoInterruttore; private String statoInterruttore;
private String statoSuono; private String statoSuono;
private static final String FILE_AUTOMA = "../res/automa.json"; private static final String FILE_AUTOMA = Antifurto.PATH_BB + "/res/automa.json";
public static final String FILE_STATO = "../res/stato.json"; public static final String FILE_STATO = Antifurto.PATH_BB + "/res/stato.json";
public static final String FILE_DELTA_SENSORI = "../res/CONF/deltaSensoriMovimento.json"; public static final String FILE_DELTA_SENSORI = Antifurto.PATH_BB + "/res/CONF/deltaSensoriMovimento.json";
public Automa() throws JSONException, IOException { public Automa() throws JSONException, IOException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment