1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
chilliwebs 53b3aaee60 usn and udn differences cause issues with smarthings (#5401)
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.
2018-11-30 22:16:02 -03:00
..
2018-07-30 01:52:16 -04:00
2018-07-30 01:52:16 -04:00

ESP8266 Simple Service Discovery Copyright (c) 2015 Hristo Gochkov Original (Arduino) version by Filippo Sallemi, July 23, 2014. Can be found at: https://github.com/nomadnt/uSSDP

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.