NodeMCU based MQTT multi-sensor with OLED display

Its showing the empty graphs.Donā€™t know where i am doing mistake.

Make sure youā€™re using the correct persistence service (Iā€™ve been using rrd4j, which can store a series of values over time) and not something like mapDB persistence (which can only save a single point - the last value).

Also, make sure you add the chart group to your Temp/Humidity item definitions, so theyā€™re actually tied to the Chart element.

Thank you sir. Yes i have installed mapDB. I am just installing rrd4j.

Sir I have installed rrd4j and uninstall mapDB but not getting any results on my graph.
Can you please suggest how you wrote in this?

Strategies {
// for rrd charts, we need a cron strategy
everyMinute : ā€œ0 0/1 * * ?ā€

    default = everyChange

}

Items {
// additionally persist weather info every minute
gHistory* : strategy = everyUpdate, everyMinute
}

Will it be same or i have to do some changes in it?

Sir i need your help in one more thing. We are doing hard coding of our esp8266 and writing the ssid and password into the code. But if the ssid and password of our network changes after some months or years then we have only one option. We have to hard code it again.
I read regarding a concept Access point below one of your video. I want to do something like that so that we can change that from our phone or PC.
Please help in that as well.

Use code fences around all your posted code, so we can read it easier :wink:

Hereā€™s my persistence strategy for the Temp_Chart group (all my sensors items belong to this group):

Items {
Temp_Chart* : strategy = everyMinute, restoreOnStartup
Temp_Chart_Period : strategy = everyChange, restoreOnStartup
}

Please post your items & sitemap definition files so we can take a look and see whatā€™s wrong.

For this, I have started to use ESPEasy with these sensors. ESPEasy makes it easy to create an access point, but also allows me to change the configuration of the sensor using webpages, and add new sensors very easily too :slight_smile:

I havenā€™t made a full video about setting these up with ESP Easy, but I did show how to do it during my last live stream. You can watch it (itā€™s towards the end of the video where I show how I load/use ESPEasy), and hopefully it helps you!

Thank you BK for your help and yes i will try to use code fences:grinning: Actually i am new to these things. Here are my bindings and sitemaps files:-

Sitemaps:-

Text label="Temperature Chart" icon="line"
                       {
       Switch item=Temp_Chart_Period label="Temp Chart Period" mappings=[0="Hour", 1="Day", 2="Week", 3="Off"] icon="line"
       Chart item=Temp_Chart period=h refresh=6000 visibility=[Temp_Chart_Period==0, Temp_Chart_Period=="Uninitialized"]
       Chart item=Temp_Chart period=D refresh=30000 visibility=[Temp_Chart_Period==1]
       Chart item=Temp_Chart period=W refresh=30000 visibility=[Temp_Chart_Period==2]
                       }

Text label="Humidity Chart" icon="line"
                       {
      Switch item=Hum_Chart_Period label="Hum Chart Period" mappings=[0="Hour", 1="Day", 2="Week", 3="Off"] icon="line"
      Chart item=Hum_Chart period=h refresh=6000 visibility=[Hum_Chart_Period==0, Hum_Chart_Period=="Uninitialized"]
      Chart item=Hum_Chart period=D refresh=30000 visibility=[Hum_Chart_Period==1]
      Chart item=Hum_Chart period=W refresh=30000 visibility=[Hum_Chart_Period==2]

                        }

Items  


Group Temp_Chart(all)
Number Temp_Chart_period "Temp Chart Period"
//Group Temp_Chart_2 (all)
//Number Temp_Chart_Period_2 "Temp Chart Second Floor Period"
Group Hum_Chart (all)
Number Hum_Chart_period "Hum Chart Period"

Number Temperature_kube "kube Temp [%.1f Ā°C]" <temperature> (FF_kube,Temp_Chart) {mqtt="<[broker:home/kube/temperature:state:default]"}
Number Humidity_kube "kube Hum [%.1f %%]" <humidity> (FF_kube,Hum_Chart) {mqtt="<[broker:home/kube/humidity:state:default]"}

I have changed the persistence strategy but still not getting any results on my graph.

Thanks a lot BK. Learning many things from you.
Finally i learned how to use code fences.:grinning:

Ok - so your sitemaps/items look alright, but thereā€™s one thing missing from teh Chart line in the sitemap -the ā€œserviceā€ option. Add it so that your Chart knows which persistence service to use. Itā€™s described here: https://www.openhab.org/docs/configuration/sitemaps.html#element-type-chart and you need it for your specific case when running more than one persistence service (mapdb and rrd4j). Just add a service=ā€œrrd4jā€ to your Chart line and see what happens!

Also - are you definitely getting good values in your items from the Kube sensor? I.e. if you add those Number items to your sitemap - do you see temperature/humidity values?

BK do you have a PDF instructions for this? I think I want to try this but instead of using a case designing it to fit into a wall box with wall plate so its less noticeable in a room. Is there any way to dim or turn off the screen at night?

@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.

https://pastebin.com/dEU1tMeq

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.