GEM Data Format

Ask questions about the GEM here.
Post Reply
pcrover
Posts: 16
Joined: Sat Mar 10, 2018 2:32 pm

GEM Data Format

Post by pcrover » Tue Apr 17, 2018 12:08 pm

I am trying to use the GEM raw data that is posted to my server but I do not fully understand how to convert it to kilowatt hours that match the Dashbox values.

I thought I could use the V x I x PF to get similar values to Dashbox and sometimes it matches up, but other times it is not even close.

Also what is the "polarized" data and can I determine generate/use data from it?

My goal is to display power readings in my own application. Is there any documentation that explains how to use this data to get actual kwh values? Any helpful info would be appreciated.

Thanks, Gary
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM Data Format

Post by ben » Tue Apr 17, 2018 1:16 pm

Gary,

There's some notes in the packet format manual (pg 29):

http://brultech.com/software/files/down ... at_2_1.pdf

Polarized counters are used for generation.

Deltas = Current Sample - Previous Sample (with a check for counter rollovers)

Watt = (Delta Wattseconds ) / Delta Seconds
kWh = (Delta Wattseconds ) / 3600000

If monitoring a net metered source:

NET Watt = (Delta Wattseconds - 2 * Delta Polarized) / Delta Seconds
NET kWh = (Delta Wattseconds - 2 * Delta Polarized) / 3600000
Ben
Brultech Research Inc.
E: ben(at)brultech.com
pcrover
Posts: 16
Joined: Sat Mar 10, 2018 2:32 pm

Re: GEM Data Format

Post by pcrover » Wed Apr 18, 2018 12:58 am

Hi Ben,

That is what I was looking for, I'll see what I can do with this.

Thanks!

Gary
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM Data Format

Post by ben » Wed Apr 18, 2018 9:25 am

pcrover wrote:Hi Ben,

That is what I was looking for, I'll see what I can do with this.

Thanks!

Gary
You could always use btmon.py to process the packets also and dump them into a database.

https://github.com/matthewwall/mtools/b ... n/btmon.py
Ben
Brultech Research Inc.
E: ben(at)brultech.com
pcrover
Posts: 16
Joined: Sat Mar 10, 2018 2:32 pm

Re: GEM Data Format

Post by pcrover » Thu Apr 19, 2018 12:00 am

It appears I don't understand the Polarized Counters concept. Using either of the formulas to calculate standard or polarized power I get identical readings, but neither are "Polarized" as in + or -. The results appear as a positive number even if Generation is happening on the port. What am I missing here?

Gary
Teken
Posts: 2700
Joined: Wed Dec 15, 2010 4:09 pm
Location: The Bad Lands

Re: GEM Data Format

Post by Teken » Thu Apr 19, 2018 6:39 am

pcrover wrote:It appears I don't understand the Polarized Counters concept. Using either of the formulas to calculate standard or polarized power I get identical readings, but neither are "Polarized" as in + or -. The results appear as a positive number even if Generation is happening on the port. What am I missing here?

Gary
Unless you're generating power via solar, wind, that value will have zero meaning to you.

I.e. Unless you're actually generating power you won't see any values. Also if you have a GEM the value can be changed to reflect positive vs negative in any channel.


Sent from my iPhone using Tapatalk
Teken . . .

My ongoing projects thread: http://www.brultech.com/community/viewt ... ?f=2&t=929
Buy me a cup of coffee: https://www.paypal.me/Teken https://gfinotify.com/ Discount Code: PC10
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM Data Format

Post by ben » Thu Apr 19, 2018 9:32 am

Did you enable NET Metering on the channel in the GEM Setup Webpage under Channel Option? It won't count generation unless you enable it.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
pcrover
Posts: 16
Joined: Sat Mar 10, 2018 2:32 pm

Re: GEM Data Format

Post by pcrover » Thu Apr 19, 2018 10:28 am

I just found an error in my code that could be the problem. I'll see what happens today when the solar starts generating.
pcrover
Posts: 16
Joined: Sat Mar 10, 2018 2:32 pm

Re: GEM Data Format

Post by pcrover » Thu Apr 19, 2018 12:59 pm

Yep, It was my code. All good now.

Thanks for the help!

Gary
Post Reply