Git Product home page Git Product logo

emailreport's Introduction

Email reports

Weekly energy reports delivered to your inbox.

This module can be used to setup a weekly email report of home consumption and solar generation if you are monitoring solar.

The module is currently installed on emoncms.org and can be found under the Extras tab top-right:

1.png

In the configuration interface you can enter an email title so that you can differentiate between report emails from different emoncms.org accounts such as a home energy monitor account and a office energy monitor account.

Up to 5 email addresses can be entered for work colleagues, family members, friends.

The email generator needs a cumulative kwh consumption feed (and solar if applicable), the same type of feed as used by the emoncms app module:

2.png

Click on 'Send test email' to check that it all works.

The weekly process that runs this at present runs at around 9am on Monday UTC time.

3.png

UK renewable energy To make the emails a bit more interesting there is a section on UK renewable energy in the last week which gives a quick overview of how much solar, wind and hydro was generated.

Setup

Symlink the web part of the emailreport module into emoncms/Modules, if not using Raspberry Pi replace 'pi' with your home folder name:

ln -s /home/user/emailreport/emailreport-module /var/www/emoncms/Modules/emailreport

Crontab:

0 9 * * 1 php /home/user/emailreport/weekly-cron.php >> /var/log/emoncms/emailreport.log

emailreport's People

Contributors

glynhudson avatar pb66 avatar reedy avatar trystanlea avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

emailreport's Issues

email report complains has no enough data, while it has

Hi

Some days ago installe the module in my emonSD running in a Rpi2 following the instructions provided.
Installed swiftmailer and updated&Checked the database.

All seemed to work but I get the following warning:

Not enough days returned in data request 
Warning: Cannot modify header information - headers already sent by (output started at /home/pi/emailreport/emailreport-module/emailreportgenerator.php:51) in /var/www/emoncms/index.php on line 265

Notice: Array to string conversion in /var/www/emoncms/index.php on line 266
Array

If I exectute the script "by hand":

sudo php /home/pi/emailreport/weekly-cron.php

I get the following:

Sending energy update emails
 - Myemoncmsusername
Not enough days returned in data request
 - Myemoncmsusername

For the avoidance of doubt: I have more than 3 weeks of data on the selected feed

Any clue?

Thank you in advance

error accessing emailreport module

when clicking on email report under extras it takes me to a page saying.

Forbidden
You don't have permission to access /emoncms/emailreport/ on this server.

am I doing something wrong ?
Ubuntu 14.04
php 7.2

Total time calculation seems to be incorrect

I just noticed (after receiving the energy usage email reports for many weeks!) that the total time calculation seems to be incorrect. It looks like it uses six days (the number of days between the first and last) rather than seven days (the number of days in the week).

For example, this is from my latest email. Given a total usage of 70.8 kWh I'd expect 70.8 / 7 = 10.1 per day, not 11.8!

Total Use: 70.8 kWh
11.8 kWh per day

I think that that the following two lines are incorrect. I'm not sure what the cleanest fix is (I'll leave that to you unless you'd like a suggestion). Thanks!

$totaltime = ($data[6][0] - $data[0][0])*0.001;

$totaltime = ($use_data[6][0] - $use_data[0][0])*0.001;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.