aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Barnett <james.barnett@fivium.co.uk>2018-10-21 19:56:46 +0100
committerGitHub <noreply@github.com>2018-10-21 19:56:46 +0100
commit95762cb6c960c0e11a8a423b6a51d62a9c42357e (patch)
treeb124abe864b4381f04a96c8f6e6fe49cafb015b6
parent2e2b3d4b5ffca1a05cb05e1883c5dcd8f08fad2f (diff)
downloadtplink-energy-monitor-95762cb6c960c0e11a8a423b6a51d62a9c42357e.tar.xz
tplink-energy-monitor-95762cb6c960c0e11a8a423b6a51d62a9c42357e.zip
Update README.md
-rw-r--r--README.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/README.md b/README.md
index 149c830..60cb44e 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,21 @@ $ npm install
$ npm start
```
+# Logging
+By default this app will log the current power usage of each plug every minute, and store 24 hours worth of entries (removing the older entries as new ones are added). This log interval and max retention limit are configurable in the `logger-config.json` file in the root project directory.
+```
+{
+ // The number of seconds between each log entry
+ "logIntervalSeconds": 60,
+
+ // The maximum number of log entries to store
+ "maxLogEntries": 1440 // 24hrs at 1 log/min
+}
+```
+Log entries are written in JSON format to the project root directory, with the filename `<plug-id>-log.json` e.g. `8FCA808B79-log.json`
+
+If you are running the app from the Docker image and you want to change the logger config, you can mount your desired config file into `/opt/tplink-monitor/`. The logs can be accessed in the same way.
+
### Note
Because the server needs access to your local network to scan for TP-Link device, you must run the server on the same network which your TP Link plugs are connected to. For the vast majority of people this shouldn't be an issue, and you can still use different network interfaces (i.e. plug(s) on WiFi and server on ethernet) as long as they all connect to the same network.
@@ -53,7 +68,7 @@ If you hit this issue you can try disabling the VirtualBox adapter in `Control P
- [x] Docker image
- [x] Support switching between multiple plugs
- [x] Switch to websockets
-- [ ] 24hr usage log
+- [x] Configurable realtime usage logging
- [ ] Show cumulative energy usage form all devices
- [ ] Rescan for devices on the fly
- [ ] Add daily cost metrics