Add support for fauxmo devices to be discovered by HomeAssistant #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Makes two changes needed for HomeAssistant to discover and manage fauxmo devices:
HomeAssistant relies on pywemo for device discovery. The pywemo.discover_devices() function sends an ssdp probe using the string "urn:Belkin:service:basicevent:1". This change causes fauxmo to respond to that probe so that pywemo.discover_devices will find fauxmo devices.
As mentioned in Fauxmo does not work with Home Assistant #88, HomeAssistant uses the serial number returned by a "real" Wemo to disambiguate devices, if more than one device shares an IP address. This changes causes fauxmo to respond to a setup message with the serial number, so that multiple fauxmo devices will be seen from HomeAssistant. This change was mentioned in the discussion for Issue 88 but does not appear to have been merged to master.
Status
**READY
Related Issues
Steps to Test or Reproduce
Unfortunately I don’t have a system that is capable of running
make test-all
(even before my change). I have, however, manually tested the change against pywemo.discover_devices (from pywemo 0.9.1) and also against HomeAssistant 2023.11.3.