DIY Mobile Solar Charger

On my recent trip to Boundary Waters in Minnesota I brought my Sony a6300 along for the ride. Months of planning and design accumulated in a week of full camera, fitbit, and GPS logging batteries.

I chose the Goal Zero Nomad 20 Solar Panel due to its 20 watt output power during peak sunlight, and it’s portability. I purposefully oversized the panel so even on cloudy days I’d still be able to get a small amount of power from it, while relying on the main battery to charge my devices until the sun would come back out.

For the battery charging I used a Mohoo 20A Charge Controller Solar Charge Regulator. Although it’s menu navigation is pretty confusing after you set it up the first time (by selecting which type of battery you’re charging) it’s plug and play from that point.

In order to get the solar panel powering the solar charger I hacked off the cigarette lighter attachment coming out of the solar panel. I was a little dismayed that hot glue was used to separate the positive and negative wires inside the adapter. Pretty bad build quality here considering the $200 price tag.

I velcro-ed the charger to the side of a 12v 7Ah lead acid battery.
IMG_20160625_233059

The battery uses a Y adapter to attach to both the regulator and whatever I’m charging at the same time. Documentation I read online said it’s better to have the load pull from the battery then the “aux” port on the regulator. This setup allows the battery to be both charged and used at the same time. I used some left over XT90 connectors I had from my RC quadcopter.
IMG_20160625_233118

Quick pic of the solar charger plugged into the battery but not the solar panel.
IMG_20160625_233133

The whole setup was enclosed in a Leader Accessories 5L Dry Bag to keep things safe while on the water.
I also stored the various chargers in this.
IMG_20160625_233211

IMG_20160625_233224

IMG_20160625_233242

On the charging end I spliced a Wagan 4-way 12v Automotive Splitter with another XT-90 connector. This would allow me to use stock hardware to charge the camera batteries, my fitbit, and a GPS logger for the trip.

Once on the water I used my tripod as a support for the solar panel, keeping it accurately pointed at the sun while it charged my batteries in the shade of itself.
DSC08380

Overall it worked excellently. It kept all my devices charged throughout the week long trip and was very easy to portage with across land. It helped me get a shot like this one!

Boats in a Row, South Temperance Lake, MN
Boats in a Row, South Temperance Lake, MN

Handyman Workbench

My toolbag has started to overflow with tools while preparing for and moving into my new home. Pry bars, wrench sets, etc have started piling up and weighing me down. I decided it was time to invest a weekend into making a workbench for the garage. I followed instructions from Family Handyman. I made a few modifications along the way.

The whole table can be constructed with 15 2×4’s, a 4×8′ sheet of plywood, and some 3″ and 1 5/8″ drywall screws. Even though the guide mentions using nails, I had the same length screws on hand.
IMG_20160529_112400

IMG_20160529_141610

I decided to use 3/4″ plywood instead of the recommended 1/2″ for a more sturdy tabletop.
IMG_20160529_220941

Pegboard cut and installed, I decided to put the board behind the bench instead of in front to increase table real estate. Soon after doing this I realized a large portion of the board wouldn’t be usable due to the support running through the middle.
IMG_20160530_091325

IMG_20160530_143953

I should have bought 2 boxes of 3″ screws, I ran out about 75% of the way through. I did not know what “CDX” plywood meant, or that one side of the board had a nicer finish than the other. I had to flip the board over after installing it. I used 3 2ft LED light fixtures for illumination. I immediately regretted the decision on using this particular piece. The first time I hammered on the bench 2 of the 3 light covers fell off. I will need to get those secured better. The light they give off though is excellent, it makes the table appear as if it’s sitting outside on a sunny day. Next up is sanding, polyurethane, and figuring out how to hang up all the tools!

New House!

My fiancé and I purchased our first home! after about a month long process we’ve finally moved out of our apartment and into a house all our own.

First up was changing all of the door locks and dead bolts. I learned how to re-key Schlage locks to save myself some money I’d have to spend on a locksmith.

Second thing we did before moving in was paint. The previous owner had children who had taken to the walls like white on rice.
IMG_20160501_160731

I received a grill as a home warming gift from my parents (warning, some assembly and re-assembly after you mess up required).
IMG_20160501_160736

I’ve always wanted a server rack for my network/server equipment. I found an older model on Craigslist for cheap! Took me a while (and some family eye rolls/assistance) to figure out how to fit it into the closet. After some Amazon purchases for a patch panel, switch, UPS, and power strip I was ready!
IMG_20160504_192941

I am in the process of wiring up the house with Cat5e, replacing all of the old telephone and speaker outlets with glorious high-speed internet.
IMG_20160505_111931

And when I say high-speed internet, i mean fiber-optic (fiber modem in white) >:-)
IMG_20160505_111925

Had to strip down the existing poorly build cabinets to fit the server.
IMG_20160509_181546

Cray fish have inhabited the yard from the drainage area past my property.
IMG_20160508_132954

The fence around the yard wasn’t wide enough to fit a riding lawn mower. I extended the gate by converting part of the fence into a gate so I could mow my…
IMG_20160515_132253

IMG_20160515_133724

…Beautiful back yard (aside from the cray fish holes and wet spots). Still need to remove some of the old nails, couldn’t manage to get them out with the tools I had on hand.
received_2944070118520

The area has received an incredible amount of rain in the past month. Low spots in the yard have swelled with water, another issue I will need to take care of. I plan on installing some french drains in the trouble areas (the entire yard) to get rid of the excess water.

I am currently learning how to configure OpenHAB to control my newly installed Z-Wave thermostat and lights. As we go through our list of items we need to repair automation will hopefully be soon to follow :).

DataTables Search box blocking backspace key?

Working with DataTables for the first time I was having some issues with the UI. The search textbox was not allowing the user the backspace. They were able to select the text and use the delete key to clear it out, but it almost felt like there was a script capturing and suppressing the backspace key press. Upon closer inspection the “type” of the input was “Search”. According to w3schools (and Visual Studio’s Intellisense) this was valid HTML. The example of their site worked as well. Perhaps it had something to do with the other scripts running on the page, or possibly the Bootstrap library addon for DataTables? Changing the type to “Text” fixed the issue. I found an easy workaround here until I can fix the root of the problem.

Dinner Table 2.0

Our first attempt at creating a dinner table were quite, wobbly. Following directions from Ana White we created a better one!

We used Cedar wood and 3″ triple coated decking screws throughout the project.

Start with the leg.
IMG_20160305_162649

Then CTRL + C, CTRL + V
IMG_20160305_171154

Add some braces between them
IMG_20160306_120317

Add some screws to hold the braces together
IMG_20160306_120337

Realize your table is 8 feet long and almost 4 feet wide (how is this going to fit in our tiny dining room???)
IMG_20160306_121322

Up next is getting the top of the table planed and joined together into one massive piece of wood. I have traded some computer repair work in exchange for some expert-level wood working 🙂

Update:

After getting the pieces joined and sanded down to 160 grit:
IMG_20160402_132214

After 2 coats of stain and 2 of polyurethane:
IMG_20160408_154032

IMG_20160404_200725

Cisco VPN Error 27850

An antiquated version of Cisco VPN used by a new client was being stubborn and failing to install on my machine. I was getting error 27850, stating something in my system was “corrupted”.

I had a hunch that the installer was conflicting with Cisco AnyConnect, a more modern version of Cisco’s VPN implementation, a program I had uninstalled after finishing up at a previous client.

I dumped the MSI installer log file and sifted through to find a more detailed error.

msiexec.exe /i "vpnclient_setup.msi" /L*V "C:\log.log"

And the result was a 1MB text file. The concerning portion was:

MSI (s) (C8:BC) [14:39:31:368]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI19B4.tmp, Entrypoint: InstallDNE
1: DNECA: RunDNEInstall dneinst command line ‘”C:\Program Files\Common Files\Deterministic Networks\Common Files\dneinst.exe” -Install -InstallPath “C:\Program Files\Common Files\Deterministic Networks\DNE”‘
Action 14:39:31: Managing Network Components. Installing Network Components. This may take several minutes.
Managing Network Components: Working (1)
MSI (c) (80:10) [14:39:32:720]: Note: 1: 2262 2: Billboard 3: -2147287038
1: DNECA: -2147467262 (0x80004002)
Internal Error 2835. ErrorIcon, ErrorDialog
not found on dialog ErrorDialog
Error 27850. Unable to manage networking component. Operating system corruption may be preventing installation.
MSI (s) (C8!74) [14:39:33:955]: Product: Cisco Systems VPN Client 5.0.07.0290 — Error 27850. Unable to manage networking component. Operating system corruption may be preventing installation.

1: DNECA: —–>> InstallDNE Exit exception handler returning g_iExitCode=0x643

CustomAction Dne64InstallExecFn.BEE04CD6_610D_4F5B_AC11_6AD2E290CC1D returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

It looked like the DNE portion of the VPN was failing to install. After some more searching I found a separate installer for DNE on Citrix’s website. I downloaded and installed the DNE installer. When trying to install it threw an error about a registry key. It was unable to modify HKLM/SYSTEM/CurrentControlSet/Services/DNE. I deleted this registry key and re-ran the installer. It went through successfully! After that I ran the original VPN installer, which also worked!

Hello, old friend :-\

Of course that wasn’t the end of it. After importing the client’s VPN connection information, I got error “Reason 442: Failed to enable Virtual Adapter”

2016-02-25_15-21-20

The mighty Google lead me to an IT That Should Just Work post solving this issue via a simple registry edit. After modifying the name of the adapter the VPN was then able to connect!

Open regedit
Browse to the registry key HKLM\SYSTEM\CurrentControlSet\Services\CVirtA
Select the display name to modify:
x86 – “@oem8.ifn,%CVirtA_Desc%;Cisco Systems VPN Adapter” to “Cisco Systems VPN Adapter”
x64 – “@oem8.ifn,%CVirtA_Desc%;Cisco Systems VPN Adapter for 64-bit Windows” to “Cisco Systems VPN Adapter for 64-bit Windows”

DIY Indoor Greenhouse

Spring time is just around the corner and I wanted to get ahead of the curve this year. Instead of buying flowers, vegetables, and other living things from local nurseries I will be growing everything from seed. After some quick online searching, kits for sale range from $600 to $1000!! So, in a recurring theme, I will be taking the (much) DIY approach!

A simple power strip timer controls the lights and heat mats. The controller I picked up has four outlets that are operated by the timer and four that are powered by the power switch. This worked out well because the heat mats needs to always be on, while the lights need to by cycled.

DSC04204

The hardware store had some handy greenhouse kits to get the plants growing. I found some cheap condensed seedling soil (just add water, woo woo woo!). I found it’s mainly made out of coconut fiber, the same fiber I mix with sand for my crabitat (and a lot cheaper!). I needed two bricks to cover the four flats.

The shelving I chose ended up being a little too short. Each of the flats sticks out a few inches off of the shelf. I will need to come up with a solution for keeping the heating mats pressed against the flats.
DSC04205

The heating mats seem to be pretty standard across various brands. They all have green writing and similar diagrams on them. My local hardware store had them for a few dollars cheaper than online.

DSC04207-HDR

Each of the lamps are held on via nuts and bolts attached to the shelving. The chains can be adjusted to change the height of the lamps. After the plants emerge from the ground the lamps can be lowered to a few inches off of the bed and then raised up as the plants get larger. There is an additional shelf that can still be attached, but I do not need it right now. Each lamp has both a cool white and soft white bulbs to help cover the light spectrum. The online community doesn’t see this solution as efficient as purpose-made grow lights, but my local hardware store was out of stock. I’ve read mixed findings on what the best bulbs to use are anyway, so I stuck with the cheapest available and got two different temperatures, even though it might not have any tangible results.

DSC04210

I’ve started with some flowers, tomatoes, and green beans. With 4 flats, I can start 288 seedlings at the same time. LOTS of flowers!
DSC04213-HDR

In the future the current shelving can accommodate the ability to double the number of flats. I don’t think my apartment’s small backyard could handle that much organic material in such a small place. Maybe when I move into a house :).

OVH / SoYouStart Adding Failover IP

I am currently running a Tor exit node on a private server. This has caused the IP to be blacklisted from many services, mainly Freenode’s IRC server. In order to circumvent this I used SoYouStart’s built in “failover ip” service to create a second IP address I can bind applications to that were blacklisted, like an IRC client. My server comes with 16 free IP addresses I can virtually assign to the same NIC. There was a $3 set up fee though.

After getting the IP address assigned by the provider, I modified my /etc/network/interfaces file, adding this entry

auto eth0:1
iface eth0:1 inet static
        address [IP.ADDRESS.SYS.GAVE.ME]
        netmask 255.255.255.255

Once this was added a simple

/etc/init.d/networking restart

added the interface!

eth0      Link encap:Ethernet  HWaddr *:*:*:*:*:*
          inet addr:[ORIGINAL.SERVER.IP.ADDRESS]  Bcast:[ORIGINAL.SERVER.IP.ADDRESS]  Mask:255.255.255.0
          inet6 addr: [ORIGINAL:SERVER:IPv6:ADDRESS]::/64 Scope:Global
          inet6 addr: [ORIGINAL:SERVER:IPv6:ADDRESS]::/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:96259868 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89513036 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:69831382581 (65.0 GiB)  TX bytes:56016587742 (52.1 GiB)
          Interrupt:20 Memory:fe500000-fe520000

eth0:1    Link encap:Ethernet  HWaddr *:*:*:*:*:*
          inet addr:[IP.ADDRESS.SYS.GAVE.ME]  Bcast:[IP.ADDRESS.SYS.GAVE.ME]  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:20 Memory:fe500000-fe520000

Installing Bitcoin Core on Headless Debian 8

This past week I took a few hours to get a Bitcoin full node running on my Debian server. As a believer in the Bitcoin project I’m more than happy to host a full node on my media server.

Compilation

From your home directory clone the bitcoin project. I used the 0.11 branch.

git clone https://github.com/bitcoin/bitcoin -b 0.11

Following the directions from the github readme I configured and compiled.

I installed the necessary tools and libraries to compile the code.

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev

Then I got the build environment set up.

./autogen.sh

Since I didn’t need wallet functionality, I didn’t need to install Berkeley DB. I also enabled hardening because, well because why not right? Extra security!

./configure --disable-wallet --enable-hardening

After the configuration was complete I compiled. I noticed make was only utilizing one core and was taking a long time to run. I reran with make configured to utilize 9 (n + 1) cores.

make -j9

Since I’m on Debian I wanted to package the code up so I could install it via dpkg. CheckInstall puts the code into a .deb file that dpkg can then install. This will allow for future uninstall or upgrades to go smoothly, and is better than blindly placing files into the system.

sudo checkinstall

Next I needed to create a configuration file for bitcoind to use. I created a new bitcoin.conf file in ~/.bitcoin/ and placed the following text in it.

# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands
server=1

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
rpcuser=superSecretUsername
rpcpassword=superSecretPassword

Autorun

I created a .service file for Debian so the application would autostart. I created a “bitcoinuser” user and “bitcoin” group for the process to run under.

[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target

[Service]
User=bitcoinuser
Group=bitcoin

Type=forking
ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoinuser/.bitcoin/bitcoin.conf -datadir=/home/bitcoinuser/.bitcoin/

Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=20s
StartLimitInterval=1s
StartLimitBurst=5

[Install]
WantedBy=multi-user.target

I placed it in /lib/systemd/system/bitcoind.service

After creating, I updated the system to pick up the changes.

sudo systemctl daemon-reload

Then I could issue nice commands to handle everything for me like

sudo service bitcoind start

Remote Status

I wanted to be able to monitor the status of bitcoind remotely via the web, which requires bitcoind to listen to JSON-RPC commands. Craig Watson has a nice PHP project to do just this. I cloned his github repo and installed it into Apache. It needed a small amount of configuration, mainly setting the RPC username and password (that I assigned in the bitcoin.conf file previously), as well as configuring what information I wanted displayed on the main page. After installing the website and configuring Apache with the new route I got a nice screen.

Capture

It’s Working!

It took around 24 hours for it to download the entire blockchain (around 55GB at time of writing), quite surprising with the fast connection the server has.

Street Guardian SG9665GC

Hopefully by now we’ve all seen Russian dash cam videos on YouTube, most of which leave your jaw hanging and eyes wide open.

I recently received the Street Guardian SG9665GC as an early birthday present! After weeks of researching, forum hunting, and video review watching I came upon the Street Guardian and added it to my gadget wishlist.

The Street Guardian SG9665GC
The Street Guardian SG9665GC
Controls knobs on either side of the camera can adjust the position of the lens.
Controls knobs on either side of the camera can adjust the position of the lens.

I chose this model due to it’s better-than-average build quality. The Guardian contains a superior Sony IMX322 CMOS sensor along with an “all-metal” lens. Coupled with its Novatek 96655 Processor it’s able to record excellent 1080p 30fps video with h.264 encoding. The kit also comes with a GPS receiver, used to record the vehicle’s location and speed. Another reason I decided on the Guardian was it’s extremely small form factor. After installation behind my rear-view mirror, I could only see the three cords coming from the camera and going into the cat’s interior trim. My first thought when opening the packaging was “wow, this thing is tiny!”

The lens is made of glass instead of lower-end plastic, increasing the image quality
The 7 element lens is made of glass instead of lower-end plastic, increasing the image quality.

The kit comes with an extra long power cable that allowed me to run the cable along the top and side of my interior trim, hiding it from view. It plugs into a cigarette lighter for power. I plan on chopping the connector off and wiring directly to an accessory powered fuse so I can keep my cigarette lighter open for phone chargers etc.

Navigating the UI on the device can be a bit clumsy at first. The 5 discrete buttons on the body have multiple uses depending on which screen is being presented to the user. The unit truly is “set and forget” though, after some initial configuration (PAL to NTSC, 60 to 50hz, etc) Navigating the UI isn’t needed.

The camera “loops” over itself when the memory card is full. The oldest videos on the card are removed for new captures. A simple button press on the camera, or a g-sensor trigger, will cause the camera to put the currently recording video into a “protected” state where it cannot be deleted by this rolling over functionality. This is used for accidents or events the driver wants to capture for later review, without fear of the video being deleted automatically.

Unlike most included SD cards that come with products, the class 10 32GB micro SD card is no chump, continuously writing at 20MB/s and reading at 86MB/s. However, these speeds were measured with a USB 3.0 card reader. Using the included card reader limited reading to 20 MB/s and writing around 17 MB/s.

Capture

Downloading from SD card to SSD
Downloading from SD card to SSD

The camera logs the location information sent to it by the attached GPS receiver. The GPS coordinates are not overlayed on the video, but instead embedded in the file. Applications like Registrator Viewer can present the data when played back on a computer.

Registrator Viewer playing back a recording.
Registrator Viewer playing back a recording, note there was lots of ice on my windshield.

Registrator overlays the vehicle position on a map that automatically adjusts to keep the vehicle in view. It can also show “G-sensor” values, but the Street Guardian does not currently support logging the data.

headphone jack connectors on the bottom are used for GPS in and A/V out. Power is supplied via the USB-B connector.
headphone jack connectors on the bottom are used for GPS, A/V Out. Power is supplied via the USB-B connector.

The Guardian can be configured to start recording to a new video file every 1,3 or 5 minutes. When it does this I noticed the new file has ~1/4 second of overlap. A mild inconvenience, much better than having missed recording time though.
The Guardian also records audio from inside the car. I tested this by having a conversation in the car. At a normal “talking volume” the device picked up the words decently. When watching the video there was no trouble discerning what people inside the car were saying. A decent amount of road noise can be heard as well, but that could be due to the 2005 Cavalier not being too quiet of a car.

The recording light on the device flashes while in operation. It’s a dim LED though, I was unable to see it from behind the rear-view mirror at night. The screen can be configured to turn off after a set amount of time. I set it to turn off after 15 seconds of being on. This allows me to verify it’s working correctly before I start driving.

Once installed it tucks up neatly behind the rear-view mirror.
Once installed it tucks up neatly behind the rear-view mirror.

And lastly, a quick night time sample video. The sun had set several hours before the video. The camera does a good job at capturing as much light as it did! As I was driving I could not see the clouds from my seat.

To Infinity, Recursively!