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

2024.6.2 ping integration broken - returns unavailable state instead of disconnected #119462

Closed
mark007 opened this issue Jun 12, 2024 · 11 comments · Fixed by #119487
Closed

2024.6.2 ping integration broken - returns unavailable state instead of disconnected #119462

mark007 opened this issue Jun 12, 2024 · 11 comments · Fixed by #119487
Assignees

Comments

@mark007
Copy link
Contributor

mark007 commented Jun 12, 2024

The problem

Since 2024.6.2 any ping devices that I have configured report themselves in Unavailable state instead of disconnected when they are not pingable.

This seems to be a breaking change. It has for sure broken many automarions I have.

Requesting it be reverted and brought in maybe as a non backwards compatible change in a future release in some controlled way.

What version of Home Assistant Core has the issue?

core-2024.6.2

What was the last working version of Home Assistant Core?

core-2024.6.1

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ping

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @jpbede, mind taking a look at this issue as it has been labeled with an integration (ping) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ping can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign ping Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ping documentation
ping source
(message by IssueLinks)

@mark007 mark007 changed the title Failed ping returns unavailable state instead of disconnected 2024.6.2 ping integration broken - returns unavailable state instead of disconnected Jun 12, 2024
@jpbede
Copy link
Member

jpbede commented Jun 12, 2024

Could you please check the log? Under normal circumstances, the sensor should still be "disconnected".
Unavailable should occur only when the system can't resolve the hostname or something bad happens.

@mark007
Copy link
Contributor Author

mark007 commented Jun 12, 2024

Hi, thanks for the fast reply.

Yeah I can't see anything in my logs that indicate anything is different to before. I run an automation to force update all of my ping sensors every second which has been working great. It does mean I see these in the logs for devices that are powered off for some time.

But those were also there before.

Logger: homeassistant.helpers.entity_component
Source: helpers/entity_component.py:61
First occurred: 11 June 2024 at 22:36:22 (199914 occurrences)
Last logged: 09:15:40

Forced update failed. Entity binary_sensor.upstairs_bathroom_2_light_pingable not found.
Forced update failed. Entity binary_sensor.work_laptop_pingable not found.

Is the new raised exception in the latest ping code somehow causing it. I always ping the ips directly so there should be no DNS involved.

@jpbede
Copy link
Member

jpbede commented Jun 12, 2024

Could you please turn on the debug log for the ping integration?

@mark007
Copy link
Contributor Author

mark007 commented Jun 12, 2024

Will do. Will report back asap

@mark007
Copy link
Contributor Author

mark007 commented Jun 12, 2024

OK for one particular ip, my living room pc, where it used to show as disconnected, its now showing as Unavailable. Heres the log entries containing this IP after enabling DEBUG in the HA UI for the ping integration.

# cat home-assistant.log | grep 192.168.8.54
2024-06-12 09:38:42.511 DEBUG (MainThread) [homeassistant.components.ping.helpers] Pinging 192.168.8.54 with: `ping -n -q -c 1 -W1 192.168.8.54`
2024-06-12 09:38:43.517 DEBUG (MainThread) [homeassistant.components.ping.helpers] Output of command: `ping -n -q -c 1 -W1 192.168.8.54`, return code: 1:
b'PING 192.168.8.54 (192.168.8.54) 56(84) bytes of data.\n\n--- 192.168.8.54 ping statistics ---\n1 packets transmitted, 0 received, 100% packet loss, time 0ms\n\n'
2024-06-12 09:38:43.517 DEBUG (MainThread) [homeassistant.components.ping.coordinator] Finished fetching Ping 192.168.8.54 data in 1.007 seconds (success: False)
2024-06-12 09:40:03.751 DEBUG (MainThread) [homeassistant.components.ping.helpers] Pinging 192.168.8.54 with: `ping -n -q -c 1 -W1 192.168.8.54`
2024-06-12 09:40:04.756 DEBUG (MainThread) [homeassistant.components.ping.helpers] Output of command: `ping -n -q -c 1 -W1 192.168.8.54`, return code: 1:
b'PING 192.168.8.54 (192.168.8.54) 56(84) bytes of data.\n\n--- 192.168.8.54 ping statistics ---\n1 packets transmitted, 0 received, 100% packet loss, time 0ms\n\n'
2024-06-12 09:40:04.757 DEBUG (MainThread) [homeassistant.components.ping.coordinator] Finished fetching Ping 192.168.8.54 data in 1.005 seconds (success: False)

@mark007
Copy link
Contributor Author

mark007 commented Jun 12, 2024

When I check the homeassistant UI for these ping entities, they mention

'This entity is no longer being provided by the ping integration. If the entity is no longer in use, delete it in settings.'

@jpbede
Copy link
Member

jpbede commented Jun 12, 2024

Okay, thanks, that helped 👍 Will fix this later

@mark007
Copy link
Contributor Author

mark007 commented Jun 12, 2024

Thanks a lot for the super fast response!

@jpbede
Copy link
Member

jpbede commented Jun 12, 2024

You're welcome! Thanks for debugging

@nbarrientos
Copy link
Contributor

Thanks for fixing this, having ping broken was very annoying :/

@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants