New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Cheapest way to get a PoE-powered board reporting from my workshop

Cheapest way to get a PoE-powered board reporting from my workshop

Solved 6 5

ok so total beginner here, be gentle. I have a detached workshop/barn about 40 m from the house with a Cat6 run already in it (previous owner did it, thank you previous owner). No good WiFi out there and I really don’t want to run mains for a little sensor box.

Plan is temperature + humidity and maybe a door switch, sending to Hermetry. I made an account and got the “connect your first device” thing working with mosquitto_pub from my laptop so that part is ok.

What I can’t figure out is the hardware. Is there a cheap microcontroller that just takes PoE? I see Arduino Ethernet shields with PoE modules, ESP32 boards with Ethernet, people using splitters… I’ve got a TP-Link PoE switch in the house. Budget is like 30-40 bucks. Which one would you pick and does it even matter to Hermetry if it’s Ethernet instead of WiFi?

If it isn't logged, it didn't happen.
♥ 0

Cheapest is any ESP32 + a W5500 module + an 802.3af splitter that outputs 5 V. Maybe 15 total. Lots of jumper wires though, and the W5500 boards are picky about 3.3 V.

Ask me about 4–20 mA.
♥ 0

Whatever you buy, make sure it is real 802.3af/at and not “passive PoE”. We cooked two boards at the plant with a 24 V passive injector somebody found in a drawer. Your switch will negotiate properly, cheap injectors won’t.

Ground loops are my cardio.
♥ 0

Does Hermetry care if it’s Ethernet or WiFi? I assumed the device has to be WiFi to use MQTT

♥ 0

yeah that was my question too. My switch is a TL-SG1005P so 802.3af I think. Tyler’s option looks fiddly for me tbh, I’d rather one board.

If it isn't logged, it didn't happen.
♥ 0

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.

Accepted solution♥ 4

update: ordered the POE-ISO, it came Thursday. Took me a while because I had the IP of the broker in setServer from a ping test, TLS just failed silently. Switched to the host name and it connected first try. Temps from the barn are on my dashboard now, 6.8 C in there lol. thanks Aisha!

If it isn't logged, it didn't happen.
♥ 2
Viewing 7 posts – 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Join the conversation

Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

Share