Technology related blog with posts on iPhone, iPad, Flex, Java and various other things that cross my path.
Sunday, April 16, 2017
Video: Newbury Marsh Sunset
Thursday, April 6, 2017
Video: Last Flight of the Shuriken 180
Monday, March 27, 2017
Video: Pipestave Hill Sledding
Sunday, March 19, 2017
Intro to Smart Home Stuff
Last month I spent a few days at my dad’s house in Florida and was surprised by how much home automation he had in place. The front door would automatically lock after a couple minutes, the lights were on timers and the garage lights had motion sensors. I immediately felt like I was falling behind in the technology race with my own father. The good news for me was that most of his devices were programmable, but they couldn’t be controlled from another device like a phone or one of the “ladies in a cannister”. I knew once I got home it was time to start planning my first foray into the world of the “smart” home.
Since I am an Apple devotee I started by researching Apple HomeKit. It seems that support for HomeKit from various vendors has been very slow due to the hoops they have to jump through in order to get approved by Apple. On the surface this seems problematic, but I like to think the adoption is a bit slower because they have placed higher standards on the vendors to ensure a more secure smart home experience.
I also looked into Alexa because I knew it supported many more devices, but my impression was that there wasn’t a consistent platform for connecting devices. In some cases you have to use the Echo skills functionality for the specific device, and in other cases you have to leverage IFTTT to trigger devices. Apple on the other hand has created an additional layer on top of the individual device apps that helps give a consistent way of controlling all the different devices. Siri support helps provide a little more flexibility than you get with Alexa, as is outlined in this great article from CNET, Google Home vs Amazon Echo. It also seemed a safe bet was to get stuff that supported Apple HomeKit, because they would also support all the other platforms too.
Once I settled on HomeKit it was time to find a device to try out in my home. I started thinking about my daily routine and what parts of it would be made easier and bedtime stood out in my mind. After sitting in the living room each evening I usually shut a bunch of lights off downstairs, upstairs I switch on the light to the room so I can turn on my bedside light and then go back out to switch the bedroom light off. I focused on this scenario and started researching online.
I went to the Apple Store page and searched through the HomeKit accessories to get an idea about what products were available. My bedside table lamp is from IKEA so it has the small E14 bulbs, so I had to find a “smart” outlet for that part of my plan. I settled on the iHome iSP5 because it was on sale from Amazon and was shaped so you could still plug other stuff in above or below it. For the downstairs lights I went with a Hue Starter Kit because they were the most well known brand available right now. I went with this particular starter kit, because it included a remote switch so you didn’t need a device to turn on the lights.
The Hue Starter kit was the first thing I received so I quickly unboxed them and replaced the two “dumb” bulbs in the recessed light over the fireplace with the new bulbs. I plugged the Hue Hub into my router and downloaded the Hue app. The setup in the app was pretty easy and was happy to see that signing up for a Hue account was optional. Next I went to the app store to download the Home app because I had removed it from my iPhone. The home app set up was easy, I created a room and was able to group the two lights together so they would be controlled as a single accessory. Controlling the lights from the control center was great and the ability to dim them by using a 3D touch was a neat feature. The Home app was able to dim the bulbs, but unlike the Hue app I wasn’t able to change the shade of white for the bulbs. I am not sure if the API just doesn’t support this yet or if Philips just hasn’t implemented it. Sounds like a software thing so it can easily be corrected.
The last thing to set up was Family Sharing, which started out pretty well. I quickly added my wife and kids to our home and they received the notifications. At some point I received a notification that I needed to set up either an iPad or Apple TV in order to access HomeKit from outside of our home network. I followed the directions for setting it up on the Apple TV, but wasn’t able to see the correct setting show up. On my iPhone I looked for the Home setting that appears on the iPad and couldn’t find it so I tried logging out of iCloud and then logging back in, which caused meant my Photo library had to get reconciled. In the end there isn’t a Home setting on the iPhone and eventually my Home setup propagated to the Apple TV.
I am stilling waiting on the iHome plug, but in the meantime I have been able to play around with Scenes and set it up so I can say “Good Night” to Siri and the lights would turn off. It is taking a bit of getting used to, but so far I haven’t received any complaints from my family about not being able to use the regular switch.
To be continued…
Hue has three different types of standard “shaped” bulbs: Hue White, Hue White Ambiance, and Hue White and Color Ambience. Hue White, the cheapest of the bunch, costs about $15 each, and only supports a single shade of white. The Hue White Ambiance costs about $30 each and supports over 50 thousands shades of white. The Hue White and Color Ambience, costs about $50 each and supports 16 million colors.
Wednesday, February 15, 2017
My Kingdom for an iPad Local Data Store
Almost a year ago I purchased the 9.7" iPad Pro, because I wanted to start using an iPad for more than just consuming social media and videos. In that time I have used the iPad on a daily basis at work mostly as a notebook by using GoodNotes, OneDrive and the Apple Pencil. Personally I have started blogging more using the ByWord and an old Apple Magic Keyboard. I also pushed the bounds of the device by recording, editing and posting my podcast, Kilobyte, exclusively from my iPad. The latter involved the Apple USB adapter, Ferrite (for recording and editing), DropBox for hosting, Coda for updating the RSS feed and Workflow to join it all together. It has been amazing how much I can accomplish now that I have a basic understanding of importing, exporting and saving using iOS extensions.
One thing noticeably absent from that list is making and editing videos, which seems odd given how easy and natural it is to use the iMovie app for simple videos. It isn’t excluded because I haven’t been making videos, because since August I have posted a bunch of drone videos on my YouTube channel, but they were all made using a Mac. I have avoided using the iMovie for iPad for one reason, video file management difficulties.
My drone footage always ends up on a Micro SD card either from my GoPro camera or the DVR inside my FatShark googles. At this point I can chain together a few dongles (MicroSD adapter to SD Card Reader to Apple’s USB adapter) and get them into the Photos app on my iPad, which will automatically upload them to my iCloud Photo Library. The problem is I don’t want these raw video files in my iCloud Photo Library and more importantly I don’t want my iPad to spend battery or bandwidth uploading over 1GB of data to the internet. Yes internet connections are everywhere, but they aren’t all created equally and sometimes it isn’t polite to just destroy a coffee shop’s internet bandwidth.
All I want is a folder inside an app where I can copy files from the USB drive without having to go through my iCloud Photo Library. I am not asking for an OS level filesystem, just something in an app that won’t get synced to the cloud. My ideal iMovie workflow would let me create a new project, plugin a USB card, select the video files to import (regardless of folder structure) and pull those videos into the app so they are stored locally just like the projects are stored today. After editing the movie and uploading it to YouTube, I could then choose to delete the project file including the imported videos.
If there is ever hope of getting audio and video professionals to switch to the iPad for work it is requires support for enormous file sizes and external disks. The cloud based data providers like iCloud, DropBox and Google Drive just fall down when working on enormous media files. I really enjoying editing podcasts using the Apple Pencil and think it would be just as much fun to edit video, but right now it just doesn’t work for me.
Sunday, February 12, 2017
Angular Proof of Concept (Part One)
I recently went through the process of building a simple application using the Angular framework and wanted to document some of my experience to possibly help others considering the framework. My day job for the last ten years has mostly involved building Flash applications using the Apache Flex framework and as a result my experience with HTML, JavaScript and CSS has been limited. In September 2016, I attended the Angular Summit Boston 2016 and learned a lot about the framework and how I might use it. A few months later I finally found some time to give it a shot.
To TypeScript or Not To TypeScript
At the Angular Summit there were two almost equally divided camps when it came to language choice. The JavaScript people seemed skeptical of TypeScript and were very comfortable with JavaScript. The TypeScript people on the other hand preferred the simpler syntax and more strongly typed nature of TypeScript. I decided to start with JavaScript Since I had some knowledge of it and also like that the browser would be working with the actual files I created rather than some on the fly transpiled files.
Once the language decision was behind me I walked through the Angular JavaScript Quick Start and quickly had a sample application running on my local machine. I used the Microsoft Visual Studio Code application because it was free and easy to use. Once I had the sample application up and running I started to make changes based on my needs. It was pretty easy to figure out the patterns and I was able to create my own components pretty easily. I did have some trouble getting the syntax of the JavaScript correct because of the hoops you need to jump through in order to support the complex class structures required by Angular. Here is an example of a simple module class and all its curly brace and bracket fun.
(function(app) {
app.AppModule =
ng.core.NgModule({
imports: [ ng.platformBrowser.BrowserModule ],
declarations: [ app.AppComponent ],
bootstrap: [ app.AppComponent ]
})
.Class({
constructor: function() {}
});
})(window.app || (window.app = {}));
Struggles with Server Calls
After completing the screens I moved on to trying to set up some services that would make calls to a simple REST API set up on my server. I went searching for examples on the Angular site, but like most of the other portions of the tutorial there isn’t a JavaScript example yet only TypeScript. I looked around the web a little bit and scraped together some information, but in the end I was forced to look at the TypeScript examples and then in my head transpile them to JavaScript. After lots of trial and error I learned how to use Promises with JavaScript and made the http get call to one of my REST endpoints. The browser sent the request to the server, but the server wasn’t having any of that nonsense.
My lack of experience with standard web technologies now started to catch up with me at this point as I fumbled through the process of updating my Apache Tomcat server to accept cross domain requests from my Angular application on a different port. A few hours of tweaking CORS filters in my web.xml file and a couple tweaks to my http get call resulted in a successful retrieval of text from the server. The next endpoint was authenticated so I once again consulted the TypeScript tutorial and figured out how to pass the Authentication data in the http get call. The TypeScript example looked so much more straightforward because it used import statements to bring in special classes for the Header, while the JavaScript I built used plain old objects.
All Downhill
Once I made it over this last hurdle I was able to finish the proof of concept with relative ease. I found debugging using Google Chrome’s built in developer tools was straightforward and helped me around some simple issues. The error messages provided by Angular were much better than I remember from what were reported back in the fall, which helped me fix some random issues I would face when adding new components. Compared to compiling Apache Flex in Flash Builder the whole experience of quickly updating a file and being able to test the change within a few seconds was a breath of fresh air. I found the process of adding new components was pretty fast and the segregation of the templates (view) from the components (model) was great. Overall using Angular has been a great experience and meshes well with my Apache Flex experience.
Of course this isn’t the end of the story, because I had a few more things I wanted to learn about Angular. In the weeks that followed I worked on switching from JavaScript to TypeScript, integrated some third party JavaScript widgets and also switched to using the fantastic Angular CLI. I am happy to say things only got better!