lmatula / ha_chint_pm

homeassistant Chint power meter integration
Creative Commons Zero v1.0 Universal
13 stars 7 forks source link

error in log #4

Closed tomasvida closed 1 year ago

tomasvida commented 1 year ago

Hi, I installed the integration, and I can see the data from the electricity meter, but the reading is interrupted

I found this error in log. Logger: homeassistant.util.async Source: util/async.py:166 First occurred: 09:11:00 (2943 occurrences) Last logged: 09:23:53

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 428: quadrant_i = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 432: quadrant_ii = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 436: quadrant_iii = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 440: quadrant_iv = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/init.py, line 342: return self._client.read_input_registers(address, count, **kwargs)

Tato chyba pochází z vlastní integrace.

Logger: pymodbus.logging Source: custom_components/chint_pm/init.py:410 Integration: Chint powermeter DxSU-666-h (documentation, issues) First occurred: 09:13:53 (35 occurrences) Last logged: 09:23:47

Cleanup recv buffer before send: 0x9d 0x3f 0xfb 0xff 0xef 0xbe 0xdb 0xff 0xfd 0xef 0x7f 0xff 0x9f 0xff 0xbb 0xdf 0xfb 0xff 0xf7 0xff 0xfd 0xff 0xfb 0xfd 0xfe 0xff 0xfb 0xbc 0xbf 0xff 0xf9 0x5b 0xb3 0x7d 0xef 0xf6 0x6a 0xff 0xfe 0xff 0xff 0xff 0xee 0xf7 0x46 0xfe 0xff 0xfe 0xfe 0xfd 0xff 0xfe 0xfc 0xc0 0xa4 0xfc 0xff 0xf7 0xff 0xf0 0xfc 0xf8 0x0 0xff 0xfe 0x0 Cleanup recv buffer before send: 0x7f 0xef 0xff 0xf6 0xdd 0xff 0xff 0xcf 0x6f 0xfd 0xfd 0xff 0xff 0xff 0xef 0xff 0xdb 0xfd 0xfc 0xff 0xdf 0xff 0xf9 0x7f 0xff 0x6f 0x75 0xf6 0xab 0xff 0xff 0xfd 0xff 0x7f 0xff 0xff 0xff 0xff 0xfc 0xfc 0xf7 0xff 0xff 0x7f 0xff 0xff 0xfe 0xff 0xdf 0xff 0xff 0xff 0xf7 0xfe 0xff 0xff 0xdf 0xff 0xdf 0x5f 0xfd 0xff 0xff 0xff 0x7f 0xff 0x3f 0xff 0xfd 0xff 0xff 0xe4 0xb6 0xfa Cleanup recv buffer before send: 0xdf 0xfd 0xfb 0xbe 0xbe 0xdf 0xfd 0xff 0xff 0xff 0xff 0xff 0xfe 0xdf 0xff 0xff 0xef 0xfb 0xfe 0xff 0xa7 0xfd 0xff 0xfe 0x77 0xff 0xef 0xfd 0xfe 0xfe 0xfe 0xdf 0xef 0xfc 0xff 0xff 0xfd 0x7f 0xfe 0xff 0xc7 0xff 0xff 0xd0 0xf5 0x7e 0xfb 0xfb 0xdf 0xff 0xff 0xff 0xff 0xfd 0xff 0xff 0xf7 0xfb 0xff 0xd7 0xff 0xfe 0xdf 0xf7 Cleanup recv buffer before send: 0xff 0xff 0xf7 0x7d 0xff 0xff 0x7d 0xef 0xaf 0xdc 0xbb 0xff 0xdf 0xfc 0xaf 0xfb 0xef 0xff 0xff 0xe7 0xf3 0xff 0xff 0xff 0xfe 0xff 0xff 0xff 0xef 0x57 0x5e 0xbb 0xfe 0x77 0xee 0xaf 0xdd 0xdf 0xff 0x3f 0x7f 0xf6 0xff 0xfe 0xff 0xc0 0xff 0xe0 0xff 0xff 0xfd 0xff 0xff 0xfe 0xfe 0x0 0xf8 0xf0 0xff 0xfe 0xff 0x3f 0xfa 0xff 0xf5 0xfe 0xfe 0xde 0xff 0x4c 0x3f 0xfe 0x60 0xf0 0xff 0xb7 0xfb 0xef 0xed 0xee 0xf8 0xff 0xff 0xff 0xf8 0xff 0xfe 0xff 0xfc 0xff 0xfb 0xf0 0xa0 0xea 0xfc 0xfc 0xfc 0xb6 0xe8 0xfc 0xfc 0xfe 0xff 0xfe 0x6e 0x7b 0xf6 0xff 0xfc 0xf7 0xff 0xfb 0xf0 0xfc 0xff 0xfe 0xbc 0xf8 0xff 0xfe 0xff 0xff 0xc3 0xda 0xff 0xf0 0xfc 0xfc 0xfb 0x4 0xfe 0x4 0xbe 0xfe 0xff 0xff 0xfb 0xff 0x0 0xff 0xf8 0xff 0xff 0xfc 0xff 0xfc 0xd4 0xff 0xff 0xf8 0xf7 0xdf 0xff 0xfa 0xff 0xff 0xff 0xc0 0xff 0xe0 0xff 0x75 0x7f 0xdf 0xfb 0xff 0xfa 0xff 0xb7 0xfd 0xfa 0xfe 0xde 0xf7 0xfb 0x7f 0xe7 0xfe 0xfb 0xff 0xff 0xff 0xdb Cleanup recv buffer before send: 0xff 0xfe 0xf8 0xf7 0xee 0xbe 0xf7 0xff 0xef 0xfe 0xff 0xfb 0xfb 0xff 0xfd 0xfe 0xff 0x77 0xff 0xff 0x6c 0xcf 0xf7 0xfb 0xff 0xfe 0x7f 0x79 0xfb 0xdb 0xff 0xdf 0xa7 0xff 0xfb 0xdb 0xfd 0xff 0xef 0xfd 0xff 0xff 0xff 0xfe 0x7f 0xd4 0x7e 0x0 0xf2 0xff 0xfd 0xd6 0xff 0xfe 0xfb 0xff 0xff 0xff 0xff 0x1e 0xfd 0xfc 0xbf 0xff 0xe5 0xfb 0xfe 0xf7 0xfd 0xff 0xe3 0xff 0xff 0xf6 0xfd 0x5e 0xf9 0xf5 0xf7 0x7f 0xff

Logger: homeassistant.util.async Source: util/async.py:166 First occurred: 09:11:00 (3866 occurrences) Last logged: 09:28:08

Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 428: quadrant_i = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 432: quadrant_ii = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 436: quadrant_iii = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 440: quadrant_iv = client.read_holding_registers( Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for solax_modbus doing blocking calls at custom_components/solax_modbus/init.py, line 342: return self._client.read_input_registers(address, count, **kwargs)

lmatula commented 1 year ago

Hi "Detected blocking call to sleep inside the event loop." issue will fix in "async-modbus" branch. The buffer problem maybe conflict solax integration? please try to temporaly disable to solax_modbus (i see logging problem solax_modbus integratin)

tomasvida commented 1 year ago

Yes you are right i am using solax modbus integration. Is there any solution for this? Solax integration only provides me with 29 basic entities, and I have to load the rest of the information from chint. I can try to turn off the solax integration, but that is not the solution. :-(

tomas

tomasvida commented 1 year ago

So I have a new acquaintance. Deleting the solax integration will not help. I have a Drazice inverter (it is a copy of Solax), I can see the data on the solaxcloud.com cloud, and according to the supplier, one of them is actually a Solax inverter. I use a chint to measure the flow from the inverter. In export controls / Mode_Select I have the option Meter. When I turn off the electricity meter measurement (Mode_Select = Disable), your integration starts to work and load data from the inverter, but still intermittently.

LOG: image

lmatula commented 1 year ago

How to connecting your modbus network? do you read chint meter from inverter and also serial adapter?

tomasvida commented 1 year ago

I have waveshare RS485/ETH and yesterday I also tried the serial RS485/USB converter connected directly to the Rpi. https://www.aliexpress.com/item/1005001621816794.html?spm=a2g0o.productlist.main.3.1b0d81e5aggKya&algo_pvid=2534d96d-084c-41c3-a1de-efac11dc1b92&algo_exp_id=2534d96d-084c-41c3-a1de-efac11dc1b92-1&pdp_npi=3%40dis%21CZK%2122.24%2117.75%21%21%21%21%21%40211bc71916862963213562272d07d6%2112000016846594795%21sea%21CZ%21182522184&curPageLogUid=ts4MCrsW0zyg

lmatula commented 1 year ago

Do you connect directly to chint, or connect over inverter? When connected with usb adapapter don't use any other master device?

tomasvida commented 1 year ago

Chint is part of the power plant installation, so it is connected to the inverter. The Waveshare is connected to the chint with approx. 10cm long wires. The second test was the RS485/USB converter and I connected it with approx. 2 m of wire to the inverter side. An interesting insight is that if I have the flow measurement through the chint switched on in the inverter, the integration does not work at all. It only works when I software disable the chint in inverter. but even so it works very poorly with big outages

lmatula commented 1 year ago

Ok, but inverter not passthru or translate modbus registers to different address. (if connect serial adapter to inverter same pins to meter, you have multiple master in modbus network, a serial modbus network must only have one master, and aon or many slave device) I have huawei inverter, when i like read over from inverter i'm only can reading totaly different registers than contins chint spec.

I'm resolving this problem, convert chint to modbus ethernet (modbus ethernet can serve multiple master) HA connect with modbus tcp to chint, huawei inverter connect an modbus/tcp -> modbus serial converter to chint.

if you like to read from inverter, please check solax integration or inverter modbus spec image

I'm using converter as Elfin EE11 and Elfin EW11 from aliexpress