Greetings friends, for some time now I have been thinking and thinking about how I could monitor all the electricity consumption in my house, I have found many different ways, and in the end, I have opted for the cheapest and simplest.
Owl USB CM160 Electricity Monitor Compatible with Windows 10
As I was telling you, the cheapest thing I found, which works in my case, is the magnificent Owl USB CM160, which you can find here:
This device is composed of several parts:
The meter that is connected by a clamp to the electricity output of our home.
The base where all the information is collected wirelessly, which we can easily configure, which also gives us a USB connection.
This simple device works as follows:
- The meter collects in real-time the electricity consumption that is passing through the cable and sends it to the base.
- This base stores the information every minute and presents this information through the display, every minute, cumulative of the day, month, cost, etc.
The advantage of this base is that it can be connected via USB to our PC, or server, etc. And already there to install the software so that the information is saved in an SQLite 🙂
Before buying it, make sure you have access to your lightbox, and that you have something similar to this image since it will be here where we will have to connect the clamp.
This clamp connects in just a minute and does not require you to make any holes or anything. The base, if you want to hold it, you can put a little nail on the wall and that’s it.
Telegraf, InfluxDB, and Grafana topology monitoring an SQLite
Requirements we will need to make everything work
To get everything working we’re going to need several components, I’ll leave the list:
- Buy, and configure the Owl USB CM160 Electricity Monitor
- A physical, or virtual machine, with Microsoft Windows 10 or Microsoft Windows Server 2016+ directly connected to the USB unit:
- Last Owl CM160 software update – http://thermalimage.idl.owlintuition.com/downloads/OWL+USB%20Software.msi
- SQLite assemblies to be able to use Powershell (please download the one that corresponds to your .NET Framework) – https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
- Extra Drivers for the Owl USB CM160 Electricity Monitor – https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Once we have everything set up, next-next. We’re ready for the next step.
Fine Configuration for Owl CM160 – Wireless USB Power Consumption Meter
This device when connected by USB, should show us a new COM in our Device Manager, if not, you have the drivers above, download and fly, we will have to see something similar to this:To leave the fine configuration, I have chosen to change it to COM1, in the following way, right button – Properties – Port Settings – Advanced Settings:
A quick check that we are receiving information via USB
We will execute our Owl software, and it will have to appear to us that it is connected, and in addition, if we move between the tabs we will be able to see historical information.If we have everything right, we can go to the next step. Important! We don’t have to close the program ever if we want the information to be stored in the SQLite, so USB and program always connected.
Use a Windows VM for this purpose
In my case, I have done the easiest for me, which VM do I always have turned on? My Domain Controller! So I have connected the base of the Owl to my ESXi, and in the selected VM I have added a USB Host:
Already in this VM, I have installed the software mentioned above and left everything fine, and the software running.
Download and configure the owlCM160_Influx.ps1 script
Let’s download the script that will make all this work, we will download the latest version from the Github repository:
This PowerShell, will download and run from this VM, or computer, with the USB connected and all the software. We’ll need to edit the configuration settings:
# System variables, on here you need to replace the next ones with your own paths, IPs, pass, etc.
#By default the SystemDataSQLLitePath on mi case was C:\Program Files\System.Data.SQLite\2015\bin\System.Data.SQLite.dll
$InfluxDBPass='YOURINFLUXPASS' | ConvertTo-SecureString -asPlainText -Force
Pay attention to the variable NumberArray, this value depends on how often you are going to program the script that is launched, for example, if we put it every 5 minutes, here we put 5.
If it is something sporadic that you want to do every day, put 1440 or some higher value.
Scheduling the PowerShell script every 5 minutes
I suppose you want to know every five minutes that have passed during the last 4, to have practical real-time monitoring of your electricity, so I’m going to show you how to create a scheduled task every 5 minutes:In the name of the task program, the one you like best, this is mine:In the triggers, we’ll select that we want to run it every five minutes:
In the actions, in program/script, we will select where we have Powershell, by default you can see the folder here, also in arguments, we will select the path with the script included, and finally, in start in, we will select the folder:Let’s run it now to see the result:
I created a Dashboard from scratch by selecting the best requests to the database, finishing off colors, thinking about graphics, and how to display them, and everything is automated so that it fits our environment without any problem and without having to edit anything manually. The Dashboard can be found here, once imported, you can see all the graphics:
Import Grafana Dashboards easily
So that you don’t have to waste hours configuring a new Dashboard, and ingesting and debugging you want, I have already a wonderful Dashboard with everything you need to monitor our environment in a very simple way, you will be like the image I showed you above. Select the name you want and enter the ID: 12226, which is the unique ID of the Dashboard, or the URL:
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte I (Instalando InfluxDB, Telegraf y Grafana)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte II (Instalar agente Telegraf en Nodos remotos Linux)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte III Integración con PRTG
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte IV (Instalar agente Telegraf en Nodos remotos Windows)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte V (Activar inputs específicos, Red, MySQL/MariaDB, Nginx)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte VI (Monitorizando Veeam)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte VII (Monitorizar vSphere)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte VIII (Monitorizando Veeam con Enterprise Manager)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte IX (Monitorizando Zimbra Collaboration)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte X (Grafana Plugins)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte XI
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XII (Native Telegraf Plugin for vSphere)
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XIII (Veeam Backup for Microsoft Office 365 v4)
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XIV – Veeam Availability Console
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XV (IPMI Monitoring of our ESXi Hosts)
- Looking for Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XVI (Performance and Advanced Security of Veeam Backup for Microsoft Office 365)
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XVII (Showing Dashboards on Two Monitors Using Raspberry Pi 4)
- En busca del Dashboard perfecto: InfluxDB, Telegraf y Grafana – Parte XVIII – Monitorizar temperatura y estado de Raspberry Pi 4
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XIX (Monitoring Veeam with Enterprise Manager) Shell Script
- Looking for the Perfect Dashboard: InfluxDB, Telegraf and Grafana – Part XXIV (Monitoring Veeam Backup for Microsoft Azure)