Herbaldew wrote:Can one make the popup graphs work on the CMX interface (running on rPi)?
I now have pop up graphs on my interface
First iteration...I did a full web site setup on my rPi with Apache, PHP, JpGraph and Mark's files. I then went through the trouble of converting my customized interface gauges page to work on the Apache server and changed all the links in my interface pages to link the the gauges page on the Apache server. This worked, but even with the realtime rate set at 2 seconds, the gauges still weren't as close to real time as the interface's built in gauges page. Then I had a thought - what would happen if I changed the imgPathURL line in the interface's gauges.js file to link to Mark's files on the Apache server? It worked! So I now have my gauges running with the speed of the interface plus they now have pop up graphs.
Second iteration...lightened the load...I installed Apache2 and PHP. My /var/www/html folder only has an images folder with just Mark's JSON files in it and the JpGraph folder. CumulusMX is uploading only it's JSON files every five minutes so little extra overhead. I did change the graphs update time to 5 minutes...with the 15 minute default graph update time, I guess you could upload the JSONs every 15 minutes so even less over head. On a side note I thought that the 2,449 and 13 folders in the v4.2.0 JpGraph file was a bit much for what was being done here. I have wittled that down to 29 files and 1 folder and that includes the two fonts that needed to be added.
For the imgPathURL: I had to use the IP of my rPi for it to work, localhost would not. So in my case: 'http://192.168.xxx.xxx/images/'.
The needed JpGraph files if anyone is interested:
Code: Select all