April 26, 2013
One area in which Thingspeak seems to fall down a bit compared to xively is key management.
Say for example I produce a IoT project which I want to produce a small run of. For the device imagine i'm using an arduino with a cheap 16x2lcd shield with 6 buttons
If I use thingspeak and talkback that means I need a way of getting a 16 character thingspeak key into the controller and a 16 character talkback key into the controller. I also need to store the channel number for thingspeak and the channel number for talkback.
Thats a lot of keys to try and get an end user to enter via an lcd keypad.
Ideally it would be nice to have an API which just lets me give each user say an 8 character unique key which when entered can respond with the users unique keys for thingspeak, talkback and both channel numbers.
kind of a provisioning API.
I've been messing about trying to find a way to do this with the current apps. The best I've got to is:
Create a provisioning channel and hard code the key for this channel into the firmware
Send an update from the device to the provisioning channel. something like
a react then picks up the PROVISION_SERIAL_NO,3374-3H8U
and triggers a similarly names Thing HTTP.
This then places a talkback command with the new keys. something like
So the pseudocode for the provisioning on the arduino would be
Inform user "Registering with server" Please wait
Request command response
while (requested serial key != recieved serial key)
Re Request command response
Inform the user "There is a problem. Please check your Serial number"
if Serial key matches the serial key that was requested
Inform the user "Controller registered OK"
Write data to eeprom
soft reset without delay
Of course the down side of this approach means I need to manually create a react for each unique user and also a thinghttp for each user.
Additionally, if anyone is able to get hold of the provisioning channel key, they can then listen for a provision request on the channel and grab the resultant talkback. They then have the keys for my device.
Its all a bit messy
Most Users Ever Online: 166
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Team_mafia, icXu, emorphistechno, VTVMART, manimozhi, adamhebrew
Moderators: cstapels: 460
Administrators: Hans: 405, lee: 457