heatseeknyc / relay

web app for setting up sensors, receiving and storing their data, and viewing it
0 stars 2 forks source link

web frontend to add new short codes #17

Open williamcodes opened 8 years ago

williamcodes commented 8 years ago

How do we add new short codes? I've got a hub here, 0013a20040dc274f, with no short code. Is there a mechanism for adding them? If so, we should document it in the README, and if not, we should make one so we don't have to write SQL.

hrldcpr commented 8 years ago

Currently you have to do it with sql:

> ssh setup.heatseeknyc.com
>> bash relay/db/connect.sh
>>> insert into xbees (id, short_id) values ('whatever', 'abcd');

But yeah we should add a (password-protected?) endpoint, I'll rename this issue accordingly.

williamcodes commented 8 years ago

I thought this would be:

>>> insert into xbees (id, short_id, version) values ('whatever', 'abcd', 'v1.5');

But there doesn't appear to be a version column in the xbees table. Where could it be?

williamcodes commented 8 years ago

Now that I've added a bunch of xbee ids, it seems like a web interface for assigning short ids to xbees should actually replace the canonical spreadsheet. We can also make the relay server start transmitting short codes along with the readings, which would mean there is no more need for the app server to have a duplicate copy of the table. That would be grand! Also not a terribly high priority for this winter though. We can get by with SQL scripts just fine for now and most of the xbees have been added at this point. Summer issue!