Code Monkey home page Code Monkey logo

Comments (3)

veista avatar veista commented on July 19, 2024

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.

veista avatar veista commented on July 19, 2024

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.

jires avatar jires commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.