Thursday, February 11, 2016

GAMME - Unable to initialize migration with the provided inputs. Check the log for details

I got an error from the GAMME 5.0.28.0 Migration Tool when trying to migrate a subset of users from MS Exchange 2010 to Google Apps for Work.

here's the error:  "Unable to initialize migration with the provided inputs. Check the log for details"

and in the log it says:

2016-02-10T17:12:10.913-07:00  ce4 E:Sql ExchangeMigration!SqliteStatement::ExecTimeout @ 715 ()> Failed to execute query: INSERT into MigrationUsers (MigrationId, Username, MigrationStatus) VALUES (?, ?, ?) error: 19 message: constraint failed
2016-02-10T17:12:10.913-07:00  ce4 E:Sql ExchangeMigration!SqliteStatement::ExecTimeout @ 716 ()> Failed with 0x80be0013, last successful line = 668.
2016-02-10T17:12:10.913-07:00  ce4 E:Sql ExchangeMigration!SqliteStatement::Exec @ 657 ()> Failed with 0x80be0013, last successful line = 656.
2016-02-10T17:12:10.913-07:00  ce4 E:Sql ExchangeMigration!SqliteStatement::Reset @ 622 ()> Failed with 0x80be0013, last successful line = 615.
2016-02-10T17:12:10.913-07:00  ce4 E:Migration ExchangeMigration!MasterMigrationDbImpl::AddMigrationUser @ 383 ()> Failed with 0x80be0013, last successful line = 382.
2016-02-10T17:12:10.913-07:00  ce4 E:Migration ExchangeMigration!ServerMigrationConfig::AddMigrationUsersToDb @ 100 ()> Failed with 0x80be0013, last successful line = 93.
2016-02-10T17:12:10.913-07:00  ce4 E:Migration ExchangeMigration!MigrationConfig::InitiateMasterDb @ 167 ()> Failed with 0x80be0013, last successful line = 164.
2016-02-10T17:12:10.913-07:00  ce4 E:Migration ExchangeMigration!MigrationMain::PrepareConfigInstanceForMigration @ 474 ()> Failed with 0x80be0013, last successful line = 468.

It turns out this error was my fault because I sloppily had a duplicate in either my 'all users' or 'subset users' list.  Just clean up these two files to make sure no dupes exist and the error should go away.




Wednesday, April 8, 2015

Google Apps for Work



Just thinking about Google Apps Script and how powerful it it is I thought I'd write up about the benefits of having Google Apps for Work even it its just for a few users.  I have had a Google Apps for Your Domain (which is now Google Apps for Work) account for over 8 years and it has been great, I can have my own email at my own domain, add aliases, set a catch all account, and more that I can't think of now but will have to add to this post as they pop in my head.
  • A custom email address is key to continue building your brand and it’s included when you setup your Gmail account.
  • You can add domains to you account too so you can have custom email addresses on all of you subdomains but still only inbox to manage.
  • In addition to Gmail for Work, each user gets 30GB of online storage with Google Drive that works with all file types and syncs with all your devices.
  • Host video meetings with your coworkers and customers using Google Hangouts. Save money and time on travel by connecting from anywhere at any time.
  • The admin controls allow you to setup and manage your users easily and safely, so your data always stays safe.  
  • I actually use my Google Apps For Work for immediate family email accounts, makes troubleshooting way easier.

What is Google Apps?
Google Apps is a cloud-based productivity suite that helps teams communicate, collaborate and get things done from anywhere and on any device. It's simple to set up, use and manage, so your business can focus on what really matters.
Millions of organizations around the world count on Google Apps for professional email, file storage, video meetings, online calendars, document editing and more.
Watch a video or find out more here.
Here are some highlights:
Business email for your domain
Looking professional matters, and that means communicating as you@yourcompany.com. Gmail’s simple, powerful features help you build your brand while getting more done.
Access from any location or device
Check email, share files, edit documents, hold video meetings and more whether you’re at work, at home or in transit. You can pick up where you left off from a computer, tablet or phone.
Enterprise-level management tools
Robust admin settings give you total command over users, devices, security and more. Your data always belongs to you, and it goes with you if you switch solutions.



Start free trial

Monday, April 6, 2015

Nest temperature logging

I had been wanting a Nest thermostat for awhile and this past October we finally decided to get one.  Mainly because our local energy smart program with our utility providers offered a 50% off rebate on it!  But even without a rebate Nest thermostats can save $131-$145/year (or less than a two year ROI and Nest now has the data to prove it).

We had just bought this house so I did not have any historical utility bills to validate these savings.  I could have went a year to get a baseline but who wants to do that.  I use google sheets to do my monthly bills/budgeting and I have over 5 years of longitudinal data, if we had stayed in the same house and bought the nest it would have been interesting to actually see the savings.

I was just curious and wanted to see the how the temperature fluctuates based on the schedule and the weather.   I thought it would be interesting to see how outside temp impacts inside temp and how hard my furnace has to work to keep up.  The Nest app does a nice job of simple showing you how much time your furnace has run each day, and if you tap on a day it will show you the breakdown of what time it ran for and how long.  It's interesting but I was curious how much the indoor temp fluctuated as an indicator to how well my house was insulated.  Or even just a graph that shows the indoor temp over the course of a day or week.  Below is screen shot from my Nest app's Energy History, pretty basic.



So naturally I searched around for a way to pull this data and found a method using a LAMP stack and an unofficial nest-api to query this data from your nest account and add it the mysql db then present it on a php webserver local or public.  This worked as expected but then I searched around some more and found a thread on the Nest Community which uses Google Sheets... brilliant.  I had not used the Google Apps Script yet so thought this was a perfect opportunity to see what it can do.  Luckily the script on the Nest Community site worked pretty much out of the box just by adding your nest credentials and zip code.  

The only thing missing was having this script get data on a schedule w/o out errors.  When I set it up it worked great and pulled data every time I manually ran the script, but if I set it to run hourly it would work at best 20% of the time.  It didn't make sense, why would it run on demand without error when ran manually but not during the trigger?  I kept thinking about it and thought maybe its how it gets run via trigger when I am not there (not logged in) vs when I manually do it while logged in.  

More searching... and found this little hint on Issue 2758: Trigger based UrlFetchApp.fetch() fails, where you just make your main function a doGet() and publish as a web app (it seems that you do have to execute it as yourself and let anyone access it, even anonymous for it to work).

So basically you just put the meat of the script in a doGet() function, publish you web app then create another function that does a UrlFetchApp.fetch('webapp url') then you can set your timebased() trigger on and it should run on that schedule.
 
So without further ado here's the script I use to query the indoor temperature, target temperature and humidity along with outdoor temperature and humidity.