Closed twobraids closed 6 years ago
The adapter was built to function this way. Upon starting up, it will discover any web things on the network via mDNS/Bluetooth/configured URLs, and open up a websocket connection (if available) or poll the device.
It has to keep track of all devices because there is a fundamental disconnect between what things the gateway knows about and what the adapter knows about. The gateway never tells the adapter what things the user has added, so as far as the adapter knows, every "thing" is necessary.
If you're developing multiple devices, a simple fix would be to run them on different ports. The adapter will then see them as distinct things.
If I add a Web Thing to the Things Gateway, observe that it works, then REMOVE the device, it appears the device is still connected. I rebooted a Things Gateway after the aforementioned removal then noticed that the Gateway was still updating a device that was supposedly no longer there:![no-removal](https://user-images.githubusercontent.com/581227/39400841-f01790a0-4aec-11e8-85f9-82b15a6244cf.png)
This ends up being really inconvenient for developing URL based things. If testing a second URL based thing with an incompatible set of properties, but on the same machine with the same IP, the second thing is flooded with GET requests that it cannot handle resulting in hundreds of 404 responses per second: