Archive for the 'Posts' Category

PowerDVD front end project

Saturday, May 10th, 2008

My latest project is a front end for PowerDVD. It creates a browsable database of all your videos, with descriptions, running time and more, plus a poster image. It has the ability to skip forward and backwards and saves your current spot when you press stop.

Password Helper

Saturday, April 7th, 2007

apwhlperThis is my latest project. It is a program for generating and storing passwords for websites. Nothing is encrypted so you need to run it from a secure location, such as a TrueCrypt volume.

Source of corruption

Thursday, January 25th, 2007

I think I finally tracked down the source of the variable corruption mentioned in an earlier post. When the monitor program uploads the data, I am using the fork command which makes a duplicate copy of the running program, one of the programs continues running, the other one calls the shell script to upload the data and then is suppose to die. Well, there was one last command it was running. Im not sure what it did exactly, but it had something to do with resetting the serial port. I think it was changing some setting on the serial port which then caused the monitor program that kept running to not read the incoming data correctly. Everything is running smoothly after adding a call to exit() right after the call to the shell script.

Another change that I think is going to be a huge improvement, is monitoring the door sensor for state changes instead of watching for the switch to be hit. The problem with watching for it to be hit is, if the door lingered in a certain position it would just constantly be registering door hits. Changing to looking for a state change means that another door hit cant be registered until the door sensor registers going into an off state. So even if the door lingers in that one position, it will only register one door hit.

I also discovered what I think is a bug in the arduino code. I was comparing two variables, and if one was less than the other then I wanted to execute some code, but I was having some problems, because the code seemed to be executing when it shouldn’t be.  It turned out that when the two variables were exactly the same, that for some reason, the arduino thought they were different. So taking that into consideration I changed the if statement and now things seem to be working as they should.

In the home stretch.

Wednesday, January 24th, 2007

Today I got the database tables created and the scripts in place to get the uploaded data into those tables. So now all the infrastructure is in place. I still have some minor fabrication to do and need to make the door switch more permanent. But beyond that, the rest is just programming. All the data transport mechanisms are in place, all the hardware is in place, and all the data formatting is figured out. The only things really left to do are to make a page to display the data, and to improve the logic handling. There are few rare scenarios that would mess data up right now, for example if the dog went out and then came right back in as well as some error handling in case the internet is down. But all that can be figured out.

Beginning real testing

Tuesday, January 23rd, 2007

It has dried up enough that I think we can leave the doggy door open. I modified the door monitor program to ignore false motion readings. So the raw log file should be more readable and it should be obvious when the dog went outside or inside.

I reset the log file, http://www.junkphone.com/all.txt so with the dog starting inside. The first set of data will be him going outside and the second set will be him going inside, and so on.

Up and running!

Sunday, January 21st, 2007

I was able to track down the short circuit and repair it. Took longer than I would have liked but not as long as I feared. So, everything is now in place for testing. Which I am now doing. You can read all the raw sensor data here, http://www.junkphone.com/all.txt

Right now, all new data is uploaded whenever the motion sensor registers a ‘motion stop’. Data lines that say, ‘processed’, indicate when a new batch of data has been uploaded. So a ‘processed’ line should always follow a ‘motion stop’ line. Since the motion sensor can register false readings there is alot of extra data that will not be there once I get all the logic code in place. False readings need to be filtered out and I should only upload new data whenever the dog goes in or out.

Short circuit

Saturday, January 20th, 2007

I went to test the new sensor with it all hooked up only to discover that somehow there is a short circuit somewhere in the heat shrink tubing. Which means I am going to have to rewire everything before I can do any real testing. Yay!

Unblocked.

Saturday, January 20th, 2007

After exchanging half a dozen emails with my host provider, they admitted to blocking my ip address but would not say why. All they would do was unblock my ip and whitelist it so it would not happen again. So I am still not clear on what I was doing to get banned. It seems like if I connected via ftp more than a few times in a few minutes, I would get banned. Anyway, I should now be able to start getting data onto the web and into a database. The only problem now is, it has been raining for days, so the dog is not allowed to use the doggy door.

Today I managed to get all the wiring redone using heat shrink tubing so it looks nice. I also replaced the piezo sensor with a standard magnetic alarm switch. I have done a little bit of testing with it and it looks like it will be alot more reliable than the piezo film.

Later on today I will do some full scale testing. Opening and closing the door, triggering the motion sensor, and seeing if the data gets transmitted to the web reliably.

Blocked!

Friday, January 19th, 2007

Wasn’t able to do any testing last night because for some reason my webhost keeps blocking my IP address. Not sure what is causing it yet. It might have something to do with my upload script being called from the C program, although that doesn’t make alot of sense. Or it could be a virus on one of my computers. I turned off the C program and reset my modem to obtain a new IP so I can get through for now. If I am blocked again when I get home tonight, then it must be a virus. So we shall see.

Minor setback

Wednesday, January 17th, 2007

The ardunio was slightly damaged in a tragic cleaning accident. Took several hours to get it functioning again. Which did not leave very much time for anything else. I did however make some progress on tracking down the variable corruption. I still do not know what the root cause is, but I was able to figure out a workaround for now.

The cold weather is causing the piezo sensor, http://www.parallax.com/detail.asp?product_id=605-00004, on the door to give false readings. It basically just goes off constantly. It is a really cool sensor but I think it is way too sensitive for this project. I need to find a replacement sensor. I might just go with a typical magnetic alarm system switch. It wont be as sexy, but it should be more reliable.

The testing of the upload script suggests that it is working and seems to be very reliable, which means I can now start working on the web portion of the project. I will start out by creating the database tables and just dumping the raw data into them. Once that is working reliably, I will turn to analyzing the data and generating output.