PVOutput widget module



  • I was wondering if it would be possible to show my generated solar panel output on MM and found out my favorite output aggregator pvoutput serves tiny widgets that satisfy my needs. The problem is, these widgets make extensive use of javascript and seem to clash with MagicMirror functionality when loaded in a

    but works when loaded as separate page using iframe (which I serve from /public folder).

    So, my personal need is satisfied, but if I wanted to share my effort with the community, the iframe method is not very customizable because I can’t access the systemid via http GET very easily (I know there is window.location work-around). Could anybody shed some light why the pvoutput widget code doesn’t work in a

    ?

    As far as I understand it, the graph makes use of jquery.sparkline to draw the graph and loads jquery 1.5.2 ondemand via widget/inc.jsp. Can dynamically loaded javascript be evaluated this way in the first place?



  • Ok, so I put up my tin-foil hat and created a real (no widget in iframe) MagicMirror module for PVOutput.org.
    It’s not tested for multiple instances of the module, pull requests are welcome.

    https://github.com/mrvanes/MMM-PVoutput
    0_1482330013918_pvoutput.jpg



  • @mrvanes Thanks for your great work!I was just what I was looking for. It works perfectly.



  • @skipperskip said in PVOutput widget module:

    ![@mrvanes Thanks for your great work!
    I was just what I was looking for. It works perfectly.]


 

398
Online

6.0k
Users

4.4k
Topics

37.0k
Posts