Comments (3)
Yes. It is a complicated problem. The main issue is the lack of capabilities of your modbus tcp bridge and/or too slow end devices. There is no clever solution for this. The problem is that you now have two different connections to the bridge and it does not handle it properly.
Trying a different bridge device might solve the problem. Or creating your own. Best solution is to have separate bridge devices so that there is only one connection per modbus network.
Does the device hang completely? Does not anwser to either connection?
from nilan.
Sorry, misread at first. It is surprising it lets you connect to the latter when using a USB adapter. The problem is even more severe when using USB since the COM port only supports one instance. Easier is to use a separate USB adapter.
from nilan.
Yes, I use USB adapter, this one.
Sometimes, when HA starts, Nilan integration fail to start and I need to reload it. Sometimes is starting well but lot of entities for both integrations (the native one and Nilan) goes "Unknown" on and off, and spits errors in log:
2023-07-25 20:31:20.253 ERROR (MainThread) [custom_components.nilan.device] Could not read get_ventilation_state 2023-07-25 20:31:20.349 ERROR (SyncWorker_14) [homeassistant.components.modbus.modbus] Pymodbus: nilanhub: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response 2023-07-25 20:31:20.429 ERROR (MainThread) [custom_components.nilan.device] Could not read get_supply_fan_level 2023-07-25 20:31:20.430 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.nilan_hvac fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 695, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update await self.async_update() File "/config/custom_components/nilan/climate.py", line 183, in async_update elif fan_supply_level > 0: ^^^^^^^^^^^^^^^^^^^^ TypeError: '>' not supported between instances of 'NoneType' and 'int' 2023-07-25 20:31:45.470 WARNING (SyncWorker_19) [pymodbus.logging] Cleanup recv buffer before send: 0x1e 0x3 0x2 0x0 0x2 0xac 0x47 2023-07-25 20:31:45.502 ERROR (SyncWorker_11) [homeassistant.components.modbus.modbus] Pymodbus: Nilan: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response 2023-07-25 20:31:45.534 ERROR (MainThread) [custom_components.nilan.device] Could not read get_ventilation_step 2023-07-25 20:31:45.622 ERROR (SyncWorker_19) [homeassistant.components.modbus.modbus] Pymodbus: nilanhub: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response 2023-07-25 20:31:45.703 ERROR (MainThread) [custom_components.nilan.device] Could not read get_control_state 2023-07-25 20:31:48.392 ERROR (SyncWorker_8) [homeassistant.components.modbus.modbus] Pymodbus: Nilan: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response 2023-07-25 20:31:48.424 ERROR (MainThread) [custom_components.nilan.device] Could not read get_supply_fan_level
I think, the interested part is this:
20:31:45.470 WARNING (SyncWorker_19) [pymodbus.logging] Cleanup recv buffer before send: 0x1e 0x3 0x2 0x0 0x2 0xac 0x47
It looks for me like the adapter is forced to send new command before is done with receiving response from previously send command
Besides Nilan, I have 28 more entities on native integration. When the issue is happening, HA can get maybe 10 values read per update, so is not completely fails.
Using different adapters is not a option for me, house is wired with one bus only, and devices are far away.
Before I installed Nilan integration, everything was connected with native Modbus integration, (with name nilanhub, therefore it show up in logs), but your integration is far more advanced than this I had wrote down in yaml by myself, so I started using yours.
Maybe I should write an enhancement "wish" on HA core Github, so those smart guys can implement some kind of coordinator for pymodbus, when there are coming calls from different integrations on the same physical device, it can be queued somehow..
from nilan.
Related Issues (20)
- If connection fails during setup, integration must be reloaded
- Add support for VGU180 EK HOT 4
- Add support for Nilan CompactS HOT 3
- Fan mode missing from automation actions HOT 2
- Nilan Compact P Air 9 support
- CTS700 on a Compact P HOT 2
- Latest update created orphaned device HOT 6
- Can't initialize integration after 2024.4 HOT 8
- Could not read errors - poss since 1.2.14 HOT 11
- Elfin EW11 HOT 2
- Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.68.122:502] HOT 1
- 1.2.15 causes MODBUS communication to fail HOT 2
- Could not exclusively lock port /dev/ttyUSB0 HOT 1
- Failed to call service HOT 1
- Home Assistant 2023.9 broke Nilan integration - "Failed to set up"
- Doesn't work with 2023.9? HOT 1
- Issues with 2023.9.0 and 2023.9.1 Core update HOT 1
- Feature request - NILAN Gateway integration directly? HOT 1
- Set Fan Level
- Central heating control HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nilan.