-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Device Name/UUID to upload. #145
Comments
Good idea. I'm pretty sure @ktind is adding this to the upcoming mqtt stuff. We should be able to port it back to the mongo uploader and the rest api pretty easily. |
If we add id's we should include both the receiver and sensor id's |
In this way you could incorporate NightClock @arbox0 @trhodeos @jasoncalabrese |
@jasoncalabrese, I like that. Something like... maybe? {
"_id": {
"$oid": "5448417a45080e31c31e0107"
},
"uploader": {
"name": "Device_Name",
"device_id": "26f53136-b527-11e4-a71e-12e3f512a338",
"batteryLevel": 86,
"connectionType": 1,
"lastConnection": "2014-10-22T23:44:58.135Z",
"isOnline": true,
"isUploading": true
},
"transmitter": {
"name": "Device_Name",
"device_id": "26f53136-b527-11e4-a71e-12e3f512a338",
"batteryLevel": 86,
"connectionType": 1
}
} |
I was thinking the connectionType could be an enum, that matches up to one of the following... 1. Wifi, Cell, USB On-the-go, Bluetooth, etc.. |
I've toyed with similar ideas off and on - my early prototypes even included similar concepts. I like it and I have a proposal on the table to include receiver SN and a unique identifier for the uploader but it only covers MQTT. Devices like the Nest usually maintain an open connection to a server. This is something we do with MQTT, but we also intend to rely on HTTP as a fallback mechanism. Maintaining an active connection makes it almost trivial to detect when a device goes offline (last-will and testament feature of MQTT for example). HTTP on the other hand will require server side calculations and some inference. We need to clarify exactly how presence reporting, detection, and logging will work in our system as a whole. I'm thinking that some of the data listed above (lastConnection, isOnline, isUploading) needs to be determined server side. I don't believe that the uploader is the right place because it should be calculated relative to the server. I have a few questions on your proposals:
We should be cognizant of the amount of data that is added to each upload. There needs to be a cost/benefit analysis performed when adding new elements. Protobuf was responsible for a dramatic reduction in data with MQTT. Maybe we should also consider a protobuf payload for the RESTful calls as well. With around ~8600 device readings in a phone billing cycle, adding a few 100 bytes per upload may seem harmless, but it could get expensive for the user. I'm sure that we can eliminate some of the redundancy with the less volatile data (e.g. device id, receiver serial number, connection type, or sensor id) by only sending it once per session or something. IMO, this is something that is worth looking into that needs more discussion with the larger team due to the impact on the system. |
There's also the issue of correlating the device info and the SVG, MBG, CAL, etc data with the device data, what happens when there are 2 uploaders? |
@ktind, I was thinking the isOnline BOOL would be more of the device attempted to upload (sort of like a heartbeat) but had no data from the device. When all is good in the world both would be true. I figured it could help in troubleshooting via a remote interface (the website). Reason I thought this would be useful is because sometimes the uploader will be connected but lost the data stream from the CGM and either requires an app restart or re-plugging of the cable. |
@jasoncalabrese, I haven't completely modeled what the data could look like, but can we setup a relationships? For every Entry record, have a id field for the upload record? |
As a novice, how does MQTT play into this project? Is it similar something like, RabbitMQ (pub/sub message bus)? |
I see two issues here..Losing the data stream from the uploader to the dexcom receiver seems to be a new bug. In older versions I could let the uploader run for days and weeks without having to connect/disconnect the dexcom receiver. |
@gangfc is from a few months to use the program but I can confirm that. in more I would say that is not seen on the screen when the trend of the graph before the upgrade to version 0.1.12 it showed. |
It would be great if the uploader could provide more detailed device information to the database. Currently, the app uploads the uploader's battery status with a date only.
Many NS users leverage multiple uploaders, so it would be helpful to see which device was doing the uploading at a specific time, as well as how it was uploaded (wifi/cell).
Current:
Proposed (extending the current structure):
or Another Proposal (maybe overkill, i've seen similar structures for other IOT devices like Nest)
The text was updated successfully, but these errors were encountered: