[OBSOLETE] Simple Event Logger

404 is a page not found error so the url you typed is wrong. The first error you were receiving was a permission error, but that was caused by the sheet id being wrong due to the line break.

Copy the url shown in your screenshot, log out of google and then paste it into a browser. it displays a version number then you’ll know your permissions are correct.

I personally find the forum the easiest way to transfer data like the url between my computer and phone so I go to a topic and start a new reply and paste the url, but I don’t actually post it. I then go to that page on my phone and the reply will be open so I copy the url and cancel so it doesn’t get posted.

Interesting. When I searched at home this morning I found a Google page that said the 404 was permission issues. I’m more aware of it being the page not found error though as you say.

I did initially have a typo in the URL, but corrected it and am still getting the same errors (at least I was when I left for work this morning). Does editing the URL in the app work?

That’s a good tip to use this site to transfer the URL, I was not aware that a post started on a desktop would show up on the phone. I’ll give that a try.

Every time I have installed this app, the URL has always returned a version number on the correct page/step.

You do have OAuth enabled for this SmartApp in the IDE, right?

Yes, you can fix the url in the SmartApp without having to reinstall. When I previously mentioned reinstalling I was just referring to the Google Script part and that was only because you accidentally exposed the url.

You should open live logging before saving the settings screen in the SmartApp because it will attempt to retrieve the script version from Google and should log additional information if it fails.

You may have to enable all of the “Live Logging Options” which is a setting at the bottom of the SmartApp’s “Other Options” screen.

That step tests the security permissions, but if you’re still logged into Google, it will succeed even if the permissions are wrong.

I should probably add this to the instructions, but you should also test the url from your mobile device.

When you go to that url, it redirects to a temporary unique url so make sure you’re pasting the original url into the SmartApp.

Yes, OAuth is enabled and looks to be fine. I used your forum transfer method to copy the URL and this is now what LL shows:

4:29:13 AM: debug SmartThings found 4 events between 03/20/2017 01:50:09 and 03/20/2017 02:50:09, posting them to Google Sheets Web App
8:40:13 PM: debug SmartThings found 4 events between 03/20/2017 01:50:09 and 03/20/2017 02:50:09, posting them to Google Sheets Web App
8:40:03 PM: warn The Google Sheets Web App is not using version 01.03.00 of the Google Script code which is required by version 01.03.00 of the Simple Event Logger SmartApp.

Please update to the latest version of this SmartApp and the Google Script code to ensure that everything works properly.

When deploying a new version of the Google Script Code in the Google Sheet, make sure you change the ‘Product Version’ field to ‘New’.

So that appears to be correct, but there is actually nothing logged into the Sheet… it’s completely blank.

That’s probably going to need to be looked at?

Just my 2 cents

If you open the SmartApp and go into the “About Simple Event Logger” section, what version does it show for the Google Script?

I’ll have to check the app after work. During the Google part of the install, it did return version 01.03.00 when logged out and following the URL that was supplied.

When installing 2 versions of the SmartApp how to I differentiate which sheet it logs to. I copied and renamed the original sheet but it has the same URL. How do I force google sheets to generate a new URL.

I assume that I need to do that to get to unique apps / sheets working.

The app shows:

Google Script: ? (expected version is 01.03.00)

Don’t copy an existing sheet, just create a new sheet, paste the google script in, and publish it as a new webapp. It will generate a different url that you can use for the second instance.

Open Live Logging, go to the settings screen in the SmartApp that has the url setting and press done until the SmartApp closes. That will force it to check the version and it will log any problems it encounters. Make sure you enable the trace logging option I previously mentioned.

Here is the output from LL when doing what you asked:

4:31:19 AM: warn The Google Sheets Web App is not using version 01.03.00 of the Google Script code which is required by version 01.03.00 of the Simple Event Logger SmartApp.

Please update to the latest version of this SmartApp and the Google Script code to ensure that everything works properly.

When deploying a new version of the Google Script Code in the Google Sheet, make sure you change the ‘Product Version’ field to ‘New’.

I just PM’d you a test version that provides additional logging. Let me know what version it thinks the Google Script is.

@krlaframboise
I’m getting this in the live logging:
Google Sheets Web App: Failed with status code 401

it was working for 4 or 5 days, then it started getting 401 errors.
can someone help me out?

I believe that’s an authorization error.

Make sure you’re logged out out Google and then copy the url you previously entered into the SmartApp, paste it into a browser and see if it returns the version.

I removed the app and started over again it appears to be working now. Almost seemed like it had a credential mismatch.

1 Like

Kevin, Is there a way to log the data so that the devices are in the columns instead of the rows? I am looking for how the data is done in google sheets? But I really like your app better. I am looking to log 2 devices energy meter and power meter, but all the data is in one column and I need it split into 2 columns. Perfect example below

.

Have you tried using a pivot table to display the information the way you need it?

Yeah, I am working on that now.

1 Like

@krlaframboise Hello, are there any issues with logging going on. I am having major issues all of the sudden. Any ideas on this?