[OBSOLETE] Log events to Google Sheets [see post /36719/154 for Github repo and v1.1]

So I’ve gone through the entire setup in the Github instructions and have installed the SmartThings App (on my iPhone), and it’s saying “Enter Code Here” which makes it sound like I’m required to have a SmartThings hub to be able to use the app (and get past the setup screen to access the marketplace inside the ST app). Any ideas?

Are you saying you don’t actually have your Nest or anything else streaming data yet? If this is true, just relax. What could you collect anyway? Wait until you’ve got your thing installed.

Do you have a SmartThings hub without any devices/sensors at all?

Do you have your ST hub yet?

Not sure where you’re coming from.

That’s what I was wondering with the “other pieces of equipment” bit. I do not currently have a ST hub- and so you’re saying that is required to be able to accomplish this logging? I mean, I guess it makes sense that would be required, considering this is the “SmartThings” forum, but me being a noob was thinking because it wasn’t explicitly mentioned, it wasn’t required. :grin:.

I’ll be picking up my Nest Thermostat on Monday from Sam’s Club. So excited to finally have one!

Yes, well gosh, bro, Yes, you do need both an ST hub, and some sensor device. :slight_smile:

When your hub and Nest are in place, dig in and enjoy!

So does the Nest on its own count as a “sensor” device? It sounds like it as I know it was in the list of devices when I was looking in the ST development area where I created the app. Again my noobness is shining through, here. :stuck_out_tongue_closed_eyes:

Sorry, I was using sensor in a very broad way. All I mean is that there has to be some source of the data that’s going to be sent. I don’t know exactly what the Nest will send (but there are probably others around that can tell you). It will probably say its current temperature, report when the HVAC turns on and off, things like that … I’m just guessing here, but you’ll find out as soon as you get it working with your hub. It’s easy to see the variables it reports from the Device page in the SmartThings API. You can probably log any or all of them, I would think.

Post 161 has the link to @jlv github now, not post 154…

Looks like latest is version 1.3 on Nov 19, 2016…

Thanks for a great SmartApp. Took me a couple tries to get it working correctly but now it is and it’s great!

If my DTH reports data every minute, and the SmartApp is set to queue for 5 minutes, will all the data write every 5 minutes (5 entries), or only the last data(1 entry)?

Just one entry.

Also, it appears that 0 value events are ignored? I am using it to monitor an energy meter my refrigerator is plugged into. When it is not running it reports zero values but they are not copied to the log.
05

Hmm, I can’t remember hearing that. I know it doesn’t report values if they don’t change, but I don’t know exactly what happens here. (Is it reported by the device to SmartThings, but not passed to the CSchwer Log by SmartThings if it doesn’t change?)

I have a bunch of Aeotec Multisensors that include illumination. Every single night, values go to 0 as the last reported value, then nothing is reported all night long, until sunrise. Strictly speaking, I did not check to see if the sensor itself is still reporting 0 at some lower level (but it’s just not being passed on, because it hasn’t changed). You can see how ST arguably has a case for not passing along values that don’t change (it reduces the amount of data they need to send out).

I have seen a few 0s for data from my five wall-plug energy sensors across a year, but then, most of them are on devices that at least have a little vampire usage. So I can’t make much conclusion from them, except that I have seen at least a few zeroes.

To make a long story short, I guess the bottom line is this: Was your case in point an instance of a repeating 0, or a new value of 0? Or just test and see.

I let it run for a couple of days and it looks like we have an answer… no data if there is no change. Since the refrigerator doesn’t draw any power while not running, while it is idle the power is 0, and the energy remains the same as the last entry. Note the 5 minute spacing while running, then one 0 power entry, then nothing for about 45 minutes to an hour.

This answers the question I had when installing, what does the refrigerator draw while idle. I’m trying to find a way to detect a power failure at that receptacle due to a GFCI tripped on the same circuit. If the refrigerator drew something while idle I could use a drop to 0 to show a failure. I’ll have to go with a different route now.

Michael, is the energy device powered by the wall socket; will it stop reporting anything at all if the power goes out? Or is it battery powered or will otherwise continue reporting? The reason I ask is because there is an excellent app that will tell you if any of your devices stops reporting. (You can select which ones to monitor.) It does this at the ST server level, so it even tells you, if everything’s down (whole-house power, internet, or hub down).

Powered by the wall outlet. I am using the Aeon Multiswitch 6 DTH by @jbisson and have Simple Device Viewer by @krlaframboise set up to notify me if there are no events reported. I have the DTH set to report every minute and to force state changes so even if the data does not change there are reports/events generated. I have Simple Device Viewer to notify me if there are no events within the last 5 minutes. This should give me a maximum of 5 minutes lag for a power failure.

Forcing the state change fixed my logging problem where I was only getting the first zero reading. Forcing the state change gives me data every five minutes regardless of whether or not there is any change. Graphing now will be consistent with five minutes intervals.

That’s the one! I love the notification of no events from Simple Device Viewer (SDV). Can’t believe ST didn’t already have it. (It will Notify you if your hub is down, though.)

It’s especially important for battery-powered stuff; I found that other things that try to detect battery level (like ST or even SDV’s battery Notification) often miss, because the battery level sometimes drops from 100% to 80% to 50% then nothing, dead. Other devices will hover at 50% for months. So monitoring battery level per se is problematic. Instead, just use a complete lack of notification for X amount of time and you’ve covered every conceivable problem, if it’s a device that reports relatively often.

SDV even effectively provides a notice if everything is down. Because if everything is down, then, of course, your device is down, too. The important point being that if the entire hub (or house) goes down, it doesn’t mean that your Notification of a down, also stops working. Older tech often fails in this regard.

Love it.

1 Like

The temperature sensor that I have monitoring the freezer temp went from 100% to 56% in a couple weeks. I thought that it was defective because it dropped so fast. It has remained 56% for months now. From what I’ve read on here I’m guessing it is going to stay there until it just stops working from a dead battery.

I think these little devices do magic on terms of making a battery last - but it means that actually asking the battery what its level is, becomes a gray murk. Sure, a wonderfully designed device can juggle watt usage and say it’s 100% … right up until the microsecond it falls off the map.

This is a general comment on all tiny smart home devices, not specific to SmartThings per se.

I think it’s very prescient to just notify the user when the device has completely failed to report. Over and above any type of testing of the device itself.

Hopefully this is still an active thread. I can’t get the darn smartapp to install, when I go to install the smartapp in the iphone app and click on the “Google Sheets Logging Automation” tile it just gives me a spinning wheel. I let it go for like 5 minutes and nothing. Ideas? Is this just a me issue?

Got it!

Need to edit this line to point to the childstartpage:

return dynamicPage(name: "parentPage", title: "", nextPage: "childStartPage", install: true, uninstall: true) {

I am also having the spinning wheel problem on my iPhone when trying to run the SmartApp for the first time. I replaced the line in the code but still get the same results. I’m stumped - any idea what I should do next?

Thanks!