Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Weather widget on watch face

ANSWERED

I'm trying to add a Weather widget to the watch face. Doesn't need to do anything onClick, just display the current temperature and maybe have an icon of the sun or clouds or something (similar to the Samsung Gear S series)

Is there a way to do this currently? I can't find it in the documentation

 

 

-Spencer

Best Answer
1 BEST ANSWER

Accepted Solutions

At this time, all communication from the device has to go via the companion, but it's very easy to add.

 

Remy Sharp prototyped fetch() from the device, but it still use the companion.

 

https://gist.github.com/remy/2f5dbe7032004a5dd09bd57733d30ab6

View best answer in original post

Best Answer
0 Votes
9 REPLIES 9

I have been trying to figure this out as well

Best Answer

My understanding is that the Fitbit api does not provide this data as the weather app is a separate app. You would need to connect your app directly to a weather service such as Open Weather to obtain weather data.

Best Answer
0 Votes

@GadgetMOnster wrote:

My understanding is that the Fitbit api does not provide this data as the weather app is a separate app. You would need to connect your app directly to a weather service such as Open Weather to obtain weather data.


This is correct. We do have a basic example on the developer website.

https://dev.fitbit.com/guides/communications/messaging/#fetching-weather-example

Best Answer

While we're on the subject of json data here, can the ionic retrieve json data from 3rd-party providers without the need of the companion app?  Or is the inclusion of a companion app necessary to retrieve json data?  

 

For example, If I were to display sport scores on the watchface, would this be possible with just an app for the Ionic watchface? 

 

Best Answer
0 Votes

At this time, all communication from the device has to go via the companion, but it's very easy to add.

 

Remy Sharp prototyped fetch() from the device, but it still use the companion.

 

https://gist.github.com/remy/2f5dbe7032004a5dd09bd57733d30ab6

Best Answer
0 Votes

Awesome, thanks Jon!

Best Answer
0 Votes

Using the weather sample messaging code, I get an error on this line:

 

temperature = data["main"]["temp"];

 

Console says "index.js TS1005: ',' expected.

Ah! The semicolon should not be there.

Best Answer
0 Votes

I know that this is an old post, bu t I am working on something similar and I cannot figure out how to retrieve the weather elements beyond the temperature level. I would like to return the current condition and the icon used. 

"weather":[
                 {"id":520,"main":"rain","description":"light intensity shower rain","icon":"09d"},
                 {"id":500,"main":"rain","description":"light rain","icon":"10d"},
                 {"id":701,"main":"mist","description":"mist","icon":"50d"}
              ],

"main" and "icon" are what i'd like to return along with the other stats that I already have returned 

Best Answer
0 Votes

I posted too soon

 

data.weather[0].main
Best Answer
0 Votes