As recently Blynk developers decided to drop .csv storage and introduce database support, I decided to give it a try, and show here an example of my first attempt to use new database raw storage collected data.
As an introduction, and a few notes:
@Dmitriy recently presented the way to setup a raw storage based on PosgreSQL database as a replacement for quite useless for vast majority of users .csv files. I always wanted to setup a web based dashboard for a typical central heating monitor, which in a hurry i created based on ESP-01 connected with boiler’s COM port used for diagnostic. It’s a REMEHA/DeDietrich which has a well documented protocol, so a monitor was easy for setup. A code is not a mystery (can share to community) but is not a scope of this post.
A mobile, Blynk based dashboard is neat and clear, but it lacked stats. And here comes the raw storage.
A raw storage, as we all know is currently a database. It is a client-server architecture, and can run on the same hardware as local Blynk server. A setup is quite easy, though as it happens with Linux - not always straightforward A database server is queried by pointed by @Dmitriy very nice java based client named Metabase (a link to release: http://www.metabase.com/start/jar.html, a github here: https://github.com/metabase/metabase). It’s easy to setup, nice looking client with plenty of possibilities to show and categorize acquired data. As a java based app, it is able to run on the same hardware as Blynk server. Great? Yeah… not exactly! Currently it uses LOT OF RAM, to the point, that my 512MB RAM OPI One with almost 400MB available memory meet the “Out of heap stack error”. Currently, for testing I just run it on my “daily” Windows machine, where java shows around 345MB of ram used by Metabase. Gonna try to setup it on OPI PC2 with 1GB RAM, when it arrive from far east… Other than that I really LOVE the new possibility to present data to the user. As it seems I’m the first regular user using new raw storage, I’m ready to share my experience. For now just want You to show the results:
A Blynk dashboard:
And a web stats dashboard:
Nice, heh? And so easy… Good enough till developers introduce a native web dashboard, at lest for me