tag:blogger.com,1999:blog-573184945135512804.post4291839186718196313..comments2024-03-01T08:36:11.376+01:00Comments on RPi-Experiences: RPi-Monitor: Use a DHT11 or DHT22 humidity and temperature sensorX@vhttp://www.blogger.com/profile/12860630541816241486noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-573184945135512804.post-61446068964661350972014-05-15T22:16:48.070+02:002014-05-15T22:16:48.070+02:00Thanks for your reply. I solved it somehow by foll...Thanks for your reply. I solved it somehow by following your example. This is my configuration:<br /><br />dynamic.17.name=pressure<br />dynamic.17.source=bmp085<br />dynamic.17.regexp=Pressure (\S+)<br />dynamic.17.postprocess=<br />dynamic.17.rrd=GAUGE<br /><br />dynamic.18.name=humidity<br />dynamic.18.source=nice -20 loldht 7<br />dynamic.18.regexp=Humidity = (\S+)<br />dynamic.18.postprocess=$1/1<br />dynamic.18.rrd=GAUGE<br /><br />dynamic.19.name=temperature<br />dynamic.19.source=bmp085<br />dynamic.19.regexp=Temperature (\S+)<br />dynamic.19.postprocess=$1/1<br />dynamic.19.rrd=GAUGE<br /><br />web.statistics.1.content.9.name=PC Room<br />web.statistics.1.content.9.graph.1=humidity<br />web.statistics.1.content.9.graph.2=pressure<br />web.statistics.1.content.9.graph.3=temperature<br />web.statistics.1.content.9.ds_graph_options.humidity.label=Hum (%)<br />web.statistics.1.content.9.ds_graph_options.pressure.label=Bar (hPa)<br />web.statistics.1.content.9.ds_graph_options.temperature.label=Temp (*C)<br />web.statistics.1.content.9.ds_graph_options.humidity.yaxis=1<br />web.statistics.1.content.9.ds_graph_options.pressure.yaxis=2<br />web.statistics.1.content.9.graph_options.y1axis={ position: "right", min: 0, max: 100 }<br />web.statistics.1.content.9.graph_options.y2axis={ position: "left", min: 0, max: 1150 }<br /><br /><br />Thanks again and keep up good work. Anonymoushttps://www.blogger.com/profile/02221650224464603906noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-3357600808159949312014-05-15T22:09:04.102+02:002014-05-15T22:09:04.102+02:00RPi-Monitor is fully configurable. Each configurat...RPi-Monitor is fully configurable. Each configuration is different and have his specificity. It is not possible to provide a configuration for each situation.<br />Nevertheless, to reach you objective, I would advise you to read carefully this article and try to reproduce what is described here sharply. Once this will work, you will have enough knowledge to update and customize your configuration file to your wishes. X@vhttps://www.blogger.com/profile/12860630541816241486noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-76522356560943069312014-05-14T13:58:18.434+02:002014-05-14T13:58:18.434+02:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/02221650224464603906noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-4582644133137083842014-05-14T13:50:57.623+02:002014-05-14T13:50:57.623+02:00Dear Xavier,
first of all, thank for sharing your...Dear Xavier,<br /><br />first of all, thank for sharing your work with us. I am not a programmer just a computer enthusiast. I am trying to do something...easy I think but due to lack of knowledge I stuck. I want to graph 3 sources on the same graph (I have a BMP085 sensor connected to a Pi), Temp, Hum and Pressure. The problem is the value of the barometric pressure which is hundred of times higher that the temperature and humidity and can't be represented on the same axis without jeopardizing the other two. I want to transfer the Pressure values on the left vertical axis of the graph table but...I don't know how! I have tried several things but no luck. Could you please help me ?<br /><br />Thanks in Advance!Anonymoushttps://www.blogger.com/profile/02221650224464603906noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-30291388825472340042014-05-11T10:44:43.685+02:002014-05-11T10:44:43.685+02:00The following bash script helped me about this pro...The following bash script helped me about this problem:<br /><a href="https://github.com/gajdipajti/munin-rpi-temp/blob/master/rpi-dht-sensor_" rel="nofollow">https://github.com/gajdipajti/munin-rpi-temp/blob/master/rpi-dht-sensor_</a><br />:-)Sancho Muzaxhttps://www.blogger.com/profile/04047843071149703333noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-57675224326892641792014-05-10T12:02:34.967+02:002014-05-10T12:02:34.967+02:00Try to record the temperature and humidity reading...Try to record the temperature and humidity readings in a file with check writing the correct value, and then add the file to the chart.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-31284601468669750632014-05-10T12:00:53.078+02:002014-05-10T12:00:53.078+02:00I often answer to such a question...
You will now...I often answer to such a question... <br />You will now find the answer into the FAQ page.X@vhttps://www.blogger.com/profile/12860630541816241486noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-25871724202612925472014-05-10T08:18:30.580+02:002014-05-10T08:18:30.580+02:00What is the problem with sampling? It's common...What is the problem with sampling? It's common for an undefined value. I have DHT11.<br />Screnshot from graph:<br /><a href="http://dl.dropbox.com/u/3577295/Kijel%C3%B6l%C3%A9s_015.png" rel="nofollow">http://dl.dropbox.com/u/3577295/Kijel%C3%B6l%C3%A9s_015.png</a>Sancho Muzaxhttps://www.blogger.com/profile/04047843071149703333noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-89217584935365943042014-02-17T18:22:22.251+01:002014-02-17T18:22:22.251+01:00This comment has been removed by the author.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-39041448668978784842014-02-17T15:35:29.641+01:002014-02-17T15:35:29.641+01:00Alezxxx when I try to run your script this is what...Alezxxx when I try to run your script this is what I get:<br /><br />"pi@raspberrypi ~ $ ./humid.out <br /> File "./humid.out", line 8<br /> output = subprocess.check_output(["./Adafruit_DHT", "22", "4"]);<br /> ^<br />IndentationError: expected an indented block"<br /><br />Already tried with sudo and the result is the same.<br /><br /><br />When I run: sudo ./Adafruit_DHT 22 4<br />Using pin #4<br />Data (40): 0x2 0x17 0x0 0xa9 0xc2<br />Temp = 16.9 *C, Hum = 53.5 %<br /><br />The results are ok, but if I try to run without sudo this is what I get:<br />"bcm2835_init: Unable to open /dev/mem: Permission denied"<br /><br />What I'm doing wrong?<br />Hope you can help me.<br />Thanks.Morcegolashttps://www.blogger.com/profile/16210705021851469937noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-57480413043627602392014-02-17T13:52:09.896+01:002014-02-17T13:52:09.896+01:00On the basis of all of the above I was able to do ...On the basis of all of the above I was able to do so. Everything works.<br /><br />dynamic.16.name=humidity<br />dynamic.16.source=/home/pi/humid.out<br />dynamic.16.regexp=Hum = (\S+)<br />dynamic.16.postprocess=<br />dynamic.16.rrd=GAUGE<br /><br />dynamic.17.name=temperature<br />dynamic.17.source=/home/pi/humid.out<br />dynamic.17.regexp=Temp = (\S+)<br />dynamic.17.postprocess=<br />dynamic.17.rrd=GAUGE<br /><br /><br />web.statistics.1.content.9.name=Temperature & Humidity<br />web.statistics.1.content.9.graph.1=humidity<br />web.statistics.1.content.9.graph.2=temperature<br />web.statistics.1.content.9.ds_graph_opts.humidity.label=Humidity (%)<br />web.statistics.1.content.9.ds_graph_opts.temperature.label=Temperature (*C)<br />web.statistics.1.content.9.ds_graph_opts.humidity.yaxis=1<br />web.statistics.1.content.9.ds_graph_opts.temperature.yaxis=2<br />web.statistics.1.content.9.graph_opts.y1axis={ position: "right", min: 0, max: $<br />web.statistics.1.content.9.graph_opts.y2axis={ position: "right", min: 0, max: $<br /><br />Script that writes data to a file:<br />#!/usr/bin/python<br /><br />import subprocess<br />import re<br />import sys<br /><br />while(True):<br /> output = subprocess.check_output(["./Adafruit_DHT", "22", "4"]);<br /> f1 = open("humid.out", 'w')<br /> f1.write (output)<br /> f1.close()<br /> print output<br /> matches = re.search("Temp =\s+([0-9.]+)", output)<br /> if (not matches):<br /> time.sleep(2)<br /> continue<br /> temp = float(matches.group(1))<br /> matches = re.search("Hum =\s+([0-9.]+)", output)<br /> if (not matches):<br /> time.sleep(2)<br /> continue<br /> humidity = float(matches.group(1))<br /> sys.exit()Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-32945494955455378602014-02-06T17:15:10.946+01:002014-02-06T17:15:10.946+01:00Xavier, I edit the /etc/rpimonitord.conf/default.c...Xavier, I edit the /etc/rpimonitord.conf/default.conf and added this:<br /><br />'dynamic.17.name=humidity<br />dynamic.17.source=Adafruit_DHT 2302 4<br />dynamic.17.regexp=Hum = (\S+)<br />dynamic.17.postprocess=<br />dynamic.17.rrd=GAUGE'<br /><br />and this:<br /><br />'web.statistics.1.content.8.graph.3=humidity<br />web.statistics.1.content.8.ds_graph_options.humidity.label=Humidity (%)<br />web.statistics.1.content.8.ds_graph_options.humidity.yaxis=2<br />web.statistics.1.content.8.graph_options.y2axis={ position: "right", min: 0, max: 100 }'<br /><br />But know when I go to Statics in Rpi-monitor it gimes me the following error:<br /><br />'File stat/null.rrd is not a valid RRD archive!'<br /><br />note that I used 'dynamic.17.source=Adafruit_DHT 2302 4' instead of Adafruit_DHT 11 27<br /><br />Hope you can help me.Morcegolashttps://www.blogger.com/profile/16210705021851469937noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-19768425077318741492014-02-06T16:37:09.178+01:002014-02-06T16:37:09.178+01:00Alright, I installed like the tutorial link above ...Alright, I installed like the tutorial link above and copied to /usr/bin, now it works in terminal, I just have to write:<br />'sudo Adafruit_DHT 2302 4' instead of 'Adafruit_DHT 2302 4', don't know why I need sudo...Morcegolashttps://www.blogger.com/profile/16210705021851469937noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-15808643191056322672014-02-06T16:23:19.634+01:002014-02-06T16:23:19.634+01:00Hello Xavier, when I try to test Adafruit_DHT it s...Hello Xavier, when I try to test Adafruit_DHT it says: sudo: Adafruit_DHT: command not found<br />First I run:<br />wget http://goo.gl/oadpl -O Adafruit_DHT<br />sudo cp Adafruit_DHT /usr/bin/<br /><br />Do I need to chmod Adafruit_DHT?<br /><br />ThanksMorcegolashttps://www.blogger.com/profile/16210705021851469937noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-8357840889685105062014-01-08T05:33:49.654+01:002014-01-08T05:33:49.654+01:00Everything worked perfectly, thanks Xavier.Everything worked perfectly, thanks Xavier.Samhttps://www.blogger.com/profile/12424283054418900068noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-6787270448085257712013-12-31T17:21:00.665+01:002013-12-31T17:21:00.665+01:00Hello Xavier!
Thank you for your RPI monitor, its...Hello Xavier!<br /><br />Thank you for your RPI monitor, its awesome, but something is not working for me. <br /><br />Well the DHT22 is works fine i get temperatures. But the graph is wrong, i can't do the same like your. This is my config and graph:<br /><br />https://dl.dropboxusercontent.com/u/13922338/Screen%20Shot%202013-12-31%20at%2017.18.07.png<br /><br />All i want same the cpu temperature or your graph, but i can't fix that. :(<br /><br />Best Regards,<br />SzergelyUnknownhttps://www.blogger.com/profile/02023614482033535286noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-36055078112151690292013-12-20T23:17:09.033+01:002013-12-20T23:17:09.033+01:00Hello,
I didn't design rpimonitor to read mor...Hello,<br /><br />I didn't design rpimonitor to read more than one postprocess line and I don't know how it will behave if more than one.<br /><br />Cheers,<br /><br />XavierX@vhttps://www.blogger.com/profile/12860630541816241486noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-13364343622777833772013-12-20T17:00:33.654+01:002013-12-20T17:00:33.654+01:00Xaiver:
This is a great tool, thanks for pulling ...Xaiver:<br /><br />This is a great tool, thanks for pulling it together.<br /><br />The DHT22 has an issue where it returns bad data if you query it too often. To work around that, I've created a script that queries the sensor once for temperature and humidity and then appends it to a file. The script is executed by cron on a periodic basis.<br /><br />I then configured rpimonitor to read that file for the values as follows:<br /><br /> dynamic.17.name=ambient_humid<br /> dynamic.17.source=/home/pi/humid.out<br /> dynamic.17.regexp=Hum = (\S+)<br /> dynamic.17.postprocess=<br /> dynamic.17.rrd=GAUGE<br /><br /> dynamic.18.name=ambient_temp<br /> dynamic.18.source=/home/pi/humid.out<br /> dynamic.18.regexp=Temp = (\S+)<br /> dynamic.18.postprocess=($1*1.8)+32<br /> dynamic.18.rrd=GAUGE<br /><br />Collection and graphing seem to be working as I expect, but I'm curious as to what method rpimonitor uses to read a file. <br /><br />If I'm reading the code right, sub Process() in package Monitor handles this. It looks to me as though it iterates through all lines in the data file and will write each value into the RRD. However, when I dump the rrd, I see far fewer datapoints than I'd expect if it were doing that. Instead, rpimonitor looks as though it is looking at the last line in the file only. (Which is what I want it to do.)<br /><br />Can you shed some light on this? Does rpimonitor read all lines and aggregate the data, or does it just read the last?<br /><br />Thanks.AlecIshttps://www.blogger.com/profile/08860658761475647478noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-45161995419578773522013-12-17T22:00:57.296+01:002013-12-17T22:00:57.296+01:00Ok here is how I solved the problem:
web.statistic...Ok here is how I solved the problem:<br />web.statistics.2.content.3.graph_options.yaxis={min: 3, max: 5}<br />This prevents it from auto-scaling the y-axis.<br /><br />Cheers<br />HarryMehttps://www.blogger.com/profile/11866654435738558923noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-40051038089968196242013-12-13T22:48:48.989+01:002013-12-13T22:48:48.989+01:00Hi Xavier,
first I would like to thank you for th...Hi Xavier,<br /><br />first I would like to thank you for this great tool! <br />It took me a bit of tinkering but now I got it (mostly) to show what I want.<br /><br />There is one thing that I would like to correct: I am reading information from a remote sensor into a file. Among other I read the voltage of the battery in form of a number like 115. Then I calculate the voltage 115*0.02+1 (3.3V) this value is stored in the database.<br />dynamic.24.name=voltage<br />dynamic.24.source=/home/pi/script/sensor.txt<br />dynamic.24.regexp=/(.*?)/(.*?)/(.*)<br />dynamic.24.postprocess=$3*0.02+1<br />dynamic.24.rrd=GAUGE<br />The status page shows 3.3 which is correct but the statistic page shows values like:<br />3.3000000000000007<br />3.2999999999999994<br />Is there a way to correct this?<br /><br />Cheers <br />Harry<br />Mehttps://www.blogger.com/profile/11866654435738558923noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-66517692111749512802013-11-05T21:02:04.262+01:002013-11-05T21:02:04.262+01:00Solved:
dynamic.21.regexp=Temp =<--!!ADD TWO S...Solved:<br /><br />dynamic.21.regexp=Temp =<--!!ADD TWO SPACES HERE!!-->(\S+)<br /><br />So, the line should be:<br /> <br />dynamic.21.regexp=Temp = (\S+)<br /><br />And only ONE space for Humidity line:<br /><br />dynamic.22.regexp=Hum = (\S+)<br /><br />Take care!XGtele.comhttps://www.blogger.com/profile/05958896503031935413noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-60379805263104482782013-11-04T21:54:05.888+01:002013-11-04T21:54:05.888+01:00Nothing obvious...
I would advise to read upper co...Nothing obvious...<br />I would advise to read upper comments about perl command to check the regular expression and to have a look to the sample files in github like https://github.com/XavierBerger/RPi-Monitor/blob/master/rpimonitor/custo.confX@vhttps://www.blogger.com/profile/12860630541816241486noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-61726186032399369142013-11-04T05:17:37.836+01:002013-11-04T05:17:37.836+01:00Here is my config:
dynamic.21.name=t5
dynamic.21...Here is my config:<br /><br /><br />dynamic.21.name=t5<br />dynamic.21.source=Adafruit_DHT 2302 18<br />dynamic.21.regexp=Temp = (\S+)<br />dynamic.21.postprocess=<br />dynamic.21.rrd=GAUGE<br /><br />dynamic.22.name=humidity<br />dynamic.22.source=Adafruit_DHT 2302 18<br />dynamic.22.regexp=Hum = (\S+)<br />dynamic.22.postprocess=<br />dynamic.22.rrd=GAUGE<br /><br />web.statistics.1.content.8.graph.7=t5<br />web.statistics.1.content.8.ds_graph_options.t5.label=t5 (deg C)<br />web.statistics.1.content.8.graph.8=humidity<br />web.statistics.1.content.8.ds_graph_options.humidity.label=Humidity (%)<br />web.statistics.1.content.8.ds_graph_options.humidity.yaxis=2<br />web.statistics.1.content.8.graph_options.y2axis={ position: "right", min: 0, max: 100 }<br /><br />What's wrong with it? XGtele.comhttps://www.blogger.com/profile/05958896503031935413noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-38039079482412868272013-11-03T20:39:56.851+01:002013-11-03T20:39:56.851+01:00Hi Xavier,
I can't put temperature readings f...Hi Xavier,<br /><br />I can't put temperature readings from DHT22 to RPi-mon statistics. My DHT22 (AM2302) are working fine and I am able to get temp and hum data from it:<br />sudo Adafruit_DHT 2302 18<br />Using pin #18<br />Data (40): 0x0 0xd1 0x1 0x2c 0xfe<br />Temp = 30.0 *C, Hum = 20.9 %<br />Can you help me to add both temperature and humidity data from DHT22 to RPi-monitor?<br />XGtele.comhttps://www.blogger.com/profile/05958896503031935413noreply@blogger.comtag:blogger.com,1999:blog-573184945135512804.post-35562847956114421832013-10-24T14:50:44.527+02:002013-10-24T14:50:44.527+02:00Hi Brian,
RPi-Monitor is designed to graph the da...Hi Brian,<br /><br />RPi-Monitor is designed to graph the data extracted. In previous version the behavior of the graph was not reliable since sometime no data were stored in the RRD. Now, it stored the data extracted or unknow, there is no more hole in the RRD.<br />You are experiencing a side effect now and it let me wonder if your previous graph was correct or not... Not sure that the timeline was correct.<br />With a sensor which is not reliable, I would propose to do like this:<br />1/Create a script which is getting the info from the sensor and updating a file when the data is correct.<br />2/Configure Rpi-Monitor to read the information in this file.<br />Like this, if your sensor doesn't send information, the data stored in RRD will be the same as the previous one.<br /><br />I think this will solve your issue.<br /><br />Rgds,<br />XavierX@vhttps://www.blogger.com/profile/12860630541816241486noreply@blogger.com