autoMobile (offline) Mini-Monitor with SDR radio and meter_reader

This was a little out of the box but maybe it will be useful to someone else
Essentially, I was pressing the limitations of the raspberry pi, the mini-monitor program, and the SDR radio to operate with as little as possible (limited power, no network, no intervention while running). It also shows that you can collect data from a moving vehicle and connect the mini-monitor to the network later and have your results post to BMON.

Problem: Verify Mini-Monitor configuration running will function and collect data without intervention once powered on if meters are nearby. While also not providing a network connection or dedicated power to the Raspberry Pi aside from auxiliary power from an automobile, and trusting it to run blind (without a display or console access).

Why would anyone do this? Well, I’m a little esoteric in my methods but consider this a proof of concept to run on a restricted site that may not allow you to personally install the equipment, but it still needs to work. Considering I don’t live in a metropolitan area where I could just plug in an SDR radio and start seeing meters in my neighborhood, I had to drive around to find them. This was a great opportunity to see what reduced power options and, while I’m at it, no network connectivity could do - this was truely a barebones setup but it worked!

My Setup
The primary documentation for Mini-Monitor can be found here, I’ll be referring to it.

I’m using SSH here to configure the software but you may use a console cable or manually by editing files on the boot partition of the SD card. Although these files are usable on a Windows PC, they are text files that use the line-ending format (“n”) used on Linux computers. It is important to preserve that type of line-ending when editing the files. The standard Notepad program that comes with the Windows Operating System does not preserve Linux line endings. Most text editors used for programming do preserve line endings, such as EditPlus or Notepad++.

  1. Download and install the sd card image

  2. I assume we’re working with a wired connection which requires no additional configuration changes but if you are using cellular or WiFi during your setup read this.

  3. Return the microSD card to the Raspberry Pi and power it on, determine the IP, and SSH in using these credentials

  4. Follow these instructions to update Mini-Monitor to it’s current version using Git source control.

  5. SSH into the pi and create a new settings file

    • cd pi_logger
    • cp system_files/
    • note, if you configured using the GUI config tool to configure for alternate networks this file will already exist, you don’t want to overwrite that file so skip this step
    • Open Configure Your Settings File section for additional details that will help going forward
  6. Here are the lines of my file that have been modified from the original template with explanation where needed:

    LOGGER_ID = 'cchrc_minimon_a'
    LOG_INTERVAL = 5*60 # seconds between logging data
    POST_URL = '[BMON URL goes here]/readingdb/reading/store/'
    POST_STORE_KEY = 'Store Key Goes Here'
    #'sys_info.SysInfo', # System uptime, CPU temperature, software version
    LOG_LEVEL = logging.DEBUG
    METER_IDS = []

    • Essentially, name the logger, turn on post to BMON and add your URL and key, comment out # the sys_info line because you don’t need that, change LOG_LEVEL to logging.DEBUG so you see any issues (i.e. if this doesn’t work, you may know why because you set to debug), enable the meter reader, set meter ids to [] so you catch them all, and enable the rtl433 reader because that’s the radio you’re using.
  7. Now you’re ready to roll!

The Drive

Equipped with my Mini-Monitor, a little NESDR Mini 2+, and an appropriate USB cable to attach to my car’s aux USB port I drove around.

Before you go, the #1 thing is to make sure the device powers on, you’ll see the PWR indicator on the pi and a little light on the NESDR Mini.

Now, the fine print.

Yes, everything worked… BUT you have to follow some protocols since you’re running a clockless linux machine.

  • When you power on the pi it will not be able to obtain a time from a timeserver so mark down the time you start.
  • The data stores in ramdisk until it is written to Mini-Monitor at 30 after the hour, again, it doesn’t know what time it is so it’s important to note start times.
  • Leave your vehicle running a MINIMUM of 30 minutes after your last suspected reading, an hour if you’re adventurous, so the data can be written to memory and not lost from ramdisk when powered off.
    • obviously this means you also cannot turn off the car during your ride along, good thing we have auto starts!

After I had the data and the right amount of time had passed I took the device and plugged it in to the network. It started pushing the stored data to BMON immediately. While I didn’t have enough data to compare two points in time, I had enough to know that I had located some meters and recorded data with zero intervention aside from powering it on.

Meters appear in this format in BMON

Sensor ID format
[mini-monLOGGER_ID]_Commodity _METERID see units below

But it all depends on meter, commodity type and multiplier set in your file.

Type Commodity Number
Electric 04, 05, 07, 08
Gas 02, 09, 12
Water 11, 13
# The multipliers below are applied to the rate of change calculated from
# sequential meter readings.  They can be used to convert that
# rate of change into engineering units, such as BTU/hour.
# There is a separate multiplier for Gas Meters, Electric Meters and Water Meters.
# *** NOTE: If you set a multiplier to 0, that type of Meter (gas, electric, water)
# will not be recorded by the Mini Monitor.
METER_MULT_GAS = 1000.0       # Converts Cubic Feet/hour to Btu/hour
METER_MULT_ELEC = 1.0         # Electric Meter Multiplier
METER_MULT_WATER = 1.0        # Water Meter Multiplier