Thursday, December 4, 2014

Random.org clone

I kind of want to attempt to clone random.org and its features. Especially the draw service. I could do the programs pretty easily. Demonstrating provable random sources is the tough part

http://random.hd.org/ is cool too

Monday, October 6, 2014

Catch Phrase Clone

I decided about a year ago to create an electronic game which is inspired by Catch Phrase with a vibe of Cards Against Humanity. The premise being an offensive word or phrase comes up on a screen and you have to describe the word without using the phrase.

I will be documenting my efforts here.

Hardware:

LED Buttons

I am using the adafruit buttons listed here in various colors. The diameter is 16mm


Power:


Software:


Documentation:

Wednesday, July 16, 2014

DNS and No-IP takedown

I finally hit the point where I was forced to learn something about domains and how dns works.
No-IP had a ton of their domains seized by Microsoft and as a result my dynamic dns stopped working. I used a servebeer.com domain for years as a dynamic dns redirect. Used this for my openvpn and lots of other stuff. I have had spilk.us sitting around for a while and not using it. As a result I started using free dns from afraid.org to make it work. Now I was able to create cnames which point to this blog hosted by Google!

I went to freedns.afraid.org, set up an account. Told it my domain, spilk.us.

I then went to my domain registrar, gave it the nameservers for afraid's servers. made an A record for spilk.us with my external IP from my ISP. Then I updated my DDNS with my router to update on afraid. I also was able to finish Hurricane electric's IPv6 certification because I was able to make MX records and AAAA records for ipv6 web (see v6.spilk.us) and ipv6 email (no longer using because I don't actually want to run a mail server).



DNS is pretty cool and pretty well documented out in the world. Just took me the kick in the pants to learn it.

Friday, December 6, 2013

Picture snapshot

Using my snaps program (mostly based on example from VideoCapture) and using www.reddit.com/r/pics/comments/1s3rm5/five_months_ago_i_created_a_program_to_silently/ as an inspiration, I wrote this. https://github.com/tspilk/python_webcam_snaps

Use it however you want. I have it snapping a photo of me every time I unlock my machine with Task Scheduler in Windows 7 to look back in a year or so at all the derpy faces I make.

Saturday, August 17, 2013

Sprinkler System

Kara and I will be installing a sprinkler system this fall. I am using this as an opportunity to actually do a useful programming, computer interface control project where I can use an Arduino/Raspberry Pi in a useful and productive manor. This project will contain the following elements. RainBird has some great education videos here: http://www.rainbird.com/homeowner/education/index.htm

Interface

The interface will be the only way in which the user will interact with the sprinkler system (other than the possible 'emergency shut off' which will be physical valves and/or a programmatic way to also replicate this behavior.

The interface will be web-based. This web functionality will run on a Raspberry Pi using Apache and be local-access only. That is, I will limit the ability to the LAN in order to impose some security on the system. Either password protected or MAC-address restricted.

I plan on including screen shots of various control sites as I develop them here.

Somewhere between the interface and the controller (though mostly interface) is the code needed to get the Arduino talking on the network. I found a little guide which talks about running a web server on the Arduino itself. This is must more simple than my original though of having the Arduino behave as a mindless drone that just takes commands over the network. As I develop this concept into more home automated things, it will likely be the better option as I can have everything centrally controlled and monitored on the Raspberry Pi and just have slave units that do the home automation over the network.

Controller

The controller will be how the user requests will be processed into the 24VAC signals needed by the sprinkler hardware in order to turn the water on and off. This will be comprised of an Arduino connected to a number of relays and an Ethernet controller. This will allow for the web access to the controller and for the signals to be processed and to fire the relays needed. I still have not decided if I will build a custom board containing the ATmega chip and other componants or just use three shields (would be more expensive but would require less building on my part).
The proposed pre-fabed parts are as follows:
Relay Shield - http://seeedstudio.com/wiki/Relay_Shield
Ethernet Shield - http://www.amazon.com/gp/product/B006J4FZTW/
Arduino Uno R3 (already have)- http://www.amazon.com/Arduino-UNO-board-DIP-ATmega328P

An all-in-one unit like this would be nice too. http://www.instructables.com/id/A-watering-controller-that-can-be-home-networked/


These components will be ideally contained in a housing located near the valve manifold (likely under the crawl space)

Relay Board:
http://www.glacialwanderer.com/hobbyrobotics/?p=9 
http://playground.arduino.cc/uploads/Learning/relays.pdf

Edit 5:
Did a mock up of the circuit for my relay board using the java circuit simulator from
Paul Falstad's page at http://www.falstad.com/circuit/



Based this on the arduino playground suggestion for relays and the posting at glacial wanderer.
http://www.instructables.com/file/F78I338GKS0T8A0


Valves

 The valves will be 24VAC triggered. I will build a manifold using whatever ones are most convenient, including a back-flow (anti siphon?) mechanism or simply anti siphon valves. I will discuss these ideas with Chris. I plan on running these off of the existing water supply in the back yard to avoid the need of tapping into the main water supply for the house as the water in the back will only be needed for this purpose. If putting anti-siphon valves, it was suggested to paint them with outdoor paint to avoid having the plastic getting brittle due to UV exposure.

Edit:

I have to build a manifold for the four Orbit valves I purchased. I will be hooking this up to the main water with a hose that connects to a second "manifold" which will allow access to a spigot at the house, a connector to the sprinkler system (which will have the anti-siphon), and a third connector to a valve located at the other end of the yard. I will secure this to the house

added a "fail-safe" off button. Basically, I will wire a button into the Arduino according to this site http://www.electroschematics.com/8964/turn-on-led-button-arduino/ and I created an If statement which will turn all relays off if the button is pressed (I plan on wiring this into a big red easy-button or something and mounting it to the house)

Zones

The zones are supposed to all use the same type of sprinkler. It is recommended by Rain Bird to get the sprinklers to be able to reach each other for maximum coverage. The type of head will depend on the zone. Measurements of water pressure, flow rate must be determined to calculate maximum number of heads and other things. I plan on using the Vinyl tubing rather than PVC as it will not require digging a trench and destroying the yard.

Zone 1

This will be the front yard, normal sprinklers, trenched from the back.

Zone 2

Back yard, normal sprinklers

Zone 3

 Garden area, types of sprinklers will depend on what works best for a vegetable garden. Drip, or sprayers of various styles.

Zone 4

Drip zone. Since these are low flow systems, I assume we can use one system for the two beds on the front, the side and the small bed in the back.

Security

 Since I do not want to let the world have control of my valves controlling my water, or my home theatre setup, I will create this in a secure way. Obviously I dont want it to be inconvenient for Kara to access but do not want it to be open to the outside world. There will need to be a happy middle ground between these two things. Obviously, local access only would be important. This will allow me to access it via an OpenVPN or SSH tunnel when away from the house. Perhaps a login page in order to secure it from visitors to the house. Another option (though obviously spoofable) is to restrict to specific IP addresses based on MAC address rules on the Router. This is simple, invisible to authorized users and the scope of the allowable IP addresses (on the right side of the firewall) is such that even if it were compromised, I would know who is doing it since I would have physically handed them access to my home network and realized they did something malicious.

Monday, July 29, 2013

DDD - Digital Dead Drop

I wrote this program a while back. In light of the recent NSA and Snowden news, I thought it interesting enough to put up here. I wanted to see what people thought of the concept and hopefully someone with better programming skills could clean up the concept and make it safer for general consumption.



The thought occurred to me while reading the Ender's Game series (namely the Shadow series) which involved a lot of covert communication on part of the characters. One of the methods used, the characters would send messaged to private dead drops for later retrieval. At the time I became very interested in secure communications and set up my own private OpenVPN server. Since I developed this, much of the communication was "taken care of" from a security standpoint. My user base was limited to myself, so I didn't concern myself with cleaning up the code to avoid injection attacks and the like. I submit this code with the hopes that people realize my perspective with developing it, just having fun with a concept.

The interface is exceptionally simple, as I wanted to use it mostly from my phone (which I connect to my vpn). This allowed me to quickly enter random thoughts on the bus or while out and about. without using commercially available options or something stored locally on my phone. This made the text safely tucked away on a secured and backed up server.


The submitted text provides a response showing the message and IP address submitted (this is not checked from the server side, as a lot of things in this, it was assumed)

My sshing into the server the messages can be watched in real time by following the file with tail.


To accomplish this, I used Python 2.7 and the Twisted library. I generated my own SSL certificates (which might have been unnecessary for the scope of the project as the traffic is already encrypted over the vpn but provided insight in the process)

This was my first project involving web/ssl and python together.


The source code for the project can be found at my github repo HERE.

I would appreciate any feedback with the knowledge that I never meant for this to see anyone's eyes but my own and have tried to remove any "sensitive" info I may have accidentally left in during testing.

Friday, July 5, 2013

Spokane Transit Authority

The south hill is a very nice place for Spokane. The houses up in the hill are well maintained and the general opinion is that the snobs live up here. Also those who do not wish to live in many of the more crime ridden portions of town. This is the reason my wife and I decided on this area
I have been riding the bus for a month now as a means to avoid the mass of traffic commuting down the hill. It has been very convenient as a bus stop exists five houses from our home. Due to the nature of this neighborhood, the clientele on the 6:55AM city loop from 29th Ave to the STA plaza is made up of commuters.
A man just got on the bus. He is carrying a green grocery bag from Super One Foods. It is obvious that he hasn't just woken up and is on his way home to consume his purchase. Based on the shape and silhouette of the bag, it would appear he has obtained a forty ounce beer.
The forty is a unique beverage choice for a number of reasons. Firstly it is seven in the morning in a Tuesday which carries its own set of issues. It also is a specific quantity of beer which ensures the goal of the drinker isn't just trying to enjoy a delicious malt beverage on a hot day (which the news promises to be over one hundred degrees). If one simply wanted a cold beer to quench their thirst, almost any beer is a better alternative and is likely of a reasonable quantity not to inebriate you. The goal of the forty beer is to get you drunk.
Alcoholism isn't something to laugh about but it gives an insight into some of the issues one might have on the bus. Riders who are drunk or on drugs can make the experience less than desirable. Even those just exposed to lifestyles connected with these issues seem to have less ability to cohabitate with their fellow human being. These people will undoubtedly end up at the bus plaza as a central "hang out" to loiter at.
The bus plaza is a bizarre place to me. When I am riding the bus, my goal is to arrive at my destination by minimizing my time spent on the bus. Even if I miss my transfer, the next bus is less than twenty minutes away (on a weekday). It seems I am of a minority of riders who actually use the plaza as a means to catch a bus or transfer buses. It always astounds me to see people to hanging out there. This issue of loitering is what makes it such a sketchy place to visit as people with no agenda often cause trouble for those of us that do. Getting bored and hassling people isn't fun for someone who just wants to be left alone. This is why I often leave my headphones on and ignore everyone I encounter on my commute.

To be fair, I have never had a negative experience riding the STA in Spokane. It is actually a rather convenient alternative to driving. Though its routes and frequency leave something to be desired as it typically takes three times as long to get anywhere, even if you plan your route meticulously. I hope to see it improve and plan on using it more in the future.

Hope this gave some insight into a brief thought I was having.

See you on the 33