Other Projects

Banana Pi + CT Ewell Case (Part 5 - Monitoring)

1 5463
Edited by actkk2000 at Fri Dec 26, 2014 14:37

This is an update to http://forum.lemaker.org/thread- ... art_4_lapdock_.html

Due to this post from tkaiser I decided to improve temperature monitoring by following his advices:
http://forum.lemaker.org/forum.p ... 37&fromuid=1602

According to previous researchs the value considered as CPU temp is wrong and needs a calibration before to be considered as correct, and for that a change of strategy:
http://www.cubieforums.com/index ... 16202.html#msg16202
Despite the conclusions, I believe it is great and worthy info about temperature on Banana Pi.

I was noticed about his info here: http://forum.lemaker.org/forum.p ... 47&fromuid=1602
Then I followed his instructions and adapted his programs to my needs. He posted this info for Bananian but it works on Raspbian 3.1 as well.

See more useful posts from tkaiser on the Network and servers section:
http://forum.lemaker.org/forum.p ... 02&fromuid=1602
http://forum.lemaker.org/forum.p ... 12&fromuid=1602
http://forum.lemaker.org/forum.p ... 07&fromuid=1602

First to do was to add a program to save on two different files the real CPU temperature and the internal Hard drive temperature, and make a daemon of it:
http://pastebin.com/43z1Z9gy

Then I installed the new version of RPI-Monitor followint these instructions:
http://rpi-experiences.blogspot. ... 9-is-available.html
I was very careful during install when asked to replace config files and asnwered "NO"

Also I edited "/etc/rpimonitor/template/raspbian.conf" and add dynamic info for temperatures and power measurement according to the specified parameters from here:
http://pastebin.com/75xwjZQA
http://pastebin.com/Mr8dnYdN
http://pastebin.com/Sn8UKxHT

From there I found useful the values for "hddtemp", "cputemp", "pmu_ac_voltage", "pmu_ac_current", "pmu_ac_consumption" and left "soc_temp" as pmu temperature.
I decided to re-sort some values and put all together on the same config file to watch it on just one screen. Power also modified to show values in Watts (W), not mW.

I added a Consumption section to show power values with a nice battery icon provided by tkaiser:
http://www.apkdad.com/wp-content ... 1/Battery-Icon1.png
  1. web.status.1.content.4.name=Consumptiom
  2. web.status.1.content.4.icon=PMU.png
  3. web.status.1.content.4.line.1="Power: <b>" + data.pmu_ac_consumption + " W</b> Voltage: <b>" + data.pmu_ac_voltage + " V</b> Current: <b>" + data.pmu_ac_current + " mA</b>"
Copy the Code
To display temperatures I replaced the old values with these using the new "JustGageBar" colorful feature:
  1. web.status.1.content.5.line.1=JustGageBar("CPU", "*C",0, data.cputemp , 100,100,80,percentColors,50,60)+" "+JustGageBar("PMU", "*C",0, data.soc_temp , 100,100,80,percentColors,35,45)+" "+JustGageBar("Disk", "*C",0, data.hddtemp , 100,100,80,percentColors,45,50)+" "+JustGageBar("Room", "*C",0, data.room_temp , 100,100,80,percentColors,35,45)+" "+JustGageBar("Humidity", "%",0, data.room_hum , 100,100,80,percentColors,60,80)
Copy the Code
The advantage of "JustGageBar" feature is the limits and thresholds can be defined accordingly.

Then I modified the Python LED display program to read real CPU temperature, PMU temperature and also HDD temperature. CPU and HDD are shown together when the program starts. CPU and HDD temperatures are displayed every ten minutes, CPU when minutes end on "0" (0, 10, 20, 30...) and HDD when minutes end on "5" (5, 15, 25, 35...)

Unfortunately I noticed that "DHT11" process sometimes started to use to much processor, with values around 100% for one core.
That forced me to develop a limiting program called "dhtcpulimit" to prevent too much use from "DHT11" process using cpulimit:
http://www.howtoforge.com/how-to ... mit-on-ubuntu-linux

Finally I had to add to "Monit" more of these daemons and files to enhance monitoring, because of all activity somethimes programs crash and need to be restarted.

Here the screenshots of RPI-Monitor and Monit on the updated version (click to enlarge):



And a couple of videos showing the LED display with HDD info, and including RPI as well (click to play):



But this wouldn't be really a post related to "cases" if there are no cases involved...
That's why I want to include a couple of bonus material that I have reserved...

The first one is related to an article on http://www.bananapi.org/ where my work with CT Ewell case is mentioned on front page:
http://www.bananapi.org/2014/11/ ... -own-banana-pi.html



Needless to say that I'm really flattered, and I believe that they really nailed it by calling me "enthusiastic user"
Thank you very much bananapi.org!

And for the end, a second (and shocking?) bonus material...
Do you remember that I started with Banana Pi due to my Cubietruck didn't work anymore?
Well, great news! Now it is working!!

Yeap, as you heard it... I managed to recover it and now is fitting a purpose!
Although during a brief moment it shared room with Banana and Raspberry Pi, now it is working as "something else"...
If you don't believe me, see it for yourself (click to enlarge):



Click to play video:


The whole (and unbelievable true) story is told on these posts from http://www.cubieforums.com :
http://www.cubieforums.com/index ... 20747.html#msg20747
http://www.cubieforums.com/index ... 20771.html#msg20771
http://www.cubieforums.com/index ... 20835.html#msg20835
http://www.cubieforums.com/index ... 20836.html#msg20836

And the cases?
OK, the first bonus is a "case of self-pride" and the second bonus is a "miracle case"
Hope you have enjoyed!

Thanks for reading and until next time!

You have to log in before you can reply Login | Sign Up

Points Rules