Quiet Dryer Notification for Home Assistant – Home Automation for Babies

My wife and I are new parents. We have an older GE Eterna dryer with a buzzer that can wake the dead. Home automation is all fun and games until you can use it to make major annoyances go away, then it’s no longer a frivolous hobby!

Continue reading “Quiet Dryer Notification for Home Assistant – Home Automation for Babies”

Home Assistant SNMP Switch for PoE on Cisco 3750

Using the Home Assistant SNMP Switch component with my Cisco 3750 PoE switch, it’s possible to enable or disable PoE on a switch port.

This post on a thread about saving energy via PoE got me close enough to manage the rest.

In the example below, i’m controlling PoE on port 41.
Continue reading “Home Assistant SNMP Switch for PoE on Cisco 3750”

DIY 3D Printer Enclosure – Single Sheet Melamine

Weekend project 3D printer enclosure. Main concern was controlling noise. Total cost was somewhere around $150 USD.

 

Designed to be cut from a single 4×8 sheet of 3/4 material. I chose Melamine because it already has a durable finish and is easy to clean. Plans and materials list included below.Continue reading “DIY 3D Printer Enclosure – Single Sheet Melamine”

Hikvision Motion Detection in OpenHAB using node.js

Using a node.js module (node-hikvision-api) for accessing a hikvision camera’s built-in motion detection for use in OpenHAB

It’s a little annoying how Hikvision exposes the motion events on their cameras. It’s a multipart http stream containing XML.

See Hikvision manual Page 176
Section 8.11.30 /ISAPI/Event/notification/alertStream
http://oversea-download.hikvision.com/uploadfile/Leaflet/ISAPI/HIKVISION%20ISAPI_2.0-IPMD%20Service.pdf

node-hikvision-api abstracts that away a bit so hikmotion.js can focus on what to do with those events, like update motion contacts in OpenHAB.

Requirements:
node.js
hikvision camera with motion events configured
(tested with DS-2CD2332-I & XC-2142FWDI)

linedetect vmd
Continue reading “Hikvision Motion Detection in OpenHAB using node.js”

rtlamr Power Meter Data in OpenHAB

Wouldn’t it be cool if you could monitor your electricity usage with OpenHAB for less than 20 bucks with the same accuracy your power company uses for billing?

Using an inexpensive rtl-sdr dongle, it’s possible to listen for signals from ERT compatible smart meters using rtlamr. This script runs as a daemon, launches rtl_tcp and rtlamr, and parses the output from rtlamr. If this matches your meter, it will push the data into OpenHAB using the REST API.

Turns out these ERT meters (at least in Omaha) are broadcasting 4 hours of usage data with 5 minute resolution. It broadcasts this data every minute, repeating the previous broadcast until the next 5 minute interval has completed. This data is flying around unprotected. Using free software and an inexpensive SDR dongle it’s possible to pull this data into OpenHAB.

rtlamr does all the heavy lifting here. It listens for the data, decodes, and passes along the meter readings.

On my meter, the interesting information is just above the readout. That’s my meter’s type and endpoint ID or serial number. I’ve blurred my details for privacy.

meter2
Continue reading “rtlamr Power Meter Data in OpenHAB”

Controlling Android Tablet Screen with OpenHAB and ADB

Wouldn’t it be cool to control an android device’s wake and sleep from OpenHAB? I’ve strapped a couple tablets to the wall with command strips. I’m using them to control OpenHAB. Gotta get ’em working well enough to gain wife approval before doing anything more permanent.

I was griping about turning my tablet screens on and off in response to sensor triggers in my home automation system. My first attempt using Tasker to poll the OpenHAB Rest API was too laggy to be useful. I wasn’t making much progress when my buddy over at https://opsech.io told me about adb and sending keyevents using adb shell. He ninja’d up tabletcontrol.sh and it works beautifully. Following his example, I munged out gettabstatus.sh and it works well enough.

Requirements-Tablet:
Rooted Android device
WiFi ADB – Debug Over Air
NOTE: This app works on ROOTED devices only.

Requirements-Server:
OpenHAB Server & exec binding, tested on 1.8
linux/bash, tested on Ubuntu Server 14.04 LTS
android tools ADB
[text]sudo apt-get install android-tools-adb[/text]

Continue reading “Controlling Android Tablet Screen with OpenHAB and ADB”

Auto-login / full screen with Milestone XProtect Go Smart Client 2014

I love Milestone XProtect. I manage a pretty large system at work, so I was excited to run the XProtect Go free software at home. The free version has some limitations, like 5 days of recording, up to 8 cameras, and the annoying part, a nag screen when launching the client.

For simple things like automating my way past the nag screen, I love AutoIT https://www.autoitscript.com/site/autoit/

Here’s a video overview

Continue reading “Auto-login / full screen with Milestone XProtect Go Smart Client 2014”

Taking over an ADT Alarm and integrating it with OpenHAB

As you can see from previous posts, I’ve started automating my house. There was an ADT alarm system installed. I was given a user code, but that was it. I opted not to pay ADT’s ridiculous monthly fee since reasonable monitoring can be had for $10/month.

Looking at the panel, I have a Safewatch Pro 3000, which the internets tells me is close to a honeywell/ademco vista20p without a couple features like zone doubling.

I have a simple touchpad, not an alpha display, probably similar to the 6150, so it’s terrible to program with.

The wireless receiver is in the 5881 series, still don’t know for sure the specific model, but I suspect its the 5881enh.Continue reading “Taking over an ADT Alarm and integrating it with OpenHAB”

Lookup DVD Metatata from Disc

Like many people, I’ve been trying to find an easier way to archive all of my movies and TV shows to hard disk instead of DVD disc. My previous attempt at semi-automated DVD ripping used an autoloader and some scripts, but it still required a lot of intervention because I couldn’t find a way to correctly name and tag my movies automatically. I wished there was something like CDDB or FreeDB for DVDs that would lookup metadata from the disc in the drive.

Windows Media Player does a lookup of the DVD metadata so I figured it had to be possible.
WindowsMediaPlayer

Thankfully, I’ve stumbled across an awesome utility that will get the DVD’s discid in the format Microsoft uses for their media player and media centers. http://dvdid.cjkey.org.uk/
dvdid-command

Time to fire up Wireshark (or Ethereal if you’ve been doing this forever) and see where that request is going. I stuck the disc in my DVD drive and opened Windows Media Player. A couple of HTTP 302 redirects later I’ve got a HTTP 200 and the current request and reply.
redirects-and-success

Looking at the discid and the URL, it looks like it strips out the vertical bar pipe character | that was used in previous versions.
dvdid-string

Opening the request gives me the URL. It looks like it’s using “User-Agent: Windows-Media-Player/12.0.7601.18741”. To avoid being ridiculously obvious while abusing this api, it might be a good idea to spoof your useragent as well.
request-url

Response is an XML file. Looks really straight forward to parse.
response-xml

The request URL is super straight forward too. Just replace everything after the CRC= with the output from dvdid, removing the | character.
http://metaservices.windowsmedia.com/pas_dvd_B/template/GetMDRDVDByCRC.xml?CRC=92918cc3b7506a7e

There doesn’t appear to be much of anything prevent this from being abused. It opened in a regular browser without issue. I used IE in this screenshot.
response-in-IE

Using Perl and ImageMagick to Generate Meme Image Macros

Sometimes I feel a need to automate some meme generation. Luckily I found this incredibly helpful blogpost from jackmeme. http://www.jackmeme.com/blog.php?id=1

I used it as inspiration and did something similar in Perl. Of course the Imagemagick perl-magick reference was invaluable. http://www.imagemagick.org/script/perl-magick.php

The first thing I thought of with automated meme generation? The Weather! See my previous post about getting data from the Weather Underground API using Perl

This naturally lead to the forecast overlaid on the current radar.
68127-radar

Inspired by http://thefuckingweather.com/, I decided I want my daily forecast in meme form. The first weather-related meme I think of is Ollie Williams.

OllieForecast

But that doesn’t really fit with the meme. Change fucking to motherfucking and Samuel L Jackson is PERFECT!

68127-memetemp

Smoosh those memes together and I’ve got my morning weather!

68127

I found another source of amusement while playing with generating image macros. There is a Pyborg bot in one of the IRC channels I frequent. “She” says some pretty funny stuff, so we keep a quote list. Of course this is ripe for meme-ifying.

meme25

More Evequotes are available in the Imgur Album

Keep reading to see the secret sauce.
Continue reading “Using Perl and ImageMagick to Generate Meme Image Macros”