1
0

http requests from esp32 to api

This commit is contained in:
Jose
2025-04-09 14:19:52 +02:00
parent 0c03c052b4
commit 245f213ad9
15 changed files with 72 additions and 37 deletions

View File

@@ -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
);

View 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);

View File

@@ -0,0 +1,7 @@
#include <WiFi.h>
#include <PubSubClient.h>
#define SSID "iPhone de Álvaro"
#define PASSWORD "alvarito123"
int setupWifi();

View File

@@ -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();

View File

@@ -1,4 +0,0 @@
#include <HTTPClient.h>
#define SERVER_IP "192.168.48.151"
#define SERVER_PORT 80

View File

@@ -1,7 +0,0 @@
#include <WiFi.h>
#include <PubSubClient.h>
#define SSID "Redmi Note 14 Pro 5G"
#define PASSWORD "aitv5949"
int setup_wifi();