Ct_clamp 60 second noise

This is my very first message here. I’m very new at home assistant. Actually, I’m more in the testing stange at the moment. I wish to convert everything from HE to HA. But on the goof testing, I realised that asphome had an integreation to ct_clamp and possibility of using ads1115. I have made my own board a coupleyears ago using an esp32 and ads1115 and about 12 ct clamps. I calibrated everything to an amazingly exactitude to my electric bill.
Anyway, I saw the chance to use the esphome to use my current board and incorporate this to HA. But in testing, I realised that the ct_clamp code is generating a pulse every 60 seconds. I put a scope on the A0 line of the ads1115 and there are no static or anything appearing there every 60 seconds. The signal is clear. I beleive something is wrong with the ct_clamp code. Unfortunatly, I dont know how to get logs of this, I dont know either how I can look at the code and try to debug it. So I’m looking for help on debugging this.
Thanks

Try to find your Esphome dashboard. There you have both your log and code available.

Thank you. But I mean the real code behind the ct_clamp . The c code I guess. What I see in the esphome interface is just parameters. The code behind is where the bug is.

And I believe anyone here gets the best support when posting their yaml and log while the problem occurs.

https://esphome.io/api/ct__clamp__sensor_8h

Just to be sure: you are using the CT Clamp Current Sensor component?
The configuration variable update_interval sets how often the sensor is read, with a default value of 60 seconds, so that could be the reason you see these spikes.
Please show your current ESPHome Yaml code, so that we can better understand what you did.

If you want to see the code behind the ESPHome CT Clamp Sensor you can have a look at the Source code on GitHub.

Yes exactly. The CT Clamp acurrent Sensor. I’ll post the yaml code later on. I’m not home right now.
But i beleive I’ve changed the update_interval to 2 seconds. Looking forward to check this code. Thanks

Yes it is set at 2 seconds. See:

The sens0 sensor is the one I concentrate on. The link to the github is great. Sounds like I have a lot to learn. But I certainly want to get to the bottom of this problem. Unless… It might be easier to take my code I already wrote on an arduino… if there is a way to squeeze that code in an esp32 object. I’m going to start learning the code tonight. but hey!!! any clue would be welcome. I got to find where this glitch come from every 60 seconds.


    # Example configuration entry for ESP32
i2c:
  sda: 21
  scl: 22
  scan: true
  id: bus_a

ads1115:
  - address: 0x48
    continuous_mode: True
    id: ads1115_0

sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 2.048
    name: "ADS1115 Channel A0-GND"
    ads1115_id: ads1115_0 
    id: sens0

  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 2.048
    name: "ADS1115 Channel A1-GND"
    ads1115_id: ads1115_0
    update_interval: 5s
    id: sens1

  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 2.048
    name: "ADS1115 Channel A2-GND"
    ads1115_id: ads1115_0
    id: sens2

  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 2.048
    name: "ADS1115 Channel A3-GND"
    ads1115_id: ads1115_0
    id: sens3

  - platform: ct_clamp
    sensor: sens0  #adc_sensor
    name: "Measured Current 0"
    update_interval: 2s
    sample_duration: 500ms
    accuracy_decimals: 5  
    id: ampere_ct1
    device_class: current
    unit_of_measurement: A  
#    filters:
  #    - calibrate_linear:
          # Measured value of 0 maps to 0A
   #       - 0.0 -> 0
          # Known load: 8.13A
          # Value shown in logs: 0.36A
    #      - 0.36 -> 8.13


  - platform: ct_clamp
    sensor: sens1  #adc_sensor
    name: "Measured Current 1"
    update_interval: 2s
    accuracy_decimals: 4
    device_class: current
    sample_duration: 
      milliseconds: 300



  # Example source sensor
  #- platform: adc
  #  pin: A0
  #  id: adc_sensor




captive_portal:

Code is inconsistent. Ads1115 channel A1 has update_interval 5s and others don’t have interval set (defaults to 60s). What’s the output if you set A0-A3 update_intervals to never or same as ct_clamp interval?

Yes, but remember this is in the experimental stage right now. It is on the bench with only A0 hooked up to a CT. The 2 second is also for test purpose.
If I cannot solve this 60 second pulse, I wont be able to use it.
My plan is

  1. Solve the 60 second pulse
  2. Test the 0 amp reading (looking at the code, i suspect a tiny problem there)
  3. Test the capacity to handle 16 circuits
  4. Add a feature to accumulate precise consumption in kwh

As you see… I’m planing a nice setup.

The thing is I already have all that working just fine in a board I made. I am trying to incorporate it in HA

As you want. Only you know what is connected and what is not.
You get best support here with clean code and log.

Sorry, yes only me know that.
ADS1115
port A0: Connected to CT. No power is circulating in the CT
port A1: Resistor
port A2: open
port A3: open

OK, took the logs, but it sounds like the wireless log might not be adequate. Many lines seems to be missing!

INFO ESPHome 2024.11.1
INFO Reading configuration /config/esphome/energy.yaml...
INFO Starting log output from 192.168.1.25 using esphome API
INFO Successfully connected to energy @ 192.168.1.25 in 0.028s
INFO Successful handshake with energy @ 192.168.1.25 in 0.090s
[09:03:04][I][app:100]: ESPHome version 2024.11.1 compiled on Dec  1 2024, 07:50:52
[09:03:04][C][wifi:600]: WiFi:
[09:03:04][C][wifi:428]:   Local MAC: 40:22:D8:EA:A1:08
[09:03:04][C][wifi:433]:   SSID: 'xxxxxxx'[redacted]
[09:03:04][C][wifi:436]:   IP Address: 192.168.1.25
[09:03:04][C][wifi:440]:   BSSID: B6:B9:8A:4D:25:55[redacted]
[09:03:04][C][wifi:441]:   Hostname: 'energy'
[09:03:04][C][wifi:443]:   Signal strength: -66 dB ▂▄▆█
[09:03:04][C][wifi:447]:   Channel: 8
[09:03:04][C][wifi:448]:   Subnet: 255.255.255.0
[09:03:04][C][wifi:449]:   Gateway: 192.168.1.1
[09:03:04][C][wifi:450]:   DNS1: 192.168.1.1
[09:03:04][C][wifi:451]:   DNS2: 0.0.0.0
[09:03:04][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 56 different samples (112 SPS)
[09:03:04][D][sensor:094]: 'Measured Current 0': Sending state 0.00129 A with 5 decimals of accuracy
[09:03:04][C][logger:185]: Logger:
[09:03:04][C][logger:186]:   Level: DEBUG
[09:03:04][C][logger:188]:   Log Baud Rate: 115200
[09:03:04][C][logger:189]:   Hardware UART: UART0
[09:03:04][C][i2c.arduino:071]: I2C Bus:
[09:03:04][C][i2c.arduino:072]:   SDA Pin: GPIO21
[09:03:04][C][i2c.arduino:073]:   SCL Pin: GPIO22
[09:03:04][C][i2c.arduino:074]:   Frequency: 50000 Hz
[09:03:04][C][i2c.arduino:086]:   Recovery: bus successfully recovered
[09:03:04][I][i2c.arduino:096]: Results from i2c bus scan:
[09:03:04][I][i2c.arduino:102]: Found i2c device at address 0x48
[09:03:04][C][ads1115:073]: Setting up ADS1115...
[09:03:04][C][ads1115:074]:   Address: 0x48
[09:03:04][C][ads1115.sensor:023]:   ADS1115 Sensor 'ADS1115 Channel A0-GND'
[09:03:04][C][ads1115.sensor:023]:     Device Class: 'voltage'
[09:03:04][C][ads1115.sensor:023]:     State Class: 'measurement'
[09:03:04][C][ads1115.sensor:023]:     Unit of Measurement: 'V'
[09:03:04][C][ads1115.sensor:023]:     Accuracy Decimals: 3
[09:03:04][C][ads1115.sensor:024]:     Multiplexer: 4
[09:03:04][C][ads1115.sensor:025]:     Gain: 2
[09:03:04][C][ads1115.sensor:026]:     Resolution: 16
[09:03:04][C][ads1115.sensor:023]:   ADS1115 Sensor 'ADS1115 Channel A1-GND'
[09:03:04][C][ads1115.sensor:023]:     Device Class: 'voltage'
[09:03:04][C][ads1115.sensor:023]:     State Class: 'measurement'
[09:03:04][C][ads1115.sensor:023]:     Unit of Measurement: 'V'
[09:03:04][C][ads1115.sensor:023]:     Accuracy Decimals: 3
[09:03:04][C][ads1115.sensor:024]:     Multiplexer: 5
[09:03:04][C][ads1115.sensor:025]:     Gain: 2
[09:03:04][C][ads1115.sensor:026]:     Resolution: 16
[09:03:04][C][ads1115.sensor:023]:   ADS1115 Sensor 'ADS1115 Channel A2-GND'
[09:03:05][C][ads1115.sensor:023]:     Device Class: 'voltage'
[09:03:05][C][ads1115.sensor:023]:     State Class: 'measurement'
[09:03:05][C][ads1115.sensor:023]:     Unit of Measurement: 'V'
[09:03:05][C][ads1115.sensor:023]:     Accuracy Decimals: 3
[09:03:05][C][ads1115.sensor:024]:     Multiplexer: 6
[09:03:05][C][ads1115.sensor:025]:     Gain: 2
[09:03:05][C][ads1115.sensor:026]:     Resolution: 16
[09:03:05][C][ads1115.sensor:023]:   ADS1115 Sensor 'ADS1115 Channel A3-GND'
[09:03:05][C][ads1115.sensor:023]:     Device Class: 'voltage'
[09:03:05][C][ads1115.sensor:023]:     State Class: 'measurement'
[09:03:05][C][ads1115.sensor:023]:     Unit of Measurement: 'V'
[09:03:05][C][ads1115.sensor:023]:     Accuracy Decimals: 3
[09:03:05][C][ads1115.sensor:024]:     Multiplexer: 7
[09:03:05][C][ads1115.sensor:025]:     Gain: 2
[09:03:05][C][ads1115.sensor:026]:     Resolution: 16
[09:03:05][C][ct_clamp:013]: CT Clamp Sensor 'Measured Current 0'
[09:03:05][C][ct_clamp:013]:   Device Class: 'current'
[09:03:05][C][ct_clamp:013]:   State Class: 'measurement'
[09:03:05][C][ct_clamp:013]:   Unit of Measurement: 'A'
[09:03:05][C][ct_clamp:013]:   Accuracy Decimals: 5
[09:03:05][C][ct_clamp:014]:   Sample Duration: 0.50s
[09:03:05][C][ct_clamp:015]:   Update Interval: 2.0s
[09:03:05][C][ct_clamp:013]: CT Clamp Sensor 'Measured Current 1'
[09:03:05][C][ct_clamp:013]:   Device Class: 'current'
[09:03:05][C][ct_clamp:013]:   State Class: 'measurement'
[09:03:05][C][ct_clamp:013]:   Unit of Measurement: 'A'
[09:03:05][C][ct_clamp:013]:   Accuracy Decimals: 4
[09:03:05][C][ct_clamp:014]:   Sample Duration: 0.30s
[09:03:05][C][ct_clamp:015]:   Update Interval: 2.0s
[09:03:05][C][captive_portal:089]: Captive Portal:
[09:03:05][C][mdns:116]: mDNS:
[09:03:05][C][mdns:117]:   Hostname: energy
[09:03:05][C][esphome.ota:073]: Over-The-Air updates:
[09:03:05][C][esphome.ota:074]:   Address: energy.local:3232
[09:03:05][C][esphome.ota:075]:   Version: 2
[09:03:05][C][esphome.ota:078]:   Password configured
[09:03:05][C][safe_mode:018]: Safe Mode:
[09:03:05][C][safe_mode:020]:   Boot considered successful after 60 seconds
[09:03:05][C][safe_mode:021]:   Invoke after 10 boot attempts
[09:03:05][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[09:03:05][C][api:140]: API Server:
[09:03:05][C][api:141]:   Address: energy.local:6053
[09:03:05][C][api:143]:   Using noise encryption: YES
[09:03:06][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.002A after 26 different samples (86 SPS)
[09:03:06][D][sensor:094]: 'Measured Current 1': Sending state 0.00163 A with 4 decimals of accuracy
[09:03:06][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:03:06][D][sensor:094]: 'Measured Current 0': Sending state 0.00118 A with 5 decimals of accuracy
[09:03:08][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028500V
[09:03:08][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02850 V with 3 decimals of accuracy
[09:03:08][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:08][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:08][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 102 different samples (204 SPS)
[09:03:08][D][sensor:094]: 'Measured Current 0': Sending state 0.00079 A with 5 decimals of accuracy
[09:03:10][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:10][D][sensor:094]: 'Measured Current 1': Sending state 0.00029 A with 4 decimals of accuracy
[09:03:10][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 105 different samples (210 SPS)
[09:03:10][D][sensor:094]: 'Measured Current 0': Sending state 0.00069 A with 5 decimals of accuracy
[09:03:12][D][ads1115.sensor:017]: 'ADS1115 Channel A2-GND': Got Voltage=1.028937V
[09:03:12][D][sensor:094]: 'ADS1115 Channel A2-GND': Sending state 1.02894 V with 3 decimals of accuracy
[09:03:12][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 24 different samples (80 SPS)
[09:03:12][D][sensor:094]: 'Measured Current 1': Sending state 0.00138 A with 4 decimals of accuracy
[09:03:12][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.100A after 95 different samples (190 SPS)
[09:03:12][D][sensor:094]: 'Measured Current 0': Sending state 0.10005 A with 5 decimals of accuracy
[09:03:13][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028500V
[09:03:13][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02850 V with 3 decimals of accuracy
[09:03:14][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 25 different samples (83 SPS)
[09:03:14][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:14][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 93 different samples (186 SPS)
[09:03:14][D][sensor:094]: 'Measured Current 0': Sending state 0.00080 A with 5 decimals of accuracy
[09:03:15][D][ads1115.sensor:017]: 'ADS1115 Channel A3-GND': Got Voltage=1.028125V
[09:03:15][D][sensor:094]: 'ADS1115 Channel A3-GND': Sending state 1.02813 V with 3 decimals of accuracy
[09:03:16][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 28 different samples (93 SPS)
[09:03:16][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:16][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.091A after 102 different samples (204 SPS)
[09:03:16][D][sensor:094]: 'Measured Current 0': Sending state 0.09109 A with 5 decimals of accuracy
[09:03:18][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028312V
[09:03:18][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02831 V with 3 decimals of accuracy
[09:03:18][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:03:18][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:18][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 95 different samples (190 SPS)
[09:03:18][D][sensor:094]: 'Measured Current 0': Sending state 0.00094 A with 5 decimals of accuracy
[09:03:20][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:03:20][D][sensor:094]: 'Measured Current 1': Sending state 0.00015 A with 4 decimals of accuracy
[09:03:20][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 97 different samples (194 SPS)
[09:03:20][D][sensor:094]: 'Measured Current 0': Sending state 0.00071 A with 5 decimals of accuracy
[09:03:22][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:03:22][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:22][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 100 different samples (200 SPS)
[09:03:22][D][sensor:094]: 'Measured Current 0': Sending state 0.00059 A with 5 decimals of accuracy
[09:03:23][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028563V
[09:03:23][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02856 V with 3 decimals of accuracy
[09:03:24][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 24 different samples (80 SPS)
[09:03:24][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:24][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:03:24][D][sensor:094]: 'Measured Current 0': Sending state 0.00123 A with 5 decimals of accuracy
[09:03:26][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:26][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:26][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 95 different samples (190 SPS)
[09:03:26][D][sensor:094]: 'Measured Current 0': Sending state 0.00072 A with 5 decimals of accuracy
[09:03:28][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028000V
[09:03:28][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02800 V with 3 decimals of accuracy
[09:03:28][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 24 different samples (80 SPS)
[09:03:28][D][sensor:094]: 'Measured Current 1': Sending state 0.00035 A with 4 decimals of accuracy
[09:03:28][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:03:28][D][sensor:094]: 'Measured Current 0': Sending state 0.00084 A with 5 decimals of accuracy
[09:03:30][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:03:30][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:30][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 102 different samples (204 SPS)
[09:03:30][D][sensor:094]: 'Measured Current 0': Sending state 0.00078 A with 5 decimals of accuracy
[09:03:32][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:32][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:32][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 95 different samples (190 SPS)
[09:03:32][D][sensor:094]: 'Measured Current 0': Sending state 0.00040 A with 5 decimals of accuracy
[09:03:33][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028250V
[09:03:33][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02825 V with 3 decimals of accuracy
[09:03:34][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:34][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:34][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 92 different samples (184 SPS)
[09:03:34][D][sensor:094]: 'Measured Current 0': Sending state 0.00128 A with 5 decimals of accuracy
[09:03:36][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 25 different samples (83 SPS)
[09:03:36][D][sensor:094]: 'Measured Current 1': Sending state 0.00093 A with 4 decimals of accuracy
[09:03:36][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 95 different samples (190 SPS)
[09:03:36][D][sensor:094]: 'Measured Current 0': Sending state 0.00042 A with 5 decimals of accuracy
[09:03:38][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028125V
[09:03:38][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02813 V with 3 decimals of accuracy
[09:03:38][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 25 different samples (83 SPS)
[09:03:38][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:38][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 95 different samples (190 SPS)
[09:03:38][D][sensor:094]: 'Measured Current 0': Sending state 0.00086 A with 5 decimals of accuracy
[09:03:40][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 26 different samples (86 SPS)
[09:03:40][D][sensor:094]: 'Measured Current 1': Sending state 0.00136 A with 4 decimals of accuracy
[09:03:40][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 103 different samples (206 SPS)
[09:03:40][D][sensor:094]: 'Measured Current 0': Sending state 0.00097 A with 5 decimals of accuracy
[09:03:42][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:42][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:42][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 107 different samples (214 SPS)
[09:03:42][D][sensor:094]: 'Measured Current 0': Sending state 0.00037 A with 5 decimals of accuracy
[09:03:43][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028500V
[09:03:43][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02850 V with 3 decimals of accuracy
[09:03:44][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 28 different samples (93 SPS)
[09:03:44][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:44][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 104 different samples (208 SPS)
[09:03:44][D][sensor:094]: 'Measured Current 0': Sending state 0.00119 A with 5 decimals of accuracy
[09:03:46][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 28 different samples (93 SPS)
[09:03:46][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:46][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 106 different samples (212 SPS)
[09:03:46][D][sensor:094]: 'Measured Current 0': Sending state 0.00050 A with 5 decimals of accuracy
[09:03:48][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028312V
[09:03:48][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02831 V with 3 decimals of accuracy
[09:03:48][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:48][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:48][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 102 different samples (204 SPS)
[09:03:48][D][sensor:094]: 'Measured Current 0': Sending state 0.00089 A with 5 decimals of accuracy
[09:03:50][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:50][D][sensor:094]: 'Measured Current 1': Sending state 0.00015 A with 4 decimals of accuracy
[09:03:50][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 102 different samples (204 SPS)
[09:03:50][D][sensor:094]: 'Measured Current 0': Sending state 0.00119 A with 5 decimals of accuracy
[09:03:52][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:52][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:03:52][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 94 different samples (188 SPS)
[09:03:52][D][sensor:094]: 'Measured Current 0': Sending state 0.00037 A with 5 decimals of accuracy
[09:03:53][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028500V
[09:03:53][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02850 V with 3 decimals of accuracy
[09:03:54][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:03:54][D][sensor:094]: 'Measured Current 1': Sending state 0.00014 A with 4 decimals of accuracy
[09:03:54][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 103 different samples (206 SPS)
[09:03:54][D][sensor:094]: 'Measured Current 0': Sending state 0.00111 A with 5 decimals of accuracy
[09:03:56][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 25 different samples (83 SPS)
[09:03:56][D][sensor:094]: 'Measured Current 1': Sending state 0.00040 A with 4 decimals of accuracy
[09:03:56][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 102 different samples (204 SPS)
[09:03:56][D][sensor:094]: 'Measured Current 0': Sending state 0.00022 A with 5 decimals of accuracy
[09:03:58][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028500V
[09:03:58][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02850 V with 3 decimals of accuracy
[09:03:58][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 26 different samples (86 SPS)
[09:03:58][D][sensor:094]: 'Measured Current 1': Sending state 0.00094 A with 4 decimals of accuracy
[09:03:58][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 97 different samples (194 SPS)
[09:03:58][D][sensor:094]: 'Measured Current 0': Sending state 0.00107 A with 5 decimals of accuracy
[09:03:58][D][ads1115.sensor:017]: 'ADS1115 Channel A0-GND': Got Voltage=1.027688V
[09:03:58][D][sensor:094]: 'ADS1115 Channel A0-GND': Sending state 1.02769 V with 3 decimals of accuracy
[09:04:00][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:04:00][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:00][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 103 different samples (206 SPS)
[09:04:00][D][sensor:094]: 'Measured Current 0': Sending state 0.00085 A with 5 decimals of accuracy
[09:04:02][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 28 different samples (93 SPS)
[09:04:02][D][sensor:094]: 'Measured Current 1': Sending state 0.00015 A with 4 decimals of accuracy
[09:04:02][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 100 different samples (200 SPS)
[09:04:02][D][sensor:094]: 'Measured Current 0': Sending state 0.00061 A with 5 decimals of accuracy
[09:04:03][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028188V
[09:04:03][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02819 V with 3 decimals of accuracy
[09:04:04][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:04][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:04][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:04:04][D][sensor:094]: 'Measured Current 0': Sending state 0.00091 A with 5 decimals of accuracy
[09:04:06][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 25 different samples (83 SPS)
[09:04:06][D][sensor:094]: 'Measured Current 1': Sending state 0.00130 A with 4 decimals of accuracy
[09:04:06][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 98 different samples (196 SPS)
[09:04:06][D][sensor:094]: 'Measured Current 0': Sending state 0.00055 A with 5 decimals of accuracy
[09:04:08][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028375V
[09:04:08][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02838 V with 3 decimals of accuracy
[09:04:08][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:08][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:08][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 105 different samples (210 SPS)
[09:04:08][D][sensor:094]: 'Measured Current 0': Sending state 0.00058 A with 5 decimals of accuracy
[09:04:10][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:10][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:10][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 103 different samples (206 SPS)
[09:04:10][D][sensor:094]: 'Measured Current 0': Sending state 0.00081 A with 5 decimals of accuracy
[09:04:12][D][ads1115.sensor:017]: 'ADS1115 Channel A2-GND': Got Voltage=1.028563V
[09:04:12][D][sensor:094]: 'ADS1115 Channel A2-GND': Sending state 1.02856 V with 3 decimals of accuracy
[09:04:12][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.192A after 24 different samples (80 SPS)
[09:04:12][D][sensor:094]: 'Measured Current 1': Sending state 0.19186 A with 4 decimals of accuracy
[09:04:12][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.098A after 95 different samples (190 SPS)
[09:04:12][D][sensor:094]: 'Measured Current 0': Sending state 0.09797 A with 5 decimals of accuracy
[09:04:13][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028188V
[09:04:13][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02819 V with 3 decimals of accuracy
[09:04:14][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:04:14][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:14][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 94 different samples (188 SPS)
[09:04:14][D][sensor:094]: 'Measured Current 0': Sending state 0.00091 A with 5 decimals of accuracy
[09:04:15][D][ads1115.sensor:017]: 'ADS1115 Channel A3-GND': Got Voltage=1.028062V
[09:04:15][D][sensor:094]: 'ADS1115 Channel A3-GND': Sending state 1.02806 V with 3 decimals of accuracy
[09:04:16][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:16][D][sensor:094]: 'Measured Current 1': Sending state 0.00037 A with 4 decimals of accuracy
[09:04:16][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.091A after 103 different samples (206 SPS)
[09:04:16][D][sensor:094]: 'Measured Current 0': Sending state 0.09136 A with 5 decimals of accuracy
[09:04:18][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028062V
[09:04:18][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02806 V with 3 decimals of accuracy
[09:04:18][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:18][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:18][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 100 different samples (200 SPS)
[09:04:18][D][sensor:094]: 'Measured Current 0': Sending state 0.00061 A with 5 decimals of accuracy
[09:04:20][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 27 different samples (90 SPS)
[09:04:20][D][sensor:094]: 'Measured Current 1': Sending state 0.00092 A with 4 decimals of accuracy
[09:04:20][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.000A after 103 different samples (206 SPS)
[09:04:20][D][sensor:094]: 'Measured Current 0': Sending state 0.00044 A with 5 decimals of accuracy
[09:04:22][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 23 different samples (76 SPS)
[09:04:22][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:22][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 95 different samples (190 SPS)
[09:04:22][D][sensor:094]: 'Measured Current 0': Sending state 0.00068 A with 5 decimals of accuracy
[09:04:23][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028188V
[09:04:23][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02819 V with 3 decimals of accuracy
[09:04:24][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 25 different samples (83 SPS)
[09:04:24][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:24][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:04:24][D][sensor:094]: 'Measured Current 0': Sending state 0.00104 A with 5 decimals of accuracy
[09:04:26][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 27 different samples (90 SPS)
[09:04:26][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:26][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 107 different samples (214 SPS)
[09:04:26][D][sensor:094]: 'Measured Current 0': Sending state 0.00069 A with 5 decimals of accuracy
[09:04:28][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028437V
[09:04:28][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02844 V with 3 decimals of accuracy
[09:04:28][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 25 different samples (83 SPS)
[09:04:28][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:28][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 101 different samples (202 SPS)
[09:04:28][D][sensor:094]: 'Measured Current 0': Sending state 0.00072 A with 5 decimals of accuracy
[09:04:30][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.001A after 25 different samples (83 SPS)
[09:04:30][D][sensor:094]: 'Measured Current 1': Sending state 0.00088 A with 4 decimals of accuracy
[09:04:30][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 103 different samples (206 SPS)
[09:04:30][D][sensor:094]: 'Measured Current 0': Sending state 0.00083 A with 5 decimals of accuracy
[09:04:32][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:04:32][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:32][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 96 different samples (192 SPS)
[09:04:32][D][sensor:094]: 'Measured Current 0': Sending state 0.00072 A with 5 decimals of accuracy
[09:04:33][D][ads1115.sensor:017]: 'ADS1115 Channel A1-GND': Got Voltage=1.028312V
[09:04:33][D][sensor:094]: 'ADS1115 Channel A1-GND': Sending state 1.02831 V with 3 decimals of accuracy
[09:04:34][D][ct_clamp:042]: 'Measured Current 1' - Raw AC Value: 0.000A after 26 different samples (86 SPS)
[09:04:34][D][sensor:094]: 'Measured Current 1': Sending state 0.00000 A with 4 decimals of accuracy
[09:04:34][D][ct_clamp:042]: 'Measured Current 0' - Raw AC Value: 0.001A after 101 different samples (202 SPS)
[09:04:34][D][sensor:094]: 'Measured Current 0': Sending state 0.00117 A with 5 decimals of accuracy

Too messy, clean the code, leave just the channel and ct_clamp you are testing.
Observe what you get on that moment it presents the “pulse”

Your log doesn’t even output A0.

Yes I know. A0 is in the log once only. That is why I think there are missing lines.

Ok I’ll clean the code…

ok, I found what is causing the problem. I need to understand the relation. The problem was caused by A2 and A3 being open. If I put a 10k resistor on their lines, the noise on A0 current disappear.

How an open A3 line can cause the false reading of A0?

For that you need to read the source code…
Anyway, it’s not noise, it’s still related to default 60s update interval.

Solved for now. Not sure why but anyway, after installing pull down resistors on unused entry of the ads1115 the problem went away. I’ll look in the code to understand why and if I find something I’ll open another ticket.
A special thanks to Karosm for pushing me to clean my code. This is how I was able to pinpoint the problem.