Skip to content
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

3 step tutorial #1

Open
bewest opened this issue Mar 14, 2015 · 26 comments
Open

3 step tutorial #1

bewest opened this issue Mar 14, 2015 · 26 comments

Comments

@bewest
Copy link
Member

bewest commented Mar 14, 2015

Leave any initial comments/questions here.

@bewest
Copy link
Member Author

bewest commented Mar 14, 2015

Tutorial Establishing Connection Strings

  1. log into azure
    Find the Configure tab configure tab

  2. Add environment variables:

    • DEXCOM_ACCOUNT_NAME, Custom type, should be your Dexcom Sharer user name.
    • DEXCOM_PASSWORD, Custom type, should be your Dexcom Sharer password.
    • Pre-requisite, you should have API_SECRET already defined in order to enable the Web API. If it's not there add it now. Only requirement is that it be at least 12 characters long. Type anything in there, make it long.

    connection strings

@bewest
Copy link
Member Author

bewest commented Mar 14, 2015

Tutorial: Getting the latest bridge

  1. Visit the releases page

    At time of this writing the latest release looks like this: example release.

  2. nightscout-sidecar.zip Download this file to your computer. You can simply click on it and it will download.

@bewest
Copy link
Member Author

bewest commented Mar 14, 2015

Tutorial: Creating Azure Sidecar (eg WebJob)

  1. Find the WEBJOBS tab: webjob tab
    Click the Add to create a new job: add-button
  2. Type a name, like share-ns-bridge, use the nightscout-sidecar.zip from the previous step, to upload, and confirm the dialog: create-webjob
  3. After confirming the dialog, a new job will transition to the Running state after a few moments if all goes well: new webjob.

Ready

Within a few moments, your nightscout rig should receive data, pebble and website should continue to work.

It should look something like this: working screen

@bewest bewest changed the title hello world: introduction 3 step tutorial Mar 14, 2015
@bewest
Copy link
Member Author

bewest commented Mar 15, 2015

Leave comments/feedback/critiques below.

Really, success stories, questions, "what does this mean?" all welcome. Make sure you are logged into github in order to see the comment box:
image

@ELUTE
Copy link

ELUTE commented Mar 15, 2015

connection strings

@ELUTE
Copy link

ELUTE commented Mar 15, 2015

dashboard

@ELUTE
Copy link

ELUTE commented Mar 15, 2015

screen shot 2015-03-15 at 9 35 30 am

@lizthelen
Copy link

These instructions, combined with the nightscout.info directions for setting up the database and website, worked great for me on my first try. I never used Nightscout before the Dexcom Share came out, so I was starting totally new, and I don't have programming experience.

I signed up for a paid Azure account (Basic, I think?), and will keep an eye on whether it starts to get expensive.

This morning I was able to apply the updated job, which enabled the trend arrows. That process was also straightforward and immediately successful. Wonderful work. Thank you.

@kws1969
Copy link

kws1969 commented Mar 17, 2015

A comment on the CGM in the Cloud post stated that the site needs to be turned to always on. This is not apparent in the tutorial.

@thefutureofamerica
Copy link

Hi all, apologies for my butchering of terminology here... I can see in the logs for my sidecar webjob on the Azure configure interface that the webjob IS pulling data from SHARE - it has data there that come from after I had unplugged my share receiver from my uploader phone... But these aren't getting pushed to my NS website and the webjob says it's shutting down.

Thanks in advance for any help.

Logs:

[03/20/2015 00:40:08 > fbb0ee: SYS INFO] WebJob is stopping due to website shutting down
[03/20/2015 00:40:08 > fbb0ee: SYS INFO] Status changed to Stopping
[03/20/2015 00:40:13 > fbb0ee: ERR ] Thread was being aborted.
[03/20/2015 00:40:13 > fbb0ee: SYS INFO] WebJob process was aborted
[03/20/2015 00:40:13 > fbb0ee: SYS INFO] Status changed to Stopped
[03/20/2015 00:40:21 > fbb0ee: SYS INFO] Status changed to Starting
[03/20/2015 00:40:22 > fbb0ee: SYS INFO] Run script 'index.js' with script host - 'NodeScriptHost'
[03/20/2015 00:40:22 > fbb0ee: SYS INFO] Status changed to Running
[03/20/2015 00:40:25 > fbb0ee: INFO] RUNNING failures 0
[03/20/2015 00:40:25 > fbb0ee: INFO] Fetching new token
[03/20/2015 00:40:25 > fbb0ee: INFO] RUNNING failures 0
[03/20/2015 00:40:26 > fbb0ee: INFO] Entries [ { sgv: 142,
[03/20/2015 00:40:26 > fbb0ee: INFO] date: 1426811866000,
[03/20/2015 00:40:26 > fbb0ee: INFO] dateString: '2015-03-20T00:37:46.000Z',
[03/20/2015 00:40:26 > fbb0ee: INFO] trend: 4,
[03/20/2015 00:40:26 > fbb0ee: INFO] direction: 'Flat',
[03/20/2015 00:40:26 > fbb0ee: INFO] device: 'share2',
[03/20/2015 00:40:26 > fbb0ee: INFO] type: 'sgv' } ]
[03/20/2015 00:40:30 > fbb0ee: INFO] Nightscout upload error null status 200 []

@bewest
Copy link
Member Author

bewest commented Mar 20, 2015

That looks like a successful log, @thefutureofamerica.

The "error" in this situation is "null," meaning no error, and the status of 200 is successful.
There should be data starting to show up in Nightscout.

@thefutureofamerica
Copy link

Thanks Ben, it did eventually start receiving data. My NS website was weird for a couple hours because it had data from my MotoG uploader (with wrong time-stamps) and from Share (with correct time-stamps) that were all showing up together - but after I left the NS uploader disconnected for an hour or two it sorted itself out. It worked flawlessly overnight. Thanks for developing this!

@bewest
Copy link
Member Author

bewest commented Mar 20, 2015

BTW, you did not butcher any terms, you submitted a fantastic report. Perfectly understandable and all terms used correctly. :-)

@zenmoxie
Copy link

Ben, this is remarkable Excellent job, easy to follow directions. It worked perfectly.

@zenmoxie
Copy link

One thing, I initially had Enchilada (dev) deployed and it would not work. Once I changed to master it worked fine.

@zenmoxie
Copy link

I stand corrected, re-deployed Enchilada and this time it is working fine. Maybe I didn't wait ling enough the first time.

@francescoger
Copy link

question.. can my son wear his pebble even when his dexcom share is using Bluetooth with his iPhone? can the iPhone handle both share and pebble ?
my husband and I both got our watches to display but my sons wont work

@humphrey4526
Copy link

I have not received my dexcom yet but based off the set-up, I think you will still need the nightscout set-up on the IPhone to push it to the pebble watch. Unless someone has been able to create an app in the pebble app to be compatible with the Share2 app. Hope this helps, I wont have out dexcoms till Sat and will update if you need.

@toarikaplan
Copy link
Contributor

To get the Pebble watch working with the share2nightscout-bridge you will need:

  1. Nightscout website running
  2. Share2nightscout-bridge job running
  3. Pebble app installed on your iPhone with the Nightscout watchface.
  4. Configure Pebble app with the correct endpoint ie. HTTPS://nickname.azurewebsites.net/pebble

@rickggaribay
Copy link

Sidecar deployment to the Azure Web Job was flawless and I started seeing CGM data right away.

What I've found since is that there are intermittent lapses in data which I've been able to correct a couple of times by either restarting the Azure Web Site or checking on the Share2 App and finding that it was in an interim state of not sending data. Seems that simply clicking on the Status icon on the Share2 app recovers the issue so I am not sure if this is a bug with the app and wondering if anyone else is seeing this?

One theory I have is that since I haven't found a way to ensure the app runs under lock screen, perhaps it stops running and thus transmitting data? Clearly not a Nightscout issue if that's the case but again curious if others are having to nudge the app from time to time?

Also, I did find the following log entries interesting:

patientData 5
running update
running loadData
patientData 5
running emitData 1427206648850 5
running update
running loadData
data isn't different, will not send to clients
patientData 5
running update
running loadData
data isn't different, will not send to clients
patientData 5
running update
running loadData
patientData 5
running emitData 1427206828882 5
running update
running loadData
data isn't different, will not send to clients
patientData 5

I need t spend some more time with the code but wondering if the Sidecar isn't sending data after a while because it thinks its the same as the last insert to Mongo?

@francescoger
Copy link

we have the same issue. my son is so used to closing apps after he is done using them to conserve data that he is constantly closing the share app. very annoying and hoping dexcom is working on a fix for this! Our pebbles are working great and we are using the follow app on our iphones so now we have the best of both worlds. It is truly amazing! Lots of items to charge at the end of the day but well worth it.

@mcbill
Copy link

mcbill commented Apr 1, 2015

Is there something I need to change to get trend data? All of my sgv values are being entered correctly and timestamped accurately, but every record's has the same "trend": 4, & "direction": "Flat" values regardless of what the trend is actually doing.
(didn't have this issue when I used android uploader, this seems only to be happening with share2 bridge)

If relevant I'm using heroku for both my ns site and this app.

@toarikaplan
Copy link
Contributor

Do you have the latest release of sidecar? The original release did not have the "trend" feature.

@mcbill
Copy link

mcbill commented Apr 1, 2015

Just merged latest changes into my repository. Is there a need for me to maintain my own fork of this repository if I plan on just keeping them in sync?

@toarikaplan
Copy link
Contributor

You do not need to keep your repo updated. You will need to make sure you use the latest version of sidecar if you are using Azure. For Heroku, the correct version will automatically be selected.

@toarikaplan
Copy link
Contributor

I believe you can click on Ben's deploy to Heroku button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests