Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon reading incorrect data after connection is lost #271

Open
jacekowski opened this issue Apr 14, 2024 · 6 comments
Open

Addon reading incorrect data after connection is lost #271

jacekowski opened this issue Apr 14, 2024 · 6 comments

Comments

@jacekowski
Copy link
Contributor

Issue related to

Sunsynk / mbusd Home Assistant Add-On

Describe the issue/bug

After addon has been running for a while, i get an error in the logs and garbage data starts appearing in HA.

Your environment

My current configuration uses https://www.waveshare.com/wiki/RS232/485/422_TO_POE_ETH_(B) in TCP server mode (UDP mode in it is useless).

It works fine for hours/days and then it doesn't, it looks like it is cause by buffers not being properly flushed

Logs


23:15:32 INFO    Queue update grid_trickle_feed=-100
23:15:32 INFO    Writing sensor grid_trickle_feed=-100 Registers:{206=0xff9c}
23:16:32 INFO    Queue update grid_trickle_feed=-100
23:16:32 INFO    Writing sensor grid_trickle_feed=-100 Registers:{206=0xff9c}
23:17:32 INFO    Queue update grid_trickle_feed=-100
23:17:32 INFO    Writing sensor grid_trickle_feed=-100 Registers:{206=0xff9c}
23:17:51 ERROR   OSError in read_sunsynk: ConnectionException reading 2 registers from 13: Modbus Error: [Connection] Connection lost during request poll_need_to_read
23:18:00 WARNING Did not complete read, only read 2/4
23:18:00 WARNING Did not complete read, only read 4/1
23:18:00 WARNING Did not complete read, only read 1/15
23:18:01 WARNING meter_enable: Unknown register value 10
23:18:01 WARNING Cannot publish Meter Enable: value is None
23:18:08 WARNING Did not complete read, only read 6/1
23:18:08 WARNING Did not complete read, only read 1/4
23:18:10 WARNING Did not complete read, only read 15/1
23:18:14 WARNING Did not complete read, only read 1/2
23:18:14 WARNING Did not complete read, only read 2/6
23:18:16 WARNING Did not complete read, only read 2/1
23:18:16 WARNING Did not complete read, only read 4/6
23:18:16 WARNING Did not complete read, only read 6/4
23:18:28 WARNING Did not complete read, only read 4/1
23:18:30 WARNING Did not complete read, only read 2/1
23:18:30 WARNING Did not complete read, only read 1/15
23:18:31 WARNING meter_enable: Unknown register value 10
23:18:31 WARNING Cannot publish Meter Enable: value is None


@MacieGx
Copy link

MacieGx commented Apr 23, 2024

@jacekowski Could you please send me your configuration in VirCOM? I have similar device RS485 TO POE ETH (B) (Din mounted). But no luck with configurations. Addon can't get any data 😢

nvm fixed. I connected wire to the meter port instead of BMS

@maslyankov
Copy link
Contributor

@jacekowski Could you please send me your configuration in VirCOM? I have similar device RS485 TO POE ETH (B) (Din mounted). But no luck with configurations. Addon can't get any data 😢

nvm fixed. I connected wire to the meter port instead of BMS

Can you upload a screenshot of your RS485 Gateway web config? Are you using Modbus TCP to RTU?

@jacekowski
Copy link
Contributor Author

image

@kellerza
Copy link
Owner

What protocol options do you have under the multi-host options?

@jacekowski
Copy link
Contributor Author

Modbus TCP to RTU and None

@kellerza
Copy link
Owner

An option is to use "serial-tcp://" instead of "tcp://". It will allow you to send RTU-over-TCP from the addon. Then you likely need the protocol set to None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants