Friday, April 24, 2015

Have you tried Sublime Text for script editing?

I recently stumbled upon Sublime Text.  I was working on a new build of Linux and Googled for a good script editor.  Sublime Text came up.  I gave it a try.  First the none beta version, version 2.  After a bit I tried the new version 3 beta.

I REALLY like this program.  I have been using the free Komodo Edit and while it is great, and I still use it too (they just released version 9 with some nice features), I mostly use Sublime Text.

Aside from having many built-in features that one wants in a coding platform, Sublime also has a Package Manager (Control) which can easily be installed.  Once added, the Package Control opens up so much more versatility, expandability, and support it is emmensly valuable.

In addition to the features, customizations, and add-ons, I particularly enjoy the massive selection of themes for the coding environment.  I have become a fan of alternate color schemes which help me identify different elements of code more quickly.  There is almost an infinite amount of pre-made themes free to download.  Additionally, one can create your own themes.

Sublime Text offers a fully functional trial version that does not expire.  It will prompt occasionally about using an unregistered version, but this trial is enough to get you hooked and want to buy a license.  Even better, the licensing is per user.  So once you buy a license, you are permitted to install Sublime Text on all of your computers.  Even work computers.  As long as it is you using it.

At the time of my purchase it was $70 USD.  It is worth it.

I'm sorry Komodo.  I still love you.  But Sublime has become my new coding best friend.

Here are some links to get an idea of what Sublime looks like:
And have a look at this! - Package Control

Thursday, April 23, 2015

Taking existing HD image and applying to SSD - test your alignment

To fully gain the performance benefits offered by switching to an SSD, the clusters need to be properly aligned with the physical sectors on the SSD.  If not, the performance gain from the SSD will be dramatically impacted and can also contribute to increased wear of the SSD.

First, a clean install of Windows 7 or newer onto an SSD is already setup to do proper alignment. This is not an issue.

The issue can occur when an image is captured from a mechanical (traditional) hard drive and then applied to a Solid State drive.  This could result in mis-alignment of the beginning of th clusters and physical sectors.

If you have taken an image of your computer and then applied it to a new SSD, and would like to know if you are properly aligned, perform these steps.

1) Open a command prompt (cmd) - Start>All Programs>Accessories>Command Prompt
2) Type in this command: wmic partition get Name, StartingOffset and hit <Enter> key
This will return something like this:
Disk #0, Partition #0 1048576
Disk #0, Partition #1 524288000

Now open calculator (Start>All Programs>Accessories>Calculator)

Now divide the value return by the command by 4,096.  If the result is an integer (no decimal value), then your partitions are properly aligned.

So in the example above division produced these results:
256
128000

That indicates proper alignment.  Had the results been something like 254.415 then alignment is offset.

If alignment is offset there are ways to correct the issue. You may want to take a look at these free tools:
http://www.partitionwizard.com/
http://www.disk-partition.com/download-home.html

For the record, a SSD partition can be created with command line parameters to set alignment.
Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
Clean
Create partition primary align=1024
Format fs=ntfs quick
Active (assuming you want to install an OS)
Exit

The above commands are not a fix for a improperly aligned disk post imaging, this is a command to create the partition with proper alignment.

If these issue affect your or you are interested I suggest doing some googling and more reading.

Sunday, April 19, 2015

Wink bricked by update (~4/18/2015) - how to use your GE Link Bulbs with something else (link a Hue Bridge)

Update:
In case you have a bricked Wink hub I received an email from Wink and it is possible to repair your hub without having to send it in, provided you have the means necessary to follow these instructions.

I wanted to post this for anyone who might not have gotten the email:

We’re writing again to apologize for the current situation.  As previously mentioned, we suffered an outage this weekend that caused your Wink Hub to fall offline.  This outage was preventable and we are deeply sorry. It pains us to have inconvenienced you as much as we know we have.

While last night’s report was grim, we are now offering two solutions to users who are affected by this outage:

Send Us Your Wink Hub -  We’ll supply a box and roundtrip shipping.   A box will be at your door early this week, and you’ll have your hubs back (with all of the settings preserved) very quickly.    If you’re not into technical stuff- this is probably the easiest route for you.   To send us your hub click here.

Fix it Yourself -  If you are comfortable making some quick changes to your home’s router settings, we can likely get you back up and running in 10 minutes.While this fix requires one to have some degree of technical skill, we’re happy to offer it to all who want to try.  We can even walk you through it over the phone if you give us a ring at 844-WINK-APP . 

You can view instructions on how to repair your Wink Hub yourself via this link recovery.wink.com  These instructions now apply even if you previously deleted your hub.

We are happy to accommodate whichever route you prefer and apologize for creating extra work for you.  Please note that this outage was caused by a security measure put in place to protect you.  Although your home is offline and your hub is inactive - your home and your information remain safe.

The Wink Team
Above is an update, here is the original post...

I think I am done with Wink hub.  It is an extraordinary ordeal to get a simple API access token. Something that could be spit out on a web form just by authenticating with your account takes 7+ weeks from Quirky, if they get back at all.  And that includes occasional check-in emails with them asking 'what is the status of my request'.  I am not disparaging Wink\Quirky staff.  There is just clearly some sort of ignorance to customer support.  For me, without a token, the device is nearly useless for my purposes.

Interestingly one night I had to chat with them for support due to an issue with my hub and I brought up the API request and 7 weeks going by and what the status was.  I was told that an update would be made to my request, and to expect a response in 2 to 7 weeks.  :(

To their credit, the next day I got an email with my API information.  Very much appreciated that they got on it after so long.

So yesterday was the day I was up until 3AM trying to figure out why my hub would not connect. Then today I find out about the firmware update that was pushed and bricked many Wink hubs.

The Wink hub is nice in the variety of radios on board, and potential for supported devices.  And the cost.  But on the downside, cloud only access, extreme difficulty getting an API key (why so hard?  I happen to know it can be down instantly with user login and pass... but that is another story).  What started out as a pretty solid (as in, online all the time) device, took a turn for the worse with firmware 0.77.0.  By this point, I started having a lot of inconsistent, and frustrating issues.  Lights turning on - on their own.  Light groups turning on, leaving one off.  Or turning off, leaving one on.  Devices needing to be re-added.  Slow reaction times.

Other than the brick update, none of the above is really a deal killer for a $50 hub.  But what is confusing is the reluctance to turn this into something great with a reasonable pace.

1) An open source project called Home Assistant, which was the only home automation project I was aware of that you could get a token immediately, was my saving grace.  Otherwise, I would have been real frustrated with the wait for them to issue me API access. But by going to the Home Assistant site, you could put your Wink user and pass in, and immediately get back a token that would allow integration into Home Assistant home automation project.  This tells me that there was really no reason to wait 7 weeks for API access, and just by chance finally get it.  It was a simple as a web form.

2) With potential support for so many protocols and devices, why keep it so limited?  Why not take a more agressive approach and open things up.  That would spur sales, community development, growth, and a more ROI product.

3) Considering the amount of competition in the market, I never have been able to understand why the Wink hub was rolled out, locked down, and eventually (unfortunately, blundered into uselessness).  I'm done.  Had a different, more open, more inviting approach been taken, the Wink hub could have been a tremendously popular device.  But no...

The real purpose of the post is a tip on how to re-associate items, like GE Link light bulbs with another device if they were not removed from the Wink hub (because you couldn't!).

First, the GE Link bulbs use Zigbee.  The Hue bridge supports Zigbee, and these bulbs.  The way to reset these bulbs for pairing is as follows:
Power on the bulb for about 5 seconds.  Turn off for about 3 seconds.  Repeat this 5 times.  On the fifth time you may see the bulb fade after power on, and at this point it should be cleared for easy pairing with another device like the Hue bridge.

Also, the bulbs have a serial number.  It may be possible to do manual additions using the serial number.

I just wanted to pass along if you try to use a bulb with another hub, and it does not pair right away, don't worry, the bulb can be cleared and paired.

BTW, the GE Link bulbs are easy to setup with the Hue bridge.  Compare to a Hue bulb, they do not dim as much, but they do work fine, and can be grouped into scenes.


New beginner's guide to PowerShell on my GitHub page

 I created a beginner's guide to PowerShell here: https://github.com/aamjohns/Powershell_Guide/blob/main/README.md I hope it helps someo...