Jay, trying to remember...

Controlling Vera home automation Z-Wave controller with Amazon Echo by running an emulator on a Raspberry Pi

This is all made possible by a nifty little Java app written by armzilla. Here’s a quick explanation of the setup:

Amazon Echo Raspberry Pi Vera Home Controller
The Echo will communicate with Phillips Hue controllers, but my setup is Vera based… what to do? Add a Raspberry Pi- the Raspberry Pi emulates the Phillips controler and transposes it to ‘Vera speak’ The Vera is setup with both on and off scenes for the lights that you want to control

Here are the basic steps I used:

This is certainly a hack, but it seems to be working OK for me over the last couple of days. It would be nice if they just played together natively.

Starting somthing on Raspberry Pi boot...

This seems to be the easiest way to start something up on bootup of Rasperian…

Tooling for a new project - choices, choices, choices...

Here’s the front-end development stack that I’m leaning towards for a new build that I’m contemplating (at this specific momement):

Today, it’s looking like Facebook is winning my attention on open source projects - not sure why this is. I’m still interested in Google’s Angular, but am feeling like jumping into that ecosystem might feel a little locked in- React may feel like the same thing, but I guess I’ll see…

Managing Jekyll with rake

Since jekyll is a ruby tool, I’m using rake to manage it. Here’s my Rakefile

Trying out a bash Jekyll creation script

This seems to work- it opens up the markdown file in vi (which I suppose is what my bash editor is set to) so that will take some getting used to - or I could cheat and not learn vi - which I’ve been putting off for about 20 years now.

Moving to Jekyll

Moving this site over to Jekyll

Clever floating point rounding in JavaScript

This is clever

+Math.PI.toFixed(0); // 3
+Math.PI.toFixed(1); // 3.1
+Math.PI.toFixed(2); // 3.14
+Math.PI.toFixed(3); // 3.142
+Math.PI.toFixed(4); // 3.1416
+Math.PI.toFixed(5); // 3.14159

toFixed(x) converts the number to a string and prefixing with the ‘+’ converts it back to a number. Found here

npm: One tool to rule them all...

After trying to sort out what a toolset should be for standard JS / HTML / possibly Node development, I’m narrowing on just using npm. Here’s the reference material that got me to this place:

npm as front-end package management (bower replacement)

npm as build tool (grunt / gulp replacement)

What I’ve found so far is that I’ve had to install more npm packages that I thought I would- these are to make up for npm’s shortcomings in running scripts. Mostly I can see how this would be a huge pain if I were dev-ing on Windows (which I hopefully never will).

Here’s a link to the package.json file that I’m playing with now - it’s mostly based on the package.json file in this project.

So, lets see if it works without too many weird hoops…

Trying out Codeship

Stumbled across Codeship and decided to give it a shot. Works a little similar to deploying to Heroku which I’m already doing, so it wasn’t too bad to figure out.

Because Heroku stores deployment specific data in environment variables, my little application was pretty much already set up for Codeship. I had to export the variables a little differently. Also, I learned quickly that you had to set the Ruby version using RVM in the setup and the test command. Here is my setup - the environment vars are set so the tests can pass:

and here is my test command:

and the poop is passing (at least right now it is)…

npm Error - " glob error { [Error: EMFILE, readdir ... "

Found the answer why this was happening here: http://blog.izs.me/post/56827866110/wtf-is-emfile-and-why-does-it-happen-to-me

Posting it here because this worked: