Posts

Powershell - Collecting and Reporting on SQL Instances

Generate a list of every SQL Instance on your Servers To be successful as a Systems Administrator, you need to be able to collect information about your environment. This little guide will show you a simple and effective way to collect and report on every SQL Instance that is installed on a server in your domain. Overview I like to write functions and automated collection scripts, so I can have up to date reports. Sometimes it makes more sense to take someone else's code if for no reason other than saving time and effort.  I have been using Boe Prox's useful Get-SQLInstance for several years and thought I would share how I use it. Get-SQLInstance supports SQL versions 2000 - 2016. Prereqs You need an account with Administrative permissions on every server you want to run the script against The account must have the ability to query AD for server names Download Get-SQLInstance from  https://gallery.technet.microsoft.com/scriptcenter/Get-SQLInstance-9a3245a0...

Creating a PC Fan Power Hub

Image
DIY PC Fan Hub I recently ran out of fan power headers on my PC motherboard. A quick search online and about $12 later, I had a fan hub heading my way.  A few days later I had the fan hub installed in about 5 minutes and all my fans were adding to the office noise. The thing is... I couldn't stop thinking about how easy it would be to make. Overview Fast forward a couple months and I find myself in need of a way to hook up some 120mm fans for cooling purposes. This time I want to find out if building my own fan hub is worth the effort. I have four 120mm PC fans that need to be powered. I would like to have the option of adding more fans later. I want to keep it cheap and simple. I will use a 12V wall wart and will add switch to power on and off. I had considered throwing a Nodemcu on it and making it a Smart fan hub. It might be a fun little project, but I have several Sonoff switches that I hacked and programmed for use with Alexa. You can see the Sonoff series at...

Creating Alexa Skills for IoT and Nodemcu - Part 3 Alexa and Lambda

Image
Reading Nodemcu IoT Data with Alexa This is the final post in a series aimed at connecting Alexa to a Nodemcu that is collecting temperature and humidity data.  Go to Part 1 - Design Go to Part 2 - AWS IoT Overview I recommend reviewing my first post in this series, so you can understand the game plan... but here's the short version. We will create and configure three separate services in AWS. An Alexa Skill for voice commands, a AWS Lambda function that will act as a middle man, and AWS IoT for storing the current state of the Nodemcu sensors. DISCLAIMER: This guide uses a work around to allow Nodemcu to communicate directly with AWS IoT. The work around uses API keys that will be written in cleartext on the Nodemcu. Proceed at your own discretion. Goals Create a AWS Lambda function that will collect the Nodemcu data that was sent to AWS IoT This will be written in Python Create an Alexa Skill to read data gathered by the Lambda function Setup ...

Creating Alexa Skills for IoT and Nodemcu - Part 2 AWS IoT

Image
Connecting Nodemcu to AWS IoT This is part two of a series of posts showing how I setup a AWS based solution to allow Alexa to read data collected by Nodemcu with DHT temperature and humidity sensors. The design is discussed in part one of this series. Go to Part 1 - Design Overview I recommend reviewing my first post in this series, so you can understand the gameplan... but here's the short version. We will create and configure three separate services in AWS. An Alexa Skill for voice commands, a AWS Lambda function that will act as a middle man, and AWS IoT for storing the current state of the Nodemcu sensors. DISCLAIMER: This guide uses a work around to allow Nodemcu to communicate directly with AWS IoT. The work around uses API keys that will be written in cleartext on the Nodemcu. Proceed at your own discretion. Goals Configure an IoT Thing Setup a security policy and user that can write data to the Thing Shadow via the REST API Ensure the policy limits ac...

Creating Alexa Skills for IoT and Nodemcu - Part 1 Design

Image
Let's Make Alexa Interact with Nodemcu In this post I will we create a solution that allows Alexa to read sensor data collected by a Nodemcu and a DHT11/DHT22 sensor. Go to Part 2 Overview I collect temperature and humidity data with Nodemcu and DHT11/DHT22 sensors throughout my house. I have been storing the data in Graphite , which is a proven time-series database solution. Graphite is traditionally used in the context of monitoring IT systems such as server and application performance. I visualize the sensor information with Grafana .  This is great for me, but let's say my wife wants to know the temperature in our daughter's room... I would quickly learn that what seems great to me does not create a simple experience for others. So how would I go about making a method that my wife would actually use? My answer is Alexa. I will use a the inexpensive ESP8266 based Nodemcu and a DHT11 or DHT22 sensor to collect temperature and humidity data. We will use ...

Hacking the Sonoff Wifi Switch - Part 3 Alexa Smart Home

Image
Controlling Sonoff with Alexa This post will build our previous work with the Sonoff Wifi Switch. We'll focus on using an Arduino library called fauxmo to allow Alexa to interact with the Sonoff. Go to Part 1 Go to Part 2 Overview I have been controlling appliances such as lights and aquaponics equipment using MQTT with Node-RED and also Blynk. Both work well. When I recieved an Echo Plus as a gift for Christmas I quickly understood the potential that the Alexa service had. It is simple to use and for those of us that like getting under the hood, functional short comings can be overcome with the creation of Alexa Skills and some type of internet accessible service to handle logic and automation (AWS Lambda, Node-RED, etc).  Echo Dot can be had a reasonable price currently. You can also keep tabs on the Alexa development pages. They have been giving out Echo Dot's to Skill creators that meet certain criteria. This guide will use the FauxmoESP library ...

Hacking the Sonoff Wifi Switch - Part 2

Image
Programming the Sonoff Wifi Switch In my last post, I showed how to mod the Sonoff Wifi Switch for easy programming using Arduino (or any other ESP8266 programming utility). In this post, I'll show how I setup my physical programming hardware and get custom code onto the Sonoff using the Arduino IDE. Go to Part 1 Go to Part 3 Overview Programming the ESP8266 based Sonoff is relatively simple. It will require a connection between the Sonoff and the programmer, which in this case is a PC, Raspberry PI, or Mac. A simple, cheap USB to Serial UART adapter will connect the computer to the Sonoff for programming. A WORD OF CAUTION : These devices are designed to work on your home mains power. You should understand the implications of connecting a device you altered to mains power. Do not ever work on a device that is connect to a mains power source. Do not attempt to program the Sonoff while it is connected to a mains power source. Goals Make an easy method to ...