Event Logs, Google Sheets, IFTTT and usability

I've been using IFTTT to create a unified Event Log in Google Sheets. With IFTTT now forcing us into paid plans, this feature will soon be broken without paying a subscription. I've come to like using Google Sheets as an event log for the following reasons:
*It's sharable, I can give my friends and family the link, but still restrict their access to read only for the dashboards (If Hubitat would allow "History" in the main tile with out clicking on the "..." this would be a non-issue)
*It's automatically filtered and formatted to my preference
*It's more permanent
*It's all in one place

For those that have similar requirements, how are you solving this problem? Is anybody working on an app or other integration with Google sheets? Or a better webUI for the event viewer? Thanks in advance for any feedback. I'm debating using this as an excuse to dust off my coding skills, but I'd like to know more of what's already out there. It looks like this app Event Logger App will get me part way down the road, but still does not address the "permanent" issue. I'm installing this app now for testing.

Are you a webcore user? If you are, look at this piston example.

I am not a Webcore User. In fact this is new to me, thanks for the tip. I visited the wiki and read a couple of introduction pages. It's an alternative rule engine, more powerful than the default. Question, are the rules executed locally? Or on the webcore.co server? I ask as this may be a good tool to offload some of my memory consuming but not so frequently rules? But that would only help if the rules are stored and executed on their server.

It executes locally also, the UI is just hosted on the webcore.co server. There is also an option to host the UI on a raspberry pi. Using webCoRE won't help with offloading your tasks.

Edit: I forgot to mention there's a dedicated thread in the HE forum for the HE version of webCoRE. webCoRE for Hubitat Updates

Thanks again for the tip. It looks like your code is the same general idea of what I want to do, so I could use that as a base. Thanks. My concern now, as hinted in my previous reply, with testing the above mentioned event manager app, I'm starting to notice things getting sluggish. So I don't think having 2 rule engines on my HE is a good idea at this point. So it's a question of how long would it take me to port all my current rules to the Webcore rule engine. I'll look into that.

You're welcome. This next thread is for the HE Anoynmous lol... I am guilty of having 2 hubs :slight_smile:

Well. Hoping to throw something together quickly didn't work. Here is my first attempt, it's closely modeled after your code. I tried storing the last logged event as both a local and a global variable. This screenshot show using the global variable with an orphaned local variable. Both fail with a message of "║An error occurred while executing the event: groovy.lang.MissingMethodException: No signature of method: com.hubitat.hub.domain.Location.hasCommand() is applicable for argument types: (java.lang.String) values: [setVariable]" before even testing the Google Apps script you wrote.

It's not my code but if you post on that thread I'm sure the original poster would be able to give you pointers. I'll check it out myself on my laptop as I'm pretty useless on the phone.

Just verifying you followed this link also?

I think and hope I did all that right. I pasted that code from github into a script on Google's sheets, and modified the post URL with the ID for my spreadsheet, not theirs.

I also tried it but I'm not getting any logging yet. No errors but I might have missed a step on the script part. I'll play with it again tomorrow morning.

I had syntax errors. The code now runs without errors, and is even logging "stuff" in my Google sheet. Thank you for your help. Now I'm at the phase of well it's "working" but that's not what I want it to do. So I'll futz with it some more tomorrow. I had to create a new piston, the screen capture above has been replaced. I hit the delete key one too many times and messed up. :wink:

I got it to work before I went to bed lol, it was stupid script permission. Maybe I'll put it to use and log some stuff :slight_smile:

Thanks again for the lead. It is now working, and I like this better than IFTTT. FYI, my biggest problem is manytimes the URL string I was assembling with the variables and device attributes had spaces in them. Once I added one line of code to swap a space with %20 it worked like magic. However, I switched to Hubitat's native rule engine. When I couldn't get it working with Webcore, I figured maybe Http get wasn't implimented yet, so I replicated that rule in the native rule engine, and by dumb luck that's when I discovered the problem. Given how I got the Hubitat rule engine version working first, I just went with it. However, I am using the Google docs script you linked to above, again, thanks for that tip.

Download the Hubitat app