question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SharkIQ Integration loses connection frequently; integration must be reloaded daily.

See original GitHub issue

The problem

My Shark vacuums lose connection with home assistant frequently, approximately once per day (but I have not timed it). They show ‘unavailable’ state. Reloading the integration fixes it immediately and the correct state is shown. From logs it appears to be an authentication issue.

vacuums_before vacuums_after

Environment

  • Home Assistant Core release with the issue: 2020-12-1
  • Last working Home Assistant Core release (if known): never
  • Operating environment (OS/Container/Supervised/Core): Supervised
  • Integration causing this issue: sharkiq
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/sharkiq/

Problem-relevant configuration.yaml

none, set up with UI

Traceback/Error logs

There are over 1200 instances of the word ‘shark’ in my logs, but this seems to be the one causing the problem. If you’d like all of the shark errors I can dive deeper.



2020-12-20 13:16:31 ERROR (MainThread) [homeassistant.components.sharkiq] Error fetching sharkiq data: Ayla Networks API authentication expired.  Re-authenticate and retry.


Additional information

Since this is seemingly an issue with Ayla Networks and not HA, perhaps adding a service to reload the integration without visiting the integrations page would be a good workaround. Then I could simply automate that if my vacuums become unavailable the integration is reloaded.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:58 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
dmatoracommented, Jan 11, 2021

Fixed it with automation that reloads integration once robot becomes unavailable

shell_command:
  shark_restart: "/usr/bin/curl -X 'POST' -H 'authorization: Bearer <token>' http://localhost:8123/api/config/config_entries/entry/<entry>/reload"
alias: SharkIQ
description: ''
trigger:
  - platform: state
    entity_id: vacuum.baby_shark
    to: unavailable
    for: '00:05:00'
condition: []
action:
  - service: shell_command.shark_restart
    data: {}
mode: single

<token> is long lived token I’ve generated in profile section) <entry> is integration id I’ve captured using chrome inspector while reloading integration from gui

8reactions
ajmarkscommented, Jan 29, 2021

Hi guys, sorry again for not fixing this yet, but I wanted to at least give everybody an update. The issue is in the authentication flow. The login credentials are good for 24 hours, and then they need to be refreshed. That refresh is what’s not working, but it is why the workaround of restarting the integration fixes it. I’ve been slammed with a new job the past few months, but I feel really bad that this is still broken, and I’m going to fix this as soon as I can.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disabling/Enabling an Integration automatically
One of my Integrations is Shark IQ. ... SharkIQ Integration loses connection frequently; integration must be reloaded daily.
Read more >
How to resolve connection issues with Shark IQ Robot Self ...
Learn how to resolve any issues you may have connecting your robot to your Wi-Fi network or the app.To learn more, visit sharkclean.com....
Read more >
Shark IQ Robot Vacuum integration stopped working - Reddit
Tried deleting then adding the integration again, it it resulted in the same error.
Read more >
Shark AI Ultra Robot Vacuum, with Matrix Clean, Home ...
Frequently bought together. Shark AI Ultra Robot Vacuum, with Matrix Clean, Home Mapping, 60-Day. +. aoteng Accessories Kit for ...
Read more >
Best Robot Vacuum for Vinyl Plank Floors - TheKingLive
Why is it better? ≫ Strong cleaning performance. ≫ Efficient navigation system. ≫ Can traverse difficult terrains. ≫ Mobile app integration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found