Author Topic: Overkill thermometer project  (Read 366 times)

cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Overkill thermometer project
« on: January 18, 2024, 01:07:42 PM »
The whole time I have been putting this together I've though that it is exactly the kind of project that Nick1911 would post about.

Before anyone pushes up their glasses, scrunches their nose, and whines "Accchhhtuuallly", yes, I'm sure there are 15 brazillion better and cheaper of-the-shelf options to this problem, but this one gives me a lot of control and eliminates any sort of ongoing fees.

I've had a lot of times when a thermometer reporting temperature extremes remotely would be handy.  Checking on freezers, making sure pipes don't freeze, etc.  When my neighbor started selling frozen meat, suddenly there was a golden opportunity to help him, plus build out a solution I can use at home.

For sensors I've settled on the Blue Charm Beacons BC04P.  These are about $22 each, have a CR2477 battery that can (depending on configuration) last about 4 years, are configurable, and broadcast BLE packets.  I set them up to send out telemetry packets which broadcast their temperature and battery level and slow the broadcast rate down to every 10 seconds.  However, my system should be able to accommodate just about any beacon that can handle Eddystone TLM packets.

For the gateway I'm doing the development using a Raspberry Pi 4b, although I think I'm going to use a Zero 2w+ or equivalent from another manufacturer for most of the deployments as the 4b is overkill.  I never needed to know Python before, so I've been learning it for this project.  Not too hard, although I'm still not totally used to the syntax.  The Raspberry Pi gateway reaches out to my web server via an API endpoint and pulls down a list of MAC addresses for beacons it should scan for.  The bluetooth module scans for any Eddystone telemetry packets from the listed MAC addresses.  It stores those in a local MySQL table and routinely submits the results via the API.  The webserver currently provides access control, user management, allows the addition of beacons by MAC address, and allows reporting of historical temperature data.  I've incorporated a watchdog routine that should catch if the process hangs up for too long and automatically restarts the device.

Originally I had the gateways as the primary unit of administration.  I even had it set up so that you could bring the beacon near a gateway and have it ask if you wanted to monitor it.  It was cool, but I think administering through the web form is probably more effective, and it means I don't have to have a touchscreen on the gateway.  That can just be a black box connected to power and wifi.

Still in process are customizable email and text alerts, better charting, cleaning up excess data (I really don't need six data points per minute for the long term), power outage monitoring, battery replacement alerts, and a few other features.  I'm planning on having a dashboard that will let you see at a glance that each of your sensors are regularly checking in, have good battery, in a good temperature range.

Ultimately, I should be able to write an image on to an SD card, boot it up in a Raspberry Pi, configure WiFi for where it will be deployed, and plug the gateway into power.

Is this overkill?  Yes.  Have I spent a lot of money on it?  Yes.  Will I be taking it 90% of the way to a commercial product but never making money off it?  Also yes.

Ben

  • Administrator
  • Senior Member
  • *****
  • Posts: 46,010
  • I'm an Extremist!
Re: Overkill thermometer project
« Reply #1 on: January 18, 2024, 02:18:13 PM »
That is really cool. If you go commercial, I will be your first customer!  :laugh:

Besides my regular weather station, I'm up to three sets of temp/humidity base stations with seven remotes, monitoring the wellhouse, several in the crawlspace (mostly for humidity), one in each shop, one in the garage, and one in each gunsafe (also for humidity). I have often thought, "How can I consolidate all these?". I've also been thinking about adding water monitors for leak detection in the crawlspace and wellhouse.

I will have to look into those sensors of yours. I really like that battery life and everyone knows how much I hate going into my crawlspace. It would be cool having batteries I don't have to worry about for a while.
"I'm a foolish old man that has been drawn into a wild goose chase by a harpy in trousers and a nincompoop."

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,071
  • Witty, charming, handsome, and completely insane.
Re: Overkill thermometer project
« Reply #2 on: January 18, 2024, 02:34:08 PM »
*Pushes up glasses, scrunches nose*

Accchhhtuuallly...

Neat project. Yes, way overkill for your needs, but lots of applications outside that. You should seriously consider seeing it through to fruition and getting some type of IP protection. You never know who might be interested in licensing or buying the rights.

Brad
« Last Edit: January 18, 2024, 04:11:22 PM by Brad Johnson »
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Re: Overkill thermometer project
« Reply #3 on: January 18, 2024, 04:08:52 PM »
That is really cool. If you go commercial, I will be your first customer!  :laugh:
If you buy the hardware and get it on wifi, I'm happy to remote in and get it set up for you.

Besides my regular weather station, I'm up to three sets of temp/humidity base stations with seven remotes, monitoring the wellhouse, several in the crawlspace (mostly for humidity), one in each shop, one in the garage, and one in each gunsafe (also for humidity). I have often thought, "How can I consolidate all these?". I've also been thinking about adding water monitors for leak detection in the crawlspace and wellhouse.
I'd have to find a good beacon that does humidity.  The ones I'm using are strictly temperature.  I'm working at the hex level on the TLM packets, so assuming there's a good BLE humidity sensor out there I should be able to integrate it.

I will have to look into those sensors of yours. I really like that battery life and everyone knows how much I hate going into my crawlspace. It would be cool having batteries I don't have to worry about for a while.
The sensors are very basic, but if all you want is to open an app on your phone and see the output they will do that out of the box.  You wouldn't get the reporting or alerts, but you could check things without having the overhead of the gateway device.

cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Re: Overkill thermometer project
« Reply #4 on: January 18, 2024, 04:13:16 PM »
Neat project. Yes, way overkill for your needs, but lots of applications outside that. You should seriously consider seeing it through to fruition and getting some type of IP protection. You never know who might be interested in licensing or buying the rights.
There has to be prior art for a remote temperature monitoring system.  It's even possible I'm unknowingly infringing on someone else's patent with this.

I did consider offering it as a paid service to local restaurants and grocery stores, but I'm not sure there is enough budget out there for the little guys to justify it, and I'm certain the big chains already have remote monitoring for their freezers.

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Overkill thermometer project
« Reply #5 on: January 18, 2024, 05:34:52 PM »
Ha, that does sound like something I'd wire up.  =)

Cool project.  You might consider grafana for a charting on your front end.

If you don't commercialize it, you can always throw it up on github as an open source project.

Brad Johnson

  • friend
  • Senior Member
  • ***
  • Posts: 18,071
  • Witty, charming, handsome, and completely insane.
Re: Overkill thermometer project
« Reply #6 on: January 18, 2024, 05:39:42 PM »
There has to be prior art for a remote temperature monitoring system.

There is. Lots, in fact, from inexpensive single point-of-use units to big industrial/institutional affairs. I admin a Vaisala brand system in our building that monitors walk-ins and -80 freezers. Scalable to however many units you want to pay for at $2000 a pop per location plus annual user licensing fee.

Keep going, though. Just because it's similar doesn't mean you can build something more useful, intuitive, and cost effective.

Brad
It's all about the pancakes, people.
"And he thought cops wouldn't chase... a STOLEN DONUT TRUCK???? That would be like Willie Nelson ignoring a pickup full of weed."
-HankB

cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Re: Overkill thermometer project
« Reply #7 on: January 19, 2024, 05:06:10 PM »
I may have to look into grafana.  Chart.js isn't displaying all the data for some reason.

The blue beacon in the bottom is in a little mini fridge freezer in my office.  You can see the compressor cycling.  The red one was sitting on my desk, then I put it in the fridge and the put it back on my desk.  The blue one at the top is in the server room.  They all have data over the entire time period.


cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Re: Overkill thermometer project
« Reply #8 on: February 23, 2024, 12:52:07 PM »
I've overcome the issues I was having with chart.js and built out a non-secured reporting portal to simplify monitoring.  On my way home from work I stopped by to pick up a bison hanger steak and some other goodies and help him with calculating his meat profit margins and while I was there I installed a handful of these at his shop.


Still a lot more features I'd like to add, but it's pretty functional.  Install went really well.  For new beacons I have to modify the settings using my phone to get it to start broadcasting TLM packets, enter the beacon MAC address into the web interface, and after the controller does a settings update it will start picking up signal.  I could have really sped up development by hardcoding that kind of stuff, or just inserting it into a database without creating the frontend to manage it, but it was nice to be able to manage it all on the spot.

The freezer beacons were already set up before I arrived, but I configured the milk fridge beacon while I was there.

I'm going to install another three beacons tonight.

Still haven't incorporated the alerts I need to add, but that'll come.

sumpnz

  • friend
  • Senior Member
  • ***
  • Posts: 8,330
Re: Overkill thermometer project
« Reply #9 on: February 23, 2024, 01:09:50 PM »
How much does that all cost?  Same number of beacons, all new hardware, etc?

cordex

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,623
Re: Overkill thermometer project
« Reply #10 on: February 23, 2024, 01:58:05 PM »
How much does that all cost?  Same number of beacons, all new hardware, etc?
Beacons are $22 each and they come with a CR2477 battery that should last for several years.  I developed the gateway on a Raspberry Pi 4b, but for deployment I went with an Orange Pi Zero 3 1G - another $22 from Amazon.  I'm not coming close to taxing it, so it would probably run on an even cheaper option.  You'll need a MicroSD card - I'm using a 64GB, but again that's overkill.

You could replicate the functionality of the hardware I've deployed so far for $120ish - maybe a bit cheaper if you went with a cheaper gateway.

I put his gateway in a metal case to keep it a little safer, added an external BlueTooth adapter (not necessary, just trying to get a little extra range) and may eventually buy a UPS for him too, all of which are optional but push the costs a little higher.

So not real cheap, but no individual component is absurdly expensive either.  Compared to losing $10k of meat it's downright cheap.  Oh, and I'm gifting him the system, so it's extra cheap.