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

Error 405 with remove_known_device #62

Open
tongaimaramba opened this issue Sep 22, 2020 · 14 comments
Open

Error 405 with remove_known_device #62

tongaimaramba opened this issue Sep 22, 2020 · 14 comments
Labels
bug Something isn't working

Comments

@tongaimaramba
Copy link

Hi there, I'd appreciate some guidance on troubleshooting the following:
I'm calling the service self.call_service("monitor/remove_known_device", device="xx:xx:xx:xx:xx:xx", namespace=mqtt) and see in logs:
DEBUG home_presence_app: call_service: mqtt/publish, {'topic': 'monitor/setup/DELETE STATIC DEVICE', 'payload': 'my mac address'}
DEBUG home_presence_app: monitor/setup/DELETE STATIC DEVICE payload: my mac address

But the entities are not deleted in Hass and in the Appdaemon log I see:
WARNING HASS: Error Removing Home Assistant entity sensor.monitor_xyz_conf
WARNING HASS: Code: 405, error: 405: Method Not Allowed

Appreciate any tips for how to solve this.

Thanks!

@Odianosen25
Copy link
Owner

Hello @tongaimaramba,

What version of HA are you using, and is it a new error?

Regards

@tongaimaramba
Copy link
Author

Hi!
This is the first time I was trying out the remove device service.

Note: i've been able to successfully call "add static device" to create new entities, its just removing them that is a problem.

System versions are as below:
Hass v0.115.2
HassOS v4.12
Supervisor v245
Appdaemon 4 v0.3.0
Python v3.8.5

Thanks again!

@Odianosen25
Copy link
Owner

Hello @tongaimaramba,

Hmmm in the latest version, once you remove the device from the config, it should auto delete the device. Now if its not working, possible something had changed in the latest HA, which unfortunately I don't use.

Remove the device, see if it goes out. And if it doesn't well until I upgrade which I honestly wouldn't do anytime soon, am afraid I will have to attend to it later.

Regards

@tongaimaramba
Copy link
Author

OK no problem @Odianosen25, thanks for looking into it.

If you think of any logging or tracing I could try, please let me know, otherwise I'll wait to hear how things look when you upgrade.

By the way I've also found that the entities do disappear after I do a system restart (reboot of the host system, not just a Hass restart). Any clues there?

Thanks

@omayhemo
Copy link

I have this same problem, old entities from a previously renamed monitor 'location' are not getting deleted and I get the 405 error. Latest version of Supervised on Linux.

arch x86_64
chassis desktop
dev false
docker true
docker_version 19.03.8
hassio true
host_os Ubuntu 18.04.4 LTS
installation_type Home Assistant Supervised
os_name Linux
os_version 4.15.0-118-generic
python_version 3.8.5
supervisor 245
timezone America/Chicago
version 0.115.2
virtualenv false

@Odianosen25
Copy link
Owner

@omayhemo,

Hmmm I don't know if I allowed for the cleaning of old devices based on the fact a node's location was changed. Will need to add that to my todo list.

Regards

@Odianosen25 Odianosen25 added the bug Something isn't working label Sep 23, 2020
@omayhemo
Copy link

omayhemo commented Sep 23, 2020

It's definitely trying to clean them out. It's just failing with the 405 error. I'm less familiar with the appdaemon api (ad.ADBase) work than I am directly working with the HASS API.

@omayhemo
Copy link

Is there a manual way to remove them, I can't find them in known devices or in the entities config

@Odianosen25
Copy link
Owner

Then most likely something has changed in the latest HA, and I am not so keen on upgrading, still on like over 20 versions behind.

Will see what I can do in the mean time to test this for a fix.

Regards

@tongaimaramba
Copy link
Author

Is there a manual way to remove them, I can't find them in known devices or in the entities config

Have you tried rebooting the HA host? After I get the 405 error for an entity I tried to remove, if I reboot (not just restart the Hass server) then the entities are gone when everything is back up.

BTW I think I've narrowed this down to the "remove_entity()" function for the HASS API.

@omayhemo
Copy link

Excellent, yes a full reboot got rid of them. Thanks!

@tongaimaramba
Copy link
Author

Then most likely something has changed in the latest HA, and I am not so keen on upgrading, still on like over 20 versions behind.

Will see what I can do in the mean time to test this for a fix.

Regards

Let me know if there's anything I can do/test as I'm already on the latest version. Happy to help.

@Odianosen25
Copy link
Owner

Ok @tongaimaramba thanks. Will look for a possible solution and have you test it.

Regards

@omayhemo
Copy link

omayhemo commented Jan 6, 2021

Still getting this error with every start up. I'm unsure if it affects perf of the system. It seems to stop working after a period of time and has to be restarted at all the satellite devices.

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

3 participants