kellerza / sunsynk

Deye/Sunsynk Inverter Python library and Home Assistant OS Addon
https://kellerza.github.io/sunsynk/
MIT License
194 stars 84 forks source link

Duplicate Publish Data #91

Closed jackkitley closed 1 year ago

jackkitley commented 1 year ago

Issue related to the Python sunsynk library

Describe the issue/bug

The published data i presume to MQTT isnt changing.

A clear and concise description of what the bug is.

Expected behavior

Expect the data to be constantly changing and publishing. Seems that its almost stuck

Logs (if applicable)

2023-01-27 13:16:15,182 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:16:15,244 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:16:25,077 ERROR   Timeout reading: 
2023-01-27 13:17:24,415 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:17:24,467 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:17:24,528 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:17:34,366 ERROR   Timeout reading: 
2023-01-27 13:18:43,654 ERROR   Timeout reading: 
2023-01-27 13:19:43,000 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:19:43,052 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:19:52,942 ERROR   Timeout reading: 
2023-01-27 13:20:52,285 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:21:02,232 ERROR   Timeout reading: 
2023-01-27 13:22:11,523 ERROR   Timeout reading: 
2023-01-27 13:23:10,869 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:23:10,920 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:23:20,815 ERROR   Timeout reading: 
2023-01-27 13:24:30,104 ERROR   Timeout reading: 
2023-01-27 13:25:29,437 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:25:29,489 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:25:29,549 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:25:29,600 DEBUG   Request registers: [96, 97] glen=2. Response [683, 0] len=2. regs={96: 683, 97: 0}
2023-01-27 13:25:29,649 DEBUG   Request registers: [184] glen=1. Response [100] len=1. regs={184: 100}
2023-01-27 13:25:29,649 DEBUG   Total PV Power=68.3kWh (683, 0)
2023-01-27 13:25:29,650 DEBUG   Total Battery Charge=36.8kWh (368, 0)
2023-01-27 13:25:29,650 DEBUG   Total Battery Discharge=28kWh (280, 0)
2023-01-27 13:25:29,651 DEBUG   Total Grid Export=0.9kWh (9, 0)
2023-01-27 13:25:29,651 DEBUG   Total Grid Import=56.7kWh (567, 0)
2023-01-27 13:25:29,652 DEBUG   Battery SOC=100% (100,)
2023-01-27 13:25:29,655 DEBUG   Total PV Power:last over 1 samples = 68.3
2023-01-27 13:25:29,655 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_pv_power, 68.3
2023-01-27 13:25:29,662 DEBUG   Total Battery Charge:last over 1 samples = 36.8
2023-01-27 13:25:29,663 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_charge, 36.8
2023-01-27 13:25:29,669 DEBUG   Total Battery Discharge:last over 1 samples = 28
2023-01-27 13:25:29,669 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_discharge, 28
2023-01-27 13:25:29,672 DEBUG   Total Grid Export:last over 1 samples = 0.9
2023-01-27 13:25:29,672 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_export, 0.9
2023-01-27 13:25:29,675 DEBUG   Total Grid Import:last over 1 samples = 56.7
2023-01-27 13:25:29,676 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_import, 56.7
2023-01-27 13:25:29,679 DEBUG   Battery SOC:last over 1 samples = 100
2023-01-27 13:25:29,679 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/battery_soc, 100
2023-01-27 13:26:29,719 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:26:39,675 ERROR   Timeout reading: 
2023-01-27 13:27:39,018 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:27:48,970 ERROR   Timeout reading: 
2023-01-27 13:28:48,316 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:28:48,367 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:28:58,256 ERROR   Timeout reading: 
2023-01-27 13:29:57,600 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:29:57,651 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:29:57,712 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:29:57,763 DEBUG   Request registers: [96, 97] glen=2. Response [683, 0] len=2. regs={96: 683, 97: 0}
2023-01-27 13:29:57,810 DEBUG   Request registers: [184] glen=1. Response [100] len=1. regs={184: 100}
2023-01-27 13:29:57,811 DEBUG   Total PV Power=68.3kWh (683, 0)
2023-01-27 13:29:57,811 DEBUG   Total Battery Charge=36.8kWh (368, 0)
2023-01-27 13:29:57,812 DEBUG   Total Battery Discharge=28kWh (280, 0)
2023-01-27 13:29:57,812 DEBUG   Total Grid Export=0.9kWh (9, 0)
2023-01-27 13:29:57,813 DEBUG   Total Grid Import=56.7kWh (567, 0)
2023-01-27 13:29:57,813 DEBUG   Battery SOC=100% (100,)
2023-01-27 13:29:57,816 DEBUG   Total PV Power:last over 1 samples = 68.3
2023-01-27 13:29:57,816 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_pv_power, 68.3
2023-01-27 13:29:57,824 DEBUG   Total Battery Charge:last over 1 samples = 36.8
2023-01-27 13:29:57,825 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_charge, 36.8
2023-01-27 13:29:57,830 DEBUG   Total Battery Discharge:last over 1 samples = 28
2023-01-27 13:29:57,831 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_discharge, 28
2023-01-27 13:29:57,834 DEBUG   Total Grid Export:last over 1 samples = 0.9
2023-01-27 13:29:57,835 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_export, 0.9
2023-01-27 13:29:57,838 DEBUG   Total Grid Import:last over 1 samples = 56.7
2023-01-27 13:29:57,838 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_import, 56.7
2023-01-27 13:29:57,842 DEBUG   Battery SOC:last over 1 samples = 100
2023-01-27 13:29:57,842 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/battery_soc, 100
2023-01-27 13:30:57,878 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:30:57,929 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:30:57,990 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:30:58,041 DEBUG   Request registers: [96, 97] glen=2. Response [683, 0] len=2. regs={96: 683, 97: 0}
2023-01-27 13:30:58,105 DEBUG   Request registers: [184] glen=1. Response [100] len=1. regs={184: 100}
2023-01-27 13:30:58,106 DEBUG   Total PV Power=68.3kWh (683, 0)
2023-01-27 13:30:58,107 DEBUG   Total Battery Charge=36.8kWh (368, 0)
2023-01-27 13:30:58,108 DEBUG   Total Battery Discharge=28kWh (280, 0)
2023-01-27 13:30:58,108 DEBUG   Total Grid Export=0.9kWh (9, 0)
2023-01-27 13:30:58,109 DEBUG   Total Grid Import=56.7kWh (567, 0)
2023-01-27 13:30:58,110 DEBUG   Battery SOC=100% (100,)
2023-01-27 13:30:58,114 DEBUG   Total PV Power:last over 1 samples = 68.3
2023-01-27 13:30:58,115 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_pv_power, 68.3
2023-01-27 13:30:58,119 DEBUG   Total Battery Charge:last over 1 samples = 36.8
2023-01-27 13:30:58,120 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_charge, 36.8
2023-01-27 13:30:58,125 DEBUG   Total Battery Discharge:last over 1 samples = 28
2023-01-27 13:30:58,125 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_battery_discharge, 28
2023-01-27 13:30:58,128 DEBUG   Total Grid Export:last over 1 samples = 0.9
2023-01-27 13:30:58,129 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_export, 0.9
2023-01-27 13:30:58,132 DEBUG   Total Grid Import:last over 1 samples = 56.7
2023-01-27 13:30:58,133 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/total_grid_import, 56.7
2023-01-27 13:30:58,136 DEBUG   Battery SOC:last over 1 samples = 100
2023-01-27 13:30:58,136 DEBUG   PUBLISH 0 SUNSYNK/status/2209132325/battery_soc, 100
2023-01-27 13:31:58,156 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:31:58,207 DEBUG   Request registers: [78] glen=1. Response [567] len=1. regs={78: 567}
2023-01-27 13:31:58,271 DEBUG   Request registers: [80, 81, 82] glen=3. Response [0, 9, 0] len=3. regs={80: 0, 81: 9, 82: 0}
2023-01-27 13:32:08,105 ERROR   Timeout reading: 
2023-01-27 13:33:07,443 DEBUG   Request registers: [72, 73, 74, 75] glen=4. Response [368, 0, 280, 0] len=4. regs={72: 368, 73: 0, 74: 280, 75: 0}
2023-01-27 13:33:17,397 ERROR   Timeout reading: 
jackkitley commented 1 year ago

Coming back to this. The more sensors i added the quicker data started to come through. It seems more fluid now.