MMM-Chart - View your graphs on your Mirror


  • Module Developer

    Description:

    This Module adds graphs to your MagicMirror 2.1 using your JSON source(s) from a URL.
    It’s built upon the chartjs “ecosystem”.

    I’m currently using small PHP scripts to pull information from my own “house-database” and then let PHP create the JSON string form the data. :) You have to provide your own “data-source” of course. :)

    There are A LOT of configuration options in this module. I will update the README on git later on. But if you want to know more, just read the MMM-Chart.js. I have tried to document it fairly well.

    The source can be either a table of values for like this (updating the whole graph on every update):

     [["2017-04-21 15:58:00",8.3,95.5],["2017-04-21 14:55:00",9.3,90.5],["2017-04-21 12:56:00",10.7,87.7],["2017-04-21 11:53:00",10.5,87.7],["2017-04-21 11:01:00",10.6,88.8]]...
    

    That will give something like this:

    Screenshot:

    Two Line Graph
    Or you can use a “real time” source looking something like this (adding values to the graph on every update):

    [["2017-04-21 15:58:00",48.3,95.5,31]]
    

    Screenshot:

    Both together looks like this (video):

    Download:


    Version 1.0

    • Initial release.

    This is a work in progress…
    OBS: I have not yet tested this module on my RPI!!
    Please come with feedback/PR:s Let me know how it works.

    The idea was triggered from the “dynchart module” by Chris van Marl. Thank you!



  • That looks really good. I log my sense hat readings to a file on my pi. Would it be possible to use your module to read that data?


  • Module Developer

    @d3r Hi! Thank you. Not directly, but if you build a script (maybe in node or in PHP) that parse the file and present the data in the form of JSON, it is possible.


  • Module Developer

    Hi all! I finally tried out the Chart module on a RPi3 (Jessie Lite install) with the latest MM2. But I can’t get the graphs to show. Is there anyone out there using my module who have it working?
    The charts work fine in Chrome or Firefox on another machine… That’s how I developed the module. :)


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.