[Visualization] Charts for SensorValuesLogging Module

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

[Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 01 Mar 2015 02:54

Ok, here is my the very first try as a developer for wonderful RaZberry platform, maybe it will be usefull for someone else.
I use logging module for testing purposes and made a simple visualization for it. Let's name it Z-Charts :) .
At the moment the code is not optimized, just a working draft.

How it works.
The Z-charts scans for all currently running sensor logging modules and displays values from them as charts .
You can find and set-up logging module in HomeAutomation UI/Modules/Data Logging/SensorValueLogging.
It tested with 2.0.1-rc16 and Chrome browser.

What you can do with it
  • You can see charts ;)
  • Save Logs to local file on comuter (name generated automatically, saved to your default directory)
  • Open Logs from local file on your computer
  • Select time range for Chart (minimum and maximum times generated automatically)
  • Move with slider to any position in time
  • Scale with slider
  • Open 'raw' JSON log for sensor
  • Reset log file
How to install it
Just copy content of archive to /opt/z-way-server/htdocs/ (or where your z-way is installed)
And go to http://[your RaZberry IP]/user/charts/
That's all!

Update 0.0.1
Added Binary Sensor Chart, Scale slider.

Update 0.0.2
Added DatePicker, Save/Load Log, Some statistic info.
Attachments
RazBerry Charts_3.jpg
RazBerry Charts_3.jpg (125.7 KiB) Viewed 9569 times
razberry-charts-0.0.2.zip
(355.7 KiB) Downloaded 651 times
Last edited by dolpheen on 03 Mar 2015 14:51, edited 2 times in total.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [Visualization] Charts for SensorValuesLogging Module

Post by pz1 » 01 Mar 2015 10:26

Interesting module.
  • It raises the question where these [userModules] that produce graphic output should be stored in the overall architecture. That location should 'survive' upgrades.
  • It is also nice because it gives added value to the SensorValueLogging module. I am defnitely interested, as I may use it with the PVlogger that I am working on.

dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: [Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 01 Mar 2015 11:17

A rich RaZberry API provide a great possibilities of visualization - for ex. I'd like to experiment with Metro UI style dashboard where I could arrange info and controls in any way I prefer. Or what about SNAP! for RaZberry? http://snap.berkeley.edu/ :)
For me, it would be a good thing that 'modules' not only could include JS code but also Visualization with great HTML technologies, some kind of 'plugins' that could be accessed from HA or Expert UI after installation .
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [Visualization] Charts for SensorValuesLogging Module

Post by pz1 » 01 Mar 2015 11:31

Indeed snap and blockley are interesting concepts. IIRC Zipato and Fibaro do use such approaches. Especially for a rule editor they give a compact and easy to read format.

dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: [Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 01 Mar 2015 11:43

Thank you for the Blockley link - I wasn't aware of it, I see it's more affordable for integration than SNAP.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: [Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 02 Mar 2015 01:21

Update 0.0.1
Improved code optimization.
Descrete charts type changed to continuos type , when every logged value is shown from history.
Added binary sensor type (0n - 1, Off - 0)
Added scale slider.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [Visualization] Charts for SensorValuesLogging Module

Post by pz1 » 02 Mar 2015 15:16

I just submitted feature request #226 for a "persistent" user directory under htdocs.

dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: [Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 02 Mar 2015 21:31

pz1 wrote:I just submitted feature request #226 for a "persistent" user directory under htdocs.
Ok, great.
And here is a Metro UI prototype I talked about. (inspired by Metro CSS framework)
Attachments
RaZberry Metro UI_2.png
RaZberry Metro UI_2.png (275.02 KiB) Viewed 9610 times
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [Visualization] Charts for SensorValuesLogging Module

Post by pz1 » 02 Mar 2015 23:01

Wow, looks great!

dolpheen
Posts: 119
Joined: 10 Feb 2015 00:38

Re: [Visualization] Charts for SensorValuesLogging Module

Post by dolpheen » 03 Mar 2015 14:54

My Logs getting bigger :)
So, added DatePicker and ability to save/load logs locally, also some statistic info added.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest