An Alexa Skill for Keeping Safe in the Sun



Bondi Beach, 1922

The Sun Problem

In 2018 the UK was in for a shocker — the second sunniest year on record. But with the sun there also came a rise in heatstrokes, sunburns, and other heat-related illnesses. People in the UK, the US, and all across Europe don’t know how much sun equals seriously dangerous sun.

If you thought things were better down-under, sorry, they’re not. Less than 4/10 adults know that the only way to check the risk of sun burn was through the UV index.

So I figured Alexa could get a break from taking song requests or settings timers, and offer a helping hand. Sun Buddy was born.

Sun Buddy

The premises is kinda simple — you say:

“Alexa, ask Sun Buddy how long can I be outside for?”

In response, you’re provided with a Maximum Safe Exposure Time. This acts as a guide for at which point your exposure in the sun will have started causing severe damage to your skin. Sun Buddy will also tell you what the current UV level is to help you understand how different levels correspond to varying degrees of hazard.

The calculation is done using your Alexa device’s location. For this to work, you have to opt in during your first use of the skill.

The human tolerance of UV rays is strongly believed to depend on the amount of melanin in our skin. More melanin equals darker skin, which equals better protection against UV rays. So to be able to account for this when calculating exposure times, Sun Buddy lets you select the skin types you want to hear guidance for.

Tennis outside means exposure the sun, even in 1926

Just 5 minutes is not fine

You wouldn’t be wrong to argue that any amount of UV radiation is harmful. In fact, the vast majority of people get enough Vitamin D by simply going about their normal routine. Therefore, an upper limit for how long you spend in the sun, does not mean it’s a good idea to go outside for short periods of time without any protection against the sun. Especially not in UV levels of 3 and above.

“Alexa, ask Sun Buddy what the current UV level is?”

The recommended time limit provided by Sun Buddy is therefore intended to be a reminder that anything longer than this will cause serious long-term damage.

How does this magic work? OpenUV.

Not unsurprisingly, someone in Australia made an API service centred around sun safety called OpenUV. The creator, Alex Ershov, opened up part of the back-end used by his mobile app UVIMate making it available for other developers to use. The service provides lots of useful data about the UV radiation in a particular location, including safe exposure time. What’s helpful is that it provides this data based on coordinates, globally. When developing for Alexa, this means that users in a wide variety of countries are covered — not just ones in countries where weather providers have made information easily available.

Manly Beach, 1940s

What does Sun Buddy change?

Spending time in the the sun is something almost everyone enjoys. But it can be a hassle to stay safe. Sun Buddy tries to make your life easier and help you manage your exposure to UV.

Hopefully, along the way Sun Buddy will also have a greater impact: fueling a discussion about UV radiation in the wider society, increasing awareness that even short exposure can be harmful, and driving up use of sun protection items like UV umbrellas.

I want your help

Do you have an idea about how Sun Buddy can be more helpful? Did you find a bug? Was something unclear? I want to hear from you, please tweet me — @oscarschafer28

This article was originally published on Medium.