本文主要是介绍cgm图编辑器_桥接Dexcom分享CGM接收器和Nightscout,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
cgm图编辑器
I've long lamented the sad state of Diabetes technology. For the last 20 years I've been told that it'll be cured in the next few years. (Spoiler: That hasn't happened.)
我一直为糖尿病技术的悲哀感叹。 在过去的20年中,我被告知它将在未来几年内治愈。 (剧透:这没有发生。)
Fortunately some technological breakthroughs have happened, like the CGM (Continuous Glucose Meter). This device has a transmitted embedded in my belly that transmits to a small receiver. However, my wife couldn't see my blood sugar remotely, so the Nightscout open source project pretends to be computer connected to the receiver, then uploads it to your own website. Then you can see your blood sugar on your watch, or family and friends can log in also. This project has been moving along nicely for a year or so now.
幸运的是,发生了一些技术突破,例如CGM(连续血糖仪)。 该设备的发射器嵌入我的腹部,然后发射到小型接收器。 但是,我的妻子无法远程看到我的血糖,因此Nightscout开源项目假装将计算机连接到接收器,然后将其上传到您自己的网站。 然后,您可以在手表上看到血糖,或者家人和朋友也可以登录。 这个项目已经进行了一年左右。
Just last month Dexcom, the CGM maker, released an update to their receiver that includes Bluetooth, called the Dexcom Share. Now my transmitter goes to my Dexcom device which then bounces via Bluetooth LE to my phone, which is then uploaded to the Dexcom site. The Dexcom iPhone app will support the Apple Watch in the future as well, they say.
就在上个月,CGM制造商Dexcom向其接收器发布了包括蓝牙在内的更新,称为Dexcom Share。 现在,我的发射器转到我的Dexcom设备,然后该设备通过Bluetooth LE反弹到我的手机,然后将其上传到Dexcom站点。 他们说,Dexcom iPhone应用程序将来也将支持Apple Watch。
However, I'd like more control over my data. Dexcom's solution (as of the time of this writing) is iPhone/iPad only. Not everyone can afford an iWatch and iDevices. I'd like to use my Pebble Watch, for example, which is supported in Nightscout today.
但是,我想对数据进行更多控制。 Dexcom的解决方案(在撰写本文时)仅适用于iPhone / iPad。 并非每个人都能买得起iWatch和iDevices。 例如,我想使用我的Pebble手表,今天的Nightscout支持该手表。
I got the Dexcom Share at 3:30pm today in the mail. By 4:40pm it was paired to my iPhone and working nicely. So what I really need is a simple bridge that takes my Dexcom Share data and copies it to Nightscout. From there I can analyze it, send it to my Pebble, or do whatever.
今天下午3:30,我通过邮件收到了Dexcom Share。 到下午4:40时,它已与我的iPhone配对,并且运行良好。 因此,我真正需要的是一个简单的桥接器,它将我的Dexcom Share数据复制并复制到Nightscout。 从那里我可以分析它,将其发送到我的Pebble,或执行任何操作。
从Windows机器观看iPhone流量 (Watching iPhone Traffic from a Windows Machine)
First, I need to understand the Dexcom Api. Let's watch the iPhone talk to Dexcom. I'll install Fiddler on my Windows machine and configure Fiddler as a proxy server. I'll need to trust the Fiddler SSL cert (only for dev purposes) on both the iPhone and the Windows machine. My machine is called Hexpower7 and the proxy is on port 8888. I'll visit http://hexpower7:8888 on my iPhone and install the cert there also, which will allow me to watch the traffic and learn about the API.
首先,我需要了解Dexcom Api。 让我们看一下iPhone与Dexcom的对话。 我将在Windows机器上安装Fiddler并将Fiddler配置为代理服务器。 我需要在iPhone和Windows计算机上都信任Fiddler SSL证书(仅出于开发目的)。 我的机器称为Hexpower7,代理位于端口8888上。我将在iPhone上访问http:// hexpower7:8888,并在那里安装证书,这将使我能够观察流量并了解API。
I learned a few things by watching the traffic.
通过观察交通情况,我学到了一些东西。
使用CURL呼叫Dexcom (Calling Dexcom with CURL)
First, when you login to the Dexcom API you get a Session ID, which is common and to be expected. With that Session ID you can get your sugar values. After the login I retrieved my latest sugar number:
首先,当您登录Dexcom API时,您将获得一个会话ID,这是常见的并且是预期的。 使用该会话ID,您可以获取糖值。 登录后,我获取了最新的糖号:
curl -k -X POST "https://share1.dexcom.com/ShareWebServices/Services/Publisher/ReadPublisherLatestGlucoseValues?sessionID=GUID&minutes=1440&maxCount=1" -H "Accept: application/json" -H "Content-Length: 0"
resulting in:
导致:
[{"DT":"\/Date(1426290216000-0700)\/","ST":"\/Date(1426293817000)\/","Trend":4,"Value":113,"WT":"\/Date(1426290240000)\/"}]
Here's a screenshot:
这是屏幕截图:
Cool. So I pair-programmed with Benjamin West from the Nightscout project and we spent an hour writing a script to get my Dexcom Share data and bridge/POST it to Nightscout.
凉。 因此,我与Nightscout项目的Benjamin West进行了配对编程,我们花了一个小时编写脚本来获取我的Dexcom Share数据并将其桥接/发布到Nightscout。
I put the script in an Azure WebJob and it's pulling my Share data and putting it into Nightscout every few minutes. I won't post the code here, rather the Nightscout team will take our prototype from here, but the result is lovely.
我将脚本放在Azure WebJob中,每隔几分钟就会提取我的Share数据并将其放入Nightscout。 我不会在这里发布代码,但是Nightscout团队将从这里获取我们的原型,但是结果很不错。
I don't have to carry an extra Android device anymore, I just use my Dexcom Share and its supported iPhone uploader application. Very cool.
我不再需要携带额外的Android设备,只需使用我的Dexcom Share及其受支持的iPhone上传程序即可。 很酷。
Now it's 7:30pm, just a few hours after I got my Dexcom Share and I've got the best of both worlds. The API was easy to use and we didn't spend more than two hours on it. Most of the time was waiting for the transmitter to complete its warmup cycle.
现在是晚上7:30,这是我获得Dexcom Share的几个小时后,我已经两全其美。 该API易于使用,我们花了不超过两个小时的时间。 大部分时间都在等待发送器完成其预热周期。
I'll do a formal Dexcom review soon, but I can already tell you it's a winner. Everyone who can get a CGM should get a Dexcom Share. It's a thrilling device. I would like the iPhone app to support iPhone 6 and 6+ screen-sizes better, and a nicer UI, but all in all, it's a great device.
我将很快进行正式的Dexcom审查,但我已经可以告诉您它是赢家。 每个能够获得CGM的人都应该获得Dexcom股票。 这是一个令人兴奋的设备。 我希望iPhone应用程序能够更好地支持iPhone 6和6+屏幕尺寸,以及更好的UI,但总而言之,它是一款出色的设备。
Don't forget, visit http://marchisformakers.com, tell your friends and tweet us at #MarchIsForMakers!
别忘了,访问http://marchisformakers.com ,告诉您的朋友,并在#MarchIsForMakers上鸣叫我们!
Sponsor: Big thanks to Aspose for sponsoring the blog feed this week! Are you working with Files?Aspose.Total for .NET has all the APIs you need to create, manipulate and convert Microsoft Office documents and many other formats in your applications. Start a free trial today.
赞助商:非常感谢Aspose本周赞助了博客提要! 您正在使用文件吗? .NET的Aspose.Total具有在应用程序中创建,处理和转换Microsoft Office文档以及许多其他格式所需的所有API。 立即开始免费试用。
相关阅读 (RELATED READING)
The Sad State of Diabetes Technology in 2012
2012年糖尿病技术的悲惨境况
Scott's Diabetes Explanation: The Airplane Analogy
斯科特的糖尿病解释:飞机类比
YOUTUBE: How my diabetes equipment works
YOUTUBE:我的糖尿病设备如何工作
翻译自: https://www.hanselman.com/blog/bridging-dexcom-share-cgm-receivers-and-nightscout
cgm图编辑器
这篇关于cgm图编辑器_桥接Dexcom分享CGM接收器和Nightscout的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!