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.


Tuesday, March 31, 2015

Mac OS X record of installed software (including operating system install)

The file /Library/Receipts/InstallHistory.plist contains a full record of installations, some details about the installation, and date of install.

I stumbled across this today and thought it could come in handy with regard to certain situations.  I just wanted to note it in case anyone else didn't know about this file (like myself).

One potential use I see is finding out what the initial operating system version was for the Mac.

Thursday, February 26, 2015

What is going on recently with the Quirky Wink hub (rooting, API, home automation, home-assistant)

Many have purchased the Wink hub, which is sold at Home Depot as a controller  for home automation devices.  The nice part about the Wink hub is the low cost and number of radios (supported protocols).  Those two items combined makes a very appealing device to use when getting started with home automation.

But there are some drawbacks.  Firstly, the Wink hub operates through a cloud based service.  This means you can access Wink at home, or away from home, which is nice.  But for those of us who want to take full advantage of the hub, the locking down of the API and cloud requirement are really handicapping the device.

If the hub you purchase is running older firmware, it can be rooted.  Once rooted, the doors are open for getting creative with the hub, adding functionality, integrating into customized HA software, etc.  But this too can be a challenge.  First, the hub has to have a certain version of firmware or earlier else the sql injection vulnerability (allowing one to get root) is patched.  In addition, even if you do gain root, updating the firmware requires much effort to maintain root through the update.

Quirky is only giving API access to those who submit requests via email and so far it is known that they may take a long time to respond with the required information, or they may not respond at all.  This difficulty is preventing those developing HA software from being able to incorporate the Wink hub.  Which means, there are less cool things you can do with the hub due to the software limitations.

I wish that Quirky would change direction with regards to the Wink hub.  Instead of trying to prevent root access, embrace it.  With its low cost, and easy availability (Home Depot), and wide range of support devices, the Wink hub is in a position to be a big seller.  There is already a community developing for the rooted hub and new and exciting features are being added.  If Quirky opened up the hub for root, I think it could turn into a hugely popular device, with a large community of talented people developing for it.  It could be become the most popular hub on the market.

If you are like me and want to find some software that will let you create more advanced scenarios for controlling home automation, fortunately, there is at least one offering for non-rooted Wink hubs.

Home Assistant:

https://home-assistant.io/getting-started/
https://github.com/balloob/home-assistant

This is still being developed, but it is far enough along to allow one to integrate their Wink hub and many different HA devices are already supported.  In addition, it lends itself to adding custom components, and end user expansion/development.  Home Assistant is open source and free.  I recently set it up and one of the really cool things is you do not have to hope that Quirky will send you the required access tokens to use the API as Home Assistant has a page that lets you put in your Wink user and pass and will generate a token for you.  So you can get started right away.  Setup is pretty simple, especially if you are familiar with Linux and Python.  Even if not, there are clear instructions and a helpful forum to help you get started.

As of this moment. this is the only non-Wink software I am aware of that will let one use the Wink hub (without having to root).

Speaking of software, there is a commercial product called CastleOS that looks promising.  There is still much to be done with CastleOS's development, but one of the really cool features is builtin support for voice recognition using Kinect for PCs.  I have found that the xbox 360 Kinects (with A/C adapters) can be purchased very affordably from places like GameStop ($25) and are easy to setup with CastleOS and work very nicely.

Unfortunately, at this point in time, CastleOS does not provide much documentation, and only supports a limited range of products.  The Wink hub is not supported.  The do offer a 30 day free demo of the software and the purchase price is $199.  Although I am finding the free software Home Assistant to be more valuable to me ATM, CastleOS may be something for you to check out if you want at more turn-key product that is Windows based, and supports Kinects for voice.

Here are some links on rooting the Wink hub and some links to items that can be used with a rooted Wink hub:

Rooting

https://winkhubroot.wordpress.com/2014/08/16/rooting-the-quirky-wink-hub/
http://arahuman.blogspot.com/2014/11/how-to-root-your-wink-hub-step-by-step.html
http://www.dinnovative.com/?p=348

Discussion and links to other software like Blink

http://forum.xda-developers.com/general/off-topic/wink-hub-root-t2969205
https://github.com/nashira/blink
http://www.rootwink.com

Finally, I recommend having a look at Home Assistant if you would like to use or become involved with a burgeoning application that offers Wink hub support, customization, and growing support for HA devices through an open model, plus existing cool features with more to come.

Wednesday, February 11, 2015

TurboXS UTEC manual (for Subaru WRX), files, and additional information

Introduction

Although some of us still have and use this hardware, information for it is becoming harder and harder to locate.  So to help insure these resources are available I am posting them here.

I first had to find the information and I want to give credit where it is due.  Most of these files came from this site http://honest-bob.com/utec/ .  It is not my intent to take from Honest Bob, again, I am just creating another location where these files can be found.  Please visit Honest Bob's site and maybe send him a thank you.

Official Manuals

WRX-STI User Guide.pdf - this should be the guide for the original UTEC, although the document is dated 2006 and I believe I purchased and installed my UTEC before that date.  I searched the web and could not find a manual that was any different, so I am going with this as the resource for original UTEC devices.

Delta Installation Supplement.pdf - this appears to be for the TurboXS 2006 new Delta model of the UTEC.  The Delta is designed to be used in a number of different platforms, the installation instructions vary slightly from the standard UTEC installation. This supplement is meant to address those differences.

Unofficial Manuals

These two documents are very helpful and a good read for tuning with the UTEC. Both are written by The Ginge.

UTEC Quick Guide 2004

UTEC Quick Guide (Part Deux) 2007

Maps and Parameters

Please use caution and double check everything if you plan to use these maps.  I do not want to be responsible for damage to your car.  I did not create these files. 

02-05 WRX UTEC
02-05 WRX Delta
04-05 STI UTEC
06-Up Delta

Firmware

UTEC Firmware version 5.8 (Original UTEC)
* I have not installed this firmware on my UTEC yet.  Before I do, I am going to try and make sure this is definitely for the UTEC I have.  Improper firmware or a bad flash can destroy the UTEC.  So please be careful. I do hope it is for my UTEC as it brings some nice new features.

UTEC Delta V23B Firmware

Drivers

Delta USB Drivers

TurboXS Tuner (for Delta v23)

Tuner v23

HyperTerminal for Windows 7

Download HyperTerminal for Windows 7

HyperTerminal is necessary for connecting to the UTEC from a computer via the serial cable.

How to install

Installing this requires extracting the zip and then placing certain files in certain locations.

If you are using Windows 7 32-bit Operating System do the following:

Step 1) Right click and extract the zip you downloaded.  The zip extracts two folders.  Program Files and Windows.  Open the Program Files folder, open the Windows NT folder, right click on hypertrm.exe and choose Copy.  Now browse to C:\Program Files\Windows NT and paste the file into the Windows NT folder (Ctrl + V or right click in the white space and choose Paste). 

Step 2) Open the Windows folder from the extracted zip.  Inside will be System32, open that folder.  Inside will be hypertrm.dll.  Right click this file and choose Copy. Browse to C:\Windows, scroll down to System32, right click the System32 folder and choose Paste. 

If you are using Windows 7 64-bit Operating System do the following:

Step 1) Right click and extract the zip you downloaded.  The zip extracts two folders.  Program Files and Windows.  Open the Program Files folder, open the Windows NT folder, right click on hypertrm.exe and choose Copy.  Now browse to C:\Program Files (x86)\Windows NT and paste the file into the Windows NT folder (Ctrl + V or right click in the white space and choose Paste). 

Step 2) Open the Windows folder from the extracted zip.  Inside will be System32, open that folder.  Inside will be hypertrm.dll.  Right click this file and choose Copy. Browse to C:\Windows, scroll down to SysWOW64, right click the SysWOW64 folder and choose Paste. 

In both cases, the help folder in the extracted System32 folder is really not necessary.  It can be ignored.

To run HyperTerminal you will want to either browse to the location of the hypertrm.exe and double click it. 
Win7 32-bit: C:\Program Files\Windows NT\hypertrm.exe
Win7 64-bit: C:\Program Files (x86)\Windows NT\hypertrm.exe

Or - you can create a desktop shortcut.  Browse to the hypertrm.exe using the appropriate paths specified above, right click on the exe and choose 'Sent To'>Desktop (create shortcut).  Now there will be a shortcut on the desktop to launch HyperTerminal.

Using HyperTerminal
Open HyperTerminal by double clicking the exe or shortcut if you created one.  The instructions for how to configure HyperTerminal are in the manual.  The settings must be set correctly for it to work with your UTEC.  When I say settings I mean things like this:
Select COM Port
Port settings:
Bits per second: 19200
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: None


Again, please refer to the manual (instructions for HyperTerminal begin on page 12 of the WRX-STI UTEC User guide.

Helpful Links

I've linked to Bob's site which offers the files above, and two sites that have interesting software that can be used with the UTEC.

Honest Bob UTEC
Jeffsoftware
MPS_UTECLogger 3.0

Also, Googling will turn up more information.  There are a number of threads on the NASIOC forum pertaining to the UTEC.


Sunday, February 01, 2015

Flashed your phone to a Lollipop Rom and lost root?

In my case with a Galaxy Note 2, already rooted and with ClockWorkMod recovery installed, after flashing to CM12 and install Gapps 5 (and selecting the option while in recovery to restore root) I still lost root. 

To re-enable root, go to Setting>About Phone>and tap Build Number 7 times.  That will unlock Developer Options.  Then open Developer Options and the option is there to enable root access.  Once that is done you can then reinstall apps like SuperSU.

Also, if you were backing up data to your external SD card (ex: I was using Titanium Backup) the path changes under Lollipop.  So if it says it cannot find your data, you need to update the path.  For example my path changed from extSDCard to SDCard1.

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...