GEM HTTP Data Post Configuration

Ask questions about the GEM here.
Post Reply
philf
Posts: 22
Joined: Mon Sep 09, 2013 9:47 am

GEM HTTP Data Post Configuration

Post by philf » Tue Apr 14, 2020 8:27 pm

With what looks like the demise of Smartenergygroups (note that Sam Sabey has appeared on Twitter as recently as April 8th, with no reference to what's happened to his site - I was a paying customer), I thought I'd temporarily re-point my GEM to my own server to at least cache my data until I make a decision on an alternative. I've been on the programming side of IT for 41 years, so thought I'd play a bit.

Anyways, in working with the Data Post tab in the GEM configuration, I don't seem to be able to make much of dent in the way this thing is sending out data. Yes, I've configured the network interface (via the GEM Network Utility) to point at my own server, and the posting requests are hitting my server. But no matter what I do with the GEM -, the inbound HTTP traffic always appears to be a "PUT", and with a URL which appears to be firmly stuck on the old SEG configuration. The options on the Data Post tab read, "Smart Energy Groups", "Dashbox/Stand-Alone Software", and "Show All". The latter does nothing, and when I switch from the original "Smart Energy Groups" option to the "Dashbox" option, it doesn't seem to make any difference to what the box is sending out. The URL is still being formed as though it was delivering a "PUT" to SEG, replete with the old URL extension and and even my site ID (which has no meaning in this context).

Is there some other hidden option that must also be changed? I don't care if the data arrives in SEG format (I can parse it), but I just want to get control over how it constructs the URL. It would be great if the thing could use a "GET", rather than a "PUT" to deliver the payload, as well.

Any insight appreciated :-)

Edit: Firmware - COM 5.13, ENG 1.49
philf
Posts: 22
Joined: Mon Sep 09, 2013 9:47 am

Re: GEM HTTP Data Post Configuration

Post by philf » Tue Apr 14, 2020 9:24 pm

Apologies for the back-to-back posts, and partially answering my own question... After messing with this for a few hours with no success, I posted my previous conundrum. It was on going back to look at the "Packet Send" tab that I recognized the probable interaction between the selected data format and what I was expecting to be an option on the "Data Post" tab. To be honest, the inter-relationship between these tabs (and the need to use a separate utility to configure the actual network interface to deliver the request to the correct site) is a bit of a head-scratcher in the way it is presented.

Anyways, after ditching the SEG format (I would have been happy to have parsed that as-is) for HTTP GET, I'm seeing that I have a bit more control. Though the values that are being passed are another head-scratcher. I'm getting a string that looks like this (I removed my serial number :-)):

SN=&SC=3881455&V=1232&c1=561886819684,5766904176,14.54&c2=11073507162,0,0&c3=91015351162,358120,0.08&c4=11657987605,127153888,0.50&c5=82562630286,1929857898,4.50&c6=8632603333,362903662,0&c7=14957401098,347638770,0.94&c8=15864687443,319650386,1.20&c9=18952885778,422902,1.90&c10=13713243566,104431724,0&c11=89647723698,245078951,0&c12=33254642293,562387334,0&c13=4853659,0,0&c14=13405881152,166223989,0.72&c15=3652642002,25525,0&c16=13925380907,1396410,0.82&c17=11618201919,1833,0&c18=5938216885,5060234,0&c19=20061234075,225199749,1.04&c20=212085033,360380,0.08&c21=8664709003,79601,0.22&c22=12789751174,97979310,0.46&c23=4225073130,1717775,0.12&c24=17129952909,126398923,0.52&c25=6342563162,5573566,0.28&c26=7286511093,43626,0.48&c27=6853890,16341,0&c28=7228392,2982,0&c29=4049619,0,0&c30=4418199,1743,0&c31=6721553,22616,0&c32=9224791,2249,0&PL=0,0,0,0&T=nc,,nc,,,,,&key=&Resp=


I can see my channels, but there are some enormous numbers in there that don't make immediate sense... Must look for reference documentation. I'm guessing that &V is my voltage (if I add 1 decimal) and that the third value in each group is the amperage. &SC would appear to be some sort of running count of elapsed seconds, and I'm guessing that that the really big numbers are just an perpetual running counter of power consumption that allows you to back into Wh... This is interesting :-).
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM HTTP Data Post Configuration

Post by ben » Wed Apr 15, 2020 3:02 pm

You actually got most of it down but the manual here will make sense of the numbers.

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

The channels are: c## = wattseconds, polarized wattseconds, and amps. Using the seconds counter and those values you can calculate watts, kwh, seconds, etc.

Here's a link to a popular data logging script written in Python by mwall:

https://github.com/matthewwall/mtools/b ... n/btmon.py

With that script and Grafana, you can play around with dashboards pretty quickly.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Post Reply