Watt Eye has a simple purpose - monitor pulses that comes from the home electric meter, measure the interval between the pulses and compute the real-time energy being consumed, broadcast that onto the network using UDP packets so that CouchCalendar has something to do and display, and publish the data to a web server, where it can be used (graphed or placed into a db).

Dependencies:   IniManager mbed HTTPClient SWUpdate StatisticQueue mbed-rtos NTPClient Watchdog SW_HTTPServer EthernetInterface TimeInterface

Features:

  • Reads the time between pulses (which the home electric meter emits as IR for each Watt consumed).
  • Once every 5 seconds, it broadcasts this via UDP to the network, so other nodes can listen to this real-time data.
  • Once every 5 minutes, it posts statistics to a web server for logging.
  • Once a day, it checks the web server to see if there is a SW update (and if so it downloads, installs, and activates it).
  • It syncs to a configured NTP server, but doesn't actually use this information for anything.
  • It hosts a web server, but this is not being used at this time.

So, this is a rather expensive piece of hardware to monitor a single pulse, and yet it is easy to imagine enhancing this:

  • Read the water meter in a similar manner.
  • Read the gas meter in a similar manner.

And even then, there will be many left-over port pins for other uses.

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sat Mar 02 23:15:49 2019 +0000
Parent:
3:5c3ba12d155b
Commit message:
Checkpoint publish before changes.

Changed in this revision

HTTPClient.lib Show annotated file Show diff for this revision Revisions of this file
IniManager.lib Show annotated file Show diff for this revision Revisions of this file
SWUpdate.lib Show annotated file Show diff for this revision Revisions of this file
SW_HTTPServer.lib Show annotated file Show diff for this revision Revisions of this file
TimeInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/HTTPClient.lib	Mon Jan 18 21:50:17 2016 +0000
+++ b/HTTPClient.lib	Sat Mar 02 23:15:49 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/HTTPClient/#d9e2d1c96b75
+http://mbed.org/users/WiredHome/code/HTTPClient/#2ef07232f65c
--- a/IniManager.lib	Mon Jan 18 21:50:17 2016 +0000
+++ b/IniManager.lib	Sat Mar 02 23:15:49 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/IniManager/#57b93035ad82
+http://mbed.org/users/WiredHome/code/IniManager/#a69c8ec96cb1
--- a/SWUpdate.lib	Mon Jan 18 21:50:17 2016 +0000
+++ b/SWUpdate.lib	Sat Mar 02 23:15:49 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/SWUpdate/#253e7da56ff9
+http://mbed.org/users/WiredHome/code/SWUpdate/#2a010efe00da
--- a/SW_HTTPServer.lib	Mon Jan 18 21:50:17 2016 +0000
+++ b/SW_HTTPServer.lib	Sat Mar 02 23:15:49 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/SW_HTTPServer/#3fc773c2986e
+http://mbed.org/users/WiredHome/code/SW_HTTPServer/#4c29c8f0cff2
--- a/TimeInterface.lib	Mon Jan 18 21:50:17 2016 +0000
+++ b/TimeInterface.lib	Sat Mar 02 23:15:49 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/TimeInterface/#1de342fa7840
+http://mbed.org/users/WiredHome/code/TimeInterface/#b5c01a52bff4
--- a/main.cpp	Mon Jan 18 21:50:17 2016 +0000
+++ b/main.cpp	Sat Mar 02 23:15:49 2019 +0000
@@ -414,7 +414,7 @@
             strcat(buf, "<a href='/'>back to main</a></body></html>\r\n");
             sprintf(contentlen, "Content-Length: %d\r\n", strlen(buf));
             // Now the actual header response
-            svr->header(200, "OK", "Content-Type: text/html\r\n", contentlen);
+            svr->header(HTTPServer::OK, "OK", "Content-Type: text/html\r\n", contentlen);
             // and data are sent
             svr->send(buf);
             ret = HTTPServer::ACCEPT_COMPLETE;