@Jon I like your idea of putting a tutorial on how people built there dashboard, so here goes.
REMEMBER TO MAKE YOUR CARD WRITEABLE BEFORE MODIFYING ANYTHING. >>> “rpi-rw”
First you need to get access to the files on your server, as I have a emonpi i install an FTP server:
$ sudo apt-get install vsftpd
$ sudo nano /etc/vsftpd.conf
CHANGE THE FOLLOWING OPTIONS…
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
$ sudo service vsftpd start
You can now FTP to your emonpi. remember to use port 22 using the same username and password as your SSH session.
I install PHPMYADMIN as its a really good package and if you want to make any changes to the SQL database it is super easy
$ sudo apt-get install phpmyadmin
$ sudo nano /etc/apache2/apache2.conf >ADD> Include /etc/phpmyadmin/apache.conf
$ sudo /etc/init.d/apache2 restart
One thing I recommend is restricting the access to the phpmyadmin by the config file, attached is a copy of my config file, this is located in /etc/phpmyadmin
Everything on the dashboard will be here…
/var/www/emoncms/Modules/dashboard/
Everything in the “widgets” dropdown menu will be in this location…
/var/www/emoncms/Modules/dashboard/widget
Everything in the “text” dropdown menu will be in this location…
/var/www/emoncms/Modules/dashboard/Views/js/widgetlist.js
Remember that you will need to setup the output html, IE size, bold, etc, etc
/var/www/emoncms/Modules/dashboard/Views/js/widget.css
A few posts recently have been on the update rate of the dashboard, this can be a problem if you host emoncms and the default update rate is 30 seconds. The following will enable you to change the rate to update, NOTE if you are using the public server, provided FOC by the team, there is an update rate limit.
/home/pi/emonhub/src/interfacers/EmonHubEmoncmsHTTPInterfacer.py
Update the following line to whatever you want…
‘sendinterval’: 5
Change ‘snap to’ grid size - You can change the pixels size:
$ sudo nano /var/www/emoncms/modules\dashboard\Views\js\designer.js
Replace:
‘snap’: function(pos) {return Math.round(pos/designer.grid_size)*designer.grid_size;},
With:
‘snap’: function(pos) {return Math.round(pos/5)*5;},
Attached below is a copy of the widgets and phpmyadmin apache config file
Backup emoncms.zip (7.4 KB)
Oh I should upload my sketches really…
emonPi - emonPi_RFM69CW_RF12Demo_DiscreteSampling.ino (19.6 KB)
emonTx - emonTxV3_4_DiscreteSampling_Node8.ino (25.8 KB)
The changes are for providing current, power factor and zeroing small wattages on the PV inverters while they are not generating.
emonhub.conf - emonhub.txt (7.1 KB)