ESP8266 and SSDP
•
I recently picked up an Adafruit Feather HUZZAH with the intent of gluing it together with the SmartThings eco system. This presented an initial problem of needing to do SSDP based communications since that's how SmartThings likes to do LAN based communications. After digging a bit, it becamse clear I was going to have to make some modifications to the library.
Getting Ready for Development
- Follow the instructions to get the standard ESP8266 Arduino package installed (see Adafruit)
- Fork the repo on github
- Change to the
cd ~/.arduino15/packages/esp8266/hardware/esp8266/2.0.0
directory - Remove everything,
rm -rf *.*
- Clone the git repo you forked
- In the
tools
directory,./get.py
to get the required tools downloaded - Make code changes and then start hacking away
Implementing the SSDP Server
After I built my own, I finally saw that there was a ESPSSDP library that I could use, so I scrapped what I did (even though it was about 5% smaller) and figured that I'd work on cleaning up the normal library so everyone else could maybe have the changes. First things first, we need a proper set of serial numbers, so now we can do this:
After poking some more at the SSDP library, I think I'm going to add a function to adjust the timer refresh since there is no way that waking the system every 1000ms is going to let it live even close to a day on the battery.