8000 Modbus sensors go unavailable after `modbus.reload` · Issue #75100 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Modbus sensors go unavailable after modbus.reload #75100

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

Closed
bjeanes opened this issue Jul 13, 2022 · 8 comments
Closed

Modbus sensors go unavailable after modbus.reload #75100

bjeanes opened this issue Jul 13, 2022 · 8 comments
Assignees

Comments

@bjeanes
Copy link
bjeanes commented Jul 13, 2022

The problem

Calling modbus.reload service (or hitting Modbus under YAML Reloading in dev tools) does not re-open the modbus connection.

Further, modbus.restart does not work after having called reload (but does prior).

I have tested this on a local dev container after discovering it on my own installation (running 2022.7.3), so this exists in main as of today.

Likely related to #68161

What version of Home Assistant Core has the issue?

2022.8.0.dev0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

modbus

Link to integration documentation on our website

https://www.home-assistant.io/integrations/modbus/

Diagnostics information

There is no integration which shows up in UI when using Modbus as far as I can tell.

The logs show these two lines when running the service:

2022-07-13 01:50:31.842 INFO (MainThread) [homeassistant.components.modbus] Modbus reloading
2022-07-13 01:50:35.603 WARNING (MainThread) [homeassistant.components.modbus.modbus] modbus Sungrow communication closed

Subsequent calls just output:

2022-07-13 01:56:36.446 INFO (MainThread) [homeassistant.components.modbus] Modbus reloading

Example YAML snippet

modbus:
  - name: SungrowInverter
    type: tcp
    host: !secret solar_inverter_ip
    port: 502
    sensors: # address is -1 from the documented register
      - name: Inverter PV Power
        slave: 1
        address: 5016 # 5017
        input_type: input
        count: 2
        data_type: uint32
        swap: word
        precision: 0
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        scale: 1
        scan_interval: 10

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

modbus documentation
modbus source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @adamchengtkc, @janiversen, @vzahradnik, mind taking a look at this issue as it has been labeled with an integration (modbus) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@go2sh
Copy link
go2sh commented Jul 31, 2022

I can confirm that with a current installation. Only a complete restart works.

@SenorRodriguez
Copy link

Bump. Same here.

@janiversen
Copy link
Member

I will get around to looking at it soon.

8000

@lausitzer
Copy link

Same here on 2022.10.3 (Docker).

@janiversen
Copy link
Member

Yes it is still on my list. I am working hard on the underlaying library to make the connections a lot stabler.

@janiversen
Copy link
Member

Fixed in #82253 and a duplicate of #82142

Closing.

550A github-actions bot locked and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
0