We have moved at community.getvera.com

Author Topic: Brultech ECM-1240 Energy Monitor  (Read 52509 times)

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #15 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.

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #16 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
« Last Edit: June 21, 2011, 06:33:05 pm by smilligan »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #17 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)
« Last Edit: June 22, 2011, 10:55:17 pm by guessed »

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #18 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
« Last Edit: June 22, 2011, 10:54:52 pm by guessed »

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #19 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
« Last Edit: June 22, 2011, 10:31:33 pm by guessed »

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #20 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
« Last Edit: June 22, 2011, 10:40:41 pm by guessed »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #21 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.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #22 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.

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #23 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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #24 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.

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #25 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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #26 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.

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #27 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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Brultech ECM-1240 Energy Monitor
« Reply #28 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)

Offline smilligan

  • Full Member
  • ***
  • Posts: 108
  • Karma: +0/-0
Re: Brultech ECM-1240 Energy Monitor
« Reply #29 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