crjens / PiPowerMeter

Raspberry Pi Power meter
89 stars 34 forks source link

Current Sensors, Config Elements, and Sensor Coverage. #1

Open akkord64 opened 7 years ago

akkord64 commented 7 years ago

I have the dl-ct08cl5 CT's (2000/1) and am unable to configure the readings properly. I also dont seem to understand the scaling factors or where the phase configurations are defined (V1,V2, V3, V1+V2). The CT's seem to be detect voltage and frequency, but no current. I am measuring ~150ohm across the CT's leads before connecting to anything. I am measuring ~44 vac and ~7.6M ohm on a 1AMP load.

Also - For any 220V circuits, do we need both legs? Just curious how the off the shelf clamp meters are calculating load when using only a single leg?

craigjensen commented 7 years ago

The CS5463 chip outputs voltage and current readings as a number in the range [0-1] which is then multiplied by the voltage and current scale factors to arrive at the actual voltage and current readings. The scale factors depend on various characteristics of the measurement circuits and the turns ratio of the transformer. I haven’t used the dl-ct08cl5 CT’s you reference but since they have a 2000/1 turns ratio (same as the YHDC sct-013 100A), you should start with a scale factor of 100 and fine tune as needed.

When you configure your circuits you’ll need to make sure you select the correct voltage reference (V1 or V2) or else you won’t get accurate results. Take a look at the waveform chart and you’ll be able to see pretty quickly if the voltage and current waveforms are in phase. If not, just change the voltage reference and check it again. Also, make sure the CT is installed correctly or else you’ll get negative results.

There are two ways to measure 240V circuits. If the circuit doesn’t have a neutral the current on each leg must be equal so you can use a single CT on one of the legs and set the voltage reference to V1+V2. If the circuit has a neutral you’ll get more accurate results by using a CT on each leg with the voltage reference set to V1 for one leg and V2 for the other.

akkord64 commented 7 years ago

Thanks for the reply. Let me try a few things based on your response and post an update. Also I have the power unit currently powered by 120v instead of 220v which may be influencing the readings? I will change that and continue with my tuning.

craigjensen commented 7 years ago

The power supply is designed to work with either 120V or 240V so that shouldn’t influence the results

From: Chris [mailto:notifications@github.com] Sent: Wednesday, July 19, 2017 2:21 PM To: crjens/PiPowerMeter PiPowerMeter@noreply.github.com Cc: Craig Jensen cjensen@microsoft.com; Comment comment@noreply.github.com Subject: Re: [crjens/PiPowerMeter] Current Sensors, Config Elements, and Sensor Coverage. (#1)

Thanks for the reply. Let me try a few things based on your response and post an update. Also I have the power unit currently powered by 120v instead of 220v which may be influencing the readings? I will change that and continue with my tuning.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fissues%2F1%23issuecomment-316521238&data=02%7C01%7Ccjensen%40microsoft.com%7Cf38e701f0faa4f57e13808d4ceec21b6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636360960950664514&sdata=QNgHjje4Nq%2FgzpmTORnvsSM3MCTjHJ2FqxiNBkKdMWw%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARuWnouB5Vj9Er4sx_D2GIZDJILeYK5eks5sPnNMgaJpZM4OVAhy&data=02%7C01%7Ccjensen%40microsoft.com%7Cf38e701f0faa4f57e13808d4ceec21b6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636360960950664514&sdata=tP0%2BzCPiXi3HRfHurdPaXV3J8Uot72hO7mf%2BcKH%2BwKo%3D&reserved=0.

akkord64 commented 6 years ago

Well after having my 4th child I am back to trying to get this project working again. I seem to have hit a wall on this as I cannot get any sensible readings from my unit.

I am now testing with a SCT-019 and was trying to measure a single leg of mains. I have a burden resistor on the probe @26 Ohms (calculated @200amps here: http://tyler.anairo.com/projects/open-energy-monitor-calculator) and had to scale the voltage (366) and current (26) to get a waveform that looks like this (what is the current wave doing??)

bad-wave

After a couple of days of frustration with trying to get this to make sense (as well as moving between ports, burden resistors, additional boards, Pi's) I decided to unplug all sensors and I am seeing readings (when running server.js directly) of

pi@PowerPi:~/app$ node server.js next rollup in: 19056531 spawned reader with pid: 2755 2018-02-10T15:42:23.558Z loading configuration... 2018-02-10T15:42:23.560Z waiting for table: Circuits 2018-02-10T15:42:23.561Z waiting for table: Config 2018-02-10T15:42:23.568Z opened database: powermeter.db 2018-02-10T15:42:23.593Z currentSha: c67445f87196163bc68588797bb8e7412fd9d357 2018-02-10T15:42:23.594Z currentDate: 2017-12-14T04:19:55.000Z 2018-02-10T15:42:23.614Z elapsed 0.042 (PRAGMA foreign_keys=on) 2018-02-10T15:42:23.614Z elapsed 0.043 (create table if not exists Probes ( id INTEGER primary key, Type text, Board int check(Board>=0 and Board<=7), CurrentChannel int check(CurrentChannel>=0 and CurrentChannel<=15), VoltageChannel int check(VoltageChannel>=0 and VoltageChannel<=3), Breaker int, Alert Text, SourceType int);) 2018-02-10T15:42:23.617Z elapsed 0.045 (create table if not exists Config ( Name text primary key, Value Text);) 2018-02-10T15:42:23.618Z Config table ready 2018-02-10T15:42:23.619Z elapsed 0.048 (create table if not exists Circuits ( id INTEGER primary key, Name Text, Description Text, Enabled int, IsMain int, Probes text);) 2018-02-10T15:42:23.620Z Circuits table ready 2018-02-10T15:42:23.623Z elapsed 0.007 (pragma table_info(Probes);) 2018-02-10T15:42:23.625Z Probes table ready 2018-02-10T15:42:23.625Z elapsed 0.008 (Insert or ignore into Config Values('Port', '3000');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('DeviceName', '');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Price', '0.1');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Region', 'en-US');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('VoltageScale', '384');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Probes', '[{''Name'':''SCT-006'',''Factor'':''40''},{''Name'':''SCT-010'',''Factor'':''152''},{''Name'':''SCT-013'',''Factor'':''101''},{''Name'':''SCT-016'',''Factor'':''152''},{''Name'':''SCT-019'',''Factor'':''295''}]');) 2018-02-10T15:42:23.627Z elapsed 0.008 (Select from Config where Name = 'BackupDB';) 2018-02-10T15:42:23.627Z elapsed 0.007 (Insert into Circuits (id, Name, Description, Enabled, IsMain, Probes) select null,'Circuit 1','',1,0,'1' where (select count() from Circuits) = 0;) 2018-02-10T15:42:23.628Z elapsed 0.007 (create table if not exists Readings (id INTEGER primary key, CircuitId int, I real, V real, P real, Q real, PF real, Timestamp int, Compacted int, F real, foreign key(CircuitId) references Circuits(id));) 2018-02-10T15:42:23.629Z elapsed 0.011 (Insert or ignore into Config Values('Mode', '000060');) 2018-02-10T15:42:23.629Z elapsed 0.011 (Insert or ignore into Config Values('Config', '001001');) 2018-02-10T15:42:23.631Z elapsed 0.007 (Insert into Probes (id, Type, Board, CurrentChannel, VoltageChannel, Breaker, Alert, SourceType) select 1,'SCT-006',0,0,0,20,null,0 where (select count() from Probes) = 0;) 2018-02-10T15:42:23.632Z elapsed 0.004 (pragma table_info(Readings);) 2018-02-10T15:42:23.633Z Readings table ready 2018-02-10T15:42:23.634Z elapsed 0.001 (select count() as Rows from Readings;) 2018-02-10T15:42:23.635Z elapsed 0.002 (create index if not exists Readings_Timestamp_CircuitId_P_idx on Readings(Timestamp, CircuitId, P);) 2018-02-10T15:42:23.636Z elapsed 0.003 (create index if not exists Readings_CircuitId_Timestamp_Pidx on Readings(CircuitId, Timestamp, P);) 2018-02-10T15:42:23.666Z elapsed 0.002 (select from Circuits;) 2018-02-10T15:42:23.668Z elapsed 0.003 (Select from Config;) 2018-02-10T15:42:23.669Z username: password: 2018-02-10T15:42:23.670Z Setting port: 3000 2018-02-10T15:42:23.691Z App Server running at port 3000 2018-02-10T15:42:23.691Z elapsed 0.024 (Select from Probes;) 2018-02-10T15:42:23.695Z elapsed 0 (Select from Config;) 2018-02-10T15:42:23.696Z read: DeviceName-> 2018-02-10T15:42:23.696Z read: Mode->000060 2018-02-10T15:42:23.697Z read: Region->en-US 2018-02-10T15:42:23.697Z read: VoltageScale->384 2018-02-10T15:42:23.697Z read: Port->3000 2018-02-10T15:42:23.697Z read: Price->0.1 2018-02-10T15:42:23.697Z read: Config->001001 2018-02-10T15:42:23.701Z mqtt: undefined reader closed 1 reader closed 2 Opening device: /dev/spidev0.0 at 2000000 Hz, mode 0, 8 bits, 0 us delay Device opened with mode: 0, bits: 8, speed: 2000000 Device opened: Hardware version: 2.2 RESET Register dump: 0 - Config: 001001 1 - CurrentDCOffset: 000000 2 - CurrentGain: 400000 3 - VoltageDCOffset: 000000 4 - VoltageGain: 400000 5 - CycleCount: 000fa0 6 - PulseRateE: 800000 7 - InstCurrent: 0003d0 8 - InstVoltage: 1764ce 9 - InstPower: 000070 10 - RealPower: fffccf 11 - RmsCurrent: 002c2e 12 - RmsVoltage: 570aa6 13 - Epsilon: 01eb85 14 - PowerOffset: 000000 15 - Status: 900085 16 - CurrentACOffset: 000000 17 - VoltageACOffset: 000000 18 - Mode: 000060 19 - Temp: 18fc00 20 - AveReactivePower: 000598 21 - InstReactivePower: 000004 22 - PeakCurrent: ffc40e 23 - PeakVoltge: c5446a 24 - ReactivePowerTriangle: 0006cb 25 - PowerFactor: c9970a 26 - InterruptMask: 800000 27 - ApparentPower: 000782 28 - Control: 000000 29 - HarmonicActivePower: ffffeb 30 - FundamentalActivePower: fffce4 31 - FundamentalReactivePower: 0005a8 2018-02-10T15:42:23.987Z latest software version: c67445f87196163bc68588797bb8e7412fd9d357 2018-02-10T15:42:23.987Z software is up to date - will periodically check for updates 2018-02-10T15:42:24.400Z start: GET /config?=1518277345681 2018-02-10T15:42:24.406Z sending cached config write: init serial port(FFFFFFFE) command: reset(80) 2018-02-10T15:42:24.422Z end: GET /config?=1518277345681 22 ms status: 800005 write: clear status(5EFFFFFF) read: read Mode register(24FFFFFF) -> 000000 write: hpf on with current phase compensation(64000060) read: read Mode register(24FFFFFF) -> 000060 read: read configuration register(00FFFFFF) -> 000001 write: interrupts set to high to low pulse with phase comp(40001001) read: read configuration register(00FFFFFF) -> 001001 epsilon before: 0.01250004768371582 write: set epsilon to 01eb85(5A01eb85) epsilon after: 0.014999985694885254 initialized setting isr pin to: 5, upDn: 2, edge: 1 2018-02-10T15:42:24.496Z start: GET /waveform?circuitId=1&=1518277345682 2018-02-10T15:42:24.497Z waveform(1) 2018-02-10T15:42:24.502Z end: GET /waveform?circuitId=1&=1518277345682 6 ms 2018-02-10T15:42:27.285Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= -1.5 PF= -0.4082 F= 60.013 F2= 60.000 (500 samples in 124.705339ms) 2018-02-10T15:42:27.313Z elapsed 0.023 (select round(min(P),0) as min, round(max(P),0) as max, round(avg(P),0) as avg from readings where CircuitId = 1 and Timestamp >= 1518190947.287 and Timestamp < 1518277347.287;) 2018-02-10T15:42:27.314Z setting lastkwh for ckt: 1 to -0.024 2018-02-10T15:42:29.861Z start: GET /config?=1518277351149 2018-02-10T15:42:29.863Z sending cached config 2018-02-10T15:42:29.866Z end: GET /config?=1518277351149 5 ms 2018-02-10T15:42:29.949Z start: GET /waveform?circuitId=1&=1518277351150 2018-02-10T15:42:29.950Z waveform(1) 2018-02-10T15:42:29.966Z end: GET /waveform?circuitId=1&=1518277351150 17 ms 2018-02-10T15:42:30.079Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4269 F= 60.004 F2= 60.000 (500 samples in 124.714608ms) 2018-02-10T15:42:30.263Z start: GET /favicon.ico 2018-02-10T15:42:30.279Z end: GET /favicon.ico 16 ms 2018-02-10T15:42:32.859Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4282 F= 60.003 F2= 60.000 (500 samples in 124.728442ms) 2018-02-10T15:42:35.639Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4285 F= 59.999 F2= 60.000 (500 samples in 124.72094ms) 2018-02-10T15:42:38.457Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 60.011 F2= 60.000 (500 samples in 125.451381ms) 2018-02-10T15:42:41.239Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4246 F= 59.997 F2= 60.000 (500 samples in 124.714629ms) 2018-02-10T15:42:44.019Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4272 F= 59.997 F2= 60.000 (500 samples in 124.719467ms) 2018-02-10T15:42:46.799Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4276 F= 59.987 F2= 60.000 (500 samples in 124.719448ms) 2018-02-10T15:42:48.642Z start: POST /probeDef 2018-02-10T15:42:48.779Z elapsed 0.032 (Insert or Replace into Config Values('Mode', '000060');) 2018-02-10T15:42:48.811Z elapsed 0.031 (Insert or Replace into Config Values('Config', '001001');) 2018-02-10T15:42:48.840Z elapsed 0.029 (Insert or Replace into Config Values('DeviceName', '');) 2018-02-10T15:42:48.873Z elapsed 0.033 (Insert or Replace into Config Values('Port', '3000');) 2018-02-10T15:42:48.905Z elapsed 0.032 (Insert or Replace into Config Values('Price', '0.1');) 2018-02-10T15:42:48.935Z elapsed 0.029 (Insert or Replace into Config Values('VoltageScale', '384');) 2018-02-10T15:42:48.970Z elapsed 0.035 (Insert or Replace into Config Values('UserName', '');) 2018-02-10T15:42:49.008Z elapsed 0.036 (Insert or Replace into Config Values('Password', '');) 2018-02-10T15:42:49.050Z elapsed 0.041 (Insert or Replace into Config Values('MqttServer', '');) 2018-02-10T15:42:49.082Z elapsed 0.032 (Insert or Replace into Config Values('Text', '');) 2018-02-10T15:42:49.118Z elapsed 0.035 (Insert or Replace into Config Values('Twilio', '');) 2018-02-10T15:42:49.154Z elapsed 0.035 (Insert or Replace into Config Values('TwilioSID', '');) 2018-02-10T15:42:49.193Z elapsed 0.039 (Insert or Replace into Config Values('TwilioAuthToken', '');) 2018-02-10T15:42:49.223Z elapsed 0.03 (Insert or Replace into Config Values('BackupDB', '');) 2018-02-10T15:42:49.260Z elapsed 0.036 (Insert or Replace into Config Values('Region', 'en-US');) 2018-02-10T15:42:49.291Z elapsed 0.031 (Insert or Replace into Config Values('Probes', '[{"Name":"SCT-006","Factor":"40"},{"Name":"SCT-010","Factor":"152"},{"Name":"SCT-013","Factor":"101"},{"Name":"SCT-016","Factor":"152"},{"Name":"SCT-019","Factor":"25"}]');) 2018-02-10T15:42:49.291Z loading configuration... 2018-02-10T15:42:49.292Z elapsed 0.001 (select from Circuits;) 2018-02-10T15:42:49.293Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:42:49.294Z elapsed 0 (Select from Config;) 2018-02-10T15:42:49.295Z read: Mode->000060 2018-02-10T15:42:49.295Z read: Config->001001 2018-02-10T15:42:49.295Z read: DeviceName-> 2018-02-10T15:42:49.295Z read: Port->3000 2018-02-10T15:42:49.295Z read: Price->0.1 2018-02-10T15:42:49.295Z read: VoltageScale->384 2018-02-10T15:42:49.295Z read: UserName-> 2018-02-10T15:42:49.295Z read: Password-> 2018-02-10T15:42:49.296Z read: MqttServer-> 2018-02-10T15:42:49.296Z read: Text-> 2018-02-10T15:42:49.296Z read: Twilio-> 2018-02-10T15:42:49.296Z read: TwilioSID-> 2018-02-10T15:42:49.296Z read: TwilioAuthToken-> 2018-02-10T15:42:49.296Z read: BackupDB-> 2018-02-10T15:42:49.296Z read: Region->en-US 2018-02-10T15:42:49.298Z mqtt: 2018-02-10T15:42:49.769Z end: POST /probeDef 1127 ms 2018-02-10T15:42:49.785Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.5 PF= -0.4224 F= 58.800 F2= 60.000 (500 samples in 146.22068ms) 2018-02-10T15:42:49.791Z elapsed 0.024 (Select from Config;) 2018-02-10T15:42:49.792Z username: password: 2018-02-10T15:42:49.828Z start: GET /config?=1518277214359 2018-02-10T15:42:49.829Z sending cached config 2018-02-10T15:42:49.831Z end: GET /config?=1518277214359 3 ms 2018-02-10T15:42:52.570Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4271 F= 59.984 F2= 60.000 (500 samples in 124.715165ms) 2018-02-10T15:42:53.205Z start: GET /waveform?circuitId=1&=1518277351151 2018-02-10T15:42:53.206Z waveform(1) 2018-02-10T15:42:53.266Z end: GET /waveform?circuitId=1&=1518277351151 61 ms 2018-02-10T15:42:54.646Z start: GET /waveform?circuitId=1&=1518277351152 2018-02-10T15:42:54.647Z waveform(1) 2018-02-10T15:42:54.662Z end: GET /waveform?circuitId=1&=1518277351152 16 ms 2018-02-10T15:42:55.352Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4249 F= 59.983 F2= 60.000 (500 samples in 124.717033ms) 2018-02-10T15:42:55.389Z start: GET /waveform?circuitId=1&=1518277351153 2018-02-10T15:42:55.390Z waveform(1) 2018-02-10T15:42:55.404Z end: GET /waveform?circuitId=1&=1518277351153 15 ms 2018-02-10T15:42:55.984Z start: GET /waveform?circuitId=1&=1518277351154 2018-02-10T15:42:55.985Z waveform(1) 2018-02-10T15:42:56.002Z end: GET /waveform?circuitId=1&=1518277351154 19 ms 2018-02-10T15:42:56.638Z start: GET /waveform?circuitId=1&=1518277351155 2018-02-10T15:42:56.640Z waveform(1) 2018-02-10T15:42:56.655Z end: GET /waveform?circuitId=1&=1518277351155 17 ms 2018-02-10T15:42:57.222Z start: GET /waveform?circuitId=1&=1518277351156 2018-02-10T15:42:57.223Z waveform(1) 2018-02-10T15:42:57.237Z end: GET /waveform?circuitId=1&=1518277351156 15 ms 2018-02-10T15:42:58.133Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 59.984 F2= 60.000 (500 samples in 124.714734ms) 2018-02-10T15:43:00.922Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4290 F= 59.986 F2= 60.000 (500 samples in 124.717786ms) 2018-02-10T15:43:03.703Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 59.985 F2= 60.000 (500 samples in 124.968915ms) 2018-02-10T15:43:04.591Z start: POST /probeDef 2018-02-10T15:43:04.623Z elapsed 0.021 (Insert or Replace into Config Values('Mode', '000060');) 2018-02-10T15:43:04.663Z elapsed 0.04 (Insert or Replace into Config Values('Config', '001001');) 2018-02-10T15:43:04.700Z elapsed 0.036 (Insert or Replace into Config Values('DeviceName', '');) 2018-02-10T15:43:04.740Z elapsed 0.039 (Insert or Replace into Config Values('Port', '3000');) 2018-02-10T15:43:04.777Z elapsed 0.036 (Insert or Replace into Config Values('Price', '0.1');) 2018-02-10T15:43:04.814Z elapsed 0.037 (Insert or Replace into Config Values('VoltageScale', '384');) 2018-02-10T15:43:04.849Z elapsed 0.034 (Insert or Replace into Config Values('UserName', '');) 2018-02-10T15:43:04.889Z elapsed 0.039 (Insert or Replace into Config Values('Password', '');) 2018-02-10T15:43:04.922Z elapsed 0.033 (Insert or Replace into Config Values('MqttServer', '');) 2018-02-10T15:43:04.960Z elapsed 0.037 (Insert or Replace into Config Values('Text', '');) 2018-02-10T15:43:04.990Z elapsed 0.03 (Insert or Replace into Config Values('Twilio', '');) 2018-02-10T15:43:05.032Z elapsed 0.041 (Insert or Replace into Config Values('TwilioSID', '');) 2018-02-10T15:43:05.069Z elapsed 0.036 (Insert or Replace into Config Values('TwilioAuthToken', '');) 2018-02-10T15:43:05.111Z elapsed 0.042 (Insert or Replace into Config Values('BackupDB', '');) 2018-02-10T15:43:05.147Z elapsed 0.036 (Insert or Replace into Config Values('Region', 'en-US');) 2018-02-10T15:43:05.188Z elapsed 0.04 (Insert or Replace into Config Values('Probes', '[{"Name":"SCT-006","Factor":"40"},{"Name":"SCT-010","Factor":"152"},{"Name":"SCT-013","Factor":"101"},{"Name":"SCT-016","Factor":"152"},{"Name":"SCT-019","Factor":"296"}]');) 2018-02-10T15:43:05.188Z loading configuration... 2018-02-10T15:43:05.189Z elapsed 0.001 (select from Circuits;) 2018-02-10T15:43:05.190Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:43:05.192Z elapsed 0.002 (Select from Config;) 2018-02-10T15:43:05.192Z read: Mode->000060 2018-02-10T15:43:05.192Z read: Config->001001 2018-02-10T15:43:05.192Z read: DeviceName-> 2018-02-10T15:43:05.192Z read: Port->3000 2018-02-10T15:43:05.193Z read: Price->0.1 2018-02-10T15:43:05.193Z read: VoltageScale->384 2018-02-10T15:43:05.193Z read: UserName-> 2018-02-10T15:43:05.193Z read: Password-> 2018-02-10T15:43:05.193Z read: MqttServer-> 2018-02-10T15:43:05.193Z read: Text-> 2018-02-10T15:43:05.193Z read: Twilio-> 2018-02-10T15:43:05.194Z read: TwilioSID-> 2018-02-10T15:43:05.194Z read: TwilioAuthToken-> 2018-02-10T15:43:05.194Z read: BackupDB-> 2018-02-10T15:43:05.194Z read: Region->en-US 2018-02-10T15:43:05.196Z mqtt: 2018-02-10T15:43:05.205Z end: POST /probeDef 614 ms 2018-02-10T15:43:05.222Z elapsed 0.018 (Select from Config;) 2018-02-10T15:43:05.222Z username: password: 2018-02-10T15:43:05.267Z start: GET /config?=1518277214360 2018-02-10T15:43:05.268Z sending cached config 2018-02-10T15:43:05.271Z end: GET /config?=1518277214360 4 ms 2018-02-10T15:43:06.488Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4282 F= 59.990 F2= 60.000 (500 samples in 124.970156ms) 2018-02-10T15:43:09.300Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4266 F= 59.989 F2= 60.000 (500 samples in 124.730623ms) 2018-02-10T15:43:12.090Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4282 F= 59.992 F2= 60.000 (500 samples in 124.972794ms) 2018-02-10T15:43:14.875Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4256 F= 59.990 F2= 60.000 (500 samples in 124.720277ms) 2018-02-10T15:43:17.661Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4269 F= 59.987 F2= 60.000 (500 samples in 124.722662ms) 2018-02-10T15:43:20.445Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4264 F= 59.983 F2= 60.000 (500 samples in 124.719526ms) 2018-02-10T15:43:21.679Z start: POST /config 2018-02-10T15:43:21.731Z elapsed 0.035 (Insert or replace into Probes Values(1,'SCT-006',1,0,0,20,'',0); ) 2018-02-10T15:43:21.768Z elapsed 0.036 (update Circuits set Name='Circuit 1', Description='', Enabled=1, IsMain=0, Probes='1' where id =1;) 2018-02-10T15:43:21.798Z elapsed 0.029 (Insert into Probes Values(null,'SCT-006',0,0,0,10,'',0); ) 2018-02-10T15:43:21.836Z elapsed 0.037 (insert into Circuits Values(null,'', '',1,0,'2');) 2018-02-10T15:43:21.836Z loading configuration... 2018-02-10T15:43:21.838Z end: POST /config 159 ms 2018-02-10T15:43:21.845Z elapsed 0.009 (select from Circuits;) 2018-02-10T15:43:21.847Z elapsed 0.002 (Select from Probes;) 2018-02-10T15:43:21.848Z elapsed 0.001 (Select * from Config;) 2018-02-10T15:43:21.848Z read: Mode->000060 2018-02-10T15:43:21.848Z read: Config->001001 2018-02-10T15:43:21.848Z read: DeviceName-> 2018-02-10T15:43:21.849Z read: Port->3000 2018-02-10T15:43:21.849Z read: Price->0.1 2018-02-10T15:43:21.849Z read: VoltageScale->384 2018-02-10T15:43:21.849Z read: UserName-> 2018-02-10T15:43:21.849Z read: Password-> 2018-02-10T15:43:21.849Z read: MqttServer-> 2018-02-10T15:43:21.849Z read: Text-> 2018-02-10T15:43:21.849Z read: Twilio-> 2018-02-10T15:43:21.849Z read: TwilioSID-> 2018-02-10T15:43:21.849Z read: TwilioAuthToken-> 2018-02-10T15:43:21.849Z read: BackupDB-> 2018-02-10T15:43:21.849Z read: Region->en-US 2018-02-10T15:43:21.850Z mqtt: 2018-02-10T15:43:21.878Z start: GET /config?=1518277214361 2018-02-10T15:43:21.879Z sending cached config 2018-02-10T15:43:21.881Z end: GET /config?=1518277214361 3 ms 2018-02-10T15:43:23.243Z Circuit 1 : V= 130.4 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4254 F= 59.945 F2= 60.000 (500 samples in 124.793575ms) 2018-02-10T15:43:26.026Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4273 F= 59.979 F2= 60.000 (500 samples in 124.724658ms) 2018-02-10T15:43:26.183Z start: POST /config 2018-02-10T15:43:26.235Z elapsed 0.036 (Insert or replace into Probes Values(1,'SCT-006',1,0,0,20,'',0); ) 2018-02-10T15:43:26.271Z elapsed 0.035 (update Circuits set Name='Circuit 1', Description='', Enabled=1, IsMain=0, Probes='1' where id =1;) 2018-02-10T15:43:26.300Z elapsed 0.029 (Insert or replace into Probes Values(2,'SCT-006',0,0,0,20,'',0); ) 2018-02-10T15:43:26.336Z elapsed 0.034 (update Circuits set Name='', Description='', Enabled=1, IsMain=0, Probes='2' where id =2;) 2018-02-10T15:43:26.336Z loading configuration... 2018-02-10T15:43:26.339Z end: POST /config 156 ms 2018-02-10T15:43:26.351Z elapsed 0.015 (select from Circuits;) 2018-02-10T15:43:26.352Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:43:26.354Z elapsed 0.001 (Select * from Config;) 2018-02-10T15:43:26.354Z read: Mode->000060 2018-02-10T15:43:26.355Z read: Config->001001 2018-02-10T15:43:26.355Z read: DeviceName-> 2018-02-10T15:43:26.355Z read: Port->3000 2018-02-10T15:43:26.355Z read: Price->0.1 2018-02-10T15:43:26.355Z read: VoltageScale->384 2018-02-10T15:43:26.355Z read: UserName-> 2018-02-10T15:43:26.356Z read: Password-> 2018-02-10T15:43:26.356Z read: MqttServer-> 2018-02-10T15:43:26.356Z read: Text-> 2018-02-10T15:43:26.356Z read: Twilio-> 2018-02-10T15:43:26.356Z read: TwilioSID-> 2018-02-10T15:43:26.356Z read: TwilioAuthToken-> 2018-02-10T15:43:26.356Z read: BackupDB-> 2018-02-10T15:43:26.357Z read: Region->en-US 2018-02-10T15:43:26.358Z mqtt: 2018-02-10T15:43:26.401Z start: GET /config?=1518277214362 2018-02-10T15:43:26.402Z sending cached config 2018-02-10T15:43:26.410Z end: GET /config?=1518277214362 9 ms 2018-02-10T15:43:28.809Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4266 F= 59.988 F2= 60.000 (500 samples in 124.719582ms) 2018-02-10T15:43:29.436Z start: GET /waveform?circuitId=1&=1518277351157 2018-02-10T15:43:29.437Z waveform(1) 2018-02-10T15:43:29.452Z end: GET /waveform?circuitId=1&=1518277351157 16 ms 2018-02-10T15:43:31.468Z start: GET /waveform?circuitId=1&=1518277351158 2018-02-10T15:43:31.469Z waveform(1) 2018-02-10T15:43:31.485Z end: GET /waveform?circuitId=1&=1518277351158 17 ms 2018-02-10T15:43:31.606Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4266 F= 59.987 F2= 60.000 (500 samples in 124.718683ms) 2018-02-10T15:43:34.390Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4281 F= 59.991 F2= 60.000 (500 samples in 125.224646ms) 2018-02-10T15:43:37.202Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4271 F= 59.989 F2= 60.000 (500 samples in 124.716781ms) 2018-02-10T15:43:38.747Z start: GET /config?=1518277420031 2018-02-10T15:43:38.749Z sending cached config 2018-02-10T15:43:38.759Z end: GET /config?=1518277420031 12 ms 2018-02-10T15:43:38.891Z start: GET /waveform?circuitId=2&=1518277420032 2018-02-10T15:43:38.892Z waveform(2) 2018-02-10T15:43:38.911Z end: GET /waveform?circuitId=2&=1518277420032 20 ms 2018-02-10T15:43:39.995Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.5 PF= -0.4271 F= 59.986 F2= 60.000 (500 samples in 124.730669ms) 2018-02-10T15:43:40.396Z start: GET /waveform?circuitId=1&=1518277420033 2018-02-10T15:43:40.396Z waveform(1) 2018-02-10T15:43:40.404Z end: GET /waveform?circuitId=1&=1518277420033 9 ms 2018-02-10T15:43:42.593Z start: GET /waveform?circuitId=2&=1518277420034 2018-02-10T15:43:42.594Z waveform(2) 2018-02-10T15:43:42.614Z end: GET /waveform?circuitId=2&=1518277420034 16 ms 2018-02-10T15:43:42.790Z : V= 130.5 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4236 F= 60.002 F2= 60.000 (500 samples in 126.387478ms) 2018-02-10T15:43:44.212Z start: GET /waveform?circuitId=2&=1518277420035 2018-02-10T15:43:44.212Z waveform(2) 2018-02-10T15:43:44.227Z end: GET /waveform?circuitId=2&_=1518277420035 15 ms 2018-02-10T15:43:45.572Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4263 F= 59.995 F2= 60.000 (500 samples in 124.721778ms) 2018-02-10T15:43:48.356Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4256 F= 60.000 F2= 60.000 (500 samples in 124.724679ms) 2018-02-10T15:43:51.139Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4276 F= 59.999 F2= 60.000 (500 samples in 124.721122ms) ^C2018-02-10T15:43:52.256Z Received kill signal, shutting down gracefully.

This seems to make NO SENSE with a voltage reading and NO probes inserted!! Do you think I have faulty hardware? I also tested the dev branch and dont see a difference on the empty probe readings.

No Probe waveform: noprobe-wave

when I change phase away from V1 and set to V2 or V1+V2 this is my waveform.

image

craigjensen commented 6 years ago

Hi Chris,

I have tested the SCT-019 sensors and they work well but the PiPowerMeter boards have built-in sense resistors so you should not be adding your own. I’ve seen some pretty unusual current waveforms especially if you have lots of electronics connected that might account for what you are seeing. Please try removing any additional burden resistors and connect the current probes directly to the current board. That should give you a more sensible reading.

The voltage waveform is read directly from the connected power source. The current sensors only read current, not voltage, which is why you still see a voltage waveform when not current sensors are connected.

Let me know if you are still having issues and I’ll help however I can.

Craig

From: Chris [mailto:notifications@github.com] Sent: Saturday, February 10, 2018 8:08 AM To: crjens/PiPowerMeter PiPowerMeter@noreply.github.com Cc: Craig Jensen cjensen@microsoft.com; Comment comment@noreply.github.com Subject: Re: [crjens/PiPowerMeter] Current Sensors, Config Elements, and Sensor Coverage. (#1)

Well after having my 4th child I am back to trying to get this project working again. I seem to have hit a wall on this as I cannot get any sensible readings from my unit.

I am not testing with a SCT-019 and was trying to measure a single lef of mains. I have a burden resistor on the probe @26https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2F26&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=W1QDFgEkNrBJSJMyDVgXN5nyIdryacRhQTUzCqy9i8o%3D&reserved=0 Ohms (calculated @200amps here: http://tyler.anairo.com/projects/open-energy-monitor-calculatorhttps://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftyler.anairo.com%2Fprojects%2Fopen-energy-monitor-calculator&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=5F4xGRYYjQfxexqfXUlP9PbnA5r24ddNhA%2B6Xg6%2FjGE%3D&reserved=0) and had to scale the voltage (366) and current (26) to get a waveform that looks like this (what is the current wave doing??)

[bad-wave]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F10292093%2F36063875-86a7d77a-0e50-11e8-9564-a2e56c8ba673.JPG&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=srDdY8l4sOr9H96mPHO6RKrF%2F9NbqhnPbLu2psWgh5M%3D&reserved=0

After a couple of days of frustration with trying to get this to make sense of this (as well as moving between ports, burden resistors, additional boards, Pi's) I decided to unplug all sensors and I am seeing readings (when running server.js directly) of

pi@PowerPi:~/app$ node server.js next rollup in: 19056531 spawned reader with pid: 2755 2018-02-10T15:42:23.558Z loading configuration... 2018-02-10T15:42:23.560Z waiting for table: Circuits 2018-02-10T15:42:23.561Z waiting for table: Config 2018-02-10T15:42:23.568Z opened database: powermeter.db 2018-02-10T15:42:23.593Z currentSha: c67445fhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fcommit%2Fc67445f87196163bc68588797bb8e7412fd9d357&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=nlhac3FBsgJ1zlBCycYVbUu4qgcSabJ%2FYZmn%2BfzHz0E%3D&reserved=0 2018-02-10T15:42:23.594Z currentDate: 2017-12-14T04:19:55.000Z 2018-02-10T15:42:23.614Z elapsed 0.042 (PRAGMA foreign_keys=on) 2018-02-10T15:42:23.614Z elapsed 0.043 (create table if not exists Probes ( id INTEGER primary key, Type text, Board int check(Board>=0 and Board<=7), CurrentChannel int check(CurrentChannel>=0 and CurrentChannel<=15), VoltageChannel int check(VoltageChannel>=0 and VoltageChannel<=3), Breaker int, Alert Text, SourceType int);) 2018-02-10T15:42:23.617Z elapsed 0.045 (create table if not exists Config ( Name text primary key, Value Text);) 2018-02-10T15:42:23.618Z Config table ready 2018-02-10T15:42:23.619Z elapsed 0.048 (create table if not exists Circuits ( id INTEGER primary key, Name Text, Description Text, Enabled int, IsMain int, Probes text);) 2018-02-10T15:42:23.620Z Circuits table ready 2018-02-10T15:42:23.623Z elapsed 0.007 (pragma table_info(Probes);) 2018-02-10T15:42:23.625Z Probes table ready 2018-02-10T15:42:23.625Z elapsed 0.008 (Insert or ignore into Config Values('Port', '3000');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('DeviceName', '');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Price', '0.1');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Region', 'en-US');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('VoltageScale', '384');) 2018-02-10T15:42:23.626Z elapsed 0.008 (Insert or ignore into Config Values('Probes', '[{''Name'':''SCT-006'',''Factor'':''40''},{''Name'':''SCT-010'',''Factor'':''152''},{''Name'':''SCT-013'',''Factor'':''101''},{''Name'':''SCT-016'',''Factor'':''152''},{''Name'':''SCT-019'',''Factor'':''295''}]');) 2018-02-10T15:42:23.627Z elapsed 0.008 (Select from Config where Name = 'BackupDB';) 2018-02-10T15:42:23.627Z elapsed 0.007 (Insert into Circuits (id, Name, Description, Enabled, IsMain, Probes) select null,'Circuit 1','',1,0,'1' where (select count() from Circuits) = 0;) 2018-02-10T15:42:23.628Z elapsed 0.007 (create table if not exists Readings (id INTEGER primary key, CircuitId int, I real, V real, P real, Q real, PF real, Timestamp int, Compacted int, F real, foreign key(CircuitId) references Circuits(id));) 2018-02-10T15:42:23.629Z elapsed 0.011 (Insert or ignore into Config Values('Mode', '000060');) 2018-02-10T15:42:23.629Z elapsed 0.011 (Insert or ignore into Config Values('Config', '001001');) 2018-02-10T15:42:23.631Z elapsed 0.007 (Insert into Probes (id, Type, Board, CurrentChannel, VoltageChannel, Breaker, Alert, SourceType) select 1,'SCT-006',0,0,0,20,null,0 where (select count() from Probes) = 0;) 2018-02-10T15:42:23.632Z elapsed 0.004 (pragma table_info(Readings);) 2018-02-10T15:42:23.633Z Readings table ready 2018-02-10T15:42:23.634Z elapsed 0.001 (select count() as Rows from Readings;) 2018-02-10T15:42:23.635Z elapsed 0.002 (create index if not exists Readings_Timestamp_CircuitId_P_idx on Readings(Timestamp, CircuitId, P);) 2018-02-10T15:42:23.636Z elapsed 0.003 (create index if not exists Readings_CircuitId_Timestamp_P_idx on Readings(CircuitId, Timestamp, P);) 2018-02-10T15:42:23.666Z elapsed 0.002 (select from Circuits;) 2018-02-10T15:42:23.668Z elapsed 0.003 (Select from Config;) 2018-02-10T15:42:23.669Z username: password: 2018-02-10T15:42:23.670Z Setting port: 3000 2018-02-10T15:42:23.691Z App Server running at port 3000 2018-02-10T15:42:23.691Z elapsed 0.024 (Select from Probes;) 2018-02-10T15:42:23.695Z elapsed 0 (Select from Config;) 2018-02-10T15:42:23.696Z read: DeviceName-> 2018-02-10T15:42:23.696Z read: Mode->000060 2018-02-10T15:42:23.697Z read: Region->en-US 2018-02-10T15:42:23.697Z read: VoltageScale->384 2018-02-10T15:42:23.697Z read: Port->3000 2018-02-10T15:42:23.697Z read: Price->0.1 2018-02-10T15:42:23.697Z read: Config->001001 2018-02-10T15:42:23.701Z mqtt: undefined reader closed 1 reader closed 2 Opening device: /dev/spidev0.0 at 2000000 Hz, mode 0, 8 bits, 0 us delay Device opened with mode: 0, bits: 8, speed: 2000000 Device opened: Hardware version: 2.2 RESET Register dump: 0 - Config: 001001 1 - CurrentDCOffset: 000000 2 - CurrentGain: 400000 3 - VoltageDCOffset: 000000 4 - VoltageGain: 400000 5 - CycleCount: 000fa0 6 - PulseRateE: 800000 7 - InstCurrent: 0003d0 8 - InstVoltage: 1764ce 9 - InstPower: 000070 10 - RealPower: fffccf 11 - RmsCurrent: 002c2e 12 - RmsVoltage: 570aa6 13 - Epsilon: 01eb85 14 - PowerOffset: 000000 15 - Status: 900085 16 - CurrentACOffset: 000000 17 - VoltageACOffset: 000000 18 - Mode: 000060 19 - Temp: 18fc00 20 - AveReactivePower: 000598 21 - InstReactivePower: 000004 22 - PeakCurrent: ffc40e 23 - PeakVoltge: c5446a 24 - ReactivePowerTriangle: 0006cb 25 - PowerFactor: c9970a 26 - InterruptMask: 800000 27 - ApparentPower: 000782 28 - Control: 000000 29 - HarmonicActivePower: ffffeb 30 - FundamentalActivePower: fffce4 31 - FundamentalReactivePower: 0005a8 2018-02-10T15:42:23.987Z latest software version: c67445fhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fcommit%2Fc67445f87196163bc68588797bb8e7412fd9d357&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=nlhac3FBsgJ1zlBCycYVbUu4qgcSabJ%2FYZmn%2BfzHz0E%3D&reserved=0 2018-02-10T15:42:23.987Z software is up to date - will periodically check for updates 2018-02-10T15:42:24.400Z start: GET /config?=1518277345681 2018-02-10T15:42:24.406Z sending cached config write: init serial port(FFFFFFFE) command: reset(80) 2018-02-10T15:42:24.422Z end: GET /config?=1518277345681 22 ms status: 800005 write: clear status(5EFFFFFF) read: read Mode register(24FFFFFF) -> 000000 write: hpf on with current phase compensation(64000060) read: read Mode register(24FFFFFF) -> 000060 read: read configuration register(00FFFFFF) -> 000001 write: interrupts set to high to low pulse with phase comp(40001001) read: read configuration register(00FFFFFF) -> 001001 epsilon before: 0.01250004768371582 write: set epsilon to 01eb85(5A01eb85) epsilon after: 0.014999985694885254 initialized setting isr pin to: 5, upDn: 2, edge: 1 2018-02-10T15:42:24.496Z start: GET /waveform?circuitId=1&=1518277345682 2018-02-10T15:42:24.497Z waveform(1) 2018-02-10T15:42:24.502Z end: GET /waveform?circuitId=1&=1518277345682 6 ms 2018-02-10T15:42:27.285Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= -1.5 PF= -0.4082 F= 60.013 F2= 60.000 (500 samples in 124.705339ms) 2018-02-10T15:42:27.313Z elapsed 0.023 (select round(min(P),0) as min, round(max(P),0) as max, round(avg(P),0) as avg from readings where CircuitId = 1 and Timestamp >= 1518190947.287 and Timestamp < 1518277347.287;) 2018-02-10T15:42:27.314Z setting lastkwh for ckt: 1 to -0.024 2018-02-10T15:42:29.861Z start: GET /config?=1518277351149 2018-02-10T15:42:29.863Z sending cached config 2018-02-10T15:42:29.866Z end: GET /config?=1518277351149 5 ms 2018-02-10T15:42:29.949Z start: GET /waveform?circuitId=1&=1518277351150 2018-02-10T15:42:29.950Z waveform(1) 2018-02-10T15:42:29.966Z end: GET /waveform?circuitId=1&=1518277351150 17 ms 2018-02-10T15:42:30.079Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4269 F= 60.004 F2= 60.000 (500 samples in 124.714608ms) 2018-02-10T15:42:30.263Z start: GET /favicon.ico 2018-02-10T15:42:30.279Z end: GET /favicon.ico 16 ms 2018-02-10T15:42:32.859Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4282 F= 60.003 F2= 60.000 (500 samples in 124.728442ms) 2018-02-10T15:42:35.639Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4285 F= 59.999 F2= 60.000 (500 samples in 124.72094ms) 2018-02-10T15:42:38.457Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 60.011 F2= 60.000 (500 samples in 125.451381ms) 2018-02-10T15:42:41.239Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4246 F= 59.997 F2= 60.000 (500 samples in 124.714629ms) 2018-02-10T15:42:44.019Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4272 F= 59.997 F2= 60.000 (500 samples in 124.719467ms) 2018-02-10T15:42:46.799Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4276 F= 59.987 F2= 60.000 (500 samples in 124.719448ms) 2018-02-10T15:42:48.642Z start: POST /probeDef 2018-02-10T15:42:48.779Z elapsed 0.032 (Insert or Replace into Config Values('Mode', '000060');) 2018-02-10T15:42:48.811Z elapsed 0.031 (Insert or Replace into Config Values('Config', '001001');) 2018-02-10T15:42:48.840Z elapsed 0.029 (Insert or Replace into Config Values('DeviceName', '');) 2018-02-10T15:42:48.873Z elapsed 0.033 (Insert or Replace into Config Values('Port', '3000');) 2018-02-10T15:42:48.905Z elapsed 0.032 (Insert or Replace into Config Values('Price', '0.1');) 2018-02-10T15:42:48.935Z elapsed 0.029 (Insert or Replace into Config Values('VoltageScale', '384');) 2018-02-10T15:42:48.970Z elapsed 0.035 (Insert or Replace into Config Values('UserName', '');) 2018-02-10T15:42:49.008Z elapsed 0.036 (Insert or Replace into Config Values('Password', '');) 2018-02-10T15:42:49.050Z elapsed 0.041 (Insert or Replace into Config Values('MqttServer', '');) 2018-02-10T15:42:49.082Z elapsed 0.032 (Insert or Replace into Config Values('Text', '');) 2018-02-10T15:42:49.118Z elapsed 0.035 (Insert or Replace into Config Values('Twilio', '');) 2018-02-10T15:42:49.154Z elapsed 0.035 (Insert or Replace into Config Values('TwilioSID', '');) 2018-02-10T15:42:49.193Z elapsed 0.039 (Insert or Replace into Config Values('TwilioAuthToken', '');) 2018-02-10T15:42:49.223Z elapsed 0.03 (Insert or Replace into Config Values('BackupDB', '');) 2018-02-10T15:42:49.260Z elapsed 0.036 (Insert or Replace into Config Values('Region', 'en-US');) 2018-02-10T15:42:49.291Z elapsed 0.031 (Insert or Replace into Config Values('Probes', '[{"Name":"SCT-006","Factor":"40"},{"Name":"SCT-010","Factor":"152"},{"Name":"SCT-013","Factor":"101"},{"Name":"SCT-016","Factor":"152"},{"Name":"SCT-019","Factor":"25"}]');) 2018-02-10T15:42:49.291Z loading configuration... 2018-02-10T15:42:49.292Z elapsed 0.001 (select from Circuits;) 2018-02-10T15:42:49.293Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:42:49.294Z elapsed 0 (Select from Config;) 2018-02-10T15:42:49.295Z read: Mode->000060 2018-02-10T15:42:49.295Z read: Config->001001 2018-02-10T15:42:49.295Z read: DeviceName-> 2018-02-10T15:42:49.295Z read: Port->3000 2018-02-10T15:42:49.295Z read: Price->0.1 2018-02-10T15:42:49.295Z read: VoltageScale->384 2018-02-10T15:42:49.295Z read: UserName-> 2018-02-10T15:42:49.295Z read: Password-> 2018-02-10T15:42:49.296Z read: MqttServer-> 2018-02-10T15:42:49.296Z read: Text-> 2018-02-10T15:42:49.296Z read: Twilio-> 2018-02-10T15:42:49.296Z read: TwilioSID-> 2018-02-10T15:42:49.296Z read: TwilioAuthToken-> 2018-02-10T15:42:49.296Z read: BackupDB-> 2018-02-10T15:42:49.296Z read: Region->en-US 2018-02-10T15:42:49.298Z mqtt: 2018-02-10T15:42:49.769Z end: POST /probeDef 1127 ms 2018-02-10T15:42:49.785Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.5 PF= -0.4224 F= 58.800 F2= 60.000 (500 samples in 146.22068ms) 2018-02-10T15:42:49.791Z elapsed 0.024 (Select from Config;) 2018-02-10T15:42:49.792Z username: password: 2018-02-10T15:42:49.828Z start: GET /config?=1518277214359 2018-02-10T15:42:49.829Z sending cached config 2018-02-10T15:42:49.831Z end: GET /config?=1518277214359 3 ms 2018-02-10T15:42:52.570Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4271 F= 59.984 F2= 60.000 (500 samples in 124.715165ms) 2018-02-10T15:42:53.205Z start: GET /waveform?circuitId=1&=1518277351151 2018-02-10T15:42:53.206Z waveform(1) 2018-02-10T15:42:53.266Z end: GET /waveform?circuitId=1&=1518277351151 61 ms 2018-02-10T15:42:54.646Z start: GET /waveform?circuitId=1&=1518277351152 2018-02-10T15:42:54.647Z waveform(1) 2018-02-10T15:42:54.662Z end: GET /waveform?circuitId=1&=1518277351152 16 ms 2018-02-10T15:42:55.352Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4249 F= 59.983 F2= 60.000 (500 samples in 124.717033ms) 2018-02-10T15:42:55.389Z start: GET /waveform?circuitId=1&=1518277351153 2018-02-10T15:42:55.390Z waveform(1) 2018-02-10T15:42:55.404Z end: GET /waveform?circuitId=1&=1518277351153 15 ms 2018-02-10T15:42:55.984Z start: GET /waveform?circuitId=1&=1518277351154 2018-02-10T15:42:55.985Z waveform(1) 2018-02-10T15:42:56.002Z end: GET /waveform?circuitId=1&=1518277351154 19 ms 2018-02-10T15:42:56.638Z start: GET /waveform?circuitId=1&=1518277351155 2018-02-10T15:42:56.640Z waveform(1) 2018-02-10T15:42:56.655Z end: GET /waveform?circuitId=1&=1518277351155 17 ms 2018-02-10T15:42:57.222Z start: GET /waveform?circuitId=1&=1518277351156 2018-02-10T15:42:57.223Z waveform(1) 2018-02-10T15:42:57.237Z end: GET /waveform?circuitId=1&=1518277351156 15 ms 2018-02-10T15:42:58.133Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 59.984 F2= 60.000 (500 samples in 124.714734ms) 2018-02-10T15:43:00.922Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4290 F= 59.986 F2= 60.000 (500 samples in 124.717786ms) 2018-02-10T15:43:03.703Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4277 F= 59.985 F2= 60.000 (500 samples in 124.968915ms) 2018-02-10T15:43:04.591Z start: POST /probeDef 2018-02-10T15:43:04.623Z elapsed 0.021 (Insert or Replace into Config Values('Mode', '000060');) 2018-02-10T15:43:04.663Z elapsed 0.04 (Insert or Replace into Config Values('Config', '001001');) 2018-02-10T15:43:04.700Z elapsed 0.036 (Insert or Replace into Config Values('DeviceName', '');) 2018-02-10T15:43:04.740Z elapsed 0.039 (Insert or Replace into Config Values('Port', '3000');) 2018-02-10T15:43:04.777Z elapsed 0.036 (Insert or Replace into Config Values('Price', '0.1');) 2018-02-10T15:43:04.814Z elapsed 0.037 (Insert or Replace into Config Values('VoltageScale', '384');) 2018-02-10T15:43:04.849Z elapsed 0.034 (Insert or Replace into Config Values('UserName', '');) 2018-02-10T15:43:04.889Z elapsed 0.039 (Insert or Replace into Config Values('Password', '');) 2018-02-10T15:43:04.922Z elapsed 0.033 (Insert or Replace into Config Values('MqttServer', '');) 2018-02-10T15:43:04.960Z elapsed 0.037 (Insert or Replace into Config Values('Text', '');) 2018-02-10T15:43:04.990Z elapsed 0.03 (Insert or Replace into Config Values('Twilio', '');) 2018-02-10T15:43:05.032Z elapsed 0.041 (Insert or Replace into Config Values('TwilioSID', '');) 2018-02-10T15:43:05.069Z elapsed 0.036 (Insert or Replace into Config Values('TwilioAuthToken', '');) 2018-02-10T15:43:05.111Z elapsed 0.042 (Insert or Replace into Config Values('BackupDB', '');) 2018-02-10T15:43:05.147Z elapsed 0.036 (Insert or Replace into Config Values('Region', 'en-US');) 2018-02-10T15:43:05.188Z elapsed 0.04 (Insert or Replace into Config Values('Probes', '[{"Name":"SCT-006","Factor":"40"},{"Name":"SCT-010","Factor":"152"},{"Name":"SCT-013","Factor":"101"},{"Name":"SCT-016","Factor":"152"},{"Name":"SCT-019","Factor":"296"}]');) 2018-02-10T15:43:05.188Z loading configuration... 2018-02-10T15:43:05.189Z elapsed 0.001 (select from Circuits;) 2018-02-10T15:43:05.190Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:43:05.192Z elapsed 0.002 (Select from Config;) 2018-02-10T15:43:05.192Z read: Mode->000060 2018-02-10T15:43:05.192Z read: Config->001001 2018-02-10T15:43:05.192Z read: DeviceName-> 2018-02-10T15:43:05.192Z read: Port->3000 2018-02-10T15:43:05.193Z read: Price->0.1 2018-02-10T15:43:05.193Z read: VoltageScale->384 2018-02-10T15:43:05.193Z read: UserName-> 2018-02-10T15:43:05.193Z read: Password-> 2018-02-10T15:43:05.193Z read: MqttServer-> 2018-02-10T15:43:05.193Z read: Text-> 2018-02-10T15:43:05.193Z read: Twilio-> 2018-02-10T15:43:05.194Z read: TwilioSID-> 2018-02-10T15:43:05.194Z read: TwilioAuthToken-> 2018-02-10T15:43:05.194Z read: BackupDB-> 2018-02-10T15:43:05.194Z read: Region->en-US 2018-02-10T15:43:05.196Z mqtt: 2018-02-10T15:43:05.205Z end: POST /probeDef 614 ms 2018-02-10T15:43:05.222Z elapsed 0.018 (Select from Config;) 2018-02-10T15:43:05.222Z username: password: 2018-02-10T15:43:05.267Z start: GET /config?=1518277214360 2018-02-10T15:43:05.268Z sending cached config 2018-02-10T15:43:05.271Z end: GET /config?=1518277214360 4 ms 2018-02-10T15:43:06.488Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4282 F= 59.990 F2= 60.000 (500 samples in 124.970156ms) 2018-02-10T15:43:09.300Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4266 F= 59.989 F2= 60.000 (500 samples in 124.730623ms) 2018-02-10T15:43:12.090Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4282 F= 59.992 F2= 60.000 (500 samples in 124.972794ms) 2018-02-10T15:43:14.875Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4256 F= 59.990 F2= 60.000 (500 samples in 124.720277ms) 2018-02-10T15:43:17.661Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4269 F= 59.987 F2= 60.000 (500 samples in 124.722662ms) 2018-02-10T15:43:20.445Z Circuit 1 : V= 130.6 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4264 F= 59.983 F2= 60.000 (500 samples in 124.719526ms) 2018-02-10T15:43:21.679Z start: POST /config 2018-02-10T15:43:21.731Z elapsed 0.035 (Insert or replace into Probes Values(1,'SCT-006',1,0,0,20,'',0); ) 2018-02-10T15:43:21.768Z elapsed 0.036 (update Circuits set Name='Circuit 1', Description='', Enabled=1, IsMain=0, Probes='1' where id =1;) 2018-02-10T15:43:21.798Z elapsed 0.029 (Insert into Probes Values(null,'SCT-006',0,0,0,10,'',0); ) 2018-02-10T15:43:21.836Z elapsed 0.037 (insert into Circuits Values(null,'', '',1,0,'2');) 2018-02-10T15:43:21.836Z loading configuration... 2018-02-10T15:43:21.838Z end: POST /config 159 ms 2018-02-10T15:43:21.845Z elapsed 0.009 (select from Circuits;) 2018-02-10T15:43:21.847Z elapsed 0.002 (Select from Probes;) 2018-02-10T15:43:21.848Z elapsed 0.001 (Select from Config;) 2018-02-10T15:43:21.848Z read: Mode->000060 2018-02-10T15:43:21.848Z read: Config->001001 2018-02-10T15:43:21.848Z read: DeviceName-> 2018-02-10T15:43:21.849Z read: Port->3000 2018-02-10T15:43:21.849Z read: Price->0.1 2018-02-10T15:43:21.849Z read: VoltageScale->384 2018-02-10T15:43:21.849Z read: UserName-> 2018-02-10T15:43:21.849Z read: Password-> 2018-02-10T15:43:21.849Z read: MqttServer-> 2018-02-10T15:43:21.849Z read: Text-> 2018-02-10T15:43:21.849Z read: Twilio-> 2018-02-10T15:43:21.849Z read: TwilioSID-> 2018-02-10T15:43:21.849Z read: TwilioAuthToken-> 2018-02-10T15:43:21.849Z read: BackupDB-> 2018-02-10T15:43:21.849Z read: Region->en-US 2018-02-10T15:43:21.850Z mqtt: 2018-02-10T15:43:21.878Z start: GET /config?=1518277214361 2018-02-10T15:43:21.879Z sending cached config 2018-02-10T15:43:21.881Z end: GET /config?=1518277214361 3 ms 2018-02-10T15:43:23.243Z Circuit 1 : V= 130.4 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4254 F= 59.945 F2= 60.000 (500 samples in 124.793575ms) 2018-02-10T15:43:26.026Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4273 F= 59.979 F2= 60.000 (500 samples in 124.724658ms) 2018-02-10T15:43:26.183Z start: POST /config 2018-02-10T15:43:26.235Z elapsed 0.036 (Insert or replace into Probes Values(1,'SCT-006',1,0,0,20,'',0); ) 2018-02-10T15:43:26.271Z elapsed 0.035 (update Circuits set Name='Circuit 1', Description='', Enabled=1, IsMain=0, Probes='1' where id =1;) 2018-02-10T15:43:26.300Z elapsed 0.029 (Insert or replace into Probes Values(2,'SCT-006',0,0,0,20,'',0); ) 2018-02-10T15:43:26.336Z elapsed 0.034 (update Circuits set Name='', Description='', Enabled=1, IsMain=0, Probes='2' where id =2;) 2018-02-10T15:43:26.336Z loading configuration... 2018-02-10T15:43:26.339Z end: POST /config 156 ms 2018-02-10T15:43:26.351Z elapsed 0.015 (select from Circuits;) 2018-02-10T15:43:26.352Z elapsed 0.001 (Select from Probes;) 2018-02-10T15:43:26.354Z elapsed 0.001 (Select from Config;) 2018-02-10T15:43:26.354Z read: Mode->000060 2018-02-10T15:43:26.355Z read: Config->001001 2018-02-10T15:43:26.355Z read: DeviceName-> 2018-02-10T15:43:26.355Z read: Port->3000 2018-02-10T15:43:26.355Z read: Price->0.1 2018-02-10T15:43:26.355Z read: VoltageScale->384 2018-02-10T15:43:26.355Z read: UserName-> 2018-02-10T15:43:26.356Z read: Password-> 2018-02-10T15:43:26.356Z read: MqttServer-> 2018-02-10T15:43:26.356Z read: Text-> 2018-02-10T15:43:26.356Z read: Twilio-> 2018-02-10T15:43:26.356Z read: TwilioSID-> 2018-02-10T15:43:26.356Z read: TwilioAuthToken-> 2018-02-10T15:43:26.356Z read: BackupDB-> 2018-02-10T15:43:26.357Z read: Region->en-US 2018-02-10T15:43:26.358Z mqtt: 2018-02-10T15:43:26.401Z start: GET /config?=1518277214362 2018-02-10T15:43:26.402Z sending cached config 2018-02-10T15:43:26.410Z end: GET /config?=1518277214362 9 ms 2018-02-10T15:43:28.809Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4266 F= 59.988 F2= 60.000 (500 samples in 124.719582ms) 2018-02-10T15:43:29.436Z start: GET /waveform?circuitId=1&=1518277351157 2018-02-10T15:43:29.437Z waveform(1) 2018-02-10T15:43:29.452Z end: GET /waveform?circuitId=1&=1518277351157 16 ms 2018-02-10T15:43:31.468Z start: GET /waveform?circuitId=1&=1518277351158 2018-02-10T15:43:31.469Z waveform(1) 2018-02-10T15:43:31.485Z end: GET /waveform?circuitId=1&=1518277351158 17 ms 2018-02-10T15:43:31.606Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4266 F= 59.987 F2= 60.000 (500 samples in 124.718683ms) 2018-02-10T15:43:34.390Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4281 F= 59.991 F2= 60.000 (500 samples in 125.224646ms) 2018-02-10T15:43:37.202Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4271 F= 59.989 F2= 60.000 (500 samples in 124.716781ms) 2018-02-10T15:43:38.747Z start: GET /config?=1518277420031 2018-02-10T15:43:38.749Z sending cached config 2018-02-10T15:43:38.759Z end: GET /config?=1518277420031 12 ms 2018-02-10T15:43:38.891Z start: GET /waveform?circuitId=2&=1518277420032 2018-02-10T15:43:38.892Z waveform(2) 2018-02-10T15:43:38.911Z end: GET /waveform?circuitId=2&=1518277420032 20 ms 2018-02-10T15:43:39.995Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.5 PF= -0.4271 F= 59.986 F2= 60.000 (500 samples in 124.730669ms) 2018-02-10T15:43:40.396Z start: GET /waveform?circuitId=1&=1518277420033 2018-02-10T15:43:40.396Z waveform(1) 2018-02-10T15:43:40.404Z end: GET /waveform?circuitId=1&=1518277420033 9 ms 2018-02-10T15:43:42.593Z start: GET /waveform?circuitId=2&=1518277420034 2018-02-10T15:43:42.594Z waveform(2) 2018-02-10T15:43:42.614Z end: GET /waveform?circuitId=2&=1518277420034 16 ms 2018-02-10T15:43:42.790Z : V= 130.5 I= 0.0 P= -1.5 Q= 2.7 PF= -0.4236 F= 60.002 F2= 60.000 (500 samples in 126.387478ms) 2018-02-10T15:43:44.212Z start: GET /waveform?circuitId=2&=1518277420035 2018-02-10T15:43:44.212Z waveform(2) 2018-02-10T15:43:44.227Z end: GET /waveform?circuitId=2&=1518277420035 15 ms 2018-02-10T15:43:45.572Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4263 F= 59.995 F2= 60.000 (500 samples in 124.721778ms) 2018-02-10T15:43:48.356Z : V= 130.5 I= 0.0 P= -1.6 Q= 2.7 PF= -0.4256 F= 60.000 F2= 60.000 (500 samples in 124.724679ms) 2018-02-10T15:43:51.139Z Circuit 1 : V= 130.5 I= 0.0 P= -1.5 Q= 2.6 PF= -0.4276 F= 59.999 F2= 60.000 (500 samples in 124.721122ms) ^C2018-02-10T15:43:52.256Z Received kill signal, shutting down gracefully.

This seems to make NO SENSE with a voltage reading and NO probes inserted!! Do you think I have faulty hardware? I also tested the dev branch and dont see a difference on the empty probe readings.

No Probe waveform: [noprobe-wave]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F10292093%2F36063995-68bca1ee-0e52-11e8-9204-3ab8b9cb4af7.JPG&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=LBdHNhsD3Do0DIUjzQcFq5AzlCN9GZLpmXe2dJw%2FQBc%3D&reserved=0

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fissues%2F1%23issuecomment-364665784&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=exwPBa9HcpkkyeGuWMLRhjX8IF23VyiM5xl42ua5fVg%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARuWnrHGXJoQMljB7CeMn7lUFjT8fnqfks5tTb7PgaJpZM4OVAhy&data=04%7C01%7Ccjensen%40microsoft.com%7Cf2e932c93e7340a27b1708d570a06c01%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636538756662671218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=XRe7X3yLEEJAZq9%2BYNdnDzs%2FFtnuJXhhTPixgrScFhY%3D&reserved=0.

akkord64 commented 6 years ago

I finally have success! I changed the unit to power from 220v (the documentation is not clear that the voltage of each leg is derived from the unit INPUT power. I connected AC1,AC2,Neutral and I can now see Phase A and B. After removing burdens, I also see current and wattage values which are approximate. I now understand your scaling logic and how it is applied in both relation to voltage and current. I am at a point of major relief! I think a few updates to the documentation should be made to call out the importance of the following:

1: the units AC Source is how voltage is derived for each phase. 2: Physical Wiring (no need for burdens)

  1. How the CS5463 readings are taken (high level sequencing, but explain the scale multipliers. I initially thought "scale" referred to peak values of readings and not as a multiplier)

I also have some things that are not clear yet.

  1. How does Type: Source, Load, Both factor into the reporting/values.
  2. Phase - What exactly does this do? Is it used in calculations or just as a reference?
  3. VARS - I have some values which are negative. I am not sure if this means my CT's are backwards? I get conflicting data between the type value (#1) and watts/vars.

Suggestions:

  1. Breaker configs - Would like to see breakers as a configurable element (like you did for probes)
  2. Pinned header with navigational controls - Navigating back and forth between config/waveform/circuits.
  3. MQTT configurable

As a side note - I had to scale my SCT-019's to 615 to get an approx accurate reading. I currently only have 1, but have ordered more and will report on the accuracy of the other units when they arrive. Your seeded scale value of 295 is nowhere near 615 and I wouldn't think that much variability would happen. Either way I will report back my progress in hopes it helps someone else. before closing the isssue.555555555 My current waveforms do not look sinusodal; I assume this is because the loads are different. Some being motors, others being AC/DC switching supplies, etc.

I am also sending you a request for a new current board as I am running out of ports (I thought I could just measure one leg of my 220v circuits, but I now see the need for measuring both).

crjens commented 6 years ago

Glad you were able to get it working and thanks for the great feedback, I’ll definitely try to improve the documentation in the future.

To answer your specific concerns:

  1. SourceType is currently only used to help clean up noise on the readings when there is no load on the circuit (i.e. loads should never have negative values). This may change in the future but for now that’s all it’s used for.
  2. Phase is important because that’s where you specify which voltage reference to use for the power calculations. If you are seeing strange readings such as a load circuit that appears to be producing energy (negative watts), it’s probably because either; 1) your CT is backwards, or 2) you are using the wrong voltage reference.
  3. VAR’s stands for Volt-Amp reactivehttps://en.wikipedia.org/wiki/Volt-ampere_reactive and is a measure of how much reactive current is flowing in the circuit. Inductive loads such as electric motors typically have a current waveform that lags the voltage producing a negative power factorhttps://en.wikipedia.org/wiki/Power_factor. Capacitive loads do the opposite so depending on what kind of load you have connected you could see either negative or positive vars flowing on a particular circuit. Connecting the CT’s backwards will also affect this value so you should make sure all CT’s connected correctly. In the case of YHDC sensors make sure the side of the sensor that has writing on it faces toward the source.
  4. You shouldn’t need to double the scale factor in the SCT-019 to get an accurate reading. If you only have one sensor and want to estimate the usage across both legs of your panel, I’d suggest leaving the scale factor for the sensor alone and setting the phase to V1+V2. This will give you a decent estimate as long as the usage is divided relatively equally across the two legs. Using two sensors, one on V1 and the other on V2, is the best way to get an accurate reading if the current is not divided equally.
  5. The meter does have rudimentary MQTT support. Just add ?advanced=1 to the config page url you you’ll be able to set the MQTT server address (http://yourserver:3000/configure.html?advanced=1)

Hope this helps clear things up a bit.

Regards, Craig

From: Chris [mailto:notifications@github.com] Sent: Sunday, February 11, 2018 5:37 AM To: crjens/PiPowerMeter PiPowerMeter@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [crjens/PiPowerMeter] Current Sensors, Config Elements, and Sensor Coverage. (#1)

I finally have success! I changed the unit to power from 220v (the documentation is not clear that the voltage of each leg is derived from the unit INPUT power. I connected AC1,AC2,Neutral and I can now see Phase A and B. After removing burdens, I also see current and wattage values which are approximate. I now understand your scaling logic and how it is applied in both relation to voltage and current. I am at a point of major relief! I think a few updates to the documentation should be made to call out the importance of the following:

1: the units AC Source is how voltage is derived for each phase. 2: Physical Wiring (no need for burdens)

  1. How the CS5463 readings are taken (high level sequencing, but explain the scale multipliers. I initially thought "scale" referred to peak values of readings and not as a multiplier)

I also have some things that are not clear yet.

  1. How does Type: Source, Load, Both factor into the reporting/values.
  2. Phase - What exactly does this do? Is it used in calculations or just as a reference?
  3. VARS - I have some values which are negative. I am not sure if this means my CT's are backwards? I get conflicting data between the type value (#1https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fissues%2F1&data=02%7C01%7C%7C6e74671eb4fd4f5f78f008d571548b43%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636539530278345726&sdata=Nor45yHciRxQCrBv3EkZIQFr8foOFlmbRm7DWOtBg1w%3D&reserved=0) and watts/vars.

Suggestions:

  1. Breaker configs - Would like to see breakers as a configurable element (like you did for probes)
  2. Pinned header with navigational controls - Navigating back and forth between config/waveform/circuits.
  3. MQTT configurable

As a side note - I had to scale my SCT-019's to 615 to get an approx accurate reading. I currently only have 1, but have ordered more and will report on the accuracy of the other units when they arrive. Your seeded scale value of 295 is nowhere near 615 and I wouldn't think that much variability would happen. Either way I will report back my progress in hopes it helps someone else. before closing the isssue.555555555 My current waveforms do not look sinusodal; I assume this is because the loads are different. Some being motors, others being AC/DC switching supplies, etc.

I am also sending you a request for a new current board as I am running out of ports (I thought I could just measure one leg of my 220v circuits, but I now see the need for measuring both).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrjens%2FPiPowerMeter%2Fissues%2F1%23issuecomment-364752174&data=02%7C01%7C%7C6e74671eb4fd4f5f78f008d571548b43%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636539530278345726&sdata=GT8NFbOt6N7k9Q8S1RMCE85uy0xu2ga7rcOraAdA%2BDo%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIxkTdwHaHQ9wmYmRu6Zrhasd1asIPiJks5tTu0BgaJpZM4OVAhy&data=02%7C01%7C%7C6e74671eb4fd4f5f78f008d571548b43%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636539530278345726&sdata=oGri3f6c4f%2Bj90t1gX%2BGD4xp%2FauKkdo8Z0cKXXc1NCg%3D&reserved=0.