zcapr17
(codersaur)
March 4, 2017, 11:36am
1
There’s loads of data logging and charting solutions, so I thought I’d create an index. Reply with any solutions I’ve missed and I will update this post.
Lately I’ve been trying to log all of my device’s states to “the cloud” where I can permanently store their data points for later analysis.
To do this, I am using Amazon API Gateway and Lambda to store the data to DynamoDB. For more details, see here .
I wanted a way to log all of the generic device data from ST, and found a Logstash logger that was close. I’ve slightly modified it to be able to log to any HTTP endpoint. And crutially, if you’re using Amazon API Gateway, being able to specify the X-Api-Key header.
Source code is here in case anyone else wants to use it:
Elastic Stack (LogStash+Beats+Elasticsearch+Kibana) [private (free) / cloud (paid )]:
Can’t see a specific thread on the community, but here’s a github link:
/**
* Event Logger
*
* Copyright 2015 Brian Keifer
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*
*/
definition(
name: "Logstash Event Logger",
namespace: "bkeifer",
author: "Brian Keifer",
description: "Log SmartThings events to a Logstash server",
This file has been truncated. show original
This SmartApp will stop working when the Groovy platform is retired
This SmartApp is no longer supported because SmartThings made some changes to the way events are handled which has impacted some users and it will most likely completely stop working in the near future.
There’s another SmartApp called something like Google Sheets Logger that subscribes to the events instead of retrieving them from the device history so it most likely won’t have the same issues as this one.
Simple Event Logger is a fully customizable SmartApp that allows you to accurately log all device activity to a Google Sheets Spreadsheet. Each event is stored on a separate row so that you have their exact time and details.
Google Sheets has an easy to use filter feature which allows you to do things like view all e…
There are a couple Google Sheet data logging smart apps (GoogleSheetsLogging and SimpleEventLogger ) and I just wanted to share a way to get a chart from a Google Sheet that could be used in SmartTiles or potentially a DH in the SmartThings App. The trick is to publish the chart as an image; from that, you have a URL that can be used anywhere you can reference an image on the internet.
1-set up your preferred logging smart app
2-insert chart from button bar, set up a chart as you like. Note: make sure to include the last row of the sheet in data ranges and this will allow the chart to refresh the new data added by your smart app.
3-(optional)from chart pulldown, select ‘move to own sheet’ (now the chart will have its own tab)
4-click publish, under link, change interactive pulldown to…
Hi, www.grovestreams.com is a service that will graph your devices and let you build a dashboard.
Here’s my SmartApp, adapted from @florianz ThingSpeak app to let you connect your devices to GroveStreams. You’ll need a free account first, when your create one it will prompt you for an organisation name - you can enter something like “Home”. Once you have created your organisation you need to get the “Feed PUT API key”:
[image]
It’s long… you might want to email this to your phone so that you can cut and paste it into the ST app.
The SmartApp uses the device name as the “Component” in GroveStreams and the capability attribute (e.g. “temperature”) becomes a “Stream” in GroveStreams. These will be auto created so you don’t need to set them up in GroveStreams. However, once they have been…
InfluxData TICK Stack (Telegraf+InfluxDB+Chronograf+Kapacitor ) + Grafana [private (free) / cloud (paid)]:
InfluxDB Logger
Version: 1.11 (2017-04-03)
Source: SmartThings/smartapps/influxdb-logger at master · codersaur/SmartThings · GitHub
This SmartApp logs SmartThings device attributes (and mode events) to an InfluxDB database.
Key features in V1.11:
Changes to device attributes are immediately logged to InfluxDB.
The Soft-Polling feature forces attribute values to be written to the database periodically, even if values haven’t changed.
Logs Location Mode events.
Supports an InfluxDB instance on the local LAN, without needing to route traffic via the cloud.
Support Basic HTTP Authentication.
GitHub:
Project Thread:
Tutorial:
Hi all,
I’ve seen many threads/apps dealing with sending some metrics (temp and humidity sensors) to different backends.
I’m an Influxdb user and would like to create a smartapp to send data into a remote influxdb.
I’m actualy trying to push the data using a plain URL call but I’m not sure it’s really efficient. Also, I’m new to Groovy (while I’m good at python or Go).
IS there any Groovy binding to Influxdb ? Or is it possible to use the Java client within smartthings ?
The Initial State SmartApp (if you don’t know what this is, read about it here ) now lets you automatically capture every event from supported SmartThings devices and store it forever. The “unlimited data retention” feature was released today and costs $5/month. This lets you use SmartThings like a “black-box” to capture what has happened in your home, something that can be really useful for energy monitoring or analyzing how your home is being utilized. Plus, you can view all of this data in visualizations like dashboards, waveforms, etc. on your laptop or mobile devices.
http://blog.initialstate.com/wp-content/uploads/2015/07/Screenshot-2015-07-28-18.11.43-1024x553.png
PlotWatt [cloud (free/paid)]:
Note: PlotWatt is discontinuing its support for 3rd party residential energy monitors on March 31st, 2017
I’ve put together a few SmartApps, mostly based on other contributions on this forum, that will log power meter data (watts and sometimes kwh) to various power monitoring services/graphing services - ThingSpeak, SmartEnergyGroups (SEG), PlottWatt. I’m using these with my Aeon HEMv1, but they would likely work with any device that reports it’s capability as being a power meter.
I’m still having accuracy issues with SEG but have given up on resolving for now. They supposedly accept data in “Wh” not “kWh”; so I’ve tried multiplying kWh by 1000 before posting, but that makes their cost calculation widgets highly inaccurate. I really wanted SEG to work because they have the best widgets, but alas, I’m tired of debugging the problem with no help.
ThingSpeak and PlottWatt appear to be pretty…
ThingLayer [cloud (free)]:
Discontinued??
Continuing the discussion from Enhanced Web Interface Demo :
As promised I have opened the source for ThingLayer.
You will need to install the ThingLayer SmartApp and configure it to send data your own firebase instance which can be found here. You will need to edit a single line at the very end with the name of your firebase instance.
I’ve put together a few SmartApps, mostly based on other contributions on this forum, that will log power meter data (watts and sometimes kwh) to various power monitoring services/graphing services - ThingSpeak, SmartEnergyGroups (SEG), PlottWatt. I’m using these with my Aeon HEMv1, but they would likely work with any device that reports it’s capability as being a power meter.
I’m still having accuracy issues with SEG but have given up on resolving for now. They supposedly accept data in “Wh” not “kWh”; so I’ve tried multiplying kWh by 1000 before posting, but that makes their cost calculation widgets highly inaccurate. I really wanted SEG to work because they have the best widgets, but alas, I’m tired of debugging the problem with no help.
ThingSpeak and PlottWatt appear to be pretty…
Xively [cloud (??)]:
Hello SmartThinkers,
I’ve just wrote a small program (based off of Aeon Smart Meter Code sample provided by SmartThings (2013-05-30), Aeon Home Energy Meter v2 by Barry A. Burke, and Xively Logger by Patrick Stuart ), that will log the Volts, Power, Amps, and Energy to an Xively account. See below. Enjoy.
/**
* Aeon HEM - Xively
*
* Copyright 2014 Dan Anghelescu
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, e…
SQL (MySQL, PostgreSQL , SQLite, SQL Server) [private (free/paid) / cloud (paid)]:
Various discussion but no working examples just yet…
I am looking at creating an events logger on a raspberry pi web server running php and MySQL. From my searching it sounds like people have been tying to create one before but couldn’t find any examples. If there is any can someone point me in the right direction if not I will get to work .
I apologize for not checking to see if this has been covered. I have not developed anything yet but have a couple ideas. Can we take advantage of SQLite from the API?
Thanks
27 Likes
Nice work!
There are a few more listed on the quick browse list in the community created wiki on the list for “logging” under smart apps.
For example, SmartEnergyGroups (SEG), and IOT logger.
http://thingsthataresmart.wiki/index.php?title=How_to_Quick_Browse_the_Community-Created_SmartApps_Forum_Section
I like the visuals in your post and the grouping by third-party solution, and I also realized after seeing it that it may not have been intuitive that the logging discussions were in the smartapp section of the quick browse lists, so I’ve added the same list to the project report section as well.
7 Likes
zcapr17
(codersaur)
March 11, 2017, 1:16pm
3
I’ve added all these, plus included info on hosting and subscription options.
1 Like
@zcapr17 Do you have any comparsion which one of those two is better? Simple Event Logger or Log events to Google Sheets Some advantages / disadvantages?
zcapr17
(codersaur)
April 17, 2017, 6:19pm
5
Sorry, I’ve never really looked at them. Logging to Google sheets is a relatively primitive solution when you can set up a much more powerful and customisable solution using InfluxDB with Grafana in under an hour, so I’ve done the latter.
That said, if anyone wants to post a comparative review I’ll try my best to integrate it into the roundup. Keep in mind that everyone has a different definition of what is better though.
2 Likes
zcapr17:
Sorry, I’ve never really looked at them. Logging to Google sheets is a relatively primitive solution when you can set up a much more powerful and customisable solution using InfluxDB with Grafana in under an hour, so I’ve done the latter.
Well, you are right. But the problem is, that you have to have running linux machine. The cheapest solution that I can think of is to buy Raspberry Pi and configure it. On the other hand the Google Sheet is completely free solution and it requires almost zero configuration. Plus graph can be exported from Google Sheet as image and then used in SmartTiles which can be a nice bonus.
1 Like
zcapr17
(codersaur)
April 17, 2017, 6:44pm
7
Both InfluxDB and Grafana publish Windows binaries now, as well as docker images too. Plus there’s various cloud-hosting options available. So you can host pretty much anywhere you want.
If you really don’t want to spend any time or money on a server, then yeah, Google sheets is a good simple option. I would also consider Initial State.
2 Likes
rontalley
(Ron Talley)
October 19, 2017, 9:22pm
9
I have a Pi3 running 4 services related to SmartThings. I have at least 30 or more metered outlets. Can my Pi3 handle all of this data with the additional services running using InfluxDB?
I’m looking into a free option for logging electricity use. I have a nextcloud\owncloud (personal cloud) instance running on one of my servers.
I ran across an app that can be added called “Sensor Logger”. Has anybody used this? Does this look like it might be possible to use with smartthings?
https://apps.nextcloud.com/apps/sensorlogger
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
July 18, 2018, 9:53pm
11
Yes. You should be able to post to this API using a SmartApp.
buster
November 29, 2018, 1:26am
12
Has anyone tied this into RRD-Tool for graphs? or started the process to build it? I am an old school network guy who has been building bandwidth and network utilization graphs for 15 years with RRD Tool. Would be great to have a way to integrate this into SmartThings.
Is this tread still actively being updated? It looks Initial State might be dead…
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
December 18, 2018, 11:34pm
14
Where did you get the impression they were “dead”?
They pivoted away from the consumer/small-developer market for a while, and then came around and added affordable (?) plans again.
Did they withdraw their SmartThings integration?
Good question, looked like thier domain was empty earlier today and now it’s loading. Disregard.
1 Like
Well since I just signed up to start using Initial State it appears their built in smartthings integration is down until “the beginning of 2019”.
jrbail01
(Jamie Bailey)
January 31, 2019, 4:00pm
17
The new SmartThings integration to Initial State is now live.
2 Likes
ipstas
(SP)
March 19, 2019, 7:09pm
18
Great index
One more to it: https://www.hundredgraphs.com
Free
1 Like
ipstas:
One more to it:
How do you integrate ST to it?
ipstas
(SP)
March 21, 2019, 9:55pm
20
I know how to do it with Vera, still looking for options for ST
Ok, though I’m not sure why you posted this in an ST forum. Do you have any connection to it?