Amro's Tumblr RSS

Archive

Jan
31st
Tue
permalink

Nest

I bought a nest thermostat a while back. I wanted it because of one particular feature: the ability to set the temperature in my home from my iPhone and iPad (or an Android device, web browser). Installation was a piece of cake — a couple of screws and four wires. Setup was simple and the web and mobile apps are well done. Plus it promises to save one money and is software upgradable (wee!). It’s an incredible little device.
Fast forward to a few days ago, when the nest reported that it couldn’t detect the fan wire. It also read the current temperature in the house a few degrees higher than actual (confirmed with two other thermometers). We had just installed a whole house humidifier, through which the fan wire runs, so I thought fan wire issue might be related to that. Nope. Then the nest dropped off my wireless network and gave a low battery warning. This is odd because my nest has been working without issue for weeks. I tried the obvious (charging via usb, resetting to factory settings, etc.) but nothing seemed to help. My house was now around 64 degrees fahrenheit (the nest claimed 84!) late on Sunday. Hardware stores, where one might buy a temporary thermostat, are closed.

So I called support. I was on hold for longer than I liked (perhaps 20 minutes?), then a guy named David picked up. David was exactly the kind of guy you want on the other side of a telephone call in a situation like this. I described the symptoms and he immediately knew what was up — a bad update (v1.1.2) had been downloaded by my nest and couldn’t be installed. The nest was repeatedly trying to install this update, which ran the battery down and caused my problem. David was able to look at detailed logging to see that my nest had indeed downloaded said bad build, and essentially issued a command for my nest to download a new fixed version of the same build.
At this point, I charged the nest via usb once more and put it back on the base an hour later. I set it to heat my home, made sure it was connected to my network, and left it alone. A few minutes later all was well. The temperature nest was reading was closer to normal and entirely normal by morning). So not only did they have someone there to take my call late on a Sunday night, but they also had enough data to know exactly what my problem was *and* push an update to fix it the same night. Should this have happened at all? No. Did they resolve my issue promptly? Very much so. Nest has excellent support.

An aside — the nest is a mass storage device. It shows up as a drive with 40MB free space and has a single visible file — a plist file containing the serial number and some other mundane info. The plist is curious (it definitely shows the nest’s Apple roots, so to speak).

Posted via email from amro’s blog | Comment »

Jan
2nd
Mon
permalink

Uh oh. The boy just Climbed out of his crib for the first time.

Dec
17th
Sat
permalink
Dec
13th
Tue
permalink

Springboard Style Wiggles

So you figured out how to setup a UILongPressGestureRecognizer and now you want to make a view “wiggle” back and forth similar to the iOS Springboard app. This is actually pretty simple with Core Animation.
First, setup the view you want to wiggle. The code below assumes it’s called “view.” I’ve found that setting kWiggleAnimationAngle to 0.04 works well.

In your gesture recognizer’s handler:
//Start at negative kWiggleAnimationAngle so we animate to positive kWiggleAnimationAngle
view.layer.transform = CATransform3DMakeRotation(-kWiggleAnimationAngle, 0, 0, 1.0);

//Setup a transform that will rotate our view to positive kWiggleAnimationAngle
CATransform3D transform = CATransform3DMakeRotation(kWiggleAnimationAngle, 0, 0, 1.0);
//Setup our animation with the transform
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@”transform”];
animation.toValue = [NSValue valueWithCATransform3D:transform];
animation.repeatCount = HUGE_VALF;
animation.duration = 0.1;
animation.autoreverses = YES;
[view.layer addAnimation:animation forKey:@”wiggle”];

We’re also setting a few important properties:
- setting repeatCount to HUGE_VALF tells the animation to play indefinitely
- duration is the length of the animation (in one direction)
- autoreverses tells Core Animation to automatically play the animation in reverse once it’s finished
Finally we add the animation to our view’s layer and that’s that. Well, sort of, when we’re ready to stop the animation we need to do the following:

//Remove the animation from our view
[view.layer removeAnimationForKey:@”wiggle”];
//Rotate the view back to its default position
view.layer.transform = CATransform3DMakeRotation(0.0, 0, 0, 1.0);

Resources: Apple’s Core Animation Programming GuideWWDC 2011 VideosAlmost There Stackoverflow Post
Notes: I generally dislike in-app Springboards but sometimes they fit the bill.

Posted via email from amro’s blog | Comment »

Jun
18th
Sat
permalink
The case for a real ‘Apple TV’? (Taken with instagram)

The case for a real ‘Apple TV’? (Taken with instagram)

permalink
Little man wearing his Star Wars shirt. 16 months old today. (Taken with instagram)

Little man wearing his Star Wars shirt. 16 months old today. (Taken with instagram)

Jun
10th
Fri
permalink
Watching Buzz Aldrin speak. Last WWDC session. (Taken with instagram)

Watching Buzz Aldrin speak. Last WWDC session. (Taken with instagram)

Jun
9th
Thu
permalink
Securing application data #wwdc (Taken with instagram)

Securing application data #wwdc (Taken with instagram)

permalink
WWDC Keynote. (Taken with instagram)

WWDC Keynote. (Taken with instagram)

Jun
2nd
Thu
permalink