Brultech GreenEye Energy Monitor (GEM)

Ok. Try the following…

With no network devices attached, try to connect from a PC, or Mac, using a telnet terminal program, explicitly specifying you want to connect to port 80 (since the default is 23) to the GEM unit.
Once connected, you should see a stream of URL data every 8 seconds.

If that works, then try the following:
Enable Verbose logging through Vera’s UI
Connect the GEM to the plugin (probably port 80, based on description)
SSH onto Vera
tail -f /var/log/cmh/LuaUPnP.log

The tail on the main log file should show a URL like log entry every 8 seconds.

OK, finally I have been able to do more tests…

The initial problem that I had was due to the fact that the ethernet module where set to “mixed” rather than server mode. And I have changed the port to 8000. And if I telnet to the GEM, I get the string every 8 seconds. Lots of data…

However, the plugin does not work. If I enable verbose log and look at the log file, I get this:

52 11/03/13 9:12:16.983 0x47 0x45 0x54 0x20 0x65 0x78 0x74 0x65 0x6e 0x73 0x69 0x6f 0x6e 0x5f 0x68 0x65 0x72 0x65 0x2f 0x3f 0x53 0x4e 0x3d 0x30 0x31 0x30 0x30 0x30 0x35 0x39 0x30 0x26 0x53 0x43 0x3d 0x37 0x34 0x37 0x38 0x32 0x31 0x26 0x56 0x3d 0x32 0x32 0x37 0x39 0x26 0x63 0x31 0x3d 0x34 0x31 0x30 0x36 0x38 0x36 0x35 0x34 0x33 0x2c 0x30 0x26 0x63 0x32 0x3d 0x32 0x34 0x39 0x34 0x32 0x32 0x36 0x36 0x35 0x2c 0x30 0x26 0x63 0x33 0x3d 0x31 0x38 0x35 0x37 0x33 0x34 0x37 0x33 0x37 0x2c 0x30 0x26 0x63 0x34 0x3d 0x35 0x34 0x38 0x39 0x38 0x33 0x37 0x36 0x2c 0x30 0x26 0x63 0x35 0x3d 0x31 0x36 0x32 0x33 0x35 0x33 0x2c 0x30 0x26 0x63 0x36 0x3d 0x31 0x31 0x35 0x30 0x37 0x37 0x31 0x2c 0x30 0x26 0x63 0x37 0x3d 0x31 0x39 0x31 0x32 0x36 0x38 0x33 0x30 0x2c 0x30 0x26 0x63 0x38 0x3d 0x33 0x39 0x32 0x37 0x2c 0x30 0x26 0x63 0x39 0x3d 0x35 0x33 0x2c 0x30 0x26 0x63 0x31 0x30 0x3d 0x31 0x34 0x33 0x38 0x32 0x37 0x36 0x2c 0x30 0x26 0x63 0x31 0x31 0x3d 0x31 0x31 0x31 0x33 0x32 0x30 0x30 0x39 0x38 0x2c 0x30 0x26 0x63 0x31 0x32 0x3d 0x35 0x30 0x33 0x38 0x31 0x39 0x30 0x33 0x2c 0x30 0x26 0x63 0x31 0x33 0x3d 0x33 0x32 0x32 0x35 0x30 0x33 0x31 0x2c 0x30 0x26 0x63 0x31 0x34 0x3d 0x31 0x37 0x32 0x37 0x36 0x36 0x36 0x2c 0x30 0x26 0x63 0x31 0x35 0x3d 0x33 0x30 0x39 0x36 0x35 0x32 0x34 0x2c 0x30 0x26 0x63 0x31 0x36 0x3d 0x38 0x38 0x31 0x35 0x39 0x38 0x37 0x34 0x2c 0x30 0x26 0x63 0x31 0x37 0x3d 0x33 0x34 0x32 0x32 0x30 0x38 0x32 0x34 0x2c 0x30 0x26 0x63 0x31 0x38 0x3d 0x31 0x31 0x33 0x32 0x33 0x33 0x39 0x34 0x38 0x2c 0x30 0x26 0x63 0x31 0x39 0x3d 0x33 0x30 0x31 0x33 0x36 0x30 0x2c 0x30 0x26 0x63 0x32 0x30 0x3d 0x31 0x36 0x36 0x30 0x30 0x32 0x33 0x39 0x2c 0x30 0x26 0x63 0x32 0x31 0x3d 0x38 0x32 0x34 0x37 0x36 0x36 0x33 0x2c 0x30 0x26 0x63 0x32 0x32 0x3d 0x35 0x31 0x39 0x32 0x31 0x35 0x32 0x2c 0x30 0x26 0x63 0x32 0x33 0x3d 0x38 0x33 0x31 0x31 0x35 0x39 0x32 0x2c 0x30 0x26 0x63 0x32 0x34 0x3d 0x32 0x30 0x31 0x32 0x36 0x39 0x38 0x35 0x2c 0x30 0x26 0x63 0x32 0x35 0x3d 0x31 0x31 0x39 0x38 0x39 0x36 0x38 0x36 0x2c 0x30 0x26 0x63 0x32 0x36 0x3d 0x31 0x32 0x36 0x38 0x30 0x2c 0x30 0x26 0x63 0x32 0x37 0x3d 0x32 0x31 0x35 0x36 0x2c 0x30 0x26 0x63 0x32 0x38 0x3d 0x32 0x34 0x34 0x39 0x39 0x37 0x2c 0x30 0x26 0x63 0x32 0x39 0x3d 0x37 0x37 0x37 0x32 0x32 0x35 0x36 0x2c 0x30 0x26 0x63 0x33 0x30 0x3d 0x31 0x33 0x34 0x37 0x36 0x35 0x38 0x36 0x36 0x2c 0x30 0x26 0x63 0x33 0x31 0x3d 0x38 0x33 0x30 0x34 0x33 0x32 0x30 0x37 0x2c 0x30 0x26 0x63 0x33 0x32 0x3d 0x35 0x32 0x2c 0x30 0x26 0x50 0x4c 0x3d 0x30 0x2c 0x30 0x2c 0x30 0x2c 0x30 0x26 0x54 0x3d 0x30 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x2c 0x26 0x6b 0x65 0x79 0x3d 0x6b 0x65 0x79 0x31 0x5f 0x68 0x65 0x72 0x65 0x26 0x52 0x65 0x73 0x70 0x3d 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 (GET extension_here/?SN=01000590&SC=747821&V=2279&c1=410686543,0&c2=249422665,0&c3=185734737,0&c4=54898376,0&c5=162353,0&c6=1150771,0&c7=19126830,0&c8=3927,0&c9=53,0&c10=1438276,0&c11=111320098,0&c12=50381903,0&c13=3225031,0&c14=1727666,0&c15=3096524,0&c16=88159874,0&c17=34220824,0&c18=113233948,0&c19=301360,0&c20=16600239,0&c21=8247663,0&c22=5192152,0&c23=8311592,0&c24=20126985,0&c25=11989686,0&c26=12680,0&c27=2156,0&c28=244997,0&c29=7772256,0&c30=134765866,0&c31=83043207,0&c32=52,0&PL=0,0,0,0&T=0,,,,,,,&key=key1_here&Resp= HTTP/1.1) __LEAK__ this:4096 start:765952 to 0x159e000 <0x2e8c2680> 35 11/03/13 9:12:16.984 luup_log:146: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET extension_here/?SN=01000590&SC=747821&V=2279&c1=410686543,0&c2=249422665,0&c3=185734737,0&c4=54898376,0&c5=162353,0&c6=1150771,0&c7=19126830,0&c8=3927,0&c9=53,0&c10=1438276,0&c11=111320098,0&c12=50381903,0&c13=3225031,0&c14=1727666,0&c15=3096524,0&c16=88159874,0&c17=34220824,0&c18=113233948,0&c19=301360,0&c20=16600239,0&c21=8247663,0&c22=5192152,0&c23=8311592,0&c24=20126985,0&c25=11989686,0&c26=12680,0&c27=2156,0&c28=244997,0&c29=7772256,0&c30=134765866,0&c31=83043207,0&c32=52,0&PL=0,0,0,0&T=0,,,,,,,&key=key1_here&Resp= HTTP/1.1, Length=538 <0x2e8c2680> 35 11/03/13 9:12:16.985 luup_log:146: Brultech PowerMeter: debug: Skipping buffer=GET extension_here/?SN=01000590&SC=747821&V=2279&c1=410686543,0&c2=249422665,0&c3=185734737,0&c4=54898376,0&c5=162353,0&c6=1150771,0&c7=19126830,0&c8=3927,0&c9=53,0&c10=1438276,0&c11=111320098,0&c12=50381903,0&c13=3225031,0&c14=1727666,0&c15=3096524,0&c16=88159874,0&c17=34220824,0&c18=113233948,0&c19=301360,0&c20=16600239,0&c21=8247663,0&c22=5192152,0&c23=8311592,0&c24=20126985,0&c25=11989686,0&c26=12680,0&c27=2156,0&c28=244997,0&c29=7772256,0&c30=134765866,0&c31=83043207,0&c32=52,0&PL=0,0,0,0&T=0,,,,,,,&key=key1_here&Resp= HTTP/1.1 <0x2e8c2680> 52 11/03/13 9:12:16.985 0x48 0x6f 0x73 0x74 0x3a 0x20 0x68 0x6f 0x73 0x74 0x5f 0x68 0x65 0x72 0x65 0x2e 0x63 0x6f 0x6d (Host: host_here.com) <0x2e8c2680>

Note the LEAK on the first row. Not sure if this is part of the plugin, or prior the plugin somehow?
Anyway, it is easy to see that the plugin does not like the packet.

I looked at your data, in concert with the parser, and the first stumbling block is this:
[tt] GET extension_here/?SN=…[/tt]

It looks like you’re missing some configuration for the URL style, so it puts in “[tt]extension_here[/tt]”, instead of a valid prefix. My code is looking for the leading “/” that’s required on a valid call.

So either “blank out” the field/configuration that contains “extension_here”, or put a “/” on the front of it and the code will continue.

Mine is simply:
[tt] GET /?SN=…[/tt]

Yes! :slight_smile:

It works! :smiley:

Like you said, there was some configuration fields that where pre-filled by Brultech, which did make your parser run wild. Not only the ones you listed, so I ended up clearing all the fields on the ‘Data Post’ tab on the GEM webpage.

There’s one thing though, the total W - can I delete that panel? I have my incoming three phases on CT 1,2 & 3, so I get double the total energy. I’m guessing that the whole plugin goes away if I would delete the total panel? Or is there perhaps an option not to show total?

Thanks,
Micael

Great to hear. If you have screenshots from their latest tool, then I can include them on the Wiki page for others to see. I haven’t upgraded firmware/tools on my GEM for some time, so my stuff is quite dated.

The Total cannot be removed, since it’s attached to the Parent node. It is however computed, so you can tell it not to include any of the children, and you’ll get a 0-total. Each of the child nodes has a Advanced/Dialog pane that lets you specify to add/subtract or ignore wrt the total, so you only reconfigure those.

guessed,

Today I added 3 temperature sensors to the GEM, and while I can see the temp in both GEM and Dashbox, the panels in Vera shows nothing - they show up (I have set 1,2,3 as active), but are empty (Well, the first shows a ‘0’, the other two panels shows nothing except “Temperature”).

I see in the first post of this thread, that you have not yet tested temp - or at least when you wrote the first post…

Anyway, my packet looks like this, according to GEM;

GET /?SN=01000590&SC=3789045&V=2270&c1=2702220479,0&c2=1871883971,0&c3=1983293788,0&c4=307771476,0&c5=782755,0&c6=7041028,0&c7=203917252,0&c8=103432,0&c9=5495501,0&c10=2839988,0&c11=670655638,0&c12=309715514,0&c13=7176731,0&c14=11802457,0&c15=18046767,0&c16=1014215314,0&c17=188339322,0&c18=584344028,0&c19=55036330,0&c20=81453931,0&c21=32509026,0&c22=14332227,0&c23=61693847,0&c24=109271559,0&c25=60543180,0&c26=261593,0&c27=272154,0&c28=2726662,0&c29=30783588,0&c30=1063362510,0&c31=1444789377,0&c32=2517,0&PL=0,0,0,0&T=20.0,-3.5,19.5,,,,,&key=&Resp= HTTP/1.1 Host:

P.S.
Apart from this, the plugin has been rock-solid!

My pattern match is incorrect, and isn’t handling the -ve value. I’ll try to tweak it today to correct that problem, thanks for the sample data, it really helps.

Replace this file, and it should work:
http://code.mios.com/trac/mios_brultech-power-monitor/export/49/trunk/L_BrultechMeter1.lua

Cheers mate,
that fix worked great - now I have the temps as well. :slight_smile:

No worries, it was a simple fix. Glad it’s all working for you.

I am currently using the Brultech MIOS app (version 0.2) with Vera3 and my GEM unit and it works great for the current sensors. I wanted to start using the pulse counters and temperature sensors on the GEM as well. I noticed that the devices created in Vera were 2 pulse and 2 temperature. The GEM has 4 pulse and 8 temperature. Just wondering if these additional devices will appear when I actually connect something to the GEM or if I have to do something special to have them appear? Thanks!

There are a few configuration parameters, under the Advanced tab, that control which pulse/temp sensors appear. The “defaults” for these are editable there (to either add, or to remove, sensors of any type)

Look for:
[urn:brultech-com:serviceId:PowerMeter1] [tt]ActivePulseMeters[/tt]
[urn:brultech-com:serviceId:PowerMeter1] [tt]ActiveTemperatureMeters[/tt]

I saw that only 1,2 was listed beside the pulse sensors in the Brultech main device in vera. I changed it to 1,2,3,4 but not sure how to get another device to appear for each of those pulse counters that I added? Thanks for your help!

After you edit the values you’ll need to Save/Restart Vera. The new child devices will be created during the restart based upon the parameter value you set.

I rebooted Vera a couple of times, reloaded, but still no luck with the devices appearing. The 1,2,3,4 took in the main device advanced tab, but still only seeing 2 pulse devices.

They appear in the “no room” device Bucket, so won’t be co-located with the other sensors. I just tested with [tt]ActivePulseMeters[/tt] values of (my normal value), “1” and “1,2,3,4” and they all did the right thing.

That said, I’m running the latest codebase from trunk, so it’s possible that I [previously] fixed a bug in this space. If you want to try this, you can load the files from:
http://code.mios.com/trac/mios_brultech-power-monitor/changeset/49/trunk?old_path=%2F&format=zip

Great that worked thanks for all your help!

Sorry another issue for me. The pulse counter devices show on Vera with Power W (nothing read yet as I haven’t secured them), the same as the meter sensors. Is that what they should show? Is the W shown the pulse count? My application was to use it to monitor my water meter. Haven’t yet figured out what one pulse is equal to on my meter, but when I do is there any way for me to configure the device so it shows me how many gallons are being consumed? Again appreciate your help!

In Vera, the only service defn that has a “[tt]Pulse[/tt]” (counter) option is:
S_EnergyMetering1.xml

It’s mingled in with the service that computes “Watts” (etc), along with the corresponding renderer. The value is being maintained correctly, even if the MCV UI isn’t reflective of all the values this serviceId holds.

You can see the value of [tt]Pulse[/tt] in the Advanced tab of the device… once a pulse value has been captured from the GEM.

thanks for all your help so far guessed. thought i’d try you on another issue. i’ve connected a pulse sensor (hamlin 55110) to my water meter and to the gem (output 4 - powered). in vera for that device in the advanced tab it’s showing the value at 32, and it never changes. i tried changing it manually, saved, and shortly after it goes back to 32. run the water in my house, but no change. any thoughts? Paul from Brultech is checking to make sure the sensor I’m using is compatible but haven’t heard back. just wondering if i need to change a setting or something or if there is any way to test if the sensor is actually receiving pulses. this is the sensor: http://www.hamlin.com/product-detail.cfm?productid=78