Try our solar cost and savings calculator
Uploading net meter to pvoutput to get consumption.
Collapse
X
-
Sadly, I realized that I have the Focus AX-SD, which uses an entirely different protocol. -
I am not because I have never received another meter from my home, but you should probably do: rtlamr -format=csv -logfile=amr.log -quiet=true -filterid=METER_NUMBER
That code is going to change - my friend found some problems with it and has to make it upload at 15 minute intervals.Last edited by rsilvers; 09-09-2016, 03:39 PM.Leave a comment:
-
Are you filtering out the ID of your meter from the command line? This seems to be an option:
Usage of rtlamr: ...
-filterid=: display only messages matching an id in a comma-separated list of ids.Leave a comment:
-
I have rtlamr logging to a file in .csv format.
Then I have a Ruby program reading that file, and uploading it whenever there is a change in the meter reading. My friend wrote it, not me.
Eventually the log will fill the filesystem, but that will take over 200 days.
This will break if my meter goes above 50 MWh due to how it handles values under 0 that are in the 99999 range. But that should never happen due to having solar production. Even if I didn't have production, it would be about two years.
#!/usr/bin/ruby2.1
require 'rb-inotify'
require 'date'
require 'open-uri'
logfile = "/home/pi/amr.log"
class PVReporter
APIKey = "put_key_here"
SystemID = "put_id_here"
def initialize(logfile)
@logfile = logfile
@cur_consumption = nil
@cur_consumption_start_ts = nil
@state = :startup
end
def run
File.open(@logfile, "r") do |f|
while line = f.gets
process(line)
end
queue = INotify::Notifier.new
queue.watch(@logfile, :modify) do
while line = f.gets
process(line)
end
end
queue.run
end
end
def process(line)
cols = line.split(",")
ts, id, consumption = DateTime:
arse(cols[0]), cols[3], cols[7].to_i
return if id != "put_meter_id_here"
if consumption > 50000
consumption -= 100000
end
if @state == :startup
@cur_consumption = consumption
@state = :init
elsif @state == :init
if consumption != @cur_consumption
@cur_consumption_start_ts = ts
@cur_consumption = consumption
@state = :active
end
elsif @state == :active
if consumption != @cur_consumption
record(consumption - @cur_consumption, ts, @cur_consumption_start_ts)
@cur_consumption = consumption
@cur_consumption_start_ts = ts
end
end
end
def record(kwh, ts, start_ts)
h = (ts - start_ts) * 24
w = (kwh / h * 1000).to_f.round
puts "#{ts}, #{w}"
url = "http://pvoutput.org/service/r2/addstatus.jsp?d=#{ts.strftime("%Y%m%d")}&t=#{ts.st rftime("%R")}&v4=#{w}&n=1"
puts url
resp = open(url, "X-Pvoutput-Apikey" => APIKey, "X-Pvoutput-SystemId" => SystemID).read
puts resp
end
end
r = PVReporter.new(logfile)
r.runLast edited by rsilvers; 09-09-2016, 01:37 AM.Leave a comment:
-
It is uploading to pvoutput now. I am surprised there has not been more talk of this $20 solution. In my case, with my three main power panels, I would have had to spend at least $400 to do this with something off-the-shelf.Leave a comment:
-
I put the SDR on my Macbook and drove to pick up my kids at school. In the 8 minute drive I logged the kWh of over 300 utility meters. And I am not in the city - this is on a rural road. I should do it again next month and see what everyone's monthly consumption is. You can import to Excel, sort, and then remove duplicates.
Interval is 15 seconds for my meter. But some are 30 seconds. Here is some output:
2016-09-08T14:07:21.324314645-04:00,0,0,42396914,5,0x1,0x0,3733475,0xe7b6
2016-09-08T14:07:21.712437182-04:00,0,0,42638296,5,0x1,0x1,6345075,0x1f00
2016-09-08T14:07:22.323618024-04:00,0,0,65524437,12,0x2,0x0,134092,0xe6e3
2016-09-08T14:07:22.601612163-04:00,0,0,42395970,5,0x0,0x0,1854720,0x939b
2016-09-08T14:07:22.656200615-04:00,0,0,42396914,5,0x1,0x0,3733475,0xe7b6
2016-09-08T14:07:23.213151073-04:00,0,0,1432172,4,0x0,0x2,25831,0x86ed
2016-09-08T14:07:23.323982464-04:00,0,0,42638296,5,0x1,0x1,6345076,0x6d68
2016-09-08T14:07:24.324863343-04:00,0,0,42638233,5,0x0,0x0,3319992,0x4604
2016-09-08T14:07:24.547051084-04:00,0,0,42395970,5,0x0,0x0,1854720,0x939b
2016-09-08T14:07:24.656547086-04:00,0,0,42638296,5,0x1,0x1,6345076,0x6d68
2016-09-08T14:07:24.768129126-04:00,0,0,42396914,5,0x1,0x0,3733475,0xe7b6
2016-09-08T14:07:26.545333575-04:00,0,0,44832551,7,0x0,0x0,1671103,0xdeb1
2016-09-08T14:07:26.602241529-04:00,0,0,4382647,8,0x0,0x2,12079,0xe1b
2016-09-08T14:07:26.991152112-04:00,0,0,42396914,5,0x1,0x0,3733475,0xe7b6
2016-09-08T14:07:27.04693776-04:00,0,0,42395970,5,0x0,0x0,1854720,0x939b
2016-09-08T14:07:27.156645697-04:00,0,0,42638296,5,0x1,0x1,6345077,0x8f8a
2016-09-08T14:07:27.936022401-04:00,0,0,4382647,8,0x0,0x2,12079,0xe1b
2016-09-08T14:07:28.324144943-04:00,0,0,42395970,5,0x0,0x0,1854720,0x939bLeave a comment:
-
Cool. I just ordered the rtl-sdr to use with my Gyr Focus/RPi. What are the time intervals for the net readings from your meter? I'd like to integrate rtlamr output into my current python scripts that I'm using to monitor my inverter production.Leave a comment:
-
You have an annual reset? I can carry a credit forever, and if I move, I can even transfer it to the new house (if the same POCO).Leave a comment:
-
I get gross generation from the inverters. My problem is getting net generation, which shows up once a month on the electric bill.
Then consumption is the difference, once you get the dates lined up.
Since the bill is delayed 3 to 4 weeks, its hard to plan usage approaching the annual reset date. Like, shall I heat the shed and
water with propane or electric? I may install a cheap but accurate, used revenue meter some day to keep a much closer running
account. Your distribution setup may be a bit complex to use that approach. Bruce RoeLeave a comment:
-
you will have to do the math to get consumption. PVoutput can help (you might have to make a donation). there will be some error as the two measurements are not taken at the same instant but should be pretty close.
Leave a comment:
-
Problem is, I am reading net. My meter is not transmitting consumption. So I am not sure how to get gross consumption into pvoutput.Leave a comment:
-
Leave a comment:
-
I am reading the meter from my Raspberry Pi now. It is working.
Leave a comment:
-
One can. One just has to wait for a Moderator to approve the post.ERT only transmits one value so there is no way to see the internal counters. In fact, the POCO cannot see them either remotely.
But my meter did go below zero, so it will work out.
One cannot post URLs on this site, but check Wikipedia for "Encoder receiver transmitter (ERT)"
See post #6Leave a comment:
-
ERT only transmits one value so there is no way to see the internal counters. In fact, the POCO cannot see them either remotely.
But my meter did go below zero, so it will work out.
One cannot post URLs on this site, but check Wikipedia for "Encoder receiver transmitter (ERT)"Leave a comment:
Copyright © 2014 SolarReviews All rights reserved.
Powered by vBulletin® Version 6.1.3
Copyright © 2026 MH Sub I, LLC dba vBulletin. All rights reserved.
Copyright © 2026 MH Sub I, LLC dba vBulletin. All rights reserved.
All times are GMT-5. This page was generated at 02:54 AM.
Leave a comment: