Other Projects

My Smart house abd home dashboard

17 4072
Edited by destroyedlolo at Tue Jul 7, 2015 10:38

Hello,

Here a small presentation of the "smart house project" I'm working on. All is home made and all is open source : more information and links on my French web site

At the beginning, I created a monitoring tool ala "Nagios" but w/ the goal to be resource conservative. This tool, named Domestik, runs on my basement BananaPI and is wrote in PHP, Lua and is using a PosgreSQL database and uses intensively REST webservice for its communication.
The problem is such architecture is good for a central monitoring solution, data archiving or such, but not to spread data among several "monitors".

As I'm currently deploying a 1wire Network (the information on this page), I kept Domestik for computers monitoring and house data archiving, but I moved live data to an MQTT  network.

It conduct to the following architecture :


The heart of the network is the well known Mosquitto MQTT broker which is feed by several daemons :
  • Marcel (the rabit icon), which is a general purpose daemon that gatter 1wire data (temperature, humidity, ...), my ISP statistics, UPS figures and will be able to send me SMS alerts in case of it found something wrong.
  • TeleInfod (the little daemon icon), is providing information about my electricity production and consumption.
  • not on the schema, I'm thinking also to drive my rolling shutter

Marcel and TeleInfod are both writen in C, using Paho library to publish data.

On the uper left corner, Domestik as explained before.

All of above components are running on my basement BananaPI, under Gentoo/Linux which is acting as web server + network head (DHCP, NTP, name server, media server, file server, ...). As I already said several time on this forum (and on others ), I'm very happy with this little beast as it is serving well all those duties for almost 1 year, with an average of 1.5w consumption and with a CPU of about 0.1 to 0.2 !! Rooms for many other things

On the lower left corner, several monitoring clients :
  • some Conky scripts to display information on PC desktop like in this very simple example (I did more complex one afterward) :
with some explanation here.
  • Currently, I'm working on a "home dashboard", which will run on a BananaPro with an LCD screen which will display home figures in my living room, like temperatures, electricity consumption (my wife will be happy ), weather forcast, ski alerts ... all from the MQTT network.
The technical layer is now finished (MQTT message consuption, low level display handling, ...) and I'm starting to work on the dashboard itself.

If someone is interrested, I'm show how this project is going as reply on this message.

Bye

Laurent
Single Polls, Total 6 Users voted
Your User group have no permission to vote
Hi, some news on my project.

I've put temporary on hold the dashboard itself as I worked on Marcel daemon : now it is capable send SMS if data stop to come on MQTT topics.
For example, with this configuration :
  1. *DPD=Dpd test
  2. Topic=Test
  3. Sample=10
Copy the Code

Marcel is monitoring Test topic and will send an SMS in case data is not received within 10 seconds period. Another SMS is send when the situation is recovered.

The SMS sending method is driven with a dedicated MQTT topic, meaning it is open to external applications. Consequently, even a remote arduino, or an ESP probe, or an other SBC, etc ... can send SMS if they detect a problem.

Next to come, possibility for the user to customize error detection thru Lua addon : like
Aquarium temperature must be b/w 22 & 28 °C otherwise, send an SMS alert.

igorpec  
Nice project!

What kind of display are you using? Get bigger than you thing ;)

I made something similar - an 2.8" 320x200 display and own Python pygame library to display various data - temp inside / outside, clock, humidity and buses around flat that are possible to catch in x minutes

Now thinking to upgrade the display to 7inch, that data can be seen from bigger distance.

Hello,

Thanks for your interest
For the moment, I'm doing my test on a 3''5 display but I'm about to buy a 7'' for the final dashboard.

Bye

Laurent

Hi all,

I'm proud to introduce v3.0 of Marcel : Lua callbacks functions are now working.

As example : lets say we want to monitor our UPS battery charge. We have to :

  • 1- add a new section in Marcel.conf
  1. *DPD=UPS battery charge
  2. Topic=onduleur/battery.charge
  3. Func=UPSBatCharge
Copy the Code

  • 2- create a Lua function like that
  1. function UPSBatCharge( topic, val )
  2.        if val < 20 then
  3.          Marcel.RiseAlert("Battery charge is critical", val)
  4.            elseif val < 50 then
  5.                     Marcel.RiseAlert("Battery charge is low", val)
  6.            else   -- Clear alerts potentially sent
  7.                      Marcel.ClearAlert("Battery charge is critical");
  8.                     Marcel.ClearAlert("Battery charge is low");
  9.           end
  10. end
Copy the Code
Everytime a MQTT message is received on onduleur/battery.charge topic, UPSBatCharge() is called, that will send an SMS when the battery charge goes bellow 50% and then 20%.

As Marcel sends only one message by alert, only one SMS will be send per level.

Enjoy !

PS : Speaking about the dashboard : I have a cheap A13 based tablet on which Android is corrupted (it seems quite common on such devices ). I'm trying to install Linux on it, been able to connect with ADB (but without remote shell working ) and even start it in FEL mode ... but I duno which uboot config to use. If someone can help ?

tkaiser  
destroyedlolo replied at Thu Jul 30, 2015 16:04
I'm proud to introduce v3.0 of Marcel : Lua callbacks functions are now working.

Nice work!

Regarding the tablet: Is it amongst them here? http://sunxi.org/Category:A13_Tablets

tkaiser replied at Fri Jul 31, 2015 09:30
Nice work!

Regarding the tablet: Is it amongst them here? http://sunxi.org/Category:A13_Tablets

Yes, I had a look on SunXi, and but I'm stuck with uboot as it doesn't contain A13-MID definition unlike what the documentation said, only A13_OLINUXINO*.

[OT] YYYYhhahahaaaaaaa, I'm now able to boot on Arch linux on it But it's using precompiled uboot.
Do you know if there is a user mailing list for sunix ? Because I found only developer ML, not for end user question.

tkaiser  
destroyedlolo replied at Fri Jul 31, 2015 10:08
Do you know if there is a user mailing list for sunix ?

None that I'm aware of (me too only knows https://groups.google.com/forum/#!forum/linux-sunxi).

BTW: Since you're the first human being I known that runs Linux on A13 would you mind to try out reading its temperature using "sunxi_tp_temp 1477"?

You can find it here http://www.lemaker.org/thread-8137-3-1.html or already compiled inside this package: http://kaiser-edv.de/downloads/sunxi-monitor.tar.gz ((MD5: 1eff9f2e1ab2ee52fa350d89a4bc6541)

I'll open an [OT] to try to got some support.

No pb to test the temperature (it was on my todo list anyway) : but the road will be long.
I need first to connect an USB keyboard and then ensure kernel modules loads.
But I'll keep U updated.

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

Points Rules