Emoncms.org Email Reports

Hello @TrystanLea

There are no changes? How to receive mail sending?

Thanks.

Hi @TrystanLea,

Following all notes, when i test php module, show error on line 70 in ‘weekly-cron.php’

pi@emonpi(rw):Modules$ php /var/www/emoncms/Modules/emailreport/weekly-cron.php >> /var/log/emoncms/emailreport.log
PHP Fatal error:  Call to a member function fetch_object() on boolean in /var/www/emoncms/Modules/emailreport/weekly-cron.php on line 70

Content of Line 70 is:

$result = $mysqli->query("SELECT * FROM emailreport");
while($row = $result->fetch_object()) {

but i can not see table ‘emailreport’ on emomcms database.

Database changed
mysql> show tables;
+-------------------+
| Tables_in_emoncms |
+-------------------+
| app_config        |
| dashboard         |
| feeds             |
| graph             |
| input             |
| multigraph        |
| rememberme        |
| schedule          |
| users             |
+-------------------+
9 rows in set (0.00 sec)

In another hand , symlink failed because File exist.

pi@emonpi(rw):Modules$ ln -s /home/pi/emailreport/emailreport-module /var/www/emoncms/Modules/emailreport
ln: failed to create symbolic link ‘/var/www/emoncms/Modules/emailreport/emailreport-module’: File exists

My apologies but may be procedure is not so clear for my. :frowning: Can you help me?

The command will only work once, then if you try it again it will fail as the symlink is already there, that’s expected and most likely good news as it strongly suggests the symlink is in place.

Have you used the “Update & check” button from the admin page in emoncms since adding the symlink? The “emailreport” table needs adding to the database before it will work.

do we have a walk through guide on how to enable and set this up on an emonpi?

+1, just want to find out if there has been any further development towards getting email reports working on emoncms base installations (not emoncms.org)?

1 Like

I dont think so, this module has not changed really in 3 years, its probably not too difficult to fix, probably needs updating to link in with update swift mailer class here emoncms/email.php at master · emoncms/emoncms · GitHub

Im not likely to get a chance to look at this for a while though unfortunately.

I’ve created an issue to keep track of this here: Fix & test on standard emoncms installation · Issue #6 · emoncms/emailreport · GitHub

BTW: It’s been a while since I last receive an email report from emoncms.org
Is something wrong on my side?

Regards

Sorry about this @Jujonet, this is now fixed. There was a file permission issue resulting from the recent server migration.

Very welcomed!!!

1 Like

Hi folks,

I am new to this community but have started to work with OEM. Thanks for the great work that is being done in this space. Before I get too far into it I am wanting to understand if anyone has / is it possible to modify the email report code to set up and email for various data feeds in emoncms?

I would like to be able to pull heat meter and electricity meter data and email it monthly.

Thanks in advance.