So is there an free SDK for those of us that would want to use a more main stream software package such as HomeSeer for monitoring this hardware?
There are protocol documents and some vb source code (not vb.net, old vb) that Paul sent me when I asked for them. They are not on the web site. I asked for them because I write my own software and I wanted to see how difficult the protocol was before I bought the unit. That's an important part of any product evaluation for me.
The protocol is pretty simple to use and it only took me a week or so to create a .net assembly to communicate with the unit, and a xAP assembly to broadcast the state. Since I don't have a unit yet these are totally untested, but the point is the protocol is pretty easy to use.
He mentioned another packet type (that would make 3) that has additional information for use with solar/wind systems, but that's not in the documentation currently. I look forward to this info being added. I'll probably buy a unit once I see the cocoontech special tomorrow.
I see some features that do not appear to be in the protocol that I would like, but I'll wait to get one and actually use the protocol before I start whining (errr... expressing interest in) these missing items.
Matt
The source for this code was taken from here and we made a few changes :
http://www.codeworks.it/net/VBNetRs232.htm (thanks to Corrado Cavalli's for the fine
vb.net serial communication demo)
OK Mat, what is missing that you would like to see? Power Factor? Apparent Power?
Ok... you asked B)
The things I didn't see are a way to determine which real time packet format (Power, Energy, or the new one) is being sent, and also how to set the format. In my code I wait for a specific number of characters in the buffer, so I need a way to determine how many chars to wait for. Right now I just hardcoded it for Energy mode. I would also like to see the structure for the third packet mode.
I didn't see a way to set the storage interval for the downloaded data either. I can get it during the download data process, but how can I set it. A separate command to get the interval would be nice but not really necessary.
The reset command isn't in the documentation, but I used the sample code to add that to my code.
The storage interval is 1 to 255, and it's returned as 2 bytes. Are they 7 bit bytes and I ignore the high bit, or do I ignore one of the bytes? This I figured I would figure out once I had a unit.
I also wasn't clear on how to figure out the date and time of a downloaded record. The docs say:
The data-logger’s “data” information is sent out as one big block in step 5 above. To assemble this data,
two pieces of information are required:
1. The start time and date of monitoring.
2. The storage interval
Since the ECM-1220 does not have a real-time clock, a time and date has to be provided for the beginning
of the monitoring at which time the ECM was reset. The storage interval value is provided by the two bytes
received in step #3 above.
I'm not understanding this. What are the steps I need to do?
I figured using the code with a real unit would clarify some of my questions.