15
Accurate/smart oil sensor? (discuss.tchncs.de)

We heat our house with oil (grumble grumble grumble) but our float sensor is not a very accurate measure and it's out of the way to actually see. Has anyone come across a sensor that works with HA and has been reliable? Bonus points for something that still has an "analog" view in case of problem

I've seen some sensors on Amazon but I'm skeptical of anything through there.

you are viewing a single comment's thread
view the rest of the comments
[-] Balakirev@discuss.tchncs.de 2 points 10 months ago

This is a really cool project. I do have a pi zero laying around...

Have you had any issues with this setup? Also was the ir necessary because of the interior of the box?

[-] walden@sub.wetshaving.social 2 points 10 months ago

The only problem I had was because of changing light where the tank is. Up until a month ago, it was out in the open. If the garage door opened or the sun came through the window, the reading would jump because the computer would think a reflection was the float sensor.

Covering it with the spray-painted Amazon box has (almost) completely solved that problem. Here's a screenshot:

Around Jan. 5th (earlier this month) is when I installed the box. You can see how the line smooths out, although it did jump around on the 18th for some reason.

It has been amazingly solid, and I never even think about it. On occasion I SSH in to do a "sudo apt update", but it never crashes or needs debugging.

Getting the camera pointed at it was tricky. There's a pretty narrow range of being "just right". Cameras for Pi's don't typically have adjustable focus, but I bought one that does.

I got an IR camera because it's totally dark in the garage at night. The camera has built in IR blasters (this is the one I got). If you get a normal camera, I would still cover it with a box, and you could probably rig up some low-powered LED for light.

It definitely takes some tinkering to get it set up. Once the software is installed, then you have to get the camera pointed correctly (you can see it live on your phone as you move it around, at least). Then you have to make some small adjustments in the settings to make sure the software is picking up the 100/75/50/25/0 markings on your gauge, as well as the float gauge. The guide has decent instructions, and fortunately once it's set, you don't have to touch it ever again.

When it talks to Home Assistant, it just provides a number. If you want long-term history, you need to give HA more than a number. To do this, I created a Template under Settings -> Helpers. The template takes the number (0-100) and turns it into a percentage. HA will then keep long term history for you.

So, to sum it all up: An IR camera will require changes to the gauge.py file as seen here because it's a different image hue (sort of pinkish).
An enclosure definitely helps in my case, but it depends where your tank is located. Matte Black spray paint is good.
Be prepared to tinker and follow the directions precisely.
When you're done, create a Template Sensor to get those sweet long-term graphs.

[-] Balakirev@discuss.tchncs.de 3 points 10 months ago

Thank you so much for this detail! You've made it sound like a fun (and wonderfully over engineered) solution. I may just give it a go because it sounds like I may learn a lot!

this post was submitted on 22 Jan 2024
15 points (94.1% liked)

homeassistant

11921 readers
5 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS