Sunrise and sunset information from 920XT in idle-mode

Former Member
Former Member
Hi,

I can see that the Garmin 920XT has data fields for sunrise and sunset, but is there any possibility to access this information outside an activity? I.e. to make a widget that display this information in idle-mode?

Thanks and regards

Andreas
Oslo, Norway
  • Sure. It would be easy to display the data, but the information isn't something that is exposed in the ConnectIQ API. That means that the widget would need to either connect to a mobile device or a web service to get the sunrise/sunset times for your current location, or the algorithm for calculating the values would have to be implemented in MonkeyC. I'm not familiar with the necessary algorithm, but I'm certain that it could be done.

    One thing an implementation would need to consider is that the sunrise/sunset times would need to update periodically to handle the case where someone is travelling.
  • Yeah, it would be nice to have access to this type of information (since the watch knows how to compute it already) for watch faces for example :)
    Recomputing it is possible obviously, but since it's already implemented... At the very least, it would be 100% consistent with what the watch displays in an activity.
  • Former Member
    Former Member over 10 years ago
    Thanks for your answers. Agree with YOHCOP that since the algorithm is already implemented it would be better to just use that one rather than implementing it again. The periodical update is already a "problem" when travelling since the clock must be updated as well? I think the 920XT changes time zones automatically? Then it should be possible to just update the sunrise/sunset when the time zone anyway needs to be updated.

    Anyone knows where suggestions to add this to the API could be posted?
  • the algorithm is already implemented it would be better to just use that one rather than implementing it again.


    Agreed. I just threw it out there since the functionality isn't provided at this time and isn't likely to come about until after ConnectIQ is in full swing, some time after the new year.

    The periodical update is already a "problem" when travelling since the clock must be updated as well? I think the 920XT changes time zones automatically? Then it should be possible to just update the sunrise/sunset when the time zone anyway needs to be updated.


    Yes, the device should detect time zone changes automatically, but there isn't a notification for when this happens. Typically a watch face would just display the time returned by Toybox.System.getClockTime() which would be adjusted for timezone before the value is returned to the user. Since a watch face updates automatically every minute, the displayed time is not likely to miss a zone transition by more than a minute. If you want to display the time/sunrise/sunset as part of an app or a widget, you're forced to ask for the interface to be refreshed when something changes (to avoid wasting the battery updating and displaying data that hasn't changed). Sure you could just implement the app to refresh every minute (or second, or whatever), but any more often than is necessary is a waste of processor and battery.

    Anyone knows where suggestions to add this to the API could be posted?

    I've had good luck with just posting in this forum. The development team usually posts a comment indicating what they think about the issue, and sometimes they go so far as to say they'll be making a fix.
  • One of my favorite things about the Fenix 2 was that it told me when the sunset and sunrise time was, right at the bottom of the time screen. I can't wait to get this on my 920xt.
  • I've submitted a ticket to have this addition investigated. I agree that this would be nice to have available. Thanks for your ideas! :)
  • Ah, that's why we still don't have watch faces with sunset/sunrise info. Isn't it possible to make all fields available through API at once? Or we will have to beg for each one of them? :rolleyes:
  • Former Member
    Former Member over 10 years ago
    I've submitted a ticket to have this addition investigated. I agree that this would be nice to have available. Thanks for your ideas! :)


    Many thanks! Hope it will get implemented soon :)
  • +1 really looking forward... I would assume that Fenix 2 does not update it constantly, rather than get last known info and replicate on screen (as the moon phases).
    Lets think: Got GPS data? Update latest Sunset/Sunrise info...

    Let's be honest... If you travel constantly, you would have to connect anyway to GPS/Bluetooth/Wifi to get your new zone and hour updated.

    This would also get people who asked for "Last known position"...