The Vera Community forums have moved!

Advanced => Programming => Plugins & Plugin Development => Topic started by: dswelch on January 29, 2011, 11:15:27 pm

Title: Brultech ECM-1240 Energy Monitor
Post by: dswelch on January 29, 2011, 11:15:27 pm
Have been researching which unit to use and found this last week. I'm curious if any Vera users have seen, heard, or used one. The specs are great compaired to anything else I'v seen.

http://www.brultech.com/products/ECM1240/communicationOptions/monitoring/four.htm

Biggest advantage is it's totally expandable to as many CT sensors as anyone could ever need so each individual circuit in the house can be monitored individually. That's Cool! And really usable information that can be tracked when using 7-15 sensors. Sensors are only about $5.00 each and multiple CT's can be wired together. For instance all your kitchen circuits could be monitored together even though in newer homes its required to have a minimum of about 3-4 circuits for (2) for outlets, disposer, dishwasher, and some citys even more circuits. you could also monitor furnace and a/c as one together, or 2 bathrooms, all outside lights, etc.

It looks like the perfect match for Vera, but would like to get some of the power users to review specs and let me know what they think.

The unit is internet, zigbee, rs-232, and Ethernet compatible. one model sends directly to Google Power Meter.

I'll await the experts opinions. Seems everyone is using ted and this brings in a new option that may be much more expandable.

Price starts at $299 with the ethernet interface and 8 CT sensors (2-200amp, 2-80amp,10-40amp CTs

http://www.brultech.com/store/

Unless I start hearing actual bad info on this unit I'll be getting one in the 2-4 weeks when I can afford it. Maybe tax refund money. I haven't got a Vera yet either, but have decided to go with it also.

Some of you hacker/hard-line users let me know what you think.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on January 30, 2011, 12:42:17 am
This is the unit that I'm planning to use, but I'm about 5-7 months away from being "ready" to add it in (and to code any Luup Plugin to integrate the data from it into Vera).

The one thing that's a little off-putting about this particular device is they won't provide the API documentation unless you have an Open order with them.

ie. You cannot work out if the API is viable for integration before you buy.

That irks me a little, but I've seen samples on some other forums that show how to code against it, so it doesn't worry me too much.


I intend to integrate it via RS-232, since I don't have Wired-Ethernet nearby.  I have a Wifi <-> RS232 adapter so will run it over Wifi instead.  That'll likely eliminate any "automatic" Google PM integration, but I'm not too worried about that at this time, and could probably write an integration if I needed it down the line.... seems like the biggest part about this is the collection of historical data, and it's presentation as charts... (which I can do other ways)

Read the notes carefully, since each device supports a specific # of "discrete" inputs, and the first two are special.  Not all CT's work on all inputs, which probably isn't an issue for most.  If you want a lot of inputs, for low-level monitoring of a lot of discrete circuits, then you end up with multiple Brultech devices (no biggy, just factor this when you're purchasing)
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: strangely on January 30, 2011, 12:57:04 am
If you used a WiFi bridge (or even put use to the old V1) at least then you could use the Google power meter?!
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on January 30, 2011, 01:07:55 am
@strangely,
Maybe so, but I have a different intent.  My RS-232 <-> Wifi bridge isn't just a simple bridge.  It's a RN-134 from Roving Networks, and can be re-programmed to do things more "rich" than the simple bridging it has built into it.

The Brultech by default has RS-232, so it's the lowest cost option.  From there, you can add modules for Zigbee, which cranks the cost, and for Ethernet Bridging, which cranks it further (esp if you then have to add a regular Ethernet-Wifi Bridge)

I don't need all that complexity.


BTW: I've currently got this connected to the spare DSC IT100 you sent me, so I can redo that plugin, and make it actually work.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on May 22, 2011, 09:29:56 pm
I now have a stub plugin that exposes all 7-channels of the "Plug & Play" version of the Brultech ECM-1240.

ie. http://brultech.com/products/ECM1240/packages/plugAndPlay.htm

I will add support for the other, non Plug & Play, versions but this was the quickest one to implement up-front in order to test the basic logic.  The PnP Versions ship data out to Google PowerMeter, which has nice renditions of Power usage, along with some predictive stuff based upon prior usage. 

With the Luup Plugin the live data goes into Vera, in addition to going out to Google PM, and MiOS will capture the historical stuff up to your MiOS account on cp.mios.com

I've reached out to the Brultech lads to see if they have any issues with me publishing the Plugin source code, and will open the code.mios.com space up once I get the green light (it's there, just not public right now)

Screenshot attached...

I'm only running this on my Bench at the moment, which is why it's seeing 4w of power consumption on only one channel 8)
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: oTi@ on May 22, 2011, 09:43:07 pm
@guessed,
Neat! How does it measure line voltage?
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on May 22, 2011, 10:00:56 pm
@guessed,
Neat! How does it measure line voltage?
Right now I'm only bubbling up the Wattage value, using the standard MiOS ServiceID.  The ECM-1240 is supplying me with a bunch of other stuff in addition to that.... one of which is the Volts, which presumably it's working out from the CT Clamp, similar to how some Clamp-based Multi-meters do.  

Once I have a "right" place to store this information, I'll add it to the mix also, along with the UI bits for it.


I've attached a screenshot of what you'd get by default using a PnP version of the Brultech stuff, coming out of Google PowerMeter.  For those willing to hand data to Google, the UI's here are very nice.  I'll add the "native" support later to handle those that would prefer to keep their data local.

PS: The "big gap" was because I'd plugged the unit into a managed power strip, which turned it all off when I turned off my monitor last night.  The small ripples at the beginning are because I'd clamped incorrectly, and needed to change that...
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: TimAlls on May 22, 2011, 11:05:41 pm
That's good news!
The voltage is a derived from the AC power supply that feeds the unit.
Words of caution....watch the installation of the CTs .... They have direction arrows that line up with the direction of the current flow. I didn't catch it until I was done.....this smart little meter knows which way the current is flowing! It also allows Multiple CTs on one channel......great for summing a few circuits. It is designed to monitor a home that has solar power coming in.....it will reverse the meter for solar incoming power.
@Guessed.....I am curious how you are handling the counters on the five smaller channel inputs....they only give you the watt seconds ..... Is that what you are going to display?
Regards
Tim
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: oTi@ on May 22, 2011, 11:33:00 pm
The voltage is a derived from the AC power supply that feeds the unit.
Ah, that's what I figured after checking out the website; it didn't look like these plug into breakers, so it must be through the (apparently specialized) power supply.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on May 22, 2011, 11:36:02 pm
The voltage is a derived from the AC power supply that feeds the unit.
Interesting.  Hadn't thought of that.

Quote
Words of caution....watch the installation of the CTs .... They have direction arrows that line up with the direction of the current flow. I didn't catch it until I was done.....this smart little meter knows which way the current is flowing!
Yeah, the install guide for the CT's makes for an interesting read.  Very easy to get them the wrong way round by the look of things.
'good old "thumb" rule for currents...

Right now I just "split" some two-flex, and put one of the Larger CT Clamps over it, which is why it's only seeing a low wattage - that two-flex is running the Wall warts for the ECM-1240 itself, and a Wifi -> RS232 adapter that I built so I can get the data onto the Net without tweaking the EtherBee that it's also connected to.

Quote
@Guessed.....I am curious how you are handling the counters on the five smaller channel inputs....they only give you the watt seconds ..... Is that what you are going to display?
The "feed" that I'm hanging off has both w an ws values for each of the Aux lines.  I don't have anything attached to the Aux lines at the moment, since they only work with the closed CT's, and I'm not installed into the Panel yet.

Worst case, if they don't have them, then I can keep track of the last "seconds" counter, and do the math to work out what these should be.  I believe the general Math for that scenario is outlined in the API doco... but I wasn't reading that today, just looking at the ASCII feed that the PnP modules emit (which is Text, more like a URL with Parameters)
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: strangely on May 23, 2011, 12:05:54 am
When I installed my Aeon HEM, I actually made sure that the CTs were installed in the same orientation (no obvious markings on them), this was purely because I'd read somebodies installation/review of a TED5000, and remembered reading it.

So back on topic... I'm having Brultech envy :)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on May 23, 2011, 12:31:59 pm
Ok, approvals are through, here's the starter stub on code.mios.com, with install instructions, limitations, and full source code/history:

     http://code.mios.com/trac/mios_brultech-power-monitor
Title: Re: Brultech ECM-1220 Energy Monitor
Post by: JOD on May 25, 2011, 02:23:58 pm
@guessed, is there a way to incorporate the amperage into the displays? Also, are scene/events configuarable? If so, on each of the seven channels?

JOD.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on May 26, 2011, 05:16:41 am
@JOD,
Not yet on the Events.  Right now it's just the stubs to decode the wattage values, which in MiOS have a standard rendition etc.  If it has the data, or it can be derived, I'll make it mimic what @woodsby's TED5000 plugin as well and try to keep them in sync functionality wise.

The most immediate next step is to have it work natively with the standard package model of the device.  They're all reconfigurable to the other type but I'd prefer not to have people reconfigure just to use the plugin.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 10, 2011, 12:46:02 am
Ok, @futzle's new CurrentCost plugin:

     http://forum.micasaverde.com/index.php?topic=6752.0

inspired me so I borrows it's JSON file to pretty up the UI of my child sensors, and align it better to the standard for energy meters.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 12, 2011, 04:33:06 pm
The newest version now displays Voltage (on the Parent node) along with a crude version of the Total Wattage.  It has events for Watts/Volts above/below values, but I haven't tested these yet.

Todo: Add flexibility on what's considered part of the "Total wattage" for the Parent device, similar to how @futzle has done for the CurrentCost EnviR plugin.

More recent screenshot attached.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 21, 2011, 05:59:52 pm
Hello,
We have installed and ECM1240 with 7 circuits for one of our production clients using VERA as an energy management host.
The ECM is connected via USB<>RS232.   Hawking device that was recognized as :


root@MiOS_16414:/proc/tty/driver# cat usb-serial
usbserinfo:1.0 driver:v1.4
0: module:pl2303 name:"PL-2303" vendor:067b product:2303 num_ports:1 port:1 path:usb-00:03.0-1.2

We then installed your latest plugin using the 6 files to upload.

I then created a device, and populated ONLY the fields in teh device you suggest.

We have never created a serial device or added new plugins so we are out of our element.

When we created the Brultech device, it shows up briefly (for about 5 minutes) with V and W being empty.
1) Not sure HOW to tell this device to get its data from the serial interface defined above
2) Not sure how to add new devices for each of the additional circuits.

Can you provide some guidance?

We have enabled remote support on this device (16404)

ALSO:  We have read the brief description on plugin.  There is a comment: 
"The Plugin doesn't yet support Ascii or Binary format data directly from the device, it only works for the Plug & Play models right now."

I assume this means you support only the HTTP mode of the ECM as established in the IA tool.   Can you confirm?  If so, does it matter what the start of the HTTP post looks like?  Or do you simply strip all of that off and disregard?

Thanks

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 22, 2011, 02:55:53 am
The ECM is connected via USB<>RS232.   Hawking device that was recognized as :


root@MiOS_16414:/proc/tty/driver# cat usb-serial
usbserinfo:1.0 driver:v1.4
0: module:pl2303 name:"PL-2303" vendor:067b product:2303 num_ports:1 port:1 path:usb-00:03.0-1.2
You should also see this Serial device appear in Vera/MiOS itself, under the MiOS developers Dialog, Serial Port configuration tab.

I've updated the UI4 Installation doc on the code.mios.com wiki area for this plugin to show examples of this (for a FTDI Serial port, but it's similar for PL2303 stuff)

Quote
We then installed your latest plugin using the 6 files to upload.

I then created a device, and populated ONLY the fields in teh device you suggest.

We have never created a serial device or added new plugins so we are out of our element.

When we created the Brultech device, it shows up briefly (for about 5 minutes) with V and W being empty.
1) Not sure HOW to tell this device to get its data from the serial interface defined above
2) Not sure how to add new devices for each of the additional circuits.
By default, it'll configure itself with a "Parent" device, along with a single Child device.  If they cannot communicate with the Brultech, or if the Brultech isn't configured for the ASCII Protocol (PnP models ship this way) then the W and V values will not fill in.

I've updated the Install instructions somewhat to show what the Serial Port config would look like.  I haven't specifically tested that situation right now, as my Brultech is hanging off a RS232-Wifi adapter, and I can directly configure an "IP Address" with the Brultech Plugin/Device.

Let me know if it doesn't work, and I'll try that out tomorrow night when I have a little more time (the code is common with other cases where I do that also, like the DSC Alarm, so it should be fine)

Quote
We have enabled remote support on this device (1xxxx)
Won't really work for me, since I don't work for MCV.  Remote Support only works for folks that work for MCV.  Everyone else has to debug remote systems using logs and so-forth, but the problems you're having are more config related at this time and we should be able to get you going on the forums directly (or, just by me documenting these parts 8)

Quote
ALSO:  We have read the brief description on plugin.  There is a comment:  
"The Plugin doesn't yet support Ascii or Binary format data directly from the device, it only works for the Plug & Play models right now."

I assume this means you support only the HTTP mode of the ECM as established in the IA tool.   Can you confirm?  If so, does it matter what the start of the HTTP post looks like?  Or do you simply strip all of that off and disregard?
In short, the Brultech devices support Binary (the default format) and an ASCII format that's used when they talk to things like http://my1240.com (as a proxy service to Google PowerMeter)

The PnP models ship configured to use the ASCII protocol, and these "commands" are sent over both the inbuilt Zigbee Module, and the RS-232 interface "simultaneously".

For PnP models, data on the Serial port looks like:
  GET /usr/bxxxxx/dev.php?sec=7983906&v=1225&c1w…  HTTP/1.0

My Plugin looks for this type of line using a pattern like:
  GET /*?<usefulStuff> HTTP/?.?

in the example above "usefulStuff" gets set to:
  sec=7983906&v=1225&c1w…

which I then process to extract the data values for each channel/CT.  Technically, anything emitting that basic format will be processed for it's values.

Until recently I haven't had a Windows machine @Home, so I haven't been able to run the IA Tool so I left each of my ECM-1240's in their default "PnP" configuration (which is how I bought them).

I bought a Netbook last Weekend so I can play with the tool, and a few other "windows-specific" things that don't otherwise play well with my Mac's (like some Native SMS device-config tools I have, and some of the Ethernet-RS232 converters I use)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 22, 2011, 09:51:05 pm
@guessed,
Thanks for the reply.   Sorry for the confusion as i had thought you were an MCV employee.

We have made a little progress with your plugin but are experiencing some issues...

Setting the stage:
1) I was incorrect, we are not using Hawking USB serial device but generic FTDI device USB<>Serial device.  We are able to cat /dev/usb/tts/0 and we rx the "get" stream from the ECM.  Initially, the ECM we are using was not shipped as a PnP device, but using IA we can set into the HTTP mode (PnP mode). We then had to set the baud rate to 9600 under VERA serial configuration.

We are now getting data using the "cat" command showing above:


GET /usr/3xxxxx/dev.php?sec=5444553&v=1242&c1w=221&c2w=2&wsa1=77804969&wsa2=1566445&wsap1=16836486&wsap2=264012&A1w=&A1ws=2804&A2w=&A2ws=7748757&A3w=&A3ws=3988024&A4w=&A4ws=10513475&A5w=76&A5ws=9066159&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

GET /usr/3xxxxx/dev.php?sec=5444563&v=1242&c1w=222&c2w=2&wsa1=77807187&wsa2=1566465&wsap1=16836486&wsap2=264032&A1w=&A1ws=2804&A2w=&A2ws=7748757&A3w=&A3ws=3988024&A4w=&A4ws=10513475&A5w=77&A5ws=9066925&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

GET /usr/3xxxxx/dev.php?sec=5444573&v=1240&c1w=221&c2w=2&wsa1=77809405&wsa2=1566485&wsap1=16836486&wsap2=264052&A1w=&A1ws=2804&A2w=&A2ws=7748757&A3w=&A3ws=3988024&A4w=&A4ws=10513475&A5w=77&A5ws=9067695&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

GET /usr/3xxxxx/dev.php?sec=5444583&v=1235&c1w=3440&c2w=2&wsa1=77837446&wsa2=1566506&wsap1=16836486&wsap2=264073&A1w=&A1ws=2804&A2w=&A2ws=7748762&A3w=3191&A3ws=4009321&A4w=&A4ws=10513476&A5w=75&A5ws=9068454&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

GET /usr/3xxxxx/dev.php?sec=5444593&v=1236&c1w=3371&c2w=2&wsa1=77871562&wsa2=1566526&wsap1=16836486&wsap2=264093&A1w=&A1ws=2804&A2w=&A2ws=7748762&A3w=3173&A3ws=4041490&A4w=&A4ws=10513476&A5w=75&A5ws=9069211&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

GET /usr/3xxxxx/dev.php?sec=5444603&v=1236&c1w=3290&c2w=2&wsa1=77904991&wsa2=1566546&wsap1=16836486&wsap2=264113&A1w=&A1ws=2804&A2w=&A2ws=7748762&A3w=3110&A3ws=4073052&A4w=&A4ws=10513476&A5w=75&A5ws=9069961&dev=12484&id=3&Resp= HTTP/1.0
Host: 192.168.30.11

As you can see we are getting valid data to Vera host.  

However, we have tried adding the Brultech device as the document suggests, and it shows up as device..   But eventually disappears from UI.   Then when we add again it shows up with NEWER (incrementally higher)  DEVICE ID.  

During one of the iterations of re-adding the brultech primary device, it did add ONE channel.

But eventually all the device disappeared.

Not sure what i could be doing wrong, but i believe it has to do with parent configuration etc..

Not sure how i can delete the OLD brultech devices that disappeared.

Any suggestions are greatly appreciated.

Thanks
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 22, 2011, 10:18:05 pm
@guessed,
I think part of the reason for the disappearance of the BRULTECH device in previous attempts is because we had originally set to ASCII.
So the plugin was getting confused.

At any rate, after we confirmed accurate stream from USB<>Serial via "cat", we went back again and follower your updated directions from last night..

All seems to be OK this time around and i am getting accurate readings on all 7 sensors.  Yee Haw!!

Questions:
1) Is there anything in your plugin that will preclude me from using description other than "Brultech"?  In other words, for future installs can i use any description i wish when creating the device?
2) Can i change the name of the individual sensors from Meter1 etc.. to more descriptive names?

So far, it looks really impressive.  When do you expect your next release?

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 22, 2011, 10:38:37 pm
@guessed,
In our typical ECM1240 deployment we use one channel (normally CH1) with split cores to monitor split-phase 240v on MAINs feeding the circuit breaker panel.

The problem that this represents for is that the total power shown in the parent Brultech device is "doubled" as the mains (which are channel 1) are added to the 6 other inputs (CH2 and AUX1-5).

It would be great if in future release you could add field to the parent Brultech device that allowed the integrator to specify which channels (comma separated string list) to aggregate in total power.  So, for example, in our case, we would simply set this field to "1" which would be the channel that is connected to the Main and thus avoid "doubling" the total power shown.  And "0" or Blank would mean 'do not aggregate' in which case the user of the UI would simply look at Meter input that is known to be tied to the mains to get "total" power consumption.

All in all looking great!!

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 22, 2011, 10:40:19 pm
All seems to be OK this time around and i am getting accurate readings on all 7 sensors.  Yee Haw!!
That's always good to hear!  You're the second deployment of this code, after me, so it's bound to have some rough edges on it.

Post a picture when you get a chance, and have some data behind it of course 8)

Quote
1) Is there anything in your plugin that will preclude me from using description other than "Brultech"?  In other words, for future installs can i use any description i wish when creating the device?
Nope, you can label it whatever you want, but I like to be explicit in the instructions so that people have a step-by-step.  You can change it afterwards also, by going into the Device's Dialog, and "clicking" on the Device Name string in the Top-left.... then (Save) afterwards of course...

Quote
2) Can i change the name of the individual sensors from Meter1 etc.. to more descriptive names?
They can be changed the same way as described above, using the Dialog for each.  They're only populated during initial Device creation, so I needed some placeholder names.

Quote
So far, it looks really impressive.  When do you expect your next release?
No idea.  I generally do things when I need them, or when someone expresses a desire (that's readily implementable).  For the moment, I have two units, but only one is wired and it's only wired to a test-rig (2 channels, low wattage)

The next logical steps would be:
a) Add support for the Binary mode (since that's the default)
b) Add support for 2 or more ECM-1240's on a single Serial bus (they multiplex them with a Serial#)

Haven't been pushed to do these yet, since I'm working on something else at the mo (a Native SMS Plugin)



Let me know what specifically you're looking for, and we can see how that's going to work.  The next few weekends are busy so it may wait a little.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 22, 2011, 10:49:44 pm
@guessed,
In our typical ECM1240 deployment we use one channel (normally CH1) with split cores to monitor split-phase 240v on MAINs feeding the circuit breaker panel.

The problem that this represents for is that the total power shown in the parent Brultech device is "doubled" as the mains (which are channel 1) are added to the 6 other inputs (CH2 and AUX1-5).

It would be great if in future release you could add field to the parent Brultech device that allowed the integrator to specify which channels (comma separated string list) to aggregate in total power.  So, for example, in our case, we would simply set this field to "1" which would be the channel that is connected to the Main and thus avoid "doubling" the total power shown.  And "0" or Blank would mean 'do not aggregate' in which case the user of the UI would simply look at Meter input that is known to be tied to the mains to get "total" power consumption.
You wish has been granted.  8)

It already has code to handle that, but I just haven't documented it.  Each child Meter object has a setting, in it's Device Dialog, as to whether the Parent "Total Watts" value should Include (add), Exclude (subtract) or Do nothing (ignore) the value from the Total wattage calculated.

In your specific deployment, you can use this to "Ignore" the value for Meter-1.  If you have a Solar array, you can use it to offset the Total wattage.

I borrowed the idea from @futzle's implementation for the CurrentCost plugin, although my UI implementation is different.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 23, 2011, 08:29:01 am
guessed,
Thanks for this info.

I am trying to remove the CH1 wattage value from the parent Brultech aggregate, but am confused..

When you say "Device Dialogue", i assume you mean the "Advanced Tab" for the device..  (accessible via the UI4 "tool" icon for device)

But in the "Advanced Tab" for the child meter devices, i cannot find any reference to a field/variable that would allow me to include/exclude a child meter's value from the brultech parent aggregate.

Can you tell me what i might be doing wrong?

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 23, 2011, 11:13:01 am
Each Meter-n Device has it's own Wrench/Spanner.  This activates it's own Device Dialog.

On the Control tab on that dialog, you'll see the options to (Add)/(Subtract) or (Ignore) the Wattage value under the "Include in Total Watts" heading.

See attached.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 23, 2011, 11:18:49 am
Guessed,

I understand that you currently do not have the ability to handle multiple ECMs.

If you would like to work with us to test a Multi-ECM setup via Etherbee gateway let me know..

In our lab/demo area we have 2 x ECM1240s that are zigby back to an Etherbee gateway.  The setup of these two ECMs is as PnP to log the HTTP to the My1240 web site.

The thought is that you could use our current hardware configuration to develop/test a multi ECM setup via IP interface back to Vera.  We could give you VPN access to our network and SSH/Web to the VERA itself.   We could then redirect the EtherBee gateway to send the IP HTTP traffic to the vera host for parse.''

I believe our current configuraiton is 7 cahnnels on one ECM and 5 channels on the 2nd ECM.

If you are interested in using our demo/lab as test bed for this effort let me know.

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 23, 2011, 11:21:50 am
I have the same hardware (2x Etherbee enabled ECM-1240's), so it's more of a "time" thing than anything.  Wiring the test-rid is the easy part. 

Still wrapping my head around how to make it work, cleanly, under Vera given they both have "device 1..7" and it's just the Serial# that differentiates the feeds, and I didn't want people keying those in.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 23, 2011, 11:25:20 am
Guessed,
Our current plugin does not show these buttons on the control tab for "Ignore, Add, Subtract"
Just the

We installed the plugin from the source that was available two nights ago (20JUN11)

Do i need to install new plugin?  If so, i have not upgraded plugin before, do i simply need to install the plugin again, following original directions and all is OK?  Or will i need to delete devices and start over?

Also, is there a version number for plugin that we can track?

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 23, 2011, 11:27:47 pm
Oops, I've been switching machines and changing SVN (source control) clients so I forgot to Tag the newest release.  I've now done this, and updated the Wiki instructions and download link.

To update, simply re-download the newest files from the link provided in the Documentation and then re-upload them to Vera.  Everything else will just work, and you'll have the new functionality.

No need to delete the Device, we try to avoid that, since it hoses any scripts you might have built (sometimes it will be unavoidable)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 24, 2011, 05:49:36 am
Guessed,
That did the trick. Thanks.

Let me know when you are ready to test a MULTI ECM setup on vera.  We have lab/trial system in our demo room that is currently logging to my1240 from 2 ECMs via EtherBee gateway.  Can point to vera host at any time.

Do not know how you will get around issue of "avoiding" having individual key in serial number to identify different ECMs.  One thought (but a lot of work) simply specify port that is monitored, and over one minute period go into "acquire" mode and read the GETs from the device and look for different serial numbers and automatically build devices/meters.  (This would assume send intervval of ECM is less than one minute)  Only problem with this approach is "equipment swap" when ECM fails and losing historical data, but even ways around that.

Regardless of what you decide, let me know when you are ready for someone to test the change to the plugin.

GREAT WORK!!
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 24, 2011, 10:05:58 am
Guessed,

It would be nice if we could use VERA not only as realtime view of power consumption, as well as automatic pass up to MIOS, but as a gateway to other richer web services.

Specifically: It is great to see realtime info in vera, and it would be the icing on the cake if you could simply "pass through" the raw PnP string with HTTP parameters (such as is available on Etherbee) to allow us to send the information further up the food chain to other web services.

In our case we want the option to log to "check-it.ca" or "my1240.com" or our own java web service for data accumulation.

What are your thoughts, comments?

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 28, 2011, 02:55:17 am
That's how I was originally going to handle the Google integration.  Basically reconfigure the Etherbee to call Vera, on one of it's UPnP calls that, in turn, would effectively call an Action on my plugin.... And then have the plugin call Google / my1240 / etc...

I decided against that for a few reasons:
A) it puts Vera in the middle of every transaction
These extra 'hops' add a certain degree of flexibility, but at the cost of lowered resilience on the overall path to the data being delivered, and I have an architectural pref for things to be autonomous (and keep working if the HA controller goes down, for example)

B) it requires reconfiguration of the Etherbee
Which adds manual configuration steps using a Windows-only tool.  This makes it harder for people to just get going, simply.  I have most of the code to decode the raw buffers, which is the default for the '1240 so it would be the cleanest route for most users....


Given Google is no longer going forward with PowerMeter, I might as well reconfigure my Etherbee back to it's default configuration.

Still wrapping my head about how to make it interface cleanly with Vera given multiple 1240's on a single channel.  I have ideas, ones that will work with Vera's notion of 'upfront' Device creation, but folks won't be able to readily 'know' which MiOS device relates to which ECM unit...
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 28, 2011, 08:54:23 am
Guessed,

Quote
I decided against that for a few reasons:
A) it puts Vera in the middle of every transaction
These extra 'hops' add a certain degree of flexibility, but at the cost of lowered resilience on the overall path to the data being delivered, and I have an architectural pref for things to be autonomous (and keep working if the HA controller goes down, for example)

But it seems you must plan for some mechanism to allow "unaltered" ECM data to get beyond the VERA platform.  There are many  people developing web services around the ECM protocol.  Our company is an example.   

Also, there is always a weak link in every chain, and yes VERA is the weak link by adding another HOP.  However, the beauty of ECM message set is that it supports Watt Seconds in each GET, so regardless of howmany messages are dropped, i can always calculate energy usage between messages.

I guess the question is:  Do you intend to "stop" the message at VERA?  If so, that pretty much rules us out as we must be able to get the messages to more powerful reporting services, and be forced to configure ECM to point to existing web services where power reporting is richer and has more momentum.   Maybe start another "fork"? or??  let me know your thoughts.

One final note:  You can simply add a field to the main brultech device that allows the user to specify a "prepended" string to the PnP string, and simply PASS this up the WAN interface if the field is populated (length > 0).   Then is available if needed, or not.

Quote
B) it requires reconfiguration of the Etherbee
Which adds manual configuration steps using a Windows-only tool.  This makes it harder for people to just get going, simply.  I have most of the code to decode the raw buffers, which is the default for the '1240 so it would be the cleanest route for most users....
Given Google is no longer going forward with PowerMeter, I might as well reconfigure my Etherbee back to it's default configuration.

I did not know Google pulled the plug (no pun intended) on powermeter.  Nonetheless there are other services that have been around for sometime that can be used as well..  Google Power Meter is not the only service..

Quote
Still wrapping my head about how to make it interface cleanly with Vera given multiple 1240's on a single channel.  I have ideas, ones that will work with Vera's notion of 'upfront' Device creation, but folks won't be able to readily 'know' which MiOS device relates to which ECM unit...

hmmm..  ECM used to "print" serial numbers on the 1240s.   These serial numbers were also used in the binary, ascii and PnP message sets.  Not sure why they stopped putting Serial #s on outside of unit.  At any rate you could always TELL the user to ADD one ECM at a time to the Etherbee network.  Once it is added, they can label the device in VERA.   Furthermore, you could have somehere in the Plugin primary device the actual serial number that was presented as the PnP data string and instruct the user to "brother label" it to the ECM.   And then start on next, etc..   Or maybe get Brultech to start labelling the ECMs again with Serial #s..  But BOTH of the above assume you have a field in the VERA device that shows the "scraped" serial number as derived from GET.   The above is just some thoughts, and i may be WAY off base..    Nonetheless, I am very interested in seeing/testing what you develop once you decide the best route for addressing this next phase of your plugin.

In Closing: Your plugin is great!!!  You should be very proud of your work.  I wish I were as altruistic as you, but unfortunately, my father's capitalism runs deep in my blood.

Kind Regards
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on June 28, 2011, 11:56:26 am
It's not that it can't be done, it's just that it's not my first priority.  The best way to do what you're describing is to outline, and implement, a common UPnP Service that can "send stuff" to remote Power Collection entities.

If this can be standardized, and made neutral of the specific "format" that the data must be sent over the wire (eg, not a URL-like ECM string), then ALL of the Energy Monitoring plugins could call it.

In turn, there would be multiple implementations of this Service, to handle sending stuff to My1240.com, Check-it.ca, etc).

If you build that Service/Device, and it's vendor neutral, then I'm sure you'll get all of the Power measurement Plugins connecting to it.... meaning you'd not only cover the ECM-1240, but likely the TED5000, and the CurrentCost EnviR...

It's probably the way that Vera's own EMonitoring should be done, so we can "unplug" it if folks wanted to (along with plugins for Notification that could be plugged)



BTW, they still write the Serial# on each device, but that's not the problem.  The problem is that the data will come in some unpredictable ordering, and I'll have to "allocate out" Children to each ECM as it does.

It'll be first come, first served... at least the first time around.

So the first ECM would get Child devices 1..7, the next would get 8..14, etc, and the user would have to indicate that they have 14 children (as they do today).  The problem is that with ECM-1 and ECM-2, you'd never know which one "got" 1..7 and which got 8..14 (etc) - at least not without opening up the Child and looking at it's properties (where I can store the Serial#)

Not really a big deal, but overall I preference making it simpler for the user (and not having them configure Serial#'s and the like)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: futzle on June 28, 2011, 05:20:15 pm
The best way to do what you're describing is to outline, and implement, a common UPnP Service that can "send stuff" to remote Power Collection entities.

If this can be standardized, and made neutral of the specific "format" that the data must be sent over the wire (eg, not a URL-like ECM string), then ALL of the Energy Monitoring plugins could call it.

This is exactly what I recommend.  I have a script that bridges Vera to the free sysadmin monitoring software Nagios (http://www.nagios.org/).  It polls a device's "Watts" variable every minute (this period is configurable) and plops the result into my network status along with ping times and UPS statuses and disk usages.

It's all done with curl and xsltproc, and the fact that the energy monitor is a CurrentCost EnviR isn't known to Nagios.  Vera abstracts that away.

Anyone who wants the script can PM me.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on June 30, 2011, 01:28:05 pm
Quote
It's not that it can't be done, it's just that it's not my first priority.  The best way to do what you're describing is to outline, and implement, a common UPnP Service that can "send stuff" to remote Power Collection entities.

I think one of the problems that might be experienced with this approach is that everyone's logging requirements might be different relative to the specific power monitoring device.  Not that the uPnP forwarding service cannot format the info, but rather the raw info as captured by plugin might "drop" important info that it in turn makes available to the uPnP service.

For example, in the case of brultech, they have a nice piece of info called WattSeconds for each channel.   From any logging/reporting service this is probably the most crucial.

My guess is that in your current Brultech plugin you discard that in the stream and just show current wattage of last message set.

So developing uPnP service to "forward info" as gathered by your plugin might not work as expected.


Quote
If this can be standardized, and made neutral of the specific "format" that the data must be sent over the wire (eg, not a URL-like ECM string), then ALL of the Energy Monitoring plugins could call it.    In turn, there would be multiple implementations of this Service, to handle sending stuff to My1240.com, Check-it.ca, etc).

I see your point, and this makes perfect sense in theory.


Quote
If you build that Service/Device, and it's vendor neutral, then I'm sure you'll get all of the Power measurement Plugins connecting to it.... meaning you'd not only cover the ECM-1240, but likely the TED5000, and the CurrentCost EnviR...

I like the way you are thinking, and in theory it would be great to have this uPnP service for each monitoring device and service logging combination.   This would allow services (like ours) to monitor record various monitoring hardware via VERA.  And it would be great..   I wonder that even if you can get everyone to "play nicely" you would find that you have similar data from various monitoring devices that would allow for single point of logging/reporting.

Quote
BTW, they still write the Serial# on each device, but that's not the problem.  The problem is that the data will come in some unpredictable ordering, and I'll have to "allocate out" Children to each ECM as it does.  It'll be first come, first served... at least the first time around.  So the first ECM would get Child devices 1..7, the next would get 8..14, etc, and the user would have to indicate that they have 14 children (as they do today).  The problem is that with ECM-1 and ECM-2, you'd never know which one "got" 1..7 and which got 8..14 (etc) - at least not without opening up the Child and looking at it's properties (where I can store the Serial#)

Yes, this is the way i would suspect it needs to be done.  It may not be plug and play, but it will work and gives you some level of control.  Especially from a support perspective when you need to "swap" equipment.

Quote
Not really a big deal, but overall I preference making it simpler for the user (and not having them configure Serial#'s and the like)

Wish i could offer up a suggestion to provide this level of Plug/Play operation, but right now my mind is drawing a blank.

Nonetheless, once you have something ready that supports multiple ECMS via Etherbee, let me know.   Have "guinea pig" will travel.

PS: We continue to be impressed with your plugin.   Thanks for your hard work.

Kind Regards
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on July 18, 2011, 10:06:16 am
Support added for multiple ECM-1240's on a single EtherBee or Mux'd Serial port.  Changes pushed to the latest over at the home, along with full source code history:

    http://code.mios.com/trac/mios_brultech-power-monitor
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: shifter775 on July 27, 2011, 11:33:33 am
Looks like they stopped selling the Plug & Play packages. Maybe a result of Google PowerMeter going away?

Does anyone know how hard it is to configure a standard package to work with this plugin?

I don't have MS Windows around, but I'm comfortable configuring things via a serial port. The downloads I can see on the Brultech website look like they are for windows only. Couldn't find a manual either.

Any pointers on getting this to work now that Plug & Play seems to be gone are much appreciated.

TIA
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on July 27, 2011, 12:56:33 pm
All of Brultech's current [re]configuration tools are Windows-based. 

If you had/borrow a Windows machine, you could reconfigure the ECM-1240 to emit the ASCII format that I'm using, it's just a few radio button options and you'd have it.... even when GPM goes away.  The reconfig is really simple (if you have a box to run their tools)

I had a number of HW Devices that all did the same thing (X-CTU for XBee's, WIZNet for SR110's, and the Brultech stuff... which partially uses the former) so I broke down and got myself a Netbook.  It made things a little easier than running VirtualBox (or whatever) just to get a Windows machine on my Mac.


Anyhow, I have most of the code "inside" the Plugin for handling the Binary format for the non-PnP models, but I've never reconfigured mine over to the "default".  With GPM going away, it's probably a good time to complete that support.

Give me two weekends and I'll complete (and test) the code so it can work without reconfiguration on the Binary-format models.
Title: Brultech w/ EtherX and two ECMs stops refreshing
Post by: smilligan on August 03, 2011, 11:43:53 am
Guessed,
Hopeful you can help me out with a slight problem.

We have latest vera, with your latest brultech plugin (i think it is latest, as i am not sure what changes you may have made in last few weeks)

Configuration:
1) Vera
2) EtherX Gateway
3) Two ECM1240s connected to EtherX gateway

The brultech plugin seems to work ok for some period of time (not sure how long), but then stops refreshing data.   I have found that simply hitting "save" button on VERA web interface seems to wake up the plulgin and i start getting data realtime..  at least for a short period.  After which point the web UI plugin stops updating and i must click on "Save" again.

I am not 100% positive that the "save" fixes the problem or it is merely coincidental, but it seems to have solved teh problem the last 4 times it has occured.

Any ideas would be greatly appreciated.

PS: we have a USB drive connected to VERA for USB logging and not sure if this new addition might be related to problem.   We added USB logging about the same time we noted this strange behavior.

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on August 03, 2011, 11:37:49 pm
Sean,
When it occurs next, can you email me a copy of your complete log file?  I'm guessing I'll need the whole file in order to debug it and capture the right messages from the Plugin itself.  I suspect the last-event occurrence data has probably disappeared from your logs by now.

You already have my Email address, so you don't need to post that content here (in case it's sensitive in any way).
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on August 06, 2011, 01:19:00 am
Sean,
I've uploaded a new copy, which includes some new files, and changed the installation instructions at:
    http://code.mios.com/trac/mios_brultech-power-monitor/wiki/Installation-UI4

there are a bunch of new files that now need to be uploaded, so you might as well upload all 9x of them.  They'll overlay any existing config since I haven't changed any names, just added a few, and a little refactoring of the code to get ready to support native/raw format.

It adds the poll() method we discussed, that executes every 5 minutes, to attempt to "reset" the connection in the power outage situation you'd experienced.  Let me know how that goes, since it's a bit of an experiment.  If it works-around the issue successfully, I'll open a Ticket to get MCV to fix that particular situation with [TCP-Based] IO dropouts.


As a potentially related issue, if you have two ECM units, and they "start" at the same time (after a power failure) then they'll routinely transmit data "at the same time".  This causes data collisions, so you'll want to see each ECM to a slightly different data publication/update frequency.

eg. 50s for the first, 51s for the second, 52s for the third, and so on...
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: mckervey on August 28, 2011, 08:13:42 pm
So close, but I need help.

I'm not seeing values in the web interface (see attachment).

I do see data in the LuaUPnP.log

 08/28/11 20:10:28.619   luup_log:25: Brultech PowerMeter: debug: processIncomingText:: Buffer=sec=190566&v=1253&c1w=5179&c2w=2734&wsa1=624668649&wsa2=317966239&wsap1=16&wsap2=29941&A1w=&A1ws=38425565&A2w=85&A2ws=4721477&A3w=286&A3ws=42990710&A4w=434&A4ws=28007620&A5w=337&A5ws=23881848&dev=34180&id=3&Resp=, Length=212 <0x3c10>
50      08/28/11 20:10:28.620   luup_log:25: Brultech PowerMeter: debug: Skipping buffer=sec=190566&v=1253&c1w=5179&c2w=2734&wsa1=624668649&wsa2=317966239&wsap1=16&wsap2=29941&A1w=&A1ws=38425565&A2w=85&A2ws=4721477&A3w=286&A3ws=42990710&A4w=434&A4ws=28007620&A5w=337&A5ws=23881848&dev=34180&id=3&Resp= <0x3c10>
50   

I'm using a wiznet serial to ethernet converter and have the Brultech in ASCI mode obviously.

Any ideas?
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on August 28, 2011, 08:59:41 pm
You are nearly there, there's a prefix missing:

50   08/28/11 17:49:56.769   luup_log:234: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET /usr/uuuuuuu/dev.php?sec=4044681&v=1216&c1w=&c2w=&wsa1=386751&wsa2=1129950&wsap1=119384&wsap2=400521&A1w=&A1ws=89628&A2w=&A2ws=164811&A3w=&A3ws=&A4w=&A4ws=47655&A5w=&A5ws=347427&dev=xxxxx&id=2&Resp= HTTP/1.0, Length=210 <0x4c12>


as mine is still uploading to Brultech's my1240.com service (for now)

I hunt for a pattern like:
    local result = s:match("^GET /.+%?(.-) HTTP/%d%.%d$")

so it doesn't really matter what that leading part of the string looks like, but it does need that general form.

There should be a spot to put that into the configuration, probably near where you configured it over to ASCII format.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: mckervey on August 29, 2011, 11:07:59 am
I played around trying to configure the ECM-IA app (set url info menu option) to output with the text you mentioned, but no avail.

Instead I tried forcing it by changing a function in L_BrultechMeter1.lua (I know this isn't preferrable, I just want to get it working  ::))

function processIncomingText(s)
    debug(string.format("processIncomingText:: Buffer=GET /usr/uuuuuuu/dev.php?%s, Length=%s", s, tostring(s:len())))

    local result = s:match("^GET /.+%?(.-) HTTP/%d%.%d$")

    if (result ~= nil) then
        decodeBufferText(result)
    else
        debug("Skipping buffer=GET /usr/uuuuuuu/dev.php?" .. s)
    end
end

The output in the log file looks correct, but it's still not showing any data in the UI4 gui :(

08/29/11 10:57:59.980   luup_log:58: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET /usr/uuuuuuu/dev.php?sec=243774&v=1253&c1w=644&c2w=&wsa1=785931537&wsa2=394009123&wsap1=16&wsap2=32849&A1w=&A1ws=46067518&A2w=10&A2ws=6486579&A3w=138&A3ws=54418949&A4w=22&A4ws=32387183&A5w=25&A5ws=30193765&dev=34180&id=3&Resp=, Length=205 <0x3c10>
50      08/29/11 10:57:59.981   luup_log:58: Brultech PowerMeter: debug: Skipping buffer=GET /usr/uuuuuuu/dev.php?sec=243774&v=1253&c1w=644&c2w=&wsa1=785931537&wsa2=394009123&wsap1=16&wsap2=32849&A1w=&A1ws=46067518&A2w=10&A2ws=6486579&A3w=138&A3ws=54418949&A4w=22&A4ws=32387183&A5w=25&A5ws=30193765&dev=34180&id=3&Resp=
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on August 29, 2011, 11:53:03 am
If you want the "quick hack", until you configure the ECM-IA component correctly, make the following change:

FROM:
    local result = s:match("^GET /.+%?(.-) HTTP/%d%.%d$")

TO:
    local result = s:match("^(.-) HTTP/%d%.%d$")

But you really need to find that string in their tool...
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: mckervey on August 29, 2011, 12:56:24 pm
Still no luck even with the hack. Attached are some screenshots of the configuration. I don't know what else to do. I spent all weekend on it :(

Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on August 29, 2011, 11:21:13 pm
I think I see the problem now, I should have paid more attention when you first posted data.

The ECM-1240's actually have 3 modes of data transmission:

and there's an item on the ECM-1240 Setup Tab of the IA tool that lets you select which you want.  In the case of the original Plug-n-Play models, they upload to My1240.com over HTTP.

The HTTP Format is almost the same as the ASCII format, except each line begins with "GET /...?" and ends with "HTTP/1.0"

If you look back at your logs, and compare them to mine, you'll see that as a difference so that's why the Pattern-match hack that I gave you isn't working (since there's not "HTTP/1.0" on the end)

Anyhow, in the IA tool, change the setting to "HTTP" (from "ASCII") and then Save.  That should force the log to look like the  one that I posted. 

You may also need to setup the IA Settings under the Menu "Set URL Info", as I'm not sure what the defaults are there.

Mine has:

POST Root URL: my1240.com
POST URL extension: /usr/ba/dev.php

but I'm assuming those are default(s).

Anyhow, give that a whirl and post your logs as needed.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: mckervey on August 30, 2011, 09:56:38 am
That did it!

I tried HTML mode previously but I suppose I wasn't patient enough. The disadvantage is the 10 second polling interval instead of 2 seconds (<10 seconds is just greedy anyway  ::) )

Thank you very much for #1 developing the plugin, #2  supporting me!


Side note, I'm not uploading to my1240.com and didn't need to configure "Set URL info" in the IA.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: ChrisAZ on October 02, 2011, 07:30:16 pm
I'm trying to get my Brultech working with Vera and could use some help.  I have the Brultech connected via an EtherBee device.  When I use the Brultech software on my PC, I am able to receive data as expected.

I have installed the Brultech plug-in as well as the IPSerial plug in and configured that for the EtherBee device (port 4883).  When I reboot Vera, it attempts to open the IO port but fails (error is: "Brultech [45] Failed to open IO port")

Any ideas as to what I have wrong?

Chris
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 02, 2011, 09:52:43 pm
With an EtherBee attached ECM, you don't need IPSerial Plugin, as the Brultech plugin natively supports connecting to it.  I've augmented the install instructions to give a starter/stub config for an EtherBee attached device.  I've also uploaded the Build to the 0.1.5 ZIP file so you might want to download that to ensure you also have the latest.

You'll want to "undo" the Serial-Port to Brultech attachment that you've done, and configure the Brultech's IP Address instead (install instructions have a screenshot of this)

The EtherBee itself needs to be configured to send the HTTP-format messages (which was the default for the old Plug-n-Play models)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: ChrisAZ on October 03, 2011, 12:50:32 pm
Deleted the serial port and followed your instructions - but still no luck.  I'm looking at the logs and not seeing much.  After a reboot I see:
01   10/03/11 9:20:06.859   luup_log:45: Brultech PowerMeter: Running Network Attached I_BrultechPowerMeter.xml on 192.168.13.7:4883 Device# 45, id  <0x402>

Occasionally I see this:

01   10/03/11 9:37:15.860   IOPort::Connect connect -1 192.168.13.7:4883 <0x4011>
25   10/03/11 9:37:19.860   IOPort::Connect device 45 connecting to 192.168.13.7:4883 iodevice: 0 path (null) <0x4011>
25   10/03/11 9:37:19.861   IOPort::Connect connect 1: 192.168.13.7:4883 <0x4011>

But I can't see any evidence that it is getting or parsing any of the data.

Any ideas?
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 04, 2011, 12:54:01 am
I believe the IOPort::... messages come from the Serial layer, so there are likely still remnants of the Serial Port association left behind in the Serial Port Configuration UI.

If this is the case, make sure that the "Assignment" is blanked out, instead of being attached to the Brultech as you had in your past diagram.

Additionally, the Plugin was built for the original "Plug and Play" models of the Brultech (setup to talk to the my1240.com service).  These come pre-configured a certain way that the Plugin is expecting, including:

a) Automatic Output of HTTP-style data every 50 seconds from each ECM-1240.
b) The EtherBee is configured in either "Mixed" or "Client" mode.

It's been a while, but I believe I had to change the EtherBee to be in "Server" mode so that Vera could connect to it, this is done using one of the tools from Brultech (a tool somewhat shared with the WIZnets, since that's 1/2 of what's inside a EtherBee)

Any ECM-1240 can be configured in this way, it's just that the "Plug and Play" models came preconfigured in that manner.

If either (a) or (b) is missing, then the MiOS Plugin will not be able to connect and "see" the data.


@mckervey, @smilligan,
Could one of you paste some screenshots of the Setup under Brultech's Windows-based config tools?  My Windows box is down and I cannot get into the tools to show the config.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: ChrisAZ on October 04, 2011, 02:08:43 am
That did the trick - I don't have the PnP model but we now know we can get a non-PnP model into the proper mode.  I reconfigured the Etherbee to mixed mode.  Server mode works too, but doesn't allow you to make changes via the IA tool.  Mixed mode appears to allow your plug-in to work and allows me to make changes with the IA tool.

I have also played around with the Packet Send Interval.  30 seconds appears to be working just fine.

I will keep noodling with this over the next few days and report back if I see anything.

Thanks for your help and for the plug-in.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 06, 2011, 01:13:40 am
Cool.  I chatted with @smilligan in the background, and he provided a few screenshots of the EtherX and ECM-IA Tools running with the "right" values in them.

I've uploaded these to the Wiki, for future reference:
    http://code.mios.com/trac/mios_brultech-power-monitor/wiki/Installation-ECM1240

They're a bit crude, but they should give folks a better clue on how to reconfigure.


Thanks for the screenshots Sean, appreciated!!
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: ChrisAZ on October 11, 2011, 07:05:40 pm
One gotcha I encountered (and Brultech confirmed) was that after you switch to HTTP mode, you must reboot the ECM-1240 before you can set the POST URL.  After setting the POST URL, perform another reboot and you are ready to go.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 13, 2011, 10:36:21 pm
@ChrisAZ,
Thanks for that info, I've added it to the Reconfiguration instructions in the Install Wiki.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 18, 2011, 01:19:40 am
I now have 14 channels all [neatly] wired into my Sub-Panel (thanks to my father-in-law).

I can't wait for their 32 channel "GreenEye" version to be available so I can re-purpose my ECM-1240's for the Oven and AirCond (hanging directly off the main Panel, on the other side of the garage) and maybe water/gas metering.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: oTi@ on October 31, 2011, 09:55:12 pm
I can't wait for their 32 channel "GreenEye" version to be available [...]

Quote from: ben @ brultech on 10/20
The GreenEye is still 7-9 weeks off, we've recently begun manufacturing. We're aiming for $320 without CTs.
Is it Christmas yet? ;D
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on October 31, 2011, 10:24:52 pm
Yeah, they've been in that mode for a while now.  Really happy with my 2x ECM-1240 units, as I have more data than I can poke a stick at, but still lusting after "unbundling" my grouped channels...

So it'll be either a GreenEye or a lump of Coal...
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on December 27, 2011, 10:54:53 am
Mr G...
Hope your holiday was good, and santa brought you all sorts of new toys to play with.

I have a "curve ball" i want to throw at you:

As you know we have an EtherX (Zigby to ethernet) gateway talking to two ECM1240s.  Everything is working like a charm.

I now want to connect a third and fourth ECM to our VERA.   THe issue is that the physical location of the circuit breaker panels is too-far from the currently provisioned EtherX gateway.  (no zigby comms).

So i would like to use a Serial to IP server, or a second EtherX gateway.   (most likely a Serial IP server as our private LAN is available at the location of these additional breaker boxes we wish to monitor)

1) Can i provision/install TWO (or more) Brultech Plugins at the same time on Vera UI4?  Each with different interface?
2) What would be the possibility of aggregating all ECMs (even if coming in on different interfaces, thus requiring different/seperate plugin instances) to one Total, such as can be done now with multiple ECMs coming in on a single interface?

Let me know your thoughts and how best to proceed.  (PS: #2 above is not even a requirement, but simply a "wondering")

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on December 27, 2011, 11:04:51 am
Sean,
You can run as many discrete Brultech ["parent"] Devices off of the same Plugin code as the Vera will support.  I currently have one Vera Device, supporting 2x ECM-1240's, just as your setup, with 50sec samples across 14 Brultech sensors (7x per ECM-1240) and it works just fine (barring the occasional crash of UI4 itself, something that's just been fixed in UI5)

If you cannot run on the same channel (EtherX, Bridged Serial etc) then you'll have to fire up another device, but can use the same Plugin code (so you needn't upload that again or anything).  Technically speaking, it'll crash UI4 less often if you split it out in the manner you describe for the 3rd ECM-1240.

You can only aggregate values from the same Device though, as I don't [currently] have any form of cross-device aggregation (although someone wanted that for something else, so an Aggregation plugin could technically be built)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on January 05, 2012, 08:37:12 pm
Hello All,

I was torn between posting this question in the PowerMeasuring topic, or in this Brultech topic, and chose this topic, as i felt is was "closer to home"

At any rate, i was wondering if any has had any experience with the ERGY Lite relative to data gather/reported by Mr. Guessed Brultech pllugin..

Specifically:  Are there any changes that need to be made to the Ergy Plugin once it is downloaded/installed as part of the Ergy activation?

Also:  Mr Guessed, do you know if anyone has tested your plugin on UI5?  If so, any issues?

Thanks in advance for your support and advice.

Regards
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on January 06, 2012, 10:49:17 am
Also:  Mr Guessed, do you know if anyone has tested your plugin on UI5?  If so, any issues?

Thanks in advance for your support and advice.

Regards
Sean
I've fired it up in a rudimentary form to validate that UI5 was "basically" working, but I'm not running it daily (yet).

It's likely that issues will only be found once it's being run full-time, as others have found with the different plugins from apps.mios.com/UI5.  Unfortunately I'm a little underwater work-wise for the next few weeks, so Plugin updates/validation and UI5 "fix ups" will be slow.

You'll want to split any ERGY questions out, and post them separately in the other area.  There have been several performance-related items noted against that extension, notably on Vera2 boxes.  I haven't enabled it [yet] on my Vera3, since my focus is on building single-source UI4/UI5 compatible plugins (which is harder than it should be)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on February 10, 2012, 06:26:36 pm
Looks like the Brultech lads posted some images of the new GreenEye model over on their forums:
    http://brultech.com/home/community/viewtopic.php?f=3&t=437&sid=81683df8b5060e77318f7df8bac2edbe&start=20

it looks great.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on February 26, 2012, 06:29:06 am
Mr. G.

I have Vera2/UI5 host that i wish to test your latest brultech plugin.

I have read the posting http://code.mios.com/trac/mios_brultech-power-monitor and there is a reference to UI5

Quote
In addition, Vera will also report your data up so you can see it under the Energy Usage tab of your cp.mios.com account, or to the ERGY Plugin of UI5/Vera3.

but the link for installations reference UI4

Quote
For UI4 Installation, please follow the UI4 Installation procedure

Does one code/install link "fit all"?  For my test bed (Vera2/UI5) do you recommend a different installation process, or can i simply install using the UI4 install at http://code.mios.com/trac/mios_brultech-power-monitor/wiki/Installation-UI4

Thanks in advance for your support.
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on February 26, 2012, 10:04:32 am
The same codebase works on both UI4 and UI5
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on February 26, 2012, 12:11:46 pm
Mr G,
Thank you for the clarification.
Installed the 0.1.5 version on our VERA2/UI5.
Installed without a hitch.
Thanks again for all of your support.
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 11, 2012, 09:22:22 am
Mr G,
We have Vera2/UI5 (1.5.286)

The latest Brultech plugin is installed and configuration was complete on Mar 7.

All data is showing up realtime in all 7 metered channels, as well as the primary plugin aggregator.

At first we were able to view realtime data into the Energy Tab.  But we would get "Invalid data rxd" when trying to look at history.
Now we get the "Invalid Data Rxd" on both real-time and historical views with the UI5.Energy interface pages.

It seems that the "Invalid Data Received" messages from the MIOS portal..   So i have no idea where to even start on this.

Any pointers would be greatly appreciated.

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 11, 2012, 11:26:25 am
There are definitely a number of problem in UI5's energy monitoring functionality.  A number of folks across the boards have indicated the errors your seeing, and I've seen them myself, even without trying to get into ERGY (which has its own set of problems)

Since these components of the system are a black box, and they were working under UI4, it's going to need the MCV team to diagnose.

I recommend you file a trouble ticket against them to get it prioritized for research.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 11, 2012, 11:32:00 am
Mr G,
Thanks for the quick reply. 
As per your suggestion, i have opened up a ticket with MCV/Mios about this issue.
I will let you know what they say.

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 14, 2012, 09:15:23 pm
Mr G,
Was wondering if you had considered adding various logging levels to the brultech plugin.
It seems to be pretty stable, and it would be nice to be able to turn off some of the logging..

Thoughts?
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 14, 2012, 09:27:06 pm
Hey Sean,
Unless you have Verbose logging, or MiOS log code 50, enabled in Vera the plugin should only emit messages @startup.  Are you seeing these at other times?

I'd prefer to lock to the Vera log debug level, as there's an existing way for users to enable/disable through the standard UI.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 14, 2012, 10:39:57 pm
Mr G,
This is a recent VERA2 to UI5 upgrade.
With your latest plugin.
Verbose logging is disabled, but i cannot speak to "code 50" setting as i do not know how to set that.
We have enabled "show polling" and "show individual jobs"

What follows is what we see in the LuaPnP.log file:  (maybe it is the "code 50" but i am not sure how to disable this)

Thanks in advance for your support.
Sean


06      03/14/12 20:38:36.489   Device_Variable::m_szValue_set device: 4 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 250,283,293,1331779096,497 now: 248,281,293,1331779116,517 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x540c>
06      03/14/12 20:38:36.491   Device_Variable::m_szValue_set device: 4 service: urn:brultech-com:serviceId:PowerMeter1 variable: Volts was: 123 now: 123 #hooks: 0 upnp: 0 v:0x827418/NONE duplicate:1 <0x540c>
50      03/14/12 20:38:36.494   luup_log:4: Brultech PowerMeter: debug: processIncomingText:: Buffer=Host: my1240.com, Length=16 <0x540c>
50      03/14/12 20:38:36.495   luup_log:4: Brultech PowerMeter: debug: Skipping buffer=Host: my1240.com <0x540c>
50      03/14/12 20:38:44.968   luup_log:4: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET /usr/ba/dev.php?sec=883922&v=1226&c1w=222&c2w=&wsa1=358323980&wsa2=81816289&wsap1=7515586&wsap2=29694&A1w=10&A1ws=19231168&A2w=170&A2ws=90704082&A3w=&A3ws=91846245&A4w=&A4ws=43022603&A5w=26&A5ws=152013077&dev=30049&id=1&Resp= HTTP/1.0, Length=238 <0x540c>
50      03/14/12 20:38:44.970   luup_log:4: Brultech PowerMeter: debug: decodeBufferText: buffer=sec=883922&v=1226&c1w=222&c2w=&wsa1=358323980&wsa2=81816289&wsap1=7515586&wsap2=29694&A1w=10&A1ws=19231168&A2w=170&A2ws=90704082&A3w=&A3ws=91846245&A4w=&A4ws=43022603&A5w=26&A5ws=152013077&dev=30049&id=1&Resp= <0x540c>
50      03/14/12 20:38:44.973   luup_log:4: Brultech PowerMeter: debug: Serial#30049, 123v, Seconds 883922, Channel 1=358323968ws, Channel 2=81816288ws, Polar Channel 1=7515586ws, Polar Channel 2=29694ws, Channel 1=222W, Channel 2=0W, Aux1=10W, Aux2=170W, Aux3=0W, Aux4=0W, Aux5=26W <0x540c>
06      03/14/12 20:38:44.974   Device_Variable::m_szValue_set device: 5 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 222 now: 222 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.975   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.976   Device_Variable::m_szValue_set device: 7 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 10 now: 10 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.977   Device_Variable::m_szValue_set device: 8 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 170 now: 170 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.977   Device_Variable::m_szValue_set device: 9 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.978   Device_Variable::m_szValue_set device: 10 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.979   Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 26 now: 26 #hooks: 0 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.981   Device_Variable::m_szValue_set device: 4 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 248 now: 248 #hooks: 1 upnp: 0 v:0x827060/NONE duplicate:1 <0x540c>
06      03/14/12 20:38:44.982   Device_Variable::m_szValue_set device: 4 service: urn:brultech-com:serviceId:PowerMeter1 variable: Volts was: 123 now: 123 #hooks: 0 upnp: 0 v:0x827418/NONE duplicate:1 <0x540c>
50      03/14/12 20:38:44.985   luup_log:4: Brultech PowerMeter: debug: processIncomingText:: Buffer=Host: my1240.com, Length=16 <0x540c>
50      03/14/12 20:38:44.986   luup_log:4: Brultech PowerMeter: debug: Skipping buffer=Host: my1240.com <0x540c>
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 14, 2012, 10:42:08 pm
Mr. G,
Now that i think about, i suspect the "code 50" that you refer to is the "log polling activity" which would cause the device to log as it does in LuaUPnP.log.
Am I close?

Thanks
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 15, 2012, 12:29:33 am
Short version..
It looks like code 50 is part of the "standard" logs that are emitted in regular logging configuration so I'll need to change that.

Detailed version...
Each log like is coded, and it's the # that appears at the beginning of each log line.  These codes are explained here, along with the LogLevels configuration parameter that sets them up:
   http://wiki.micasaverde.com/index.php/Luup_Loglevels

When you select Verbose mode, it puts a # (comment) in front of this line in /etc/cmh/cmh.conf, but without that it'll display the log entries outlined in this parameter.

On a Vera3 unit, the defaults are:
    LogLevels = 1,2,3,4,5,6,7,8,9,50

Since I'm logging to 50 for my debug calls, they're coming out unconditionally.  I'll switch them to 35 (debug) at some point and they'll follow this config correctly.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 15, 2012, 02:53:20 pm
Thanks for this update.  No rush..
Kind Regards
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 21, 2012, 02:32:23 pm
Mr G.
We upgraded a VERA from UI4 to the latest UI5 (1.5.346)
This VERA previously had the Brultech plugin installed under UI4.
Prior to upgrading, we deleted the Brultech plugin.
Then SSH in and deleted all files from /etc/cmh-ludl that belonged to Brultech.
We then upgraded to UI5
Then installed Brultech plugin from the apps UI5 page.
All went well, and we assigned the Serial port to the plugin.
All seemed to go OK, but the PLUGIN is not showing any V or W for the any of the monitored channels.  (we have another similar installation that is working fine under UI5)

We get this in the logs (see under signature line), and am wondering if the "partial row received" message is some how a corrupt message that keeps the plugin from doing its job?

Any pointers are greatly appreciated.

Thanks sean

50      03/21/12 12:29:16.162   luup_log:55: Brultech PowerMeter: debug: processIncomingText:: Buffer=Host: 192.168.30.11, Length=19 <0x4813>
50      03/21/12 12:29:16.163   luup_log:55: Brultech PowerMeter: debug: Skipping buffer=Host: 192.168.30.11 <0x4813>
50      03/21/12 12:29:26.116   luup_log:55: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET /usr/312484/dev.php?sec=12085261&v=&c1w=&c2w=&wsa1=14334404593&wsa2=106125812&wsap1=22028595&wsap2=19661329&A1w=&A1ws=380019114&A2w=&A2ws=1773764640&A3w=&A3ws=354787998&A4w=&A4ws=3318523586&A5w=75&A5ws=1830658283&dev=12484&id=3&Resp= HTTP/1.0, Length=246 <0x4813>
50      03/21/12 12:29:26.118   luup_log:55: Brultech PowerMeter: debug: Partial row received, skipped=sec=12085261&v=&c1w=&c2w=&wsa1=14334404593&wsa2=106125812&wsap1=22028595&wsap2=19661329&A1w=&A1ws=380019114&A2w=&A2ws=1773764640&A3w=&A3ws=354787998&A4w=&A4ws=3318523586&A5w=75&A5ws=1830658283&dev=12484&id=3&Resp= <0x4813>
50      03/21/12 12:29:26.142   luup_log:55: Brultech PowerMeter: debug: processIncomingText:: Buffer=Host: 192.168.30.11, Length=19 <0x4813>
50      03/21/12 12:29:26.143   luup_log:55: Brultech PowerMeter: debug: Skipping buffer=Host: 192.168.30.11 <0x4813>
50      03/21/12 12:29:36.126   luup_log:55: Brultech PowerMeter: debug: processIncomingText:: Buffer=GET /usr/312484/dev.php?sec=12085271&v=&c1w=&c2w=&wsa1=14334404593&wsa2=106125812&wsap1=22028595&wsap2=19661329&A1w=&A1ws=380019114&A2w=&A2ws=1773764640&A3w=&A3ws=354787998&A4w=&A4ws=3318523586&A5w=74&A5ws=1830659033&dev=12484&id=3&Resp= HTTP/1.0, Length=246 <0x4813>
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 21, 2012, 02:53:19 pm
Sean,
There are no "volts" in the response, so it's considered invalid in the Plugin's code.  There's something amiss with your Brultech ECM-1240 device.

You've had a similar problem to this sometime in October last yr.  We discussed it in an email series entitled:
    ECM1240 and no voltage reading..

Here's the relevant snippet from when it occurred that time around, not sure if you're seeing a similar problem now:

Quote
IT turns out that something “flakey” happened with the ECM that caused the PT Range setting to change.  (normally it is 3, but somehow got set to 67)
This caused the voltage to be = ‘’”
...
..., we have changed the PT settings back to what they should normally be, and all is OK now.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: smilligan on March 21, 2012, 03:36:49 pm
Mr G.
Thanks for this update..   I am thankful your memory is much better than mine.
We will update the ECM's PT value and hopefully that will fix the problem
Thanks again for your support.
Sean
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 21, 2012, 03:45:25 pm
My in-memory cache is just big enough to remember "that sounds familiar", then I jump to search of my email archive.  8)

...I am thankful your memory is much better than mine.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: signal15 on February 19, 2013, 09:23:21 pm
Have any updates been made to this plugin that would allow native decoding of the binary stream? 

I'm not set up for a 3rd party service, and I don't want to be.  I'm having problems getting this working in plug and play mode.  It appears to be connecting to the Etherbee/Wiznet device, but I'm not getting any data.  I cannot figure out if this is a problem with the Etherbee, or somewhere else.  It appears to be an Etherbee problem since the EtherX tool cannot find my Etherbee, even though I can ping it and connect to it on the port it's listening on.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on February 19, 2013, 09:29:59 pm
Don't worry, it won't phone home. 

I only use the URL format, but my 1240's were never actually sending data out of my house.  In my case, the Etherbee was configured in SERVER Mode, instead of CLIENT Mode.

As a result Vera has to establish the connection to the Etherbee, in order for the data to be seen.  It then parses this data, but it must be in the URL mode in order to do it.

I do this for the GEM also, and auto-detect the format from the URL stream.


If the 1240 itself hasn't been configured to emit a URL, then you'll be able to connect to the Etherbee, but you won't see any data.  If you do this with a Terminal program, and nothing comes out, then in all likeihood the '1240 isn't set into the right mode.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: signal15 on February 19, 2013, 11:06:05 pm
My Etherbee is giving me all sorts of problems.  Before, it was listening on a couple of TCP ports, and I could connect to it. Now, even though I can ping it, it's no longer listening.  I cannot discover it with the EtherX software unless I plug it directly into a laptop.  It worked fine before when plugged into my switch.  It's running the 4.1 firmware, which is the latest.  It started flaking out on 2.x, so it's not the firmware version.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on February 19, 2013, 11:23:30 pm
In an off chance, try using g a different power supply.  I doubt its this but its worth trying it since they fail slowly over time and in odd ways.

Internally, the Etherbee is just a WIZnet,so it might be possible to reset it.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: signal15 on February 19, 2013, 11:40:14 pm
In an off chance, try using g a different power supply.  I doubt its this but its worth trying it since they fail slowly over time and in odd ways.

Internally, the Etherbee is just a WIZnet,so it might be possible to reset it.

I already tried that at the suggestion of Paul from Brultech.  I'm trading emails with him right now, so hopefully he can help me figure it out. 

Those wiznet things have horrible software. 
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: eddie on February 26, 2013, 01:24:32 pm
Any chance of getting some of the updated features from the CurrentCost implementation into the Brultech plugin?

I would really like a history of usage.  KWH used/day  Total KWH used in a month/billing cycle. 
http://forum.micasaverde.com/index.php/topic,6752.msg43359.html#msg43359
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on February 26, 2013, 01:48:39 pm
@eddie,
Unlike the CC, the Brultech devices don't accrue data.  They're just a live feed of either 32 (GEM (http://www.greeneyemonitor.com/)), or 7 (ECM-1240), channels of the "right now" energy usage data.

The exception to this are the pulse counting circuits in the GEM (these accrue, and can be reset)

I could accrue & graph Watt-values locally, within the Plugin itself, but then I'd start to have overlapping functionality with something like the datamine Plugin (http://forum.micasaverde.com/index.php/board,43.0.html)... and I'd likely never do it as well, so I've never bothered to add it.

When Brultech come out with their add-on/storage device, it would be worthwhile exposing it so that everyone can see the data it's capturing.


Usage history is generally exposed, for all power monitoring devices, by the standard [Flash] graph under the Energy tab.  This is what I've been using to tune my overall energy usage pattern.  It's not bad, but a little unruly when you have a lot of channels (I have about 24 used right now)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: 2pesimmon on April 03, 2013, 02:51:51 am
I installed the ​Brultech ECM-1240 App from the app market on my Vera3/UI5. I am using a serial interface. I configured Vera as it was explained in the forum to recognize my USB to serial port, but the App does not get any data.
 
Can someone tell me how to solve the problem please.

Thanks.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on April 03, 2013, 09:47:19 am
Did you reconfigure the 1240 to use the URL format?  The default is binary, and the plugin only understands the URL form.

If you attach hyper terminal, or equiv, on a PC with the USB Serial device asttasched you should see URLs come up on the screen ever 50 seconds if the 1240 has been configured correctly.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on April 04, 2013, 05:44:11 am
@2pesimmon,
For reference, see the HTTP option listed in the screenshots of the ECM-1240 config tools here:
    http://code.mios.com/trac/mios_brultech-power-monitor/wiki/Installation-ECM1240

Quote
Thank you for your reply. I downloaded and set the ECM tool V2.8. Surprisingly, there is no option to setup the packet format! Maybe
i need to update the firmeware
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: 2pesimmon on April 06, 2013, 02:07:43 am
Thank you for your response.

I found another app, that has  settings for http. It is called ECM1240 Interface Application.

I have attached all my settings. I get some non ASCII characters on xbee communication (as it can be seen on the figures), but I am not sure why. Vera still does not show the power.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on April 06, 2013, 06:06:07 am
Third screen in the setup instructions link I provided above.  Doesn't matter what host is added there since the unit cannot call out of the network, but a value MUST be specified there.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: 2pesimmon on April 06, 2013, 12:21:07 pm
Guessed, thank you for your support.

The third screen in the setup matches mine ( which is default settings).
I am not sure what the first screen is though. In my case, it is completely blank.

My firmware is 1.025, which is older than that of yours. I haven't been able to find the newer firmware.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on April 06, 2013, 09:10:11 pm
When I look at your output:
    http://forum.micasaverde.com/index.php?action=dlattach;topic=5518.0;attach=9848;image

...it really looks like the 3rd screen really hasn't been filled in.

The POST Root URL & POST URL Extension bits of this:
    http://code.mios.com/trac/mios_brultech-power-monitor/attachment/wiki/Installation-ECM1240/BrultechECMIA2.png


Basically the Brultech devices "glue" the pieces of the URL-like string together, and then they emit it onto the Serial bus.  In this case, the two parts that look corrupted are the "POST Root URL" and "POST URL Extension".

Even though we're not going to actually go out to an internet service with this data, these components need to be filled in (and the values shown in the screenshot link are good enough for this purpose)


If these are the same, please provide (1-1) screen captures matching the ones presented.  You already have the 2nd one (the ECM-1240 Setup screen) but it's possible that one of the others is whacked.

These screenshots are from @ChrisAZ's environment.  I'm not sure what FW version mine were on, but that's always a possibility.

You may want to ping Ben on the Brultech forums to see if there's a material difference in these versions that would impact the output of these sections in a ECM-1240 configured for HTTP.  They're very responsive to questions on their forum.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: 2pesimmon on April 07, 2013, 01:32:23 am
I think you are right about the URLs. My third screen looks like yours. HOWEVER, when I press the read button it shows "timeout error" . When I press the write button it shows timeout as well. It seems to me that URLs are shown in the screen but they are not actually written to the unit. And for whatever reason, the unit shows timeout error reading or writing URLs. Otherwise the unit functions properly, as I have used it in Homeseer before.

Thanks again!
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: 2pesimmon on April 08, 2013, 02:24:26 pm
Guesses,

I set the URL variables, and it is working. Ben, said the unit is busy, that's why it gives timeout. I started fresh, and setup the URLs, without activating any other service (like real-time or Zigbee search) on the ECM1240 unit.

Here is the link  (http://www.brultech.com/home/community/viewtopic.php?f=7&t=686&p=3152&sid=b0be17ac0f2ca42cf107dccee73a438e#p3152)from ECM1240 forum.

Thanks.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: signal15 on April 12, 2013, 01:52:12 am
Just a note, be careful upgrading.  Mine bricked due a bug in the bootloader on the earlier versions.  Brultech fixed it for free, but I still had to ship it Canada. I also upgraded my Xbee interface and that seems bricked now also.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: tawollen on February 22, 2015, 08:42:56 pm
Is anyone still using this plug-in? it seems like it hasn't been updated in a long time.

I just installed a couple ECM-1240 modules and a digi xbee -> ethernet gateway, but nothing works. There doesn't seem to be good documentation anymore. Hoping someone can give some hints on how to get it set up and get data into my vera.

Thanks
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: scyto on March 21, 2015, 04:21:18 pm
did you get it working?
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 21, 2015, 04:41:28 pm
It's in the App Store, and the doc to setup is still on http://code.mios.com. 

From a configuration standpoint, the most common mistake users make is to forget to change the ECM-1240/GEM settings to use HTTP-style URL's instead of their native/default Binary format.

That said, I stopped recommending it to people because Vera is far too resource limited, and it's all too easy for users to make their systems unstable with a small # of active plugins.  This plugin is very active when using a GEM since, by default, those units are configured to sample every 5 seconds (can be reconfigured)
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: scyto on March 21, 2015, 07:00:32 pm
Thanks, I have it installed and I am pointing it at my GEM which is configured to output Primary (Com1) Packet Format on port 8000.

My GEM is configured to send packets every 15 seconds. I configured the plug-in to get all 32 channels.  Lets see what that does to perf on the vera edge! Guess I should login and do a top?

On the GEM I set the packet format to 3 (HTTP Get) and set the packet format fields to the my1240 paramerters.  Done that and I am now getting data.

If anyone is interested I will write up a complete how to.   But beware UI7 is still flaky as s**t (way better than when I got the vera3 that went back to amazon months ago because I never got it working) - I have only had this Vera Edge up and running for the last couple of hours, seems way better, but the code for entering variables is shoddy and doesn't work properly.
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: guessed on March 21, 2015, 08:31:05 pm
It's in a GET style.  The plugin works out the format differences between the GEM and ECM-1240 GET style requests, but that format isn't the default option for either the GEM or the ECM
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: scyto on March 21, 2015, 09:05:00 pm
It's in a GET style.  The plugin works out the format differences between the GEM and ECM-1240 GET style requests, but that format isn't the default option for either the GEM or the ECM

Sure but with the fields completely empty in the GEM UI it didn't work at all, I added the entries for my1240 and then it worked, I wonder if you plug-in doesn't like those fields being null in the packet?
Title: Re: Brultech ECM-1240 Energy Monitor
Post by: sym857 on April 21, 2015, 03:10:43 am
Hi scyto,

I would be interested in a how to my edge doesn't want to set the port, cant see what I've done wrong at the moment.

Steve