Thunkable Weather


#1

Is there a way to get the weather through Thunkable?


#2

You can use an API, like the BBC Weather or others


I’m working on a PHP example using openweathermap.org, because I’ve already worked with it in some LUA Telegram bots


Check this: https://scripts.thunkable.ga/weather/Examples/ (Using official OpenWeatherMap PHP API)

What data data do you want to have? I can provide everything that are in those examples


Scripts.thunkable.ga
#3

I would like to have:

Sunrise and Sunset
Wind
Wind Direction
Temperature
Precipitation Prop
Cloud Cover
Visibility


#4

Okey, I will do it using GET Methods and the city, would you prefer to input it using lats and longs, or by city name?


#5

It would be best if it gets it automatically with GPS.


#6

That is no problem, you could parse lat and long to the url using the location sensor, so don’t worry about it, I will add the option to input the city or the coordenates


#7

Also, I forgot to ask you if you wanted the current weather or the weather forecast

What do you want?


#8

@Ced999
The script is finished (for current weather only). I update it so you can also make the weather forectast, but unfortunately I can’t work too much in Thunkable during the week, so I can’t make an app example right now (I’m also busy with my Image Editor App), but when I have time I will make a better example:

Usage example: https://scripts.thunkable.ga/weather/?weather&provider=OpenWeatherMap&current&temperature&now -> Response: 12.16 °C


Sorry for not giving a detailed example now, I’m very busy


Features I Want
#9

No problem, thank you very much


#10

Fantastic work, as usual, @barreeeiroo! Thanks for this script. :+1:


#11

Later (or some days later when I have time xD) I will make a detailed example and add more functions like humidity and pressure

Thanks :+1:


#12

I’ve updated the script. Now, with only typing https://scripts.thunkable.ga/weather/, it will show you how to use it, so it will be easier for beginner users:

Sorry for that quantity of images :sweat_smile:



**And, as you can see, I've also added the option to get the forecast in a 'raw' form, but I will try to make easier to get the weather for x day and x hour**




And I’ve added this new requests:

  • Get a cool icon to use as image or the url
  • Humidity
  • Pressure
  • When was the latest update


#13

Amazing work!
If I could I would donate to you immeadiatly!


#14

No please xD
I don’t like people that pay for software. I’m a fan of free software, so I don’t want money.
This is just a hobby xD


#15

Well, I would not pay for it, I would donate. But if you do not want :relieved:


#16

I still have a question.

Why don’t I get anything back here?

https://scripts.thunkable.ga/weather/?weather&provider=OpenWeatherMap&current&coordinates&lat=47.878593&log=18.146682&sun&rise


#17

Let me go home and I will take a look to it


Oops, sorry. It was my fault. I set the longitude coordinate to the variable lon, but in the help it was set as log. Fixed it. Now it works with lon, log, long or longitude, so it will cover all possible mistakes

eg.: https://scripts.thunkable.ga/weather/?weather&provider=OpenWeatherMap&current&coordinates&lat=47.878593&log=18.146682&sun&rise


#18

Thank you, it works for me now.
Is there a way to change th timezone?


#19

I think so

But let me search more info and tomorrow I will trigger to implement


#20

https://scripts.thunkable.ga/weather/?weather&provider=OpenWeatherMap&current&coordinates&lat=47.878593&log=18.146682&precipitation&data

Hmm… the “data” thing does not work