Update WiFi connection handling, adjust MQTT timer, and implement group ID deserialization
This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <HTTPClient.h>
|
||||
#if DEVICE_ROLE == SENSOR
|
||||
#include "BME280.hpp"
|
||||
#include "MQ7v2.hpp"
|
||||
#include "GPS.hpp"
|
||||
#endif
|
||||
#if DEVICE_ROLE == ACTUATOR
|
||||
#include "MAX7219.hpp"
|
||||
#endif
|
||||
|
||||
String serializeSensorValue(
|
||||
int groupId,
|
||||
@@ -17,4 +21,7 @@ String serializeSensorValue(
|
||||
const MQ7Data_t &mq7,
|
||||
const GPSData_t &gps);
|
||||
|
||||
#if DEVICE_ROLE == ACTUATOR
|
||||
MAX7219Status_t deserializeActuatorStatus(HTTPClient &http, int httpResponseCode);
|
||||
#endif
|
||||
int deserializeGroupId(HTTPClient &http, int httpResponseCode);
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "iPhone de Jose"
|
||||
#define WIFI_PASSWORD "bombardeenlaus"
|
||||
#define SSID "DIGIFIBRA-D2ys"
|
||||
#define WIFI_PASSWORD "4EEATsyTcZ"
|
||||
|
||||
int WiFi_Init();
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#define MQTT_URI "miarma.net"
|
||||
#define API_URI "https://contaminus.miarma.net/api/v1/"
|
||||
#define RAW_API_URI "https://contaminus.miarma.net/api/raw/v1/"
|
||||
#define REST_PORT 443
|
||||
#define MQTT_PORT 1883
|
||||
|
||||
|
||||
Reference in New Issue
Block a user