REST question

so that node is in node-red-contrib-alexa-remote2, setting it up is kind of a pain but once it work. it is nice.
this is what the node looks like


in order to get this to work, this is how the account needs to be setup

when you do it you will need to initialize it the first time. when you do it will tell you to goto http://192.168.6.2:3457 well that is my ip for node-red you will then sign in and so on to amazon and it should complete
i actually have mine initialize 4 times a day. no you won’t have to go to that website everytime.

btw, cron-plus pallete is a great thing to have. here is my node setup for gathering the data from sugarmate


if you do it exactly like mine, it will go every 2 seconds.

also, because i have had issues in the past of the alexas not working, i decided to have a test announcement every day at noon.

I like how you have this setup. I want to see how yours works when she is not reading or dehydrated when it is not trending. we will see. mine does having issues reading when she doesn’t trend.

Wow, that’s quite a capable node… thanks for the tip.
I recently did a project using Amazon Polly, an online text to speech tool, and it uses the SSML syntax.

SSML Tags Supported by Amazon Polly: https://docs.aws.amazon.com/polly/latest/dg/supported-ssml.html#supportedtags

Not all SSML tags are supported by Alexa; SSML is a W3C’s voice browser working group specification.

Good source of SSML samples: https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#ssml-supported

Another reference: https://developer.amazon.com/en-US/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html


“if you do it exactly like mine, it will go every 2 seconds.”
Sugarmate only updates every five minutes, so every two minutes is more than enough. Every two seconds just floods their servers with unnecessary data requests.

This is fun…

Here’s a flow I just made to announce my blood glucose:

Here’s the flow, without the Alexa node- insert your own.

[{"id":"10bd99c8.b73446","type":"function","z":"eef97088.bad3b","name":"Build the string \"Your blood glucose is..\"","func":"// Build the text to send to Alexa.\nvar a= flow.get('bg') || 0; // Get the last bg value\nvar s= \"<speak>Your blood glucose is, <voice name=\\\"Brian\\\"><lang xml:lang=\\\"en-GB\\\">\";\ns += a;\ns += \"</lang></voice></speak>\"\nmsg.payload = s;\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":2420,"wires":[["754568a9.c71778"]]},{"id":"d6924442.7b03a8","type":"inject","z":"eef97088.bad3b","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":2420,"wires":[["10bd99c8.b73446"]]},{"id":"754568a9.c71778","type":"change","z":"eef97088.bad3b","name":"","rules":[{"t":"set","p":"textToSpeak","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":2420,"wires":[["467bc875.e8cee8"]]}]

And this is how you set up your Alexa Node to speak SSML:

speakSSML

bg is a flow variable that I set every time I get a new reading.

I did the 2 seconds because if i do 2 minutes, if she drops low, i would like to know right away. if it doesn’t notify me for almost 2 minutes then we are behind. i wish i could have it sync to their time or something like that.

I never could get amazon polly to work. i just gave up on it. I had issues with the alexa palette so i was trying all different kinds of things and finally got it to work correctly. I also broke TTS to google as well. I can use google in NR but i am using a palette made for a directly google.

Stevemann, i have started using your way of pulling the data from sugarmate. I like your because right now my alert system is depending on HA to work. if it doesn’t work then it won’t alert us. now the new way will set a global message and i can pull the data in other flows. i would post a shot of it but it is messy right now why i still wait to see if everything works. Thank you.

The Dexcom simply doesn’t respond that fast to Blood Glucose levels. The sensor only updates to the receiver/phone every ten minutes. Then there’s a few minutes delay to send data to your subscribers. With the CGM, you watch trends. When you eat something sugary like a piece of fruit, there is a lag in the CGM responding with a higher BG reading. In my case, I can eat a peach with a starting BG of 100 and steady, and my CGM won’t see an increase in BG for at least 10 minutes. If your BG on the CGM is 60 and descending, you are already lower than that.

In your program you can do the same thing as my Android app. If the BG is low and the trend is down, then sound the alarm because a low is coming soon. If the BG is low and steady, then maybe just a warning.

Polly takes some getting used to. We made an “escape-room”-like game for Easter because our kids have outgrown easter egg hunts, but still enjoy the games. This year the game was a detective’s office with clues to Roger Rabbit’s kidnapping. Part of the game was to use a rotary-dial phone to dial phone numbers hidden in the room (in plain sight). When they dialed a number that led to a clue, I used different Polly voices to record the clues.

that is awesome!

Yeah I know of the timing and delays. With the Dexcom 6, it reads about every 5 mins. which dex do you have?

It may likely be five minutes, but a tech at Dexcom said every ten.

These are great! Would you mind sharing the config file?

There’s a lot of people in this thread. Who is this meant for?

Touche!!!

to who and which one. i am all for sharing, if you find a better way to do things or anything else that is cool please share. I am constantly making changes to mine. i have a flow just for getting the data, trending system for when she is single or double arrow down and depending on the BG she is at, one for her to drink water ever so often(we can turn this one off), and then a reminder system for lantus. the lantus one is very basic. i just wish i had a couple of screens on my control panel in home assistant on changing the time for lantus and the units given and also a screen for the time before reminders on drinking.

You should probably start a new thread for this as many of the prior posts refer to the Sugarmate REST API. Sugarmate has discontinued the API and the only way I know of to get blood glucose data from a CGM is using Nightscout.

No, you can use python scripts to pull the data now.

https://github.com/gagebenne/pydexcom Is what I used. It’s actually what ha uses too.

Indeed pydexcom is what HA uses. Dexcom - Home Assistant

However I use rest with nightscout.