Hardwired sensor network utilizing obsolete CAT6 infrastructure

Looking for input.

I'm going to outfit small private school I work at with temperature sensors. I do not find wireless (zigbee, wifi, etc.) sensors reliable. A couple of weeks ago, I realized that our school has wired cables going from a server room, to most of the rooms in the building. Out of around 50 ethernet ports, we only utilize 6 (wifi APs + printer). A principle sketch of our layot is shown in image:

So, I have discovered mainly two options:

  1. 1-wire sensors with RJ45 connection, 1-2 hubs and a controller
  2. ESP32 w/PoE

The 1-wire option
I've found a company called UniPi, which sells 1-wire sensors with RJ45 plugs, hubs and controllers based on Raspberry Pi. There are probably similar options available. This would mean I would have to buy sensors like this On wall temperature sensor with a RJ45 to 3 pin 1-wire cable. I would have two hubs allowing for 13 sensor points. I would also need a controller as well as a Raspberry Pi.

  • Would use of the hub with the long stretches of lan cable mean that the travel length of the signals would be too far, or is it in parallell?
  • How should I set up a NodeRed in such a system? Where do I put it? I want data logged at intervals of 1 to 5 minutes, and I need a way for this data to be displayed in interactive graphs, readily available online. I would also like to set up alarms triggered by certain temperature events.

ESP32 w/PoE
Here, I would need an affordable switch w/PoE. I would also need "safe" ESP32s, which wouldn't damage any of our other lan infrastructure (switch, UDM-Pro, APs, ...).

  • How would I solve this in the most elegant manner? Would each ESP32 be an autonomous device, addressable over the internet - i.e. would each ESP32-device be accessible through an online iteration of NodeRED running on AWS? Or do I need a on-premises controller running NodeRED?
  • Which ESP32 PoE devices should I go with?

Would love your suggestions or advice on this. Especially input on reliability, affordability, design and implementation time. Would also like suggestions for "complete" solutions for solving this, how it could be set up.

Thanks!
H.

    • edited because I forgot to link a controller - *

Hi @henxan,
I'm also a cable guy, and I have used in my home the setup from this discussion.
Although the wt32-eth01 board is not POE, it works fine in combination with this poe splitter which offers me also 5V voltage to power my sensors.
I am very pleased with it.
Bart

1 Like

I am certainly no expert on this kind of wiring but I do remember some previous extensive threads on the forum about using CAT wiring for sensors.

I would expect that you would want to put it wherever the wiring comes into the existing patch panel.

That is certainly no problem for Node-RED even on a Pi.

A lot of us use a combination of InfluxDB and Grafana. InfluxDB is a timeseries database very suited to recording and analysis of IoT data. Grafana is a great way to display charts of your IoT data.

Online over the Internet or simply within the building? If over the Internet, you will, of course, need to pay attention to security. There are lots of ways to do that depending on who needs access to the displays and from where. For example, if only a few people need access, you may wish to set up some kind of VPN access which could be as simple as using a service like NGROK or Cloudflare's Zero Trust. If loads of people need access over the Internet, then you will be best off adding something like NGINX as a reverse proxy with suitable security (you may also want to re-proxy that via Cloudflare for additional protection).

All of these services can be used freely, even Cloudflare has generous free tier access. And all of the mentioned apps will run on a single Pi.

Personally, I would not do things that way. I would run an MQTT broker locally and get the ESP's to only talk locally. The more you make accessible from the Internet, the larger the attack surface and the bigger the risks.

5 Likes

This might be useful

2 Likes

Wow, thanks for all the input to all of you!

I'm also convinced that a individual "autonomous" units (wt32-eth0, esp32, etc.), all considered, would be the best alternative for a reliable sensor network. I would weigh simplicity highly though, and would restrict myself to one single unit with PoE. However, after doing a lot of searching and reading, I've run into two problems:

  • Cost of "safe" PoE ESP32 units are high! One of the cheapest are Olimax ESP32-POE-ISO, at 32 euro (same as 32 us dollar), w/o shipping and other charges.
  • Reading up on reviews of the ESP32-POE-ISO and other similar devices, I've seen some feedback that worries me. Generally, they have been related to heat issues and devices that "freeze"/need to be booted.

I've done some searching on this forum, but I'll try to do some more. It would be fantastic if I could find a better alternative :slightly_smiling_face:

Since I have some experience with Node-RED from last year, and I really like the system, it is highly probable I'll go with Node-RED - that is disregarding whichever solution I choose (1-wire, esp32, ...). The 1-wire solution I'm considering have a Raspberry Pi as controller, and I would install Node-RED. :innocent:

This I didn't know. However, I have watched several youtube-videos and glanced at some tutorials, and it seems like a perfect solution for my/our need!

I totally agree! However, I think there could be a solution by setting ut a tunnel to my Raspberry Pi (controller) unit. We have a Unifi UDM-Pro, and I'm pretty sure I could tunnel a single port or, in other ways, create a hermetic system for the sensor system.

Great input! Absolutely spot on for the 1-wire solution, as the "star topology" is exactly how we would have to solve it. Apparently, I need to find out how single-supply analog switches work, and determine their availability and price! :joy:

Well - finding info on 1-wire switches (1-wire multiplexer), was harder than I believed! :joy:

Even Unipi, the company I mentioned in my OP, do not produce such multiplexers. However, I found one document, in which they refer to a 1-wire HUB multiplexer and in footnotes: "Hub multiplexers are available from several manufacturers (consult the manufacturers list on www.1wire.org for manufacturers of units) ...". Well, 1wire.org does not exist (any more). And I'm NOT going to start soldering and making my own units - so I'm a bit lost down the 1-wire route at the moment! :joy: ...

I've tried contacting UniPi, but I'm still to get any reply from them. Hopefully they'll be able to help, but if anyone know of any 1-wire multiplexer producers, I'm all ear! :blush:

Personally, I think I would go with Zigbee for this system rather than 1-wire. Unless you have a particular reason for using 1-wire.

2 Likes

This may also be useful:

It's all about reliability. I have experience with zigbee through sonoff products, they do not work as promised. It may be that another company produces better products, but doing a bit of research online, there have been similar problems with a lot of them.

In my case, we are putting sensors throughout a large building with a lot of concrete walls. For our sonoff sensors, there does not seem to be much jumping of data between the sensors, so a lot of sensors just go offline, others have shoddy data. This problem shows up just through one wall.

Also, it would be better to have a hardwired system, so we can avoid replacing batteries. For us, wireless systems are out of the question :innocent:

1 Like

Absolutely not arguing with your preference for using wired connection but...

Out of around 50 ethernet ports, we only utilize 6 (wifi APs + printer).

Doesn't that imply that you have rock solid wifi?
So wifi ESP based sensors ought to be a viable option.

If we were to go with a wireless alternative, Wifi would be the absolutely best alternative, and the only one I would consider.

However, the case for wireless alternatives is not as simple as good wifi-coverage for a laptop.

  • Wifi temperature sensors are expensive, at least if you want sensors which reconnect reliably and are stable.
  • If you go for entirely "wireless" sensors, that is battery powered units, you will have frequent battery changes. The longest stretches I see advertised are approx. 1 year, but with frequent reporting, we are looking at 2-6 months, which is an unacceptable alternative.
  • If you want to go with devices powered by a wall outlet, you would need x transformers/power supplies, in our case 10-14 power supplies. Every power supply is either adding to the fire hazard in the building, or very expensive. Also, if I were to go down the power supply-route, i could just as well get 14 SOCs, drop PoE, and plug them both into an outlet and ethernet. This would be a more stable alternative.
  • Lastly, some places in our building have virtually zero wifi, though some have ethernet sockets. This is areas where there is no need for wifi (basement, technical rooms, water/utility etc.), but they can still be reached by ethernet using the existing infrastructure. We need temperature sensors in some of these rooms, as frost would seriously affect everything carrying water.

Edited because I inadvertently posted prior to being finished writing

I'm a fan of ESP32 development boards - usb powered, Tasmota firmware and BME280 sensors.
Node-red on a Raspberry Pi monitors their status and processes the data.

But I'm a tinkerer at home; you have a real world requirement and probably not much time to go and kick a sensor if it goes offline.

I hope you'll keep us informed of what you finally opt for.

2 Likes

Yeah, I'll be sure to post updates :innocent:

I really hope the 1-wire solution is viable, as that would be the simplest setup. I just have to get X temperature sensors w/RJ45, and plug them in wherever I need to measure. Of course, I would have to find the best setup in our server room - parallel, hubs, etc. - but then I would get away with a simple RPi4.

Going with my ESP-PoE solution, also requires PoE switch, which will be about 100+ USD/EUR. All units need to be set up, and it would be a hazzle. So, as you understand, I really hope my 1-wire alternative is viable :joy:

1 Like

What measurement frequency are you looking for?

Our SVT-200V wireless vibration & temperature sensor has an option of fixed measurement interval of 10 seconds. It measures temperature, vibration velocity and acceleration every 10 seconds. The battery lasts 10 years. The sensor is ultra compact and weighs 45g (1.59oz).

The sensor is more expensive than consumer products, since it is IP67 industrial grade with intrinsic safe design.

You may find some Zigbee temperature sensors for better price with good battery life too.
1-year battery life is too short.

1 Like

Could you tell us how much these sensors cost please?

could you buy one of these..w hich would require a Raspberry Pi for every 8 temperatures that you are monitoring....

Or have you considered this:

Wiznet Ethernet HAT ($4.95) for the Raspberry PICO.. so Assumes a Raspberry PICO at every station you are monitoring... but nto expensive and PICO supports Analog IO.... Have all the PICOs make thier data available to the Raspberry PI sitting in the Network Closet (or whereever you put it)......
A better option than the HAT is the whole Wiznet device Wiznet W5100s-EVB-PICO that is aPICO 2040 clone combined w/ wired Ethernet for $9.95 (so your outlay at each place you are monitoring.. plus the cost of your sensors..)...
https://eshop.wiznet.io

1 Like

Sorry i have come in here quite late - a couple of questions

  1. What distances are you talking for each of the runs ?
  2. 1-Wire is a parasitic power network so there are lots of ways it can be run depending on what is suitable - however as you essentially have a star topology with your CAT6 setup then it makes sense to run it this way.
  3. Distance issues with 1Wire can be addressed by playing around with different combinations of resistors typically.
  4. As a first test i would get a DS18B20 (the easiest ones to work with are the Waterproof ones encased in a stainless probe.

Check out how your CAT6 cable has been terminated - presumably all 8 pins will have been terminated - there are however 2 standard for how that termination will be

image

Make yourself up a temporary fly lead with a DS18B20 on one end and an RJ45 connector crimped on the other - i would use a pair of pins to each lead on the DS18B20 to minimize the interference (which leads will depend on the cabling standard that has been followed)

I would get an Arduino Mega with Sensor shield and Ethernet interface and then get a basic sketch setup to take measurements - You would have enough digital pins on a Mega to run all the temperature sensors you wanted

You can then test a single DS18B20 in each location in a one to one connection with the Arduino to make sure you are getting good readings - get yourself a package of various resistors and you can mix and match on each one until you get a reading.

If you proved that this worked OK then you can scale up by buying additional sensors for each room and getting the crimping leads made professionally - if you did end up going down this track i would move to a screw down shield for the Mega

And a decent Mega with inbuilt ethernet

EtherMega (100% Arduino Mega 2560 compatible with onboard Ethernet) | Freetronics.

This is how i use to run my home automation system with about 40 DS18B20 strung around the place - using Cat5 mostly with the longest run to our backyard for the swimming pool being about 85 metres in total.

If you wanted to go down this path and were prepared to pay shipping (from Australia) - i have 3 of the ethermega (as listed above) that i no longer use for home automation and they are sitting around gathering dust - be happy to donate one of them to you for your testing

Craig

2 Likes

I've been using the dallas semi, now maxim, 1-wire temperature sensors for over a decade and really like them. I also have all my home shutter controls on a 1-wire daisy chain going all around the house on a cat-5 daisy chain. In this day and age you do need to make sure you get real maxim sensor chips and not the clones, so order from a reputable distributor/company.

I would highly recommend to use one of the maxim i2c to 1-wire interface chips. For long & messy wire topologies they are great. I've written my own driver and am not sure about rPi driver support. You could bring all the cat-5 pairs into one such chip easily.

If you do not use one of the i2c - 1-wire chips you can use a single I/O pin too. The trick is to put a ~180Ohm resistor in series and a relatively low value pull-up (1.2K-2.2K).

1 Like

Hi all! A lot of replies! :grinning:

Yes, it seems like a good alternative to ESP32 and others, but still, it requires either external power supply or a poe-splitter - so it's just crossing the complexity limit I've set :innocent:

The longest stretches I believe to be are around 80-90 meters. Most will be within maybe 15-30 meters, in a star formation, as you mention.

I do believe they are all terminated, yes. I've testet PoE on a couple of cables, and it worked fine (at least it worked - I didn't test the quality), doesn't that mean that they are all terminated? I do not know it it is T568A or T568B. I could presumably just screw one open and check when I have time between teaching :joy: ...

This is only a type of adapter - i.e. it doesn't offer multiplexing/switching?

Well, I'm on bit shaky ground here - but I've been looking at the possibility of using a maxim max14661 multiplexer based card, like this one:

If I understand correctly, this would give me the opportunity to have 16 different 1-wire ports, which I would utilize to have 1 single 1-wire sensor at each port. This would be enough sensors for our needs. It would eliminate problems with several sensors interfering with eachother. However, I am still not proficient enough to know how I would physically hook up things to the MAXREFDS72-device. Also, I was thinking of doing three wires, not two. Is it doable? Also, it is a Arduino-based card, and I was thinking of using rPi, but I assume there is no problem connecting these? Or should I go with arduino based system?