[OBSOLETE] Simple Event Logger

Would it crash immediately after selecting the devices or were you also able to select the events?

If it crashed before providing you the option to select the events to log, it could be something weird with one of your devices that the SmartApp isn’t expected.

When you go to select more devices, open live logging in the IDE first so if it happens again you can see and post the error message.

Google Spreadsheets have a 2 million cell limit combined for all the sheets in it, but I’m not sure how graphs affect that number.

It was right after i picked a device type. Dont remember which ones. Never made it to next step.

Okay, I will . Hopefully I can try before bed time.

Okay I just tried several times, the app freezes as soon as I select a group. I tried, sensors, batteries, co2, and another one. When it goes to load the list of items to pick from, the screen freezes and you get the smartthings error pop up.

There is nothing logging in live logging. Except the expected messages of I’m uploading the events. I did manage to get a few devices selected .

I’ll try to Uninstal and reinstall the the app later. Will probably be this weekend before I can get to it.

There’s no need to reinstall, but when you get a chance, update the SmartApp to version 1.0.3 to see if it either fixes the problem or at least displays something to live logging.

The previous version of the SmartApp populate the “Choose Events” field with only the events supported by the selected devices, but it had to refresh the list every time you made a device selection which I think might have been causing your problem.

I’ve also added a lot of extra error handling so that if the change above doesn’t fix the problem the application will hopefully log the problem and continue instead of just crashing.

I only changed the SmartApp code so you don’t have to update the Google Sheets Script.

Okay, I’ll give it a test.

I will be making this change in a future version.

I’m back to report my findings.
I updated the code this morning through git hub.

While at work today I went through each device list to see which groups it would lock up and crash on. Here is the 4 that had issues:
Sensor
CO2
Battery
Smoke Detectors

So from that list I would assume one of my smoke / CO2 detectors is causing the issue.

I currently have AC powered 2 nest protects and 4 battery powered Zsmoke detectors connected to my hub.

Could it be the Nest protects battery status causing the app to lock up. They report battery as okay in smartthings app even though there is no battery’s since their AC powered.

I just released version 1.1 of the SmartApp which requires that you update both the SmartApp and the Script in the Google Sheet. When publishing the code in the Google Sheet, make sure you change the version number to “new”.

If you want to verify that both versions are correct, opening the SmartApp and tapping Done will refresh the Google Script version shown on the About screen.

Thanks to @RedKnight, I was able to adjust the way the SmartApp calculates the available log space so it should now be accurate.

I’ve added a setting to the “Other Options” screen for “Delete Extra Columns”. If you enable it, it will automatically delete the extra columns in the spreadsheet allowing you to store about 400,000 events instead of the default which is around 77,000.

I’ve also moved the “Excluded Event Devices” feature into it’s own screen because of timeout problems. If it’s unable to load all of the fields within the allowed amount of time, it will stop where it is and add a message to the bottom of the screen letting you know that it wasn’t able to finish.

If the SmartApp is hanging and then you get that red bar, I’m pretty sure it’s a timeout problem.

When you open the SmartApp, do you see the settings that allow you to select devices, events, and device exclusions or do you first have to tap Choose Devices and Choose Events and then see a new page with the various setting fields you can choose from?

I can open it and select devices. It’s when I select any of the 4 device groups I listed. It will start to populate the list of devices then the screen freezes. After a short time screen goes black. Get smartthings has encountered error pop up and the app exits when you select close on the error. Your then back to the apps screen in smartthings.

It is running with the devices I had selected before to test it, and ensure it was logging to Google correctly.

I’ll try to check live logging when I get home in a little bit.

This is the screen I’m presented with when the app opens:

This is the screen where I select the groups where it will lock up:

My SmartApp puts those setting fields on the page and sets the type to whatever type of device the user should be able to choose from, but developers don’t have access to or any control over the screen that lists your devices.

Can you go into the Marketplace, tap “Safety and Security”, tap “Notify me When”, and see if the same thing happens when you try to select a device from the “Smoke Detected” setting?

I just want to rule out a problem with the platform before I look into it further.

Yeah, please hold

Okay notify me when locks up and does the same thing when I select smoke detected.

Simple Device Viewer will show me my smoke detectors in its list.

So something to do with smartthings stuff?

Am I the only one with this issue? Could just be something messed up in my data / system.

Not really that big an issue for me. I won’t be logging smoke detectors . I should be able to select what I want.

Notify Me was created by SmartThings so if that did the same thing, it’s not a problem with the Simple Event Logger SmartApp and probably an issue with one of your devices that supports the smoke detector capability.

I just checked the code for the Simple Device Viewer and I didn’t do anything different so I have no idea why one of them works and the other doesn’t.

What device handler are you using for your nest protects?

I am using Nest Manager for my Nest Protects.

I know you probably want to figure it out. Cause it’s a small hiccup in the app.
For me it really doesn’t matter. There really is nothing in my smoke detectors I’ll log or track. Only 2 things really to monitor on them are battery and if alarming. There is other apps to monitor my battery levels. If their alarming I have more serious issues!

It could be an issue if someone wanted to use only the battery or sensor group.
There is options / work arounds since if you select an item once it grabs all its options. There is other fields available to pick your devices.

I see you updated the code, I’ll update this weekend and play with it some more.

Thanks for everything you do on these apps and DTH you write. It opens opportunities for people like me to tweak their stuff to how they want it.

Unfortunately I don’t think there’s anything I can do about it in the SmartApp anyways, but you’re probably going to run into the same problem with most other SmartApps.

Although you mentioned that you were able to select it in the Simple Device Viewer so that should cover your battery monitoring needs.

If you’re using Smart Home Monitor to monitor your Smoke Detectors then it’s probably fine because it defaults to monitoring everything, but if you use the option to just select specific Smoke Detectors you’ll most likely experience the same error.

Either way, if you haven’t done so already, I recommend testing them to make sure they setup SHM when they go off.

Yeah, on my to do list this weekend when I’m home. Even if doesn’t work in SHM I’m good since I still have notification from Nest. If necessary I can remove it all. Not super needed just nice to have it all hooked together.

I’ll work on it and try to find the problem device.

Appreciate your help.

1 Like