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

Integration loosing my callback methods after some time #17

Open
wojciechczyz opened this issue May 9, 2021 · 4 comments
Open

Integration loosing my callback methods after some time #17

wojciechczyz opened this issue May 9, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@wojciechczyz
Copy link

wojciechczyz commented May 9, 2021

The problem

After few days my Home Assistant suddenly "looses" callbacks that were exposed by net-daemon intergration.
I am exposing 4 methods such as:

[HomeAssistantServiceCall]
public async Task OpenDoor1(dynamic data)
{...}

they are working happilly dozen of times for few days and then they simply disappear.
When trying to call them from my scripts I get:

Service not found for call_service at pos 1: Unable to find service netdaemon.mutuumairlockapp_opendoor1

When going to:
Developer tools > Services

I stiill see:
NetDaemon - Entity_Create
NetDaemon - Entity_Remove
NetDaemon - Entity_update
NetDaemon - register_service
NetDaemon - reload_apps

but my callbacks are gone.

Restarting NetDaemon docker container solves problem, till next time it occurs.

System health

System Health

version core-2021.5.0
installation_type Home Assistant Container
dev false
hassio false
docker true
virtualenv false
python_version 3.8.9
os_name Linux
os_version 4.19.118
arch aarch64
timezone Europe/Madrid
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Lovelace
dashboards 1
resources 0
views 1
mode yaml

Traceback/Error logs

Additional information

@wojciechczyz wojciechczyz added the bug Something isn't working label May 9, 2021
@helto4real
Copy link
Contributor

helto4real commented May 18, 2021

Thank you for reporting. Do you think this happening when you are installing a new version of HA or restarting HA or does it "just stops working"?

@wojciechczyz
Copy link
Author

Thank you for following up on this, sorry for delay, missed this message.
This happens when HA is restarted, without restarting NetDaemon container.
As soon as I restart also NetDaemon, it reconnects to HA and then my netdaemon service is back.

Is there some bidirectional pinging mechanism in place that makes sure both parties sees each other?
Cheers!

@wojciechczyz
Copy link
Author

Now this error happens more frequent, as netdaemon is installed on one machine and Home Assistant on another one. For one reason or another they are getting out of sync much more frequently now

@helto4real
Copy link
Contributor

Can you point to your code for the app. If you do not want it public, ping me privately. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants