Author Topic: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.  (Read 15932 times)

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Since we just finished our 7.7KW Grid Tie install, I have interest in using these cool USB dongle Software Defined Radios to monitor our spanking new Smart Meter the utility installed.

I have made no real progress so far but have been busy on other stuff. I installed the Skywave Linux distribution in VirtualBox on my Macbook Pro and it works sort of kinda.  The dongle definitely works but I don't understand how to use it so far. It doesn't do what I want at all plus it is GUI driven. I was hoping to use it with the command line to snoop my meter values.

Typically, all the easy stuff uses Mickey Soft. Not going there.

Cubietruck is a bit wimpy to use a GUI, IMHO so Skywave is no help for my needs.


Anyone used one of these guys?

https://www.amazon.com/gp/product/B0129EBDS2/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1 << Amazon out of stock listing.


http://skywavelinux.com/ <<The home page.

Supposedly these things can mimic pretty much any RF reciever once configured.

Anyone with actual experience, I would appreciate a clue hammer blow.

Thanks.

Tom



« Last Edit: December 06, 2016, 12:44:07 PM by TomW »
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3040
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #1 on: December 06, 2016, 01:23:43 PM »
yeah Tom,
I have used the SDR usb dongles.
I have an older one than what you linked but it works fine with the SDR Sharp software.
I haven't played with it too recently but I have gotten it to work with other programs so used to decode APRS packets and also got it working with software to decode the local highway department that had moved over to digital system. Most of the Wisconsin State Patrol is also now on digital I believe.

So you should be able to decode your meter if someone has already figured out how to do that.
The SDR that you linked is better than mine because it has an SMA antenna jack which is more common than the kind that I have. But mine came with a small mag mount antenna so I just desoldered the tiny coax from that and soldered that end on another connector that I could use with existing antennas .

If you haven't been on SDR Sharp website that is the place to go do some reading. I am pretty sure you don't use Windows so not sure how you would do it on linux or mac but on my Windows 10 I used a program that makes a virtual audio cable so you can route the audio from SDR to another program running on the computer to use.

I just bought a kit off ebay that takes a SDR ( included) and you solder on on a board with some other components that will allow it to tune down below 28 MHz limit into the HF bands. I haven't had a chance to put it together yet though.

Keep us posted on  your progress with this . I see Amazon is out of stock on the one you listed but you might try Nooelec for omparable models. http://stores.ebay.com/nooelec/


Larry
« Last Edit: December 06, 2016, 01:26:43 PM by ClassicCrazy »
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

paul alting

  • Jr. Member
  • **
  • Posts: 66
    • http://paulalting.com
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #2 on: December 13, 2016, 06:57:47 PM »
Tom,
I haven't any experience with SDR as yet, even though I have a bench full of more traditional amateur radio equipment, which for me has a nice retro essence about it.
But, I have been looking over the past year and I wonder if you have looked into gnuradio, where you essentially develop the complete software processing section?
The link is http://gnuradio.squarespace.com/about/.

Have a read and you will see it is quite comprehensive and capable.
I'm not sure if it will work with the particular SDR dongle you have and I know nothing about smart meter and what modulation methods they use for data transmission.

I'm sure there will be others that will have tinkered with trying to do the same.

Paul
6 x 200W PV into home-brew 6 stage MOSFET charge controller : Microhydro 220Vac 3 phase IMAG
8 x 400Ah LiFeYPO4 Winston : Latronics LS2412 inverter
QuadlogSCADA control and monitoring system : Tasmania, Australia : http://paulalting.com

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #3 on: December 14, 2016, 11:11:08 AM »
Paul;

I do have GnuRadio installed in a Virtual Machine running Ubuntu. I find it way too hard to use and I don't have the patience to dig into the typical GNU cryptic documentation.

Thanks for pointing it out as an option, however.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3040
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #4 on: December 24, 2016, 08:27:14 PM »
Tom,
Did you get your SDR  yet ?
This looks interesting and you can get an SDR as part of their kit.
https://outernet.is/
https://youtu.be/24HBmRKHULs

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #5 on: December 25, 2016, 10:39:56 AM »
Tom,
Did you get your SDR  yet ?
This looks interesting and you can get an SDR as part of their kit.
https://outernet.is/
https://youtu.be/24HBmRKHULs

Larry

Larry;

Yeah, already have it, one of those impulse buys before I researched and discovered it is yet another of those M$ only supported devices.  :'( Sadly, it was probably actually developed on Linux or other open source systems but only supported for Mickey$oft.

end rant. ;D

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3040
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #6 on: December 25, 2016, 11:50:12 AM »
I am not a linux guy but it looks like there is linux support for SDR
http://www.rtl-sdr.com/skywave-linux-new-linux-ubuntu-distribution-made-for-software-defined-radio/
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #7 on: December 25, 2016, 01:01:41 PM »
CC;

Got Skywave installed in a virtual machine on my macbook pro. It works but nothing for reading a smart meter I have found for it, yet. Missed the other 2 rtl distros so grabbing them now. 

Rather not run a GUI on the Cubie with its limited resources plus it is headless.

Appreciate the heads up.

I want a simple command line crond script or whatever to simply poll the meter every X hours or something. A few years ago I probably would sort out how to do it in Perl or Python but I just don't have what it takes to do that stuff these days. Bad case of CRS (Can't Remember $#!+).

Still too stubborn to give up just yet.

Thanks again.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3040
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #8 on: December 25, 2016, 02:03:00 PM »
Have you seen this - lots of links but not sure if they will help you
http://hackaday.com/2014/02/25/using-sdr-to-read-your-smart-meter/

http://bemasher.net/rtlamr/
« Last Edit: December 25, 2016, 02:06:07 PM by ClassicCrazy »
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #9 on: December 29, 2016, 08:07:26 AM »
CC;

Well, making progress (of sorts), got it  running in tcp mode on one of the cubietrucks running Debian Sid. Can access it from other devices over the network with graphical tools. Still a ways to go before it does what I want.

Just a heads up.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #10 on: January 13, 2017, 11:50:50 PM »
Well, after some false starts and lots of research, I found something that actually works as an arm binary for Linux.

It works with rtl_tcp to snag the data from our meter. Nothing fancy but moving forward. It is called rtlamr by a guy called bemasher and a google search should kick up a link.

rtl_tcp is available as a Debian package and the rtlamr is available as a binary.

Biggest problem finding good info on these radios, especially for reading meters is that damn near every thread on "how" diverts to a bunch of political BS about privacy and all that brings. So, the tech stuff gets buried by those who just want to @&%@ about the possibility of abusing it.

Still got some learning curve to climb but at least making forward progress.

Supposedly, we have the only smart meter in this burg so I can't really abuse it here.  :o

It is kind of interesting once you get it rolling along. Puts out this info to a log file:
  Time                                      Meter type   ID#             value
{Time:2017-01-13T22:27:20.656 8 SCM:{ID:51417813 201.58  KWH out
{Time:2017-01-13T22:28:03.997 8 SCM:{ID:51417812 877.16  KWH in
{Time:2017-01-13T22:28:28.068 8 SCM:{ID:51417814 675.59  KWH net

Meter type 8 is an electric meter each meter value has a specific ID# and all output values are 100th of a KWH (divide by 100 to get the KWH) I run it with the infinite loop option enabled so it just dumps to a file whenever the meter broadcasts it's info.

Hopefully this helps cut through the frustrating search for how this can be done.

It works  ;D ;D ;D

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

Westbranch

  • Hero Member
  • *****
  • Posts: 2788
  • Building System (sort of) 1 weekend at a time
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #11 on: January 14, 2017, 12:03:23 PM »
Tom are you able to access a couple of the previous owner bills  for comparing your total consumption to?  would let you know if the meter is working correctly...
FYI  there was a bad batch of meters up here that had to be replaced within months...
KID FW1811 560W >C&D 24V 900Ah AGM
CL150 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 Cisco WRT54GL i/c DD-WRT Rtr, NetGr DS104Hub
Cotek ST1500 Inv  want a 24V  ROSIE Inverter
OmniCharge3024  Eu1/2/3000iGens
West Chilcotin 1680+W to come

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #12 on: January 14, 2017, 12:27:41 PM »
Tom are you able to access a couple of the previous owner bills  for comparing your total consumption to?  would let you know if the meter is working correctly...
FYI  there was a bad batch of meters up here that had to be replaced within months...

I can get the utility usage going back before we got the place. We recently switched from a tank type gas water heater to  a demand electric water heater so that will skew any historic usage figures.  from July 2015 to July 2016 we averaged 16 KWH / day. Since we commissioned the SMA we have had generally had overcast, clouds and precipitation and no impressive full sun days and we have only used a net of 15.5 KWH/day which is less than what we used before the electric water heater for that year we averaged usage for.

So far the meter values appear to be accurate from direct observation and the radio  telemetry matches the display values.

One reason I want to keep electronic records is to be able to identify issues with metering.

All part of the fun being the first to do it on this utility.

Tom
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3040
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #13 on: January 14, 2017, 01:34:38 PM »
What frequency do you receive that at ?

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

TomW

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1415
  • Nullius in Verba
Re: Use Cubietruck and Software defined Radio [RTL-SDR] to read smart meter.
« Reply #14 on: January 14, 2017, 03:27:14 PM »
What frequency do you receive that at ?

Larry

Here is the info it pushes when you start rtlamr:

16:10:01.687832 decode.go:82: CenterFreq: 912600155
16:10:01.691712 decode.go:83: SampleRate: 2359296
16:10:01.692078 decode.go:84: DataRate: 32768
16:10:01.692200 decode.go:85: SymbolLength: 72
16:10:01.692302 decode.go:86: PreambleSymbols: 21
16:10:01.692501 decode.go:87: PreambleLength: 3024
16:10:01.692617 decode.go:88: PacketSymbols: 96
16:10:01.692719 decode.go:89: PacketLength: 13824

Thats all I know. Looks like 912 Mhz? All the docs I looked at showed the meter radios using the 900Mhz band.

rtl_tcp identifies the dongle as:

Using device 0: Generic RTL2832U OEM

I got this dongle on an Amazon lightning deal for $12 delivered. Should have got 3 or 4 but wasn't sure on support in Linux

https://www.amazon.com/gp/product/B0129EBDS2/ref=oh_aui_search_detailpage?ie=UTF8&psc=1


I had some unused wireless IP camera antennas and used one for the dongle which comes with no antenna.

Tom
« Last Edit: January 14, 2017, 03:36:46 PM by TomW »
Do NOT mistake me for any kind of "expert".

( ͡° ͜ʖ ͡°)


24 Trina 310 watt modules, SMA SunnyBoy 7.7 KW Grid Tie inverter.

I thought that they were angels, but much to my surprise, We climbed aboard their starship and headed for the skies