SmartThings Community

Time logging in smartthings?


(Ben Smits) #1

I have a heater in my garage, I am looking for a way to pull the data on when it came on and when it turns off, to put it into a spreadsheet. I want to be able to calculate runtime. Any ideas?


(might be my fake name?) #2

There seems to be something brewing in this thread.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #3

Search for Google Sheets logging or similar here. It’s a bit complex, but pretty nifty.

You can modify the SmartApp to watch for Power draw on the smart outlet and log it.

I also think WebCoRE can write out events as they are captured…


#4

Two separate questions here.

First, where are you going to get the data. And second how are you going to report it.

For the first, the web core option already linked to is a good one to track when you are turning on the device and turning off the device.

As far as logging, people do that many different ways with many different kinds of utilities.

If you look at the quick browse lists in the community – created wiki in the project report section and choose “log two separate questions here.

First, where are you going to get the data. And second how are you going to report it.

For the first, the web core option already linked to is a good one to track when you are turning the device on and off.

As far as logging, people do that many different ways with many different kinds of utilities. The following covers most of them (this is a clickable link) :sunglasses:


(mp) #5

Hello. New to smarrthings and finally have my HEM logging correctly to my smartthings HUB. I am trying to calculate daily runtime of my HVAC as well. I have the wattage being sent every 1 minute to my HUB, so the data is there, just need to figure out how to get it out of the HUB and preform some analytics on it.

Was wondering how hard it was to get the event data to google sheets ? Are their other solutions that are much easier ?

thanks, mp


(Ron Talley) #6

I just cooked up a Piston to do this! Use the backup code to import into webCoRE. This one also has conditions where it will turn off the plug if its been on for two hours or the temperature in the room reaches a certain temperature. Works great!


(mp) #7

This looks perfect, nice work. Is it posted anywhere I can download ?

thanks, mp


(Ron Talley) #8

Sure! With webCoRE, all you have to do is import the code in the Piston using the create from backup option.

b8yi


(mp) #9

AH, got it. Didn’t realize what that backup code was. Thanks for
contributing, I will let you know how it goes.

thanks, mp


(mp) #10

Ron,

Sorry about the simple questions, very knew here.

I loved your code, I have it partially working for my usecase.

One question I can’t figure out is how to get the script to trigger every
15 seconds. I can click test and it will run, but I would like it to
automatically run every X number of seconds.

thanks, mp


(Ron Talley) #11

If you view the Piston, then it actually updates every time the wattage changes. If you want it to notify you every 15 minutes then you will have to specify that with some additional coding.

I’m out for the night but I will hit you back tomorrow.


(mp) #12

No worries ron. I finally am i figuring out the the difference between a
trigger and condition. So I got it working ;-).

Thanks, mp