Wednesday, May 19, 2010

80's / Zombie party

So we had this 80's Zombie party at our place last weekend. I was going to be Zombie Mario, but I gave up on the Zombie makeup after screwing it up several times. So I was just Mario the Zombie slayer.

Anyways... I had one of my friends film me playing Mario Brothers on the Wii. It cracks me up every time I watch it. Check it out:

I should also mention that my wife made an awesome brain cake for all the zombies to munch on:

Twittering doorbell

All I wanted was a doorbell that would send me a text message when somebody rang it, and I wanted it NOW. There are a number of ways I could have done this. Ideally I would have used an opto isoloator, but Radioshack didn't have those. They did have a full wave bridge rectifier, and a 5V relay. I already had some random capacitors, and a 5V regulator, so that would have to do. I connected the AC inputs on the rectifier inline with the doorbell using the connections behind the doorbell transformer in my garage. The relay switch is connected to the digital input and ground connections on my IOBridge. I've configured the iobridge to send an email to both my magic account at that updates twitter, as well as an email distribution list that sends text messages to both my wife and myself, as well as to our email inboxes.

You can find the twitter updates from my doorbell on my twitter account here:

Here is the schematic and a photo:

Sunday, May 09, 2010

Busting the myth: Unbalanced Breaker panel = Larger electric bill

There is a myth that if your breaker panel is "unbalanced" then you will be billed for the higher leg on the meter.

Let's find out...

I didn't film the third part because it was dark outside, but I went outdoors and monitored the meter before and after I shut off the breakers on one of the phases making the load unbalanced. The meter DID spin half as fast, so this proves that the meter IS accurate and this myth is BUSTED!

DHCP Notify Parsing with Polycom phones

Syslog sample:

Jul  8 18:25:12 babelfish dhcpd: {"vendor-class-identifier": {"substrings": [ {"company": "Polycom"}, {"part": "SoundPointIP-SPIP_430"}, {"part_number": "2345-11402-001,1"}, {"app_version": "SIP/ 10:17"}, {"bootrom_version": "BR/ 13:08"} ] }}

create polycom.conf and include it in your dhcpd.conf file.

allow booting;
option option-150 code 150 = text;
option option-155 code 155 = text;
option option-160 code 160 = text;
option sip-server code 151 = text;
option voice-vlan code 128 = text;
class "polycom" {
            match if(
            (substring (option vendor-class-identifier, 0, 4) = 00:00:36:3d) and
            (substring (hardware, 1, 12) = 00:04:f2:11:f3:b9)
            set vendor_class_identifier = (substring (option vendor-class-identifier,5,(extract-int ((substring (option vendor-class-identifier, 4, 1)),8))));
            set vendor_class_identifier_1_len = (extract-int ((substring (vendor_class_identifier,1,1)),8));
            set vendor_class_identifier_1 = (substring (vendor_class_identifier,2,vendor_class_identifier_1_len));
            set vendor_class_identifier_2_len = (extract-int ((substring (vendor_class_identifier,(3 + vendor_class_identifier_1_len),1)),8));
            set vendor_class_identifier_2 = (substring (vendor_class_identifier,(4 + vendor_class_identifier_1_len),vendor_class_identifier_2_len));
            set vendor_class_identifier_3_len = (extract-int ((substring (vendor_class_identifier,(5 + vendor_class_identifier_1_len + vendor_class_identifier_2_len),1)),8));
            set vendor_class_identifier_3 = (substring (vendor_class_identifier,(6 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len),vendor_class_identifier_3_len));
            set vendor_class_identifier_4_len = (extract-int ((substring (vendor_class_identifier,(7 + vendor_class_identifier_1_len + vendor_class_identifier_2_len + vendor_class_identifier_3_len),1)),8));
            set vendor_class_identifier_4 = (substring (vendor_class_identifier,(8 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len + vendor_class_identifier_3_len),vendor_class_identifier_4_len));
            set vendor_class_identifier_5_len = (extract-int ((substring (vendor_class_identifier,(9 + vendor_class_identifier_1_len + vendor_class_identifier_2_len + vendor_class_identifier_3_len + vendor_class_identifier_4_len),1)),8));
            set vendor_class_identifier_5 = (substring (vendor_class_identifier,(10 + vendor_class_identifier_1_len +  vendor_class_identifier_2_len + vendor_class_identifier_3_len + vendor_class_identifier_4_len),vendor_class_identifier_5_len));
            log(info, (concat ("{\"vendor-class-identifier\": {\"substrings\": [ {\"company\": \"", vendor_class_identifier_1,"\"}, {\"part\": \"", vendor_class_identifier_2,"\"}, {\"part_number\": \"", vendor_class_identifier_3,"\"}, {\"app_version\": \"", vendor_class_identifier_4,"\"}, {\"bootrom_version\": \"", vendor_class_identifier_5,"\"} ] }}")));
            if (option dhcp-message-type = 8)
                        option dhcp-parameter-request-list 2,3,4,6,15,17,42,43,60,66,128,150,151,155,160;
                        option option-150 "http://PlcmSpIp:PlcmSpIp@";
                        option option-155 "http://PlcmSpIp:PlcmSpIp@";
                        option option-160 "http://PlcmSpIp:PlcmSpIp@";
                        option tftp-server-name "http://PlcmSpIpFOO:PlcmSpIp@";
                        option sip-server "sip.voip.local";
                        option domain-name-servers,,,;
                        option domain-name "voip.local";
                        option ntp-servers;
                        option time-servers;
                        option time-offset -18000;
                        #option voice-vlan "VLAN-A=10;";
subnet netmask {