http requests from esp32 to api
This commit is contained in:
@@ -31,16 +31,16 @@ String serializeDevice (
|
||||
);
|
||||
|
||||
void deserializeSensorValue (
|
||||
HTTPClient* http,
|
||||
HTTPClient &http,
|
||||
int httpResponseCode
|
||||
);
|
||||
|
||||
void deserializeActuatorStatus (
|
||||
HTTPClient* http,
|
||||
HTTPClient &http,
|
||||
int httpResponseCode
|
||||
);
|
||||
|
||||
void deserializeDevice (
|
||||
HTTPClient* http,
|
||||
HTTPClient &http,
|
||||
int httpResponseCode
|
||||
);
|
||||
4
hardware/include/RestClient.hpp
Normal file
4
hardware/include/RestClient.hpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#include <HTTPClient.h>
|
||||
|
||||
void getRequest(HTTPClient &httpClient, const String url, String &response);
|
||||
void postRequest(HTTPClient &httpClient, const String url, const String &payload, String &response);
|
||||
7
hardware/include/WifiConnection.hpp
Normal file
7
hardware/include/WifiConnection.hpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "iPhone de Álvaro"
|
||||
#define PASSWORD "alvarito123"
|
||||
|
||||
int setupWifi();
|
||||
@@ -1,9 +1,8 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "json.hpp"
|
||||
#include "rest.hpp"
|
||||
#include "wifi.hpp"
|
||||
#include "test.hpp"
|
||||
#include "mqtt.hpp"
|
||||
#include "JsonTools.hpp"
|
||||
#include "RestClient.hpp"
|
||||
#include "WifiConnection.hpp"
|
||||
#include "MqttClient.hpp"
|
||||
|
||||
uint32_t getChipID();
|
||||
@@ -1,4 +0,0 @@
|
||||
#include <HTTPClient.h>
|
||||
|
||||
#define SERVER_IP "192.168.48.151"
|
||||
#define SERVER_PORT 80
|
||||
@@ -1,7 +0,0 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "Redmi Note 14 Pro 5G"
|
||||
#define PASSWORD "aitv5949"
|
||||
|
||||
int setup_wifi();
|
||||
Reference in New Issue
Block a user