Generic HTTP/JSON Adapter?

Dear all,
i started to work on an adapter which finds new devices by listening to SSDP NOTIFY messages. That part worked out well (i took the ESP-adapter as a basis), but got stuck in the code around properties.

I’m querying device’s ThingDescription and need to adjust the device & property objects to reflect the contents from the TD i parsed.

My question is if i really need to do that, since my device speaks The Thing API as per specification. Or is the gateway able do that transparently without the need for an adapter?

Current state of code is at https://github.com/aschmidt75/generic-ssdp-http-json-adapter

Thanks!
Andreas

Hi Andreas,

Thanks for working on this!

We actually have an add-on already for adding native Web Things by URL which we plan to include in the upcoming 0.4 release. Currently, we’ve included discovery via mDNS and Bluetooth Eddystone beacon, but SSDP would definitely be a nice thing to include. Would you consider submitting a pull request with that feature to the add-on we’ve created?

Thanks,
Mike

Hi Mike,
that sound’s great! Looking forward to the 0.4 release. I’m happy to contribute the SSDP part, i’m going take a look at thing-url-adapter and see how i can integrate it there. Does thing-url-adapter work with 0.3 as well?
Andreas

Yes, it will work with 0.3, but you’ll need to build the package on whatever device you plan to run on (with the package.sh script). It has been pushed out to 0.4 due to its inclusion of platform-specific binaries, which was not supported by 0.3.X.