Friday, December 27, 2013

Viewing Amazon Historical Prices inside Amazon

I spent part of the day working on a Chrome/Firefox plugin that lets you view Amazon Prices over time. I use camelcamelcamel.com's historical data, and put it inside next to the "Add to Cart" button to warn myself before purchasing. Now you can make sure that you're not buying a product on a very bad day!

Here's what it looks like above the "Add to Cart" button:


After clicking on the small snapshot, it reloads a larger historical chart and places it above the product's Title/Name:


If you click on the larger image, it will take you to camelcamelcamel.com and you can setup trigger prices to have them email you if the price drops low enough. I have done this with several products, and it worked out nicely.

In order to install the plugin follow the steps below for Chrome or Firefox browsers.
Note: This is only for Chrome or Firefox

Steps for Chrome Browser:

  1. Install my extension located here: Amazon Historical Price Extension

Steps for Firefox Browser:

  1. Install the Greasemonkey plugin (a prerequisite). Go to https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/, and then click "Add to Firefox". Greasemonkey allows user scripts, like mine, to be installed
  2. You will probably be prompted to restart firefox, do it.
  3. Click on this AmazonHistoricalPrice Addon Link, and it will get installed to your firefox Greasemonkey scripts.
  4. You are done.

Friday, December 20, 2013

Home Security IP Camera in the Cloud

My wife considers me to be paranoid, but I am just realistic. I like to have a little more situational awareness than the average person. For instance, when someone rings on the doorbell, I'd rather look at my phone or computer to see who is there than get up and find out I'm face-to-face with a salesperson. I'd also like to be able to check from work whether a package has arrived at my doorstep, or call my neighbor when I realize my garage door is open when I left on vacation. All of these are easily handled by putting in a wireless IP camera or two. A little more effort, and I can record motion and upload it to the cloud for free as well!



Original Efforts - CCTV and pin spy cameras

Originally I bought one of those CCTV Camera sets, but I didn't like the idea of having wires running around my house to a central DVR.
I thought about getting one of those tiny Spy cameras and putting it in my door's peephole, and then transmitting that to a little TV receiver. That idea added up to a little over $100 and a non-digital signal.

Enter: PTZ (Pan Tilt Zoom) WiFi Webcams

There are a lot of really cheap WiFi webcams out there that have Pan and Tilt capabilities. That means you can control them and have them point around. The cheap ones don't have any zoom capabilities, and if they advertise it then it's a "digital zoom" which is fake and not really zooming. But I'm fine not having zoom. As of this writing I see some under $50. I've bought four, and they're all pretty similar. So similar, in fact, that although the web software for them looks a little different, it seems like the firmware for the cameras are the same. I'll give an example later on. My first WiFi camera was the popular Foscam model pictured on the right. I also bought the EasyN and Wansview cameras displayed.
I use one for my front porch, one inside my garage, one in the baby's room, and one in the front room. Now I can easily see if there's a package sitting on my porch, if I left my garage open, if the baby has climbed out of the crib, and what the kids are getting into while I'm watching a movie with the wife. I measured the power usage of the cameras if they were left on all the time, and it came to about $3-4 a year. Not bad!

Camera Settings Setup

Here's how I setup the camera settings within my network. I'll do a follow on post to describe how to get access to the cameras from the outside. I have a bunch of screenshots of the steps I took, but I will try to narrate a little.
Camera Software for Initial Setup
The cameras come with simple software used for setting it up. Most have you connect the camera to your network with a cable. We are going to do most of the setup on the web interface, so for now let's modify the camera to work on our network (most networks can have the above settings). In particular, I changed the HTTP Port from some other number to 80 so that it would be an easier address to type in the browser. Once these settings are updated to the camera, we can access the camera's web interface and we don't need the software anymore.

Access the Web interface
Type the IP address that was setup above into your browser (192.168.1.126 in our example). It asks for a username/password. The camera should have instructions on what the initial username and password is (you will want to change these later)

Different Webpages for Different Browsers
I have found that for all of the cameras, the ActiveX Mode had the nicest interface, BUT all of these cameras are from China, and I would be worried about installing the required plugins to get the ActiveX Mode running. So instead, use the Firefox/Google Browser signin method even if you use Internet Explorer.

Some of the Settings Available

Alias is used to identify the camera when multiple are on network, but I usually use my phone's app which does not see these Alias names

Enable IP from DHCP
We had earlier set our IP address to 192.168.1.126, but that address might be conflicting with others on the network. So instead of telling it exactly what address to use, we will let our home network pick an address automatically using DHCP. This means the address will not always be the same

Add your wireless settings so that you don't need the cable plugged in anymore.

Camera Boot Options
If there is a setting to "Enable preset" or to "Start running to the specified preset" these would be good to enable. If you ever lose power (or need to power-cycle the camera), when the camera turns on it will startup and look around and then go to a centered position. If the above setting is enabled, you can choose a position for it to point at after the initial boot sequence.

IF YOU DON'T HAVE A PRESET BUTTON, don't fret! There's a really good chance it still exists but isn't accessible through the web interface. As I mentioned above, the firmware for these cameras are very similar. I found out for one of my cameras that did not have the setting that I could send the same command to it that I sent to the Foscam. The way commands are sent is by URLs. Look at the example below that the Foscam (and 3 other camera brands) all use for sending the command to enable the preset:

Note that you need to change the user=admin and pwd=mypassword to your appropriate settings.

When this is done, we are now ready to unplug from router and connect wirelessly. If it does not connect after a while (it can take a minute or two to boot up) you will have to use the software again to easily find your IP Camera.
Resolution and FPS
There are some settings that are instance-based settings. For instance, if you change the Max FPS, any other browser connected to the camera will not be affected. On the other hand, if you change the Resolution from 640*480 to 320*240, any other browser (including the software that is backing up movement to the cloud) will downgrade to the smaller 320*240 image. I highly recommend Putting and LEAVING the setting at 640*480.

EasyN's interface has some arrows to click in order to Pan/Tilt camera

Setting Presets
The web interface will have some way to set preset locations. Use the controls to get the camera to point in a direction you want, and set that to preset 1. Use preset 1 for your default location as this is usually the preset that is loaded when the camera boots up. Then setup some others that might be useful. I once setup about 10, but then I only used about 2-3 of them.

Using Presets
After you have setup the presets, you can "Goto" or "Call" (or some other term used in web interface) one of the presets to have the camera quickly move between preset locations.

Flip Horizontally/Vertically Buttons
The cameras will have a Flip Vertically / Flip Horizontally button that will help out if your camera is being mounted upside down. My camera outside is hanging upside down under the rafters. The Garage one, on the other hand, is just sitting on a shelf and so does not need either of these settings.

Another setting is the On/Off Light button. This turns on the Infrared lights or turns them off. I don't think I have seen an "Automatically turn them on when they are needed" feature, so you must choose one or the other. I just leave them on all the time, I feel it doesn't hurt having them on in the daytime, and they are a necessity at night. The only time I would say not to is if you are using the camera behind a window. In this case, the Infrared lights glare off the window and make it impossible to see during the night. In that case you should rely on a porch light.

Hope this helps someone. Other things I'd like to talk about sometime is how I use ISpyConnect to monitor the cameras and automatically record on motion, how I automatically have recorded video uploaded to web using Dropbox (or any other cloud service), and how to get access to your camera from outside your house.