The Subscribe/Unsubscribe events use the UDN IP address and UDN port which is set in the
setupDevice method which is only called from the supporting SmartApp. After the IP address is manually updated in a device’s settings, it calls the
initialize method which calls
setURL to override the base HTTP URL and
CheckEventSubscription after a 5 second delay but does NOT call the
setupDevice method as it requires parameters only found during the SSDP discovery.
We could probably change the
udnAddress to match the overridden HOST component of the URL you entered, but note that the
udnPort for UPnP event subscriptions is different than the HTTP port and is only determined by the SmartApp during discovery (not the device handler).
My concern here is that Kodi is reporting the wrong UPnP address during discovery for some reason and really that should be fixed instead of putting a shim in place to grab the host from the overridden URL. As others have mentioned, I’d love to have more feedback from the Kodi team as to why there are some odd issues like this, but I don’t think UPnP eventing is a high priority item for them.