damage
Senior Member
it's watt/sec. i've sniffed the serial port & the values correspond to what the brultech software was displaying as watts/sec
It is watt-secs (not watt/sec).
oops. you're right
it's watt/sec. i've sniffed the serial port & the values correspond to what the brultech software was displaying as watts/sec
It is watt-secs (not watt/sec).
it's watt/sec. i've sniffed the serial port & the values correspond to what the brultech software was displaying as watts/sec
It is watt-secs (not watt/sec).
Counters max values (and hence rollover point) are (to the best of my knowledge):
5 byte counters: 1,099,511,627,775
4 byte counters: 4,294,967,295
3 byte counters: 16,777,215
The transmitted seconds field is 3 bytes. Max value is about 194 days.
The Ch1,2 and Polar1,2 fields are 5 bytes.
The Auxn fields are 4 bytes.
Hope this is helpful,
tenholde
For those interested, the reason it's watt-seconds and not watts/sec is because watts by themselves are not a quantitative/cumulative unit of measurement (like liters or miles), they are instantaneous, like a pressure. One watt-second is 1 watt of continuous power over the course of one second, one KWH is the same measurement essentially, but it's 1000 watts continuous over the course of one hour. One watt-second is also sometimes, probably more frequently, called a Joule.
For those interested, the reason it's watt-seconds and not watts/sec is because watts by themselves are not a quantitative/cumulative unit of measurement (like liters or miles), they are instantaneous, like a pressure. One watt-second is 1 watt of continuous power over the course of one second, one KWH is the same measurement essentially, but it's 1000 watts continuous over the course of one hour. One watt-second is also sometimes, probably more frequently, called a Joule.
To split hairs even further, the watt-second from the ECM is not a continuous watt for a second, but an average of 1 watt for a period of one second.
tenholde
Does anyone know what point the KWH usage wraps? I am writing some sqlite queries to calculate usage similar to what the dashboard does but I am wondering if I need to take into account the total KWH usage wrapping.
Does anyone know what point the KWH usage wraps? I am writing some sqlite queries to calculate usage similar to what the dashboard does but I am wondering if I need to take into account the total KWH usage wrapping.
The ch1,2 counters are 5-byte counters and wrap at 1,099,511,627,775
The Auxn counters are 4-byte counters and wrap at 4,294,967,295
The second counter is a 3-byte counter and wraps at 16,777,215
tenholde
1 KWH has 3,600,000 Watt-seconds (joules) in it. The AUX counters will wrap at 1193.04647 KWH. The CH1/2 counters will wrap at 305419.897 KWH. To put this in the context of money, at 6.5 cents/KWH, I would have to spend $19,865 on CH1/2 to wrap it. But, on an AUX channel, that's only $77 worth of electricity. My AUX channels DO wrap on a regular basis due to my server rack and several freezers.
For residential use, I don't see the CH1/2 being much of a problem for wrapping, but if you were using this in a datacenter or industrial environment, it would most certainly wrap at some point. Any software needs to take this into account for the AUX channels for sure, and at that point, you just add the similar code for the CH1/2 channels.
Current reading - Last reading = delta
4,294,967,100 - 4,294,967,000 = 100 Watt-seconds
If the current reading < last reading then
(4,294,967,295 - last reading) + current reading
So if the current reading was 230, then you would have:
(4,294,967,295 - 4,294,967,100) + 230 = 425 watt-seconds
secondsdelta = delta of the seconds counter with wrapping taken into account
If current >= last then
reading = (current - last)/seconds
If current < last then
reading = (4294967295 - last + current)/secondsdelta
You don't need to store how many times it's wrapped. When you are storing data in the DB, you are storing the delta from the last reading.
......
Anyone know what the awsc or pwsc in the brultech db is? the awsc for each channel divided by the second counter it approx the same as kwh -10%. Example for channel 1 4199840565/3958088=1061 1061 is close to 1167.
Anyone know what the awsc or pwsc in the brultech db is? the awsc for each channel divided by the second counter it approx the same as kwh -10%. Example for channel 1 4199840565/3958088=1061 1061 is close to 1167.
I believe those are the watt-second counter values. Each of the primary channels has two counters. 1 that counts watt-seconds regardless of energy flow direction (the awsc values) and the other counts watt-seconds for one direction only (the pwsc values). The direction is configuration on the device.
The directional (or polarized) values get used in net-metering situations where you may be feeding power back to the grid.
The other reason to store counter (accumulators) values is to provide for missed packets.
If your database contains not only computed watts for the reporting period (usually each hour), you can write a query to show energy use for a day by easily totally the hours in that day. However, if your server was down for some period of time, you will have hours missing in the database. This will screw up your query that computes total energy for the month, etc.
If you also have the accumulators stored, you can write a simple utility to go through the database, find missing hours (or partial hours), compute the total energy use from before and after the gap, and fill in the missing hours with average values for the gap period. This way, your queries that total and average hour records will be accurate.
tenholde