I really need and advice regarding my architecture.
1. On Tago I’ve got 3 devices (custom hTTP), one is for management and data saving (persistent_data_device), the other two will be linked to real IoT devices.
2. I have an arduino IoT device that has hardwired the “device-token” of the “persistent_data_device”.
The arduino send its “unique_ID” to “persistent_data_device”, through POST.
3. Using GET, based on “unique_ID”, one device-token is asigned to Arduino and from now on will send data only there.
Is there another solution that helps matching devices without having to hardcode it into arduino the “device-token” of each device?
For this case, you must have a middleware between TagoIO and your hardware. Middleware will receive this unique id and find the related device on TagoIO.
It has an example of TCP/IP server, but the basics are applied to any type of middleware you want.
You can also go an Analysis step. If you send the ID of the sensor in a metadata or something, you can set to trigger an analysis and split to different devices using the analysis available in this tutorial How to split up data from one device to multiple devices (tago.io)
But the generic http network is a more easier approach if you are sending data as JSON.
Nice example. I’ve remain at a stone age solution for this stage of development. Basically, a hardwire of a “Persistent_DATA_DEVICE” token on arduino. That device stores the info regarding other devices.