Traducido del English por IA ·
A Hermetry no le importa, solo ve una conexión TLS en el 8883 (o HTTPS en el 443). Ethernet o WiFi son invisibles para él.
Para una sola placa me quedaría con un Olimex ESP32-POE-ISO. Tengo tres en un invernadero. PoE aislado, Ethernet integrado, funciona con el core Arduino normal de ESP32. En ESP32 el Ethernet pasa por la misma pila de red que el WiFi, así que WiFiClientSecure y PubSubClient funcionan sin cambios:
#include <ETH.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
WiFiClientSecure net;
PubSubClient mqtt(net);
void setup() {
ETH.begin(); // valores por defecto del ESP32-POE-ISO
while (!ETH.linkUp()) delay(200);
net.setCACert(ROOT_CA); // CA pública, el host del broker tiene un certificado público
mqtt.setServer(BROKER_HOST, 8883); // NOMBRE del host, no IP (SNI)
}
void loop() {
if (!mqtt.connected()) mqtt.connect("barn-01", ACCESS_TOKEN, NULL);
mqtt.loop();
// cada 60 s:
// mqtt.publish("v1/telemetry", "{"temperature":7.4,"humidity":81}");
}
El token es el nombre de usuario, la contraseña va vacía. PubSubClient solo publica con QoS 0, que Hermetry acepta. Los pasos para el token están en Connect your first device.
Y en la versión no ISO no la alimentes por USB y PoE a la vez, así perdí un puerto USB de un portátil.
Hermetry doesn’t care, it only sees a TLS connection on 8883 (or HTTPS on 443). Ethernet or WiFi is invisible to it.
For one board I’d get an Olimex ESP32-POE-ISO. I have three in a greenhouse. Isolated PoE, Ethernet on board, works with the normal ESP32 Arduino core. On ESP32 the Ethernet goes through the same network stack as WiFi, so WiFiClientSecure and PubSubClient work unchanged:
#include <ETH.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
WiFiClientSecure net;
PubSubClient mqtt(net);
void setup() {
ETH.begin(); // ESP32-POE-ISO defaults
while (!ETH.linkUp()) delay(200);
net.setCACert(ROOT_CA); // public CA, broker host has a public cert
mqtt.setServer(BROKER_HOST, 8883); // host NAME, not IP (SNI)
}
void loop() {
if (!mqtt.connected()) mqtt.connect("barn-01", ACCESS_TOKEN, NULL);
mqtt.loop();
// every 60 s:
// mqtt.publish("v1/telemetry", "{"temperature":7.4,"humidity":81}");
}
Token is the username, password empty. PubSubClient only publishes QoS 0, which Hermetry accepts. Steps for the token are in Connect your first device.
And on the non-ISO version don’t power it from USB and PoE at the same time, I lost a laptop USB port that way.

