Webhook identification

Just to give my feedback here as my problem seems to be resolved. I was not able to identify the cause even with the updated webhook debug message, but I made a custom component and just increased the text length from 64 chars to a higher number that gave me more information. Turned out it was one of my integrations for mobile application (the official apps). The entities didn’t seem to update although the specific app was in daily use, so something must have been broken. I deleted and re-added it, and I’ve been without these error messages for a week or so now.

Thanks for the support everyone!

Hey. Can you explain how you did this? It’s driving me insane as i have one that keeps doing this and i want to know which one is causing it.

Thanks

Anyone, any ideas?

Hi! My best guess is a mobile app that has gone weird, try to delete and clear all apps and re-install is my best advice since it solved my stuff. I’ve also seen some messages lately which I believe is since I always leave my web browser with HA open. Not sure at all, but think I read somewhere that this may cause messages (since it kindof goes to sleep I think?).

Remember to set logger level to debug for the webhook component to ensure you see all there is to it (either by calling service logger.set_level for the component or by adding it to your configuration.yaml file). It gives you more detailed messages in the log.

If you mean what I did to try to debug it further than default, it was to make a local copy of the Webhook component and put it into my custom_components folder under config. It really shouldn’t be necessary but I had to do it to make something useful out of the logger message since it is limited to 64 chars (see lines 89-93 in init.py). I simply changed this to something larger for the custom component.

1 Like

Thanks for the write up. I didn’t manage to create the custom component but after rummaging through the old files from my install i found out that the culprit was SmartThings from that specific install even though the token was recreated (from what i remember). I’ve deleted all integrations to smartthings and deleted all tokens and i’ll try to recreate them.

I had a similar issue with SmartThings in Home Assistant and I think the steps I took to get into this state were something like:

  • Use Smart Things
  • Remove / Re-add Smart Things
  • Start getting messages about unidentified webhooks
Received message for unregistered webhook <....>

To diagnose this I added the following to my configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.webook: debug

Then when looking at the full logs I could see messages like this:

2021-01-02 18:36:18 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook fbc254bf6a98d5f3d<....> from 192.168.1.202
2021-01-02 18:36:18 DEBUG (MainThread) [homeassistant.components.webhook] b'{"lifecycle":"EVENT","executionId":"b60fdas-<...>'...

To resolve this you need to run the python command line tool in https://www.home-assistant.io/integrations/smartthings/#removal-instructions however that also removes everything so i hacked it up to just let me remove some of them.

I may look into improving the smart things integration to handle removal automatically as that would be a better user experience.

Ah so https://github.com/home-assistant/core/issues/21462 was meant to resolve this for SmartThings. Looks like it failed for some reason. I just tried to add and remove SmartThings and it was able to clean itself up successfully, so maybe it just failed transiently last time, or I was running and older Home Assistant version without this fix.

I fixed it by connecting to the smartthings api and deleting the rogue webhook apps from there :slight_smile:

Yep, I used https://pypi.org/project/hass-smartthings-remove/ and it worked

that didn’t work for me

Have you identified the reported webhook ID as your Smartthings webhook ID?
I have the same issue but my smartthings webhook ID is different than reported in the error message

I’ve deleted all my previous API token on smartthings site, but I still have error messages in every five minutes.

I used a python script form somewhere to query the api and find some hidden tokens, and deleted them.

I have the same issue. Its coming from my Google Home Mini, I used to have the Google Cast integration on this HA instance, but moved it to another and deleted the integration. Still getting these messages after deletion.

2021-03-22 09:47:59 DEBUG (MainThread) [homeassistant.components.webhook] Handling webhook POST payload for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2021-03-22 09:47:59 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from xx.xxx.xxx.xxx

2021-03-22 09:47:59 DEBUG (MainThread) [homeassistant.components.webhook] b’{“requestId”:“xxxxxxxxxxxxxxxxxxxxxxxxxx”,“inputs”:[{"inte’…

BTW, the same exact webhook shows up as being successfully handled by the HA instance that now manages the Google Cast integration.

Maybe this will help someone… The way I tracked it down was I looked at the webhook ID and dropped into a shell at the OS. I searched the files for that entry and it came up with two files (besides the logs) in ./storage.

cd config
find . -type f -exec grep -l kfsdj8s7dfas98dfuas98f7as98fas89dfa89sfa9sfasfasf {} \;

where kfsdj8s7dfas98dfuas98f7as98fas89dfa89sfa9sfasfasf was the webhookID.

Looking into those files I was able to find where it was failing on. In my case it was the Companion app where I previously enabled a few sensors and then turned them off at a later time. I haven’t resolved it yet but clearing the data on that app will likely fix this.

I have this spamming my log files on my new instance of HA with a different IP than my main HA instance, its being sent from my Google Homes that have never been added on this instance. How can I get the Homes from broadcasting to this instance? I am not even using nabucasa on this one.

2021-08-30 02:50:01 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.26
2021-08-30 02:50:03 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.24
2021-08-30 02:53:27 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.24
2021-08-30 03:23:49 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.23
2021-08-30 03:46:11 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.21
2021-08-30 04:37:09 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 04:46:06 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.37
2021-08-30 05:06:18 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 05:52:37 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 06:11:39 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 06:22:48 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 06:35:29 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36
2021-08-30 07:05:48 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 06eeafa9a90c60a6f00050ad7c32576d2a54904f610943cef3fe00d29ab4c58d from 192.168.1.36

Figured it out, posting for anyone else

I had to switch my nabucasa account to the new HA instance and then uncheck the google integration so it could deregister the webhooks. I then switched nabucasa back to my OG HA instance and then unchecked and checked the google integration so the webhooks could assign themselves to the right instance. This hopefully should help fix some flakey google devices I have been having too.

1 Like

Posting in case anyone else gets this issue, I found a hacky workaround. I don’t have time to do the above steps to find out if it’s Google Home, Mobile Apps or otherwise, so I just registered the webhook ID being reported.

  1. Create new automation
  2. Trigger type = webhook
  3. Copy webhook id spamming logs
  4. Actions: delay 1 second
  5. Save and relax

Edit: Found the culprit. Smartthings Integration. I turned it on, used it, then got rid of smartthings entirely. I deleted the integration but didn’t do anything on the ST side. I was going to set it back up again for a front door lock and figured it out, finally.

1 Like

Go to your mobile phone app settings and clear cache and data related to HA app.
Those errors will disappear.