NodeMCU based MQTT multi-sensor with OLED display

@Jarred_Youngblood - I wrote up detailed instructions on my Thingiverse page and the Github repo. Fitting it into the wall box shouldn’t be too much of an issue, but you’d probably want to design your own PCB to house an AC/DC converter for power, and put the DHT sensor up front so it can get proper airflow for measurement.

You definitely can dim the screen, either based on a lux sensor input, or based on time (if you use ESPEasy like I have been doing lately, you can also write time-based rules) or based on an MQTT command from openHAB (based on an Astro sunset event).

That said, for a wall box based controller (with touchscreen), check out this project i found and adapted for openHAB recently (Home Automation Switch Plate) - it’s a fully functional display/controller that fits into a 1-gang wall box, and has a pre-designed PCB for a Wemos D1 and the AC/DC converter. The only thing it’s really missing is a DHT sensor, but you could potentially have a “dumb” sensor hidden somewhere else in the room, and display its temperature/humidity on the HASP (as a bonus, you also get touchscreen control and status display for other openHAB functions).

I had thought of something like you linked but I decided with kids, maybe I just want temp/humidity/motion…something they can’t break lol! I’ve integrated a pi touchscreen in the main hallway wall for larger control and have a wife friendly sitemap for our phones.

My goal with this to tell motion/temp/humidity and then work towards individual room duct control to even out the house. A year ago i started going room to room in the house pulling walls down and replacing insulation with spray-in foam. When I did that I ran all of my electrical in conduit and the main switch is a double gang and one side has a blank plate. I had thought of the AC/DC converter but being that stuff is so cheap and iffy to prevent a house fire i might just run a usb cable up through the conduit and put a outlet in the basement joyce. I don’t need my hobby burning down the house because i used a $3 ebay converter from china.

Do you have a oshpark version of the board? That pcb site I can’t get to work, has an error on country selection. Even tried remoting to my workstation desktop and no luck.

oh and also I did find your github and thingiverse sites. When I get my blank wall plate designed and fitted I’ll send you a link to it.

Good idea with the kids - the touchscreen would have to be pretty locked down to prevent them from making your house go crazy :slight_smile:

Awesome! We’re thinking alike! ^ That is precisely the reason I designed this thing in the first place, and why I added the external sensor/connector in a servo pinout. I’m hoping to eventually control my registers based on some room-balancing, too. If you haven’t seen it already, there’s a great write-up of a solution on this forum, which uses H-bridges and old ventmiser registers (basically replacing the ventmiser controller with a pre-wired ESP8266/Arduino, while keeping the original motor). As you’ve probably heard from anyone you’ve told this idea, you’ll want to monitor the differential pressure on your blower motor when closing vents (the “SAT” range varies, but for my motor, I don’t want it to get past 0.5 inHg. I’ll save you the trouble of finding a good sensor and dealing with analog pins on ESP8266 (don’t bother! :stuck_out_tongue: ) - the MPXV7002DP sensor with an ADS1115 ADC is the way to go!

I share your concerns, but the IRM-03-5 supply aderusha uses in his HASP project is actually a very good unit made by a good brand (used all over the place in household electronics), so I’m not worried about it being in my walls. Much easier than pulling DC cable to every place I’d want to put these :slight_smile:

I’ve shared my breakout board files on Github, including the Eagle .brd file you’ll want to use for OSHPark. Use the v1.1 files for now, as I’m still testing v1.2 - and the version posted doesn’t include the latest changes I made - waiting for those boards now, if they pass my testing, I’ll update the repo.

Awesome - looking forward to seeing what you come up with!!

Plus long runs of dc lose voltage so then you’re guessing at what voltage to supply in the basement so that you get the right voltage at the room. The irm is a very safe component and the HASP is a great place to start. I’m heading towards removing walls to get to ducting to seal mine up and make my solution more effective. I would love to spray foam, too. That’s awesome, keep it up.

With espeasy and openhab you can do nearly anything imaginable! I went a different way for the phones, making little habpanels that almost resemble apps

1 Like

Okay BK i will do that. And yes i am getting temp and humidity values in my openhab dashboard. I have done the testing of it by changing the temperature of sensor and its showing the change as well.I am facing problem in the graphical part only.

Still not getting any value in graph bk. I don’t know where i am wrong but really want to do this.Please help.

Are you using the Habpanelviewer app for this? I haven’t given it a try yet, thinking Habpanel layouts are too big for the phone screen, but yours looks actually usable.

This tells me you’ve got an issue with either persistence or your sitemap/item definition still. Let’s try this - post all three of your config files (.items, .sitemap and .persistence) on Pastebin or something like that (keep your private info out of them), and let us have a look at that. I’m sure it’s something simple like a typo in the configuration or something.

Just a chrome shortcut saved on the desktop with kiosk mode on. I didn’t figure on hp being usable on the phone either. I started setting up imperihome but at the time it broke Google home and I never got off the ground with it. I’m a little surprised it looks as well as it does too! :blush:

1 Like

Anyway to integrate the IRM-03-5 into the backside of your breakout board? I did get some ordered from Oshpark. Should be here in a week.

Hello Bk,

Kindly check the link for the sitemaps, items and persist files.

I have not added the service option to the sitemaps file because I have installed only one persistence service( rrd4j). Please help where I am wrong and what changes are required.

It wouldn’t fit without a redesign of the board, and at that point, might as well make the board bigger and add proper spacing for AC wiring, etc…I definitely wouldn’t recommend hacking something together just to make it fit.

Is that your full persistence file? If so, the problem is you’re not actually defining the persistence strategies, just defining the items/groups you want to persist. Your rrd4j.persist file should look more like this:

// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
	// for rrd charts, we need a cron strategy
	everyMinute : "0 * * * * ?"
	everyHour : "0 0 * * * ?"
	everyDay : "0 0 0 * * ?"
	default = everyChange

Items {

	Temp_Chart*,Temp_Chart_2*,Hum_Chart* : strategy = everyMinute, restoreOnStartup
	Temp_Chart_Period,Temp_Chart_Period_2,Hum_Chart_Period : strategy = everyChange, restoreOnStartup

All your other files look OK to me, so I really think you just have an issue with your persistence description (and I assume you already have the actual persistence service/addon installed :slight_smile:

1 Like

Hi BK,
I am facing one more issue. I am installing 3 DHT sensor at my office in 3 different rooms. In the items files i am using the names like Temp1,Temp2 and Temp3. But in openhab application its showing the same temperature for all the 3 sensors and when i am changing the temperature of any one of 3 sensors its changing for all.
kindly help where i am wrong.

@Neelam_Rani - it sounds to me like you’re using the same MQTT topic for all three sensors. Even though you’re defining three different items, the data is coming from the same MQTT topic, and the three sensors are “fighting” by feeding their data to the same topic.

Double check that first…

1 Like

The issue is fixed BK and now its working fine. Thank you so much for your help.

Awesome! Can you explain what you did to fix it, so anyone with the same problem can quickly find a solution?

Yes it was the same you were saying. I was defining the same topic with different item files.After changing that its working fine.
Thanks a lot.:relaxed:

1 Like

You guys are GREAT.
I got here while watching BK’s video on Youtube. I read through the entire tread and got answers to my different questions.
I’m new in Openhab, scanning the net in search of the best possible protocol to use in connecting my OpenHAB to my sensors while still giving me the opportunity to add more in future - ESPEasy is the way!

I appreciate you all:slightly_smiling_face:

1 Like

@Udee - welcome to the forum and welcome to OpenHAB! ESPEasy certainly is a great way, but I’m also trying different methods too (ESPHome appears to also be a great option, using configuration files to build the sensor).

I’m working on version 2 for the Kube, a more modular approach (stackable PCBs for different sensor modules). Not fully cooked yet, but here’s a “teaser” :smiley:


ESPHome is another great one, I just glanced through it now.
Have you migrated to Home Assistant or you are still using OpenHAB?