Who here builds their own sensors (CHAT)

I see them as too good too be true they are extremely cheap compared too other smart sockets like wemo, tp link,

It worries me trusting cheap Chinese with electricity that’s constantly on

I love it I have just always done it with computers

Openhab has made me jump into code for rules ect made me try Linux on the RPI and now thinking about building my own devices

Openhab is the best project I have ever started

I am glad you think so, but be careful and don’t bite more than you can chew. One step at a time and when you mastered on aspect and you feel you are ready for the next project then go ahead.

I agree but having a test of building own sensors is no great loss for £25 even if it goes in the bin and i could learn some new skills

even if Its a loss and can’t get it working there will be lessons learned I’m always up for that

But I do have alot of stuff going on
I can’t code or solder or use Linux (my setup runs on RPI since yesterday working fine)

I’m also backing up my OH so no worries there

I design and build many sensors of my own. Depending on what I “suddenly” need to monitor I will first scour AliExpress or BangGood and if there is not something already rolled, I will build my own.

So far:

-Boiler monitor
Using WeMos, custom Arduino code, a number of DS18B20 and a water flow meter I monitor the cold inlet temp, hot water outlet, heating return and heating flow temps as well as cold-water flow. Using MQTT that reports back which OH2 picks up and graphs.
No pics of the board and sensors but here is the result:

Solar Controller - Shed
Using a number of hall-effect current sensors (ACS712 and ACS758) along with a Wemos , a number of relays, a ADC (ADS1115) I measure the PV panel output voltage and current, the battery voltage and charge current as well as the drain current (gives me a net current).


It can also control the inverter, dummy loads and switch over from street supply and batteries when conditions are right.
It’s further connected into the rest of the smart home and activates a “low power mode” when no one is home and running off batteries.

Bathrooms
Same flow meters and temp meters on all the plumbing in the bathrooms to monitor and log that.

Solar Panels
I have a 2KW set of panels on the house. I want to now measure the voltage (Vmax 500V :D) and the current they put out. From those, and with logging, I can predict better when to run different appliances and how to manage the battery charging to try and ensure they get charge priority over the rest of the house.

Future
I’ve got more ideas than I have time to do. Some practical ones are:
Gas Metering
House electrical circuit metering

For fun - lighting detector using a basic AM radio. When the forecast is for a storm and the detector detects a strike it will flicker all the hue lamps. :smiley: :smiley: It’ll drive my wife mad :slight_smile:

I’ve always enjoyed building my own sensors and measuring everything but never had a single point to use and display it. OH has helped, nay, fueled my addiction :stuck_out_tongue:

3 Likes

Nice job with your sensor display (I take it you designed your own Habpanel widget for this?). For the lightning detectors, check out Blitzortung - I haven’t taken a plunge on buying their kit yet, but have been thinking about building one myself. I think my wife would kill me if I did what you suggested, though :smile:

To add to the discussion, here’s my DIY sensor design, based on NodeMCU/ESP8266. It measures temp/humidity(DHT22) and motion (HC-SR501 PIR) and displays it all on a local OLED screen as well as publishing it to MQTT/OH. I have too much on my plate right now, but in the future, I’ll be adding support for analog sensors (e.g. differential pressure to monitor my HVAC blower) and luminosity sensors, as well as possibly adding servo control (HVAC register adjustment).

1 Like

@bartus

I have already watched your video on YouTube :wink:

1 Like

Now that I’m running on a RPI I have a mqtt server built into openhabian so I’m going too be watching these sort of videos again

I have two variations – in my furnace room, I have an ESP8266 with a DS18B20 temp sensor to report ambient temperature in the room. The ESP8266 is a dev board that has a 5V option, so I run it from a phone charger plugged into a nearby outlet. There’s no case; it literally hangs by the power supply line from the condensate drain. The ESP8266 sketch (I use the Arduino dev tools) posts readings via MQTT.

My other is an RPi in the garage whose main purpose is to host the alarmdecoder interface to our alarm system. I added a DB18B20 to it for an ambient reading from the garage; a simple shell script reads the sensor and posts it via MQTT.

My two upcoming projects are a low water sensor for my fish pond (ESP8266, float valve, battery powered, MQTT) and a refrigerator monitor. In addition to temperature sensors, I want to put current taps on the compressors (one each for the refrigerator and freezer) and lights. The unit is built-in, and there’s mains power available inside the cabinet, so this one will be mains powered. In addition to temperature alarms, I want to monitor the duty cycle of the compressors to try to predict when it’s time to vacuum the condensor coils (before the unit’s alarm triggers when it’s really overdue). Both of these projects are currently stuck in the “getting a round TUIT” stage.
I’m also thinking about adding temp sensors to the supply ducts for the furnaces (2) to get a sense of how they run, especially during air conditioning season.

  1. It depends. My garage doors use an RPi 3 gpio wired to reed sensors and gpio to relays. I chose an RPi largely because it was my first project and keep it as an RPi because I also run a camera on it. My other door sensors are wired to an RPi 0w gpio. These are also just reed sensors and I’ve not taken the time to move to an esp8266. I’ve also three NodeMCUs running ESP Easy with DHT22s and photoresistors in a few rooms of the house. Originally these were Arduinos wired to an RFM69HW network but there is too much interference I’m my neighborhood on that frequency to get the range I need. Eventually I’ll probably replace the RPi 0w with a NodeMCU. Everything is wall powered.

  2. Now pretty much exclusively MQTT.

  3. If I’m not in a hurry I can build a new sensor for $10-20 (slow boat from China shipping). Though I expect prices to go up in the near term thanks to recent politics).

  4. The RPis too some python coding but I’ve posted that to GitHub so you wouldn’t have to. Easy ESP requires no coding. If you use it plan to use Sonoff, you can also use Tasmota on the NodeMCU to standardize. Both are equally as easy in my experience.

  5. Wired reed sensors for the doors. DHT22s for temp and humidity. Analog photoresistors for light sensing (does not give values in a measurable units like lux, but it’s good enough to control some lamps). I’ve played with other sensors but there’s are the only ones I’m actively using.

  6. Not at the moment but if I remember I’ll send something. I tend to put them in found cases so they look like more like art d’objet than an appliance.

2 Likes

Rich, what is that you’re using for the charts, is that Grafana? Looks real nice!

Yep, just Grafana with InfluxDB for persistence and using the light theme. I’m really happy with it for charts.

Here are a couple of my sensors.

The second one is in my son’s room so he got to decorate it.

The garage.

4 Likes

Where can I find plastic case for temperature sensor.

How did you manage to get these battery times? Which Type of arduinos are you using?

I am using ESP8266 with Arduino on for my sensors and switches. Easy to have them log directly on wifi, and communicate over mqtt.

I started with z-wave, but was not satisfied with the reliability and responsiveness. I ended up implementing everything by myself.
I use arduinos as both sensors and actuators + use Ethernet or esp8266 bound to the Arduino if I need WiFi to connect to openhab. But the network is never a point of failure and local operations (wall switches) can function with the network being down, as long as the arduinos are alive.
I implemented light switches, dimmers, roller shutter, ventilation, IR emitter and more.
Most of my code is in GitHub if anyone is interested.
I got a lot of inspiration from SuperHouseTV (Google it), but took things much further.

I have built all my sensors from scratch. So from reed switches, ds18b20’s, coils, DHT’s, Hall etc.
I even turned a bucket into a Leyden Jar with some alu foil, just to sense if it was full or not.

Made sensors to sense if there was any current going through a wire

I have another diy sensor to measure the clarity of my pond water. It is basically 2 glass tubes -one with an LED, the other with a light sensor, sticking through a piece of floating material.

I am using Arduino, ESP8266, Raspi
certainly cost effective, also, some specific sensors are hard to find, if they even exist
coding hardly an issue, once you have code for one temperature (or other) sensor, easy to transport to similar other node. Examples galore

I will snap a pic when I tidy the pool:-)

1 Like

Esp8266 and easyesp
Check out www.flex-iot.com

Hi GuyCo,
I’ve been trying to make my own dimmers that work over MQTT and I am having an issue with low level blinking. I am interested to see your code please. I also like SuperHouseTV - it’s a pity Jonathan has gone a bit quiet lately.