Hikvision NVR with PIR Enabled Recording

I was having issues getting the PIR sensor of my DS-2CD2432F-IW to trigger recording on my DS-7608NI-I2/8P NVR.

Enabling the PIR alarm on the camera and listening for the alarm on the NVR wasn’t working correctly. I could see the PIR alarm being captured in the log of the NVR, but it wasn’t recording video when the alarm was triggered. After a few hours of troubleshooting I found the following solution.

First, on the camera, disable Motion Detection and Enable Dynamic Analysis for Motion. Since we are going to use the PIR sensor to trigger recording, we don’t need these enabled.

Next, on the Alarm Output tab of the camera, set the Arming Schedule to be active 24/7 (or whenever you want the PIR alarm to be armed).

On the PIR Alarm tab, enable the PIR, and set the Arming Schedule for the same timeframe you set on the Alarm Output tab.

On the NVR, navigate to the Alarm Input tab, and select the appropriate Alarm Input choice. If your camera is set as “Camera 5”, the IP will be, “Camera 6” would be, etc. The Alarm Type is set to “NO” (Normally Open). Select Enable Alarm Input Handling.

On the Alarm Input tab click on the Linkage Method. Set the Trigger Channel to the camera we want to record when the alarm is triggered.

On the NVR, navigate to the Schedule Settings and select the camera we are enabling the PIR alarm for. Here’s the tricky part. Don’t select “Alarm | Motion” or “Alarm”. For whatever reason these do not get triggered for an alarm output. I selected “Event” and set the appropriate times I wanted it for fire.

The PIR sensor on the camera doesn’t trigger “Alarm” or “Motion” on the NVR. It does seem to trigger “Event”. My hypothesis is the “Alarm” choices only fire when the direct alarm connections on the back of the NVR are triggered. If the trigger is coming over the ethernet line from the camera it works differently. I have not tested this hypothesis yet, however. If you are not sure the PIR is working on the camera, enable Audible Warning on the linkage method on the camera.

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.

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.

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

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.



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.

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.


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

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.


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.

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

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!

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.

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

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

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

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…


…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.

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.

Then CTRL + C, CTRL + V

Add some braces between them

Add some screws to hold the braces together

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

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 🙂


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

After 2 coats of stain and 2 of polyurethane:


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 — 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”


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.


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.

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.


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.


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!

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]

Once this was added a simple

/etc/init.d/networking restart

added the interface!

eth0      Link encap:Ethernet  HWaddr *:*:*:*:*:*
          inet6 addr: [ORIGINAL:SERVER:IPv6:ADDRESS]::/64 Scope:Global
          inet6 addr: [ORIGINAL:SERVER:IPv6:ADDRESS]::/64 Scope:Link
          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:
          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.


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.


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

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


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.

Description=Bitcoin's distributed currency daemon


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



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.


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.

To Infinity, Recursively!