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

usn and udn differences cause issues with smarthings #5401

Merged
merged 3 commits into from
Dec 1, 2018

Conversation

chilliwebs
Copy link
Contributor

I recently starting playing around with a few esp8266-01s and tried to use the SSDP libraries to work with Smarthings discovery:

https://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html

on the docs there are example grovy files that do simple service discovery, i was not able to get SSDP to work correctly, though i was able to find some other projects that did (python fauxmo works for alexa, but with modifications i was able to make it work for custom devices in ST).

after digging to figure out why the python code was working and the ESP SSDP lib was not i noticed there is a string comparison in the grovy file and it was failing to match the udn with the original usn device id. The ST groovy code could be changed to remedy this problem but i wonder if it should be fixed here, because so many other examples of SSDP discovery take care in ensuring the usn and udn match exactly.


Summary, I think the USN and UDN values should match exactly. This will fix issues, allowing for much easier integration with smart hubs that need the device ids to match. Allowing me to use these libraries and not need to roll a custom SSDP handler.

I recently starting playing around with a few esp8266-01s and tried to use the SSDP libraries to work with Smarthings discovery:

https://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html

on the docs there are example grovy files that do simple service discovery, i was not able to get SSDP to work correctly, though i was able to find some other projects that did (python fauxmo works for alexa, but with modifications i was able to make it work for custom devices in ST).

after digging to figure out why the python code was working and the ESP SSDP lib was not i noticed there is a string comparison in the grovy file and it was failing to match the udn with the original usn device id. The ST groovy code could be changed to remedy this problem but i wonder if it should be fixed here, because so many other examples of SSDP discovery take care in ensuring the usn and udn match exactly.

___________

Summary, I think the USN and UDN values should match exactly. This will fix issues, allowing for much easier integration with smart hubs that need the device  ids to match. Allowing me to use these libraries and not need to roll a custom SSDP handler.
@devyte
Copy link
Collaborator

devyte commented Nov 30, 2018

Culprit was #4981 . I even remarked about it at the time.

@devyte devyte merged commit 53b3aae into esp8266:master Dec 1, 2018
@chilliwebs
Copy link
Contributor Author

cool thanks! great work on the libraries, and now I can very easily create Smart Things integrations, and the best part is it can be done using very little modifications to both the SSDP example provided by this library and arduino ide, and the smarthings groovy example!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants