Wednesday, November 25, 2015

OpenHAB and Proximity

A big part of being able to automate with rules is the ability to know who is home. Proximity is one of the items that needs to be transferred from DomotiGA to openHAB. There are two main ways of doing this. OpenHAB supports a Bluetooth binding which requires a bit of working to get setup. Not wanting to mess with that, I decided to just adapt my original shell script to openHAB as well as incorporating some changes from This example page also has some good rules on using not only phones but laptops and such on the network to track who is home.  You can have all kinds of fun with that!

OpenHAB and Zigbee Philips Hue

Now that openHAB and Z-Wave are working, it's time to get Zigbee setup so I can use the cheaper light bulbs. As of this post, the GE and Cree Zigbee bulbs are $15 at your local Home Depot or on Amazon in comparison to $30 for the Z-Wave ones. I have tested the Cree bulbs and they have a nice even glow compared to GE. The GE bulbs look cool since they have a clear dome but deathly to look at when on.

My co-worker originally bought the bulbs but realized replacing the wall switches was the way to go, so now I have them, ;).  Since I didn't go the Wink route, I had to figure out the best way to get Zigbee support. Zigbee seems a bit harder as I couldn't find a nice USB solution like Z-Wave. There are some USB solutions like the Ti Zigbee development board which is supported by openHAB2, which isn't ready for prime time.

After many hours researching I decided on the Philips Hue Hub. It's not the best solution as far as flexibility but it works with openHAB without root, using the native REST API and works locally without a cloud service. You can join it to the cloud if you want for remote access, but openHAB takes are of that for me and doesn't rely on someone else's server but my own. Plus it supports scenes and the new version of the hardware is Apple Homekit certified (if you are into that). It seems that the new hardware version just came out so it was a bit hard to find but of all places, Best Buy had it in stock. Most places sell it with a kit with a few RGB bulbs vs standalone.  I didn't want to spend that much and honestly, using the cheaper Cree bulbs is a great start. Eventually, I would like to try the color bulbs. Maybe Philips can send me some to review...

Thursday, November 19, 2015

openHAB and Z-Wave

Now that openHAB is chugging along nicely, I would like to be able to start controlling devices using off the shelf parts. There seems to be two standards widely used Z-Wave and Zigbee. So far it appears light bulbs are mostly Zigbee and switches/thermostats/door locks are Z-Wave. You can get Z-Wave light bulbs but as of this post, they cost twice as much. Zigbee is what the Xbee is based on and it isn't as standardized across manufacturers like Z-Wave. To be as flexible as possible in the end, I want to have both radios available to openHAB.

One way to do this is via a rooted Wink Hub. My co-worker really likes the Wink Hub as it has worked out well for him, but he is solely using it and not integrating it. If I had gone with this solution, it would of cost me less but in the end it wouldn't have been as flexible - depending on their device database, require polling, and requiring another app and point of failure. Also unless you root it you are using their cloud service, plus its hard to root after its been updated. The nice thing is it has all the radios: Z-Wave, Zigbee, and Bluetooth. What would be cool is to root it and take control of everything directly (found openWink). Of course there are other controllers like SmartThings by Samsung that has an API and the ability to add unsupported devices. The last one I came across was the VeraLite. These are all more expensive than the Wink.

Saturday, November 14, 2015

Nextion - Human Machine Interface

Another crowd sourced campaign completed! This one, from Indiegogo is called Nextion HMI, Human Machine Interface. This display offloads the UI elements, processing, and design away from your microcontroller. Nextion has an editor that you design your UI with drag n' drop elements. Then your microcontroller just interacts with the display over serial to retrieve button press and other events. I believe this is similar to 4D systems but affordable. Sweet!
Nextion in action. Image from Indiegogo.

Here are some of the specs for the 2.4in. For details check Indiegogo or their site

  • 320 x 240 Resolution
  • RGB 65K true to life colors
  • TFT Screen with integrated 4-wire Resistive Touch Panel 
  • Easy 4 pin interface to any TTL Serial Host
  • 4M Flash memory for User Application Code and Data 
  • On board micro-SD card for firmware upgrade 
  • Visual Area:36.72mm(L)×48.96mm(W) 
  • Adjustable Brightness:0~180 nit, the interval of adjustment is 1% 
  • 5V90mA power consumption
Indiegogo was for 2.4in and 4.3in. Now they are releasing 5.0in, 7.0in and 2.8in. Anything over 2.8in comes in a higher resolution which is nice.

Sunday, November 8, 2015

openHAB and Colorific

After my initial adventures in exploring openHAB, I wanted something I can control. The only thing around at the time was my Colorific RGB bulb I was playing around with in the Jamrific project. Even though openHAB doesn't support this bulb directly, I can still make it work since it is so flexible. One of the available bindings is the EXEC which can call a system command or shell script. Perfect!

Adventures in openHAB

When I was originally researching open source home automation servers, I had looked at openHAB but then dismissed it due to the iPhone looking interface and lack of admin UI. At that time I settled on DomotiGA, as you may have noticed in my previous blog posts. The problem with DomotiGA is the difficulty in adding custom devices without having to edit/compile the source code which is in Gamba3. For now I have just lived with it since it has a nice desktop UI to use and supports JeeNodes. Some other issues is the lack of an official built-in web interface and mobile apps, ease of remote access, plus, it's Linux only, which isn't that big of an issue but it can be limiting for some (to clarify, there are two web interface add-ons). Don't get me wrong DomotiGA is great, but better if you use mostly off the shelf devices.

Now onto openHAB! OpenHAB or Open Home Automation Bus, is a Java based framework to develop your own automation system. Being that it is Java, it will run anywhere Java does which is pretty much anywhere. I am using a Virtual Machine but you could run it on a Raspberry Pi. This time I decided to give it a real try since I have devices to play with now. The easiest and fastest way to get going is to use the MQTT data from DomotiGA and feed it to openHAB. This pulls the data from my sensor nodes around the house. At least this will get you a proof of concept and a chance to get familiar with openHAB.  Unlike DomotiGA, openHAB uses all configuration files. There is a version two in the works that provides a web interface but it is still in beta. I won't get too much into it here, since there are plenty of resources but here is the basic layout. You will see it is very flexible. It's great that I can bring together a mix of my own nodes/hardware along with off the shelf devices. If you are not into editing configuration files, you can download the Eclipse based OpenHAB Designer, which I haven't tried yet.

Saturday, October 24, 2015

Home Automation: Egg Minder

As I was looking for some Z-Wave stuff on Amazon, I saw an awesome deal on the Quirky Egg Minder. It was selling at a reduced price for only fifteen bucks - so total impulse buy! Also, my reasoning to buy just about any gadget is for future blogging. Makes sense, right? I ordered via Amazon Prime on a Friday and received on Sunday. Pretty, sweet! Upon opening the box, I was pleasantly surprised by the nice modern packaging. The Egg Minder is a WiFi cloud enabled device to manage your eggs. You know, the of farm-fresh variety. No more are the days of counting your eggs. Not only does it keep count, but it keeps track of freshness by indicating which eggs are the oldest to use first. This is indicated by a blue LED.

Wednesday, September 30, 2015

Blast from the Past: Tandy 1000TL/2

A little over two years ago I was finishing building the XTIDE Adapter with the Dangerous Prototypes free PCB. Using their Bus Pirate I was able to flash the CPULD, but you need a computer to flash the BIOS. Upon pulling my Tandy 1000TL/2 (my first computer were I learned the basis of everything I do today) out of the closet, I realized after trying a standard keyboard that it requires an XT keyboard. Drat! When my wife and I moved first moved to Monterey, I had gotten rid of a bunch of stuff. I couldn't remember if the Tandy keyboard was one of them. I know I got rid of the monitor(s) and dot matrix printer. Either way, I still haven't found it.

Once in a while I would think about this project and looked up ways to create an adapter from AT to XT. It's cheaper and it takes up less space then getting a $$$ XT clicky keyboard on eBay. More recently I had found some decently priced ones on eBay but never pulled the trigger. 

Then after our trip to the Portland Mini Maker Faire and staying/talking to my best friend, it sparked my motivation to finish this project. We had visited a computer recycling place in search of a keyboard. They thought they had one, but not all 5pin din keyboards from yesteryear are XT. So looking on eBay can be tough as well. The best bet are ones that obviously have a switch.