Brultech GreenEye Energy Monitor (GEM)

Folks,
I’ve finally started the plugin to interface Brultech’s GreenEye Energy Monitor (GEM). This is the next generation replacement for the Brultech ECM-1240.

For those not familiar, Brultech’s GEM has the following features:

[ul][li]32 Channels of Energy Metering[/li]
[li]8 channels of Temperature measurement, using [optional] DS18S20 sensors[/li]
[li]4 Pulse channels for Water and other Pulse-based meters.[/li][/ul]

… and a bunch more, full specs are here:
http://brultech.com/GreenEye.htm

The code is “not preity” right now, and really intended for those that have early model GreenEye’s and wanting to hook it up to Vera.

The code is in code.mios.com:
http://code.mios.com/trac/mios_brultech-power-monitor/browser/trunk

and I [currently] require that the GEM be configured to use a URL-style of output. To do this, you can run the following command, over a serial port, to the GEM unit:

^^^SYSPKT03

At this point the following are implemented:

[ul][li]Support for up to 99 channels per GEM, but you’ll only get up to 32 from a current generation GEM unit[/li]
[li]Support for multiple GEM’s on the same EtherBee, for people with a crazy hunger for channels of power measurement[/li]
[li]Prototype for 4x channels of Pulse Counter support[/li]
[li]Prototype for 8x channels of Temperature support[/li]
[li]Addition of “[tt]LastUpdate[/tt]” flag for each value changed, but only when it actually changes[/li]
[li]Addition of “[tt]LastUpdate[/tt]” flag for the device, if any of the children changes[/li][/ul]

TODO List

[ul][li]Get an actual Temperature sensor, to test the Temperature support ;)[/li]
[li]Rework the Pulse input support with a unique UI to display the values[/li]
[li]Validate an Ethernet-based hookup[/li]
[li]Validate replacing the internal XBee Radio with a RN-XVee Wifi chip for more direct communications, bypassing the need for a Etherbee[/li][/ul]

Anyhow, at this point it’s fairly functional.

I’ll use this thread to host technical discussions relating to it’s development (and for @smilligan, who’s been waiting for me to write this :8) )

Are they available for purchase now then? Could be time to finally get rid of my Aeon HEM :slight_smile:

Yes, they’re order-able. Right now they’re doing it via email, and they’re not on their sales/shop site.

In my case, I’ve had it since early July. I ordered the model with Zigbee (a GEM-X), and plan to use it [short term] with the existing EtherBee from my ECM-1240’s (they’re turned off right now so I don’t get conflicts on the Zigbee channel)

Once I get the basics in, I’ll move it over to WiFi directly, and bypass all the Etherbee stuff (presuming it works). A lesser model would work also, but I figured it was worth having the Zigbee model “just in case”.

When I bought it, I got just the GEM since I already had all my CT’s wired in. They can give you pricing for all the components.

You can order by contacting Tammy on sales@brultech.com.

@guessed

This is very good news. I just received my 2 GEM Ethernet devices this morning along with all the CT’s and likely will commence installing in the next few days. Really glad that you are developing the plugin. Thank you.

I’ve modified the code for the GEM, and merged it with the ECM-1240 driver. This lets me run the GEM “side-by-side” on the same EtherBee as the ECM-1240’s during the cutover.

Since this will be easier to maintain, I plan on keeping it as a merged plugin. We can continue to use this thread to discuss the GEM-specific issues.

I’ve amended my first-post to reflect this change.

I’m considering getting a GEM, but until I have moved my electric panel (need to, the current solution is too cramped), I will only use the temperature sensors for measuring on my hearing system. And now to the question.:slight_smile:
Will the plugin do only whole degrees or will it work down to 0.1 degree resolution?

It shows each of the temp sensors down to .1 degree resolution. It would depend upon the sensor itself as to what it’s actual precision is.

I just ordered mine yesterday, so may need some advice in the coming weeks in regards to setup. I’m probably only going to install 3 temp sensors initially (in addition to all the circuits), but they are going to be in a challenging location, and I notice that perhaps from info on the brultech forum that they can only be added and enumerated one at a time?

With the GEM there is a one time registration step for each temperature sensor. From memory, you do this with only one ‘sensor’ connected to the 1wire bus at a time. There have been changes in this area in the last few months, so I might not have the most recent information.

Once you register the sensors, the API gives me the data for all 8 temperature sensors at the same time. Actually I get this data, and all the 32 Watt and 4 Pulse measurements, at the same time every few seconds (5, from memory)…

This volume of data is why I wouldn’t be in a hurry to run the GEM against a Vera2… At least not without downgrading the frequency at which the firehose of data is sending.

Anyone with a GEM updated the respective firmwares on their units recently? Wondering if it’ll break anything, or what it may bring to the table? There seems to be some quite comprehensive additions between versions.

I take it nobody has updated then?

I just read that the most recent change adds the ability to send different data formats to different serial ports, so I’m going to dive in and do this so that I can get one uploading to SEG, and the other to Vera…

Just the minor issue now of having to use my Dual WizNET there instead which currently is being used elsewhere (with only one port in use now since I ditched my DSC IT100), and swapping the one out in the GEM… Wonder if I can get it to fit in there:)

Finally have installed my GEM :slight_smile:

I have got the dashbox up and running, so time to try to also get the Vera to know about the data…
… but how is it supposed to be set-up?

The IP-address I get. But then the plugin complains about the port. So I am guessing this is the serialport(?) My setting for “commUse” is rs232, which I suppose should be something else. But what?

Then, on the GEM, should I set-up the “Data Post” tab entries with something?

On the packet format, I have entered “HTTP GET”.

I have looked on the wiki, but it only seams to deal with the ECM-1240.

The plugin it self populated my “devices” tab with all the 32 channels, so this part seams to be working great.

@vespaman ,
Once you have the GEM running, there are some basic config changes you need to make to it to “switchover” to using HTTP Format instead of it’s regular Binary mode.

This is done through Brultech’s config tool, and it’s been a while since I’ve used it so I don’t have any screenshots but it was easy to find.

Once you have that set correctly, the GEM will automatically send through data, in the form of a long URL, every 5 seconds. This URL will contain data for ALL of the channels, along with the Temperature sensors and Pulse Counters.

This will show up in the Brultech configuration tool. You’ll see the data automatically coming through? at least until you connect Vera to it, whereupon the “port” will be tied up by Vera.

And on the Vera side of things, I have mine set as follows in the Advanced Tab (27 Power meters, 1 Temperature meter, no Pulse meters):

[b][i]Device params[/i][/b] ip (custom) = 192.168.1.37:2000 commUse (default) = rs232

Variables
url:brultech-com:serviceId:PowerMeter1 , ActiveMeters=1,2,3,4,5,6,7,8,9,10,?27
url:brultech-com:serviceId:PowerMeter1 , ActiveTemperatureMeters=1
url:brultech-com:serviceId:PowerMeter1 , ActivePulseMeters=

The Port I use is 2000. It comes from the Wifi <-> Serial device I’m using (an RN-XVee from RovingNetworks) to connect my GEM to my Wifi network (cutting out the need for the Etherbee I was using with the ECM-1240’s.

On your device, the port# may be different, but the way it’s specified (ip:port) will be the same.

guessed,
I guess I’m failing to understand where/which port/ip to change :-[

My GEM has an ethernet tab, which, apart from the normal IP address settings, has a “Server IP” and associated “Remote Port”.
I have tried setting them to the address of the Vera, and port 2000 (which I programmed in Vera as per your description).
But maybe this server IP is not the way to do it?

On the network tab, there’s also settings “Ethernet Mode” which as /Client/Server/Mixed/ to choose from.

On top of the GEM network utility (4.8), there’s also settings such as TCP client, TCP Server and Serial. But I guess this is something else.

I guess my primary question is: Is your Vera plugin connecting to the Bruhltech, or is it the other way around?

Cheers,
Micael

Edit: I am using 10.1.200.7:80 to connect to my GEM from my browser and also from the Network Utility.
So maybe I should also set-up Vera to use the same port?
This would make sense, but then it does not seam to work… I have the packet format set to 03 which I think your suggested command above actually doing. I can get data from the Bruhltech with that, it looks like this:

[code]Packet

GET extension_here/?SN=01000590&SC=124150&V=2293&c1=37162097,0,1.90&c2=24336571,0,.46&c3=11191365,0,.58&c4=1707404,0,0&c5=40499,0,0.06&c6=27138,0,0&c7=753811,0,.16&c8=3703,0,0&c9=17,0,0&c10=113,0,0&c11=6193841,0,.58&c12=2307061,0,.30&c13=716915,0,0&c14=30,0,0&c15=944,0,0.02&c16=2263365,0,0&c17=7323431,0,.88&c18=8560192,0,0.08&c19=158114,0,.28&c20=2470344,0,.26&c21=52211,0,0.02&c22=759546,0,0&c23=3112205,0,0&c24=1468613,0,0&c25=360129,0,0&c26=10982,0,0.06&c27=123,0,0&c28=955,0,0&c29=35786,0,0.02&c30=4112649,0,.14&c31=2135179,0,0&c32=38,0,0&PL=0,0,0,0&T=0,&key=key1_here&Resp= HTTP/1.1 Host: host_here.com
[/code]

Maybe the format has changed? Are you using the lastest GEM fw?

My Vera has one IP Address, and the Brultech has another.

In the example posed, my Brultech has the IP Address: 192.168.1.37, and it’s listening on port 2000. My Vera unit, which is running on a totally different IP Address, connects TO the Brultech on 192.168.1.37:2000

From what your describing, it sounds like you bought the Brultech GEM model that has the built-in (cabled) Ethernet. This is a small WIZNet SR110 board that sits inside of the GEM itself, to provide the Serial ↔ IP/Ethernet bridging functionality.

Typically these are configured for DHCP out of the factory, and you’ll want to “fix” it’s IP address so it’s at a predictable location on your network (either via a Static DHCP assignment in your Router, or by explicitly specifying an IP in the Ethernet Tab of the GEM.

It needs to be run in Server mode, since my Plugin will connect TO the GEM unit? The GEM will use Port 5000 by default, not the 2000 that I use for my Wifi unit.

[quote=“vespaman, post:15, topic:172782”]I am using 10.1.200.7:80 to connect to my GEM from my browser and also from the Network Utility.
So maybe I should also set-up Vera to use the same port?[/quote]
If you’re connecting on 10.1.200.7:80 for configuration, then that’s also what you’d tell the Plugin to connect using as well.

Note that the Ethernet Hardware in the GEM can only take one connection at a time. So that will be EITHER one from the Configuration tool, OR from the Plugin.

If both are configured to connect, and running, then whichever connects “first” will win and will lockout the other.

[code]Packet

GET extension_here/?SN=01000590&SC=124150&V=2293&c1=37162097,0,1.90&c2=24336571,0,.46&c3=11191365,0,.58&c4=1707404,0,0&c5=40499,0,0.06&c6=27138,0,0&c7=753811,0,.16&c8=3703,0,0&c9=17,0,0&c10=113,0,0&c11=6193841,0,.58&c12=2307061,0,.30&c13=716915,0,0&c14=30,0,0&c15=944,0,0.02&c16=2263365,0,0&c17=7323431,0,.88&c18=8560192,0,0.08&c19=158114,0,.28&c20=2470344,0,.26&c21=52211,0,0.02&c22=759546,0,0&c23=3112205,0,0&c24=1468613,0,0&c25=360129,0,0&c26=10982,0,0.06&c27=123,0,0&c28=955,0,0&c29=35786,0,0.02&c30=4112649,0,.14&c31=2135179,0,0&c32=38,0,0&PL=0,0,0,0&T=0,&key=key1_here&Resp= HTTP/1.1 Host: host_here.com
[/code]

The Packet format looks to be correct. At least by eyeballing it.

The GEM has a second serial port which is supposed to be able to be configured with a different packet format. If you buy another WIZnet, then you should be able to then get the data over to Vera too.

I’ve been thinking about getting the dashbox too, but wanted to make sure I could keep it working with Vera too and didn’t want to risk the expenditure if I couldn’t get it to work.

Sure, but that’s only needed if you want to get the data stream to two different locations (one to Vera, and say one to a real Energy Monitoring Service)

In this case, it sounds like they’re just getting started with the basics…

OK,

I did some more tests last night, and I realize this morning, reading back in this thread, that I was not very detailed… Guess I was tired after the GEM installation. :slight_smile:
So I’ll detail this a bit, if not for anything else, should someone else takes a similar path in the future.

Here’s my set-up:
GEM firmwares: COM 2.40, ENG 1.46

The Dashbox is connected to the GEM on serialport 2 of the GEM directly - no stuff between them. I have selected 48bit binary (“4: Bin48-NET-Time”) for the second serialport.

The GEM has an built-in ethernet module, which is connected to serialport 1. For serialport 1, I have selected the format “3: HTTP GET”. Real Time Status is on. Include Current In Packet is on (I have also tried deselecting this).

Both serialports share 8 second packet send interval.

The Dashbox works fine - it logs and all, so the second port is ok.

The GEM has a web interface @ port 80, where all settings above are programmed. This is shared with the Network utility as well, so only one of them can be connected at a time.

Now, If I enter the IP:port, in my case 10.1.200.7:80 in Vera/Brulthech plugin, it seams that the Brultech plugin connects, since I cannot connect with my browser after LUA is restarted. But nothing appears in the panels.

I think the other (server IP address etc) network settings within the GEM is not needed for this, what ever they are.

So, I think something maybe has changed, or, I am still missing a setting here or there.