Jimbo
Members
-
Joined
-
Last visited
Reputation Activity
-
Last night I decided to look at what the comms to VRM looks like. Took out me old trusty tcpdump, then threw that into wireshark, extracted the HTTP post, and employed a bit of python:
>>> import zlib >>> from urllib import unquote >>> from urlparse import parse_qsl >>> from pprint import pprint >>> s = zlib.decompress(open('zzz').read()) >>> ss = unquote(s) >>> pprint(parse_qsl(ss)) [('IMEI', 'badbeef15bad'), ('c', '1'), ('d', '2'), ('bst[0]', '0'), ('VSOC[0]', '100.0'), ('IP1[0]', '228'), ('bv[0]', '25.58'), ('bs[0]', '100.0'), ('IV1[0]', '234.9'), ('Pb', '0'), ('Pc', '0'), ('Bg', '0'), ('gc', '0'), ('II1[0]', '1.4'), ('OP1[0]', '134'), ('eO[0]', '0'), ('IF1[0]', '50.1'), ('Pg', '0'), ('Gc', '0.0182044506073'), ('OF[0]', '50.03'), ('S[0]', '10'), ('AI[0]', '0'), ('AILIM[0]', '5.0'), ('OI1[0]', '1.1'), ('bp[0]', '0'), ('eL[0]', '0'), ('Bc', '0'), ('vp[0]', '14'), ('vc[0]', '0'), ('gb', '0'), ('eT[0]', '0'), ('Gb', '0'), ('s[0]', '3'), ('t', '900'), ('OV1[0]', '234.9'), ('Et', '2016062121'), ('PC[0]', '1'), ('CI[0]', '0'), ('bc[0]', '0'), ('a1[0]', '134'), ('CV[0]', '25.58'), ('ERR[0]', '0\n')] So that's what the request looks like, it is a typical application/x-www-form-urlencoded form post, gzipped, with php array notation in the field names. And the data is all there.
Why is this important? Well, because using the right dbus command you can tell vrmlogger to log to a different url. So you can tell this thing to log to YOUR server instead of theirs.
# dbus -y com.victronenergy.settings /Settings/Vrmlogger/Url SetValue http://your.site.here/whatever.php. So there is another way to get the data out... but as usual, it's an artichoke: You have to do a little work to get at the heart of it.