Weather App

Posted on
Page
of 2
/ 2
Next
  • When my watch arrives I was thinking I might see about creating a simple app or widget to tell me the current weather. Has anyone else started on anything like that?

    Also, if I were to create such an app, what would be the most straightforward way to get current weather information onto the watch? I see that GadgetBridge supports weather for some other models of smart watches, would it be possible to take advantage of that?

  • Hi! Sounds like a great idea - I'm pretty sure the weather support for Bangle.js is already in Gadgetbridge, so you'd just need to extend what we have at the moment to make use of it.

    I think Gadgetbridge needs a second app installed to grab weather, but then the format data comes to the watch in is:

    http://www.espruino.com/Gadgetbridge

  • See here:
    https://www.espruino.com/Gadgetbridge

    t:"weather", temp,hum,txt,wind,loc
    

    I do not know if GB sends that regularly or how you can trigger that.

  • So the second app obtains the data and then sends it through GB to the Bangle?

  • Nice! That sounds a lot more straightforward than I was expecting.

  • I like the fact that you use draw and fill to create the weather conditions instead of using images.

  • Stunning! I wants it.

  • That looks great! While we have the Image Converter I wonder whether we couldn't make one that created a bunch of Espruino draw calls from an SVG?

  • That would be super handy - I actually created SVG versions of most of the weather symbols while I was contemplating how to render them, so an SVG to Espruino draw call converter would have been perfect. I imagine you'd have to pick a subset of the SVG spec to support, though.

    Another possibility would be to create a simple web-based vector editor with the limitations of the Graphics API in mind.

  • Hi NebbishHacker, did you prepare the app with this solution? Thank you for dedicating your time to the issue and I hope that it will appear on the repository. Consider that, thanks to the great Gordon's idea, I am now approaching for the first time js and I really need a "tutorial for dummy" for using your codes as fully enjoyable apps. Cheers

  • I'm afraid this isn't a full app yet. My smartwatch hasn't arrived, so all I can do right now is experiment with the emulator. When it arrives I will for sure keep working on this and try to get it included in the app loader.

  • I guess if the watch had been in your hands earlier than in mine it would have been more fruitful 😄

  • there are also some animated svg weather icons available here: https://github.com/ghys/org.openhab.ui.iconset.climacons/tree/master/icons

  • Thank you Dergutewolf. I hope some guys of you could share a working application. I'm not yet able to write a working code 🙄

  • NebbishHacker

    Thanks!

    That looked pretty amazing, and it seemed like a shame to let all that hard work to to waste.
    So I went ahead and converted it into an actual app: https://github.com/espruino/BangleApps/pull/340

    The way you draw those images also made it really easy to use a smaller version for a widget :-)

  • Ah, cool! I'll likely contribute some more changes to this myself when my watch finally arrives, but in the meantime it's great to see this turned into something people can actually use :)

  • Hi all! I just received my watch a couple days ago and I've been working on porting over a watchface that I had written for the Pebble Time way back when I first got that watch. I also hope to incorporate weather updates into my watchface.

    As far as I can tell, there's no good way to request a weather report right now from the bangle.js, seems like we can only passively receive updates from the gadgetbridge weather app? I think it would be really great if there was a way to execute any sort of arbitrary API request from bangle.js apps. Is this possible?

  • Sat 2020.04.25

    post #20 'if there was a way to execute . . . API request from bangle.js apps. Is this possible?'

    Good Morning @jpoles1, a discussion about this very topic was started last week:

    ble<=>ip

    Please review for ongoing updates.

    As this is recent content and may not have been indexed yet, for future searches, load a Google page instance and type a concise request using the 'site:' keyword qualifier.

    See examples in:

    Writing an effective forum post

  • Amazing work with this watch app, really cool how you were able to use the gadgetbridge notifications. And very clever to save the weather to settings for persistence of the weather data when the app is not open!

  • post #22 'really cool how you were able'

    If I'm not mistaken, the you that is referred to, as stated #18 post by rigrig in reply to @NebbishHacker, gives credit #22 post to the wrong individual. See emulator link from three weeks ago in #7 post. Even stated as such in the actual pull request.

  • Apologies if I'm mistaken, but I think @rigrig wrote the code to accept gadgetbridge weather notifications while using @NebbishHacker hacker's lovely code for displaying the weather itself. Not sure who wrote the code to persist to storage... I didn't think it was that important to be so specific in an informal forum post.

  • As far as I can tell, there's no good way to request a weather report
    right now from the bangle.js, seems like we can only passively receive
    updates from the gadgetbridge weather app? I think it would be really
    great if there was a way to execute any sort of arbitrary API request
    from bangle.js apps. Is this possible?

    For this specific case you could look into adding a new "requestweather" message to the Bangle.js <-> GadgetBridge protocol, which is documented here and implemented by GadgetBridge here. I don't think there's any way of doing completely arbitrary API requests at the moment, though.

    Apologies if I'm mistaken, but I think @rigrig wrote the code to
    accept gadgetbridge weather notifications while using @NebbishHacker
    hacker's lovely code for displaying the weather itself. Not sure who
    wrote the code to persist to storage... I didn't think it was that
    important to be so specific in an informal forum post.

    This is correct, I only contributed the mock up in the emulator. @rigrig deserves all the credit for making it into an actual app :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Weather App

Posted by Avatar for NebbishHacker @NebbishHacker

Actions