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

First ping works, subsequent ones never reach Healthcheck.io #13

Closed
quanturium opened this issue Jan 14, 2021 · 4 comments · Fixed by #21
Closed

First ping works, subsequent ones never reach Healthcheck.io #13

quanturium opened this issue Jan 14, 2021 · 4 comments · Fixed by #21

Comments

@quanturium
Copy link

quanturium commented Jan 14, 2021

I've set up the plugin from HACS and the first ping works correctly. Any subsequence ping never reached their server.

Here are the logs I've found from home-assistant.log

2021-01-13 16:53:55 ERROR (MainThread) [custom_components.healthchecksio] Could not update data - 
2021-01-13 16:53:55 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up healthchecksio platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/healthchecksio/binary_sensor.py", line 17, in async_setup_entry
    for check in hass.data[DOMAIN_DATA]["data"].get("checks", []):
KeyError: 'data'

EDIT: I was able to repro this on the previous and current version of this integration

@ishalem
Copy link

ishalem commented Jan 27, 2021

I have the same issue

@clockiee
Copy link

clockiee commented Mar 4, 2021

Hello I seem to be having the same problem as the two above, is there a work around or am I missing a setting? Any help would be appreciated so much

@quanturium
Copy link
Author

If you're only using this extension to send a ping to healthcheck.io, an alternative and much simple solution is this:

configuration.yaml

rest_command:
  healthcheckio:
    url: HEALTHCHECKIO_URL (e.g. https://hc-ping.com/xxxxxx)
    method: GET

automation.yaml

- id: "1610586454189"
  alias: Healthcheckio ping
  description: ""
  trigger:
    - platform: time_pattern
      minutes: "/2"
  condition: []
  action:
    - service: rest_command.healthcheckio
      data: {}
  mode: single

This will send a ping every other minute to your healhcheckio endpoint.

@clockiee
Copy link

clockiee commented Mar 5, 2021

That's what I ended up doing and now it's working thank you

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

Successfully merging a pull request may close this issue.

3 participants