IoT: Internet of Things

Lately I’ve been playing with Internet of Things type technologies. Started with Raspberry PI’s but got turned onto ESP8266 microprocessors. They can run a lite-weight version of python called micropython. Basically it lets me run a cheap sensor platform anywhere I can get power for about $20. I’ve got the code for the pi and the esp8266 in this repo. Most of the esp8266 chips come with at least one LED on the board you can blink, so I wrote a library to blink morse code.



Doing a lot with Docker at work, I’ve decided I need to bone up on the skills on the side projects. This tutorial was extremely simple and if you understand what’s going on under the covers – it’s pretty amazing. You’re basically spinning up two fully functional virtual servers and running a complete web application on them.

I’m hoping it’ll speed up some of the plans I have for and allow me to be a little more “dangerous” with the things I’m trying – while being able to get back to stability and also potentially have someone other than myself work on the site. There’s an API in my future.

Kindle on Android screen sleep timeout

I can’t prove it, but I think the latest version of the Kindle app on Android changes the way the screen sleep timing works. It presented to me on my android moto-x with a recent update to Kindle, v4.3.0.44 and if I didn’t read fast enough the screen would dim in anticipation of going to sleep. It was annoying because it would do it right as I was getting to the end of the page, and I couldn’t find a setting in the app itself to prevent this. There is an android permission android.permission.WAKE_LOCK that allows an app to stop a screen from going to sleep – and I suspect the Kindle app had this previously but the developers decided to remove it. The solution was to update the android settings-> display -> sleep setting to something higher (5min in my case.)

RDC to Win 2008

When trying to RDC (i.e. terminal services connection) to a server I started getting the error:

The remote computer disconnected the session because of an error in licensing protocol

Spent a while figuring out exactly what I had to turn ON to get it working when in fact it was something I had to turn OFF.

The problem was I had installed the “Remote Desktop Services” role thinking it would enable RDC connections, when in fact this is a much more complicated beast that I think wants to enable the server to serve up tons of desktop sessions to many users vs. the single connection administration activity I needed. This new functionality comes with yet another licensing scheme from Microsoft and googling for a solution sent me down this path many times.

The solution: Remove the “Remote Desktop Services” role, and go to Start ->Control Panel->System and Security->Allow remote access . Doing this you find the familiar Remote Desktop settings and things work like I expected.

Give Camp New England 2011

I spent last weekend doing coding as a charity for non-profits as a part of New England Give Camp 2011.  The short version: 100+ volunteer developers get together and help 20+ non profits with all their technology/website needs for an entire weekend. 

The longer version of the story details how little sleep happens, how much amazing work can get done in a single weekend and learning where the tires really hit the pavement. That story also has to showcase the people who put this thing together and worked so hard before the event to make it happen.  The things the sponsors provided were exactly what was needed.  The venue (Microsoft’s 1 Memorial Drive office) was also a big piece of the story.  100+ very true uber-geeks with laptops and the WiFi was 100% on and super fast the entire weekend.

I didn’t know the event existed until my friend Chris from VT asked if he could spend the night.  Serendipitously my wife and kids were out of town for the weekend and my plans involved mostly lawn work.  So I contacted some other friends I found out were going and got myself signed up.

My team created a companion pet memorial site for the Maine Society for the Protection of Animals.  We also did some training on how they could use their drupal based website to publish new articles without burdening their already over-worked web-master, freeing him up to do more creative/compelling things with their site. I’m a little bummed we didn’t “launch” the additions to the site over the weekend, but we did get it running on their development server, and I’m confident they’ll be pushing live at which point I’ll update this post.

The end of the weekend involves each team presenting what they’ve done and it became very clear how much work really happened.  The whole thing was an eye opener on many levels.

I’ll do it again if the family commitments allow.

CSS style lost on validation in ASP.NET, ie only

In the process of upgrading the style of an existing ASP.NET web application I incorporated the grid system style sheets. Along the way I created a single style sheet with 4 @import directives, so I didn’t have this list of CSS files on every page, just one <link href…> tag that included a single CSS file with the @imports.
During testing it was uncovered that while using the app in IE 7, when a validator failed and generated a message (like “Bad email address” etc) during the postback process a large majority of the style on the page would be absent – making it look pretty bad.
Turns out the problem is the @import directives not being obeyed during the 2nd rendering of the page.
I moved all the CSS into a single file (which will help with performance in the long run) and the problem goes away.