• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[HOW-TO] Add your City in MIUI Weather App

Search This thread

TechnoLover

Member
Jul 1, 2010
37
34
Hello everybody,

when I searched the web for a tutorial how to add a city to MIUI-Weather app and found nothing yet, I started to try to add my own city to the database of MIUI. I was succesful and I thought that it would be a good idea to write a tutorial how to add your own city to the db.

You need the following:
  • root
  • SQLite Database Browser: sourceforge.net/projects/sqlitebrowser/
  • OR Root Explorer && SQlite Editor (thanks to Fisher_9511)

I'm not responsible if you damage your phone, brick it or it does not start anymore. You're the one who's responsible for your device. You should know what you do

I explain the process on the database of Europe and Germany, because there's nothing added for Germany.

First thing to do is to download the database of your desired location. Save it somewhere where you find it again. Now start "SQLite Database Browser" and open the database. It should now look like thid (Attached Image 1). Switch to the tab "Browse Data" and select "hotcity" as the table (Attached Image 2).

Now search for the abbreviation of your country, in my case it's "DE" for "Deutschland" (Germany). Remember the abbreviation and the posID of your country. So in my case I need "DE" and "110000001"

Now head over to weather.com and search for your city, where you live in. In my case I search for "Cloppenburg, Germany". Now you should have an url like this: "weather.com/weather/today/GMXX0017:1:GM". The part which is necessary is "GMXX0017", the GM stands for Germany, the XX is a placeholder I think and 0017 is the ID we need.

Now we have the posID of our country and the ID of our city. Now we have to sum the posID and the ID of our city. In my case it's "110000001" + "0017" which ends up in "110000018". This is the posID for our city.

Now we switch back again to our SQLite Database Browser and select "city" as our table (Attached Image 3). Now we have to go to the last page (Attached Image 7) and look for the last ID used in the database. In my case it's "16619" (Attached Image 4), so the next ID is "16620".

Now we create a new record and insert all our information we have, this happens when you double click the specific field of the new added empty line.
This should look like this (Attached Image 5).

When you entered every information it should look like this (Attached Image 6). Save your database and push it back to your device.
Code:
adb push miui_city_entire_eu.db /data/data/com.miui.weather/databases/miui_city.db

Now you should be able to select your city in the weather app and use the app effeicient.

(I hope it was the right forum :) )
 

Attachments

  • step_1qcl2.jpg
    step_1qcl2.jpg
    34.2 KB · Views: 2,088
  • step_1173p.jpg
    step_1173p.jpg
    47.2 KB · Views: 1,594
  • step_157eg.jpg
    step_157eg.jpg
    59.4 KB · Views: 1,303
  • step_1e74l.jpg
    step_1e74l.jpg
    65.1 KB · Views: 1,617
  • step_1x7bz.jpg
    step_1x7bz.jpg
    50.7 KB · Views: 1,135
  • step_1zunw.jpg
    step_1zunw.jpg
    40 KB · Views: 1,107
  • step_1k7je.jpg
    step_1k7je.jpg
    60.7 KB · Views: 1,270
Last edited:

mobiousdigital

Senior Member
Feb 3, 2010
671
7
LOL!

Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.
 
  • Like
Reactions: wowthatisrandom

mode_ss

Member
Oct 30, 2010
31
2
Santo Domingo
Why are you so rude with this guy, mobiusdigital?? he is just trying to make that app a little better, for those who desire more of it!! It's not neccesary for you to be such an indecent person, not even if you were the master developer for that app...

I think you should appologize "Technolover"... Beeing a "professional" dev. (as I think you are), also demands to be more polite... there are other ways to say the things you just wrote... or is that everyone in your country are that rude?? Gosh!!
 

Fisher_9511

Member
Aug 28, 2010
38
4
Followed all instructions to the letter, but the MIUI weather app won't open, well I hope that MIUI Devs will add some functionnality to MIUI Weather to add our own cities, or something similar.

for the record
using HTC HD2, with last MIUI and living in France.
 

tkjeeper

Senior Member
Jan 24, 2011
3,713
1,509
Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.

Very helpful, this is the kind of help everyone looks for, brilliant.
 

ermacwins

Senior Member
Aug 25, 2009
5,865
996
Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.

Oh look, its the clown who thinks he owns miui. He wanted to sell the weather widget because he done a few dirty hacks. Also he was considering to sell some language packs. Myself and others co confronted him and our posts got deleted and I got banned.

You should see his attitude in miui-dev
 

Monofail

Member
Aug 12, 2010
5
0
Canberra
WOW! I was really keen to try the app out, had been checking their site every couple of weeks to see if my country was in there yet. After mobiousdigital's reply, I'm disgusted.

-1 customer
 

TechnoLover

Member
Jul 1, 2010
37
34
I don't know Vietnam Post ID so MIUI weather fail to update.

Sorry, but this works only for posID's which are in the "hotcity" table. I don't know the real backend of the app but I think that the posID's of the countries are just there to change them to the letters which wetter.com uses (e.g.: GMXX0017 for Cloppenburg).

Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.[...]

Maybe I have no clue about the real backend but it's not a full load of crap as you can see here. My Tutorial helped one to get his town working, so ...

Followed all instructions to the letter, but the MIUI weather app won't open, well I hope that MIUI Devs will add some functionnality to MIUI Weather to add our own cities, or something similar.

for the record
using HTC HD2, with last MIUI and living in France.

Try pushing it to /system/app/ ;)

@ tkjeeper & ermacwins

I'm not going to look further about him and don't really care about him but thanks ;)

@ DragonKnight_91

look at my first quote ;)

Ok, I used SQLite Editor from android and it's now working

HD2 with MIUI

That's a possibility, too ;) it's cool that it worked for someone and that I could have helped one person :)
 
  • Like
Reactions: Seylox and nadiros

EDD!E

Senior Member
Jul 22, 2007
326
14
Anyone can tell me where can I get posID ?

I manage to reach the weather.com for my info ... SNXX0006

Now, I'm stuck with posID to complete the entire db.

Please Help ...
 

TechnoLover

Member
Jul 1, 2010
37
34
so live in Germany in a little village will it work here?

when you find the city on weather.com, then it should be possible ;)

where can i download the database of my desired location?

On the download page of the miui weather widget ;)

Anyone can tell me where can I get posID ?

I manage to reach the weather.com for my info ... SNXX0006

Now, I'm stuck with posID to complete the entire db.

Please Help ...

Sorry, but Asia isn't in the hotcity table, so it's not possible to get it working, except you know the posID from the Backend of the App but I don't think so =/
You have to wait for an update from MiUI-Weather
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Hello everybody,

    when I searched the web for a tutorial how to add a city to MIUI-Weather app and found nothing yet, I started to try to add my own city to the database of MIUI. I was succesful and I thought that it would be a good idea to write a tutorial how to add your own city to the db.

    You need the following:
    • root
    • SQLite Database Browser: sourceforge.net/projects/sqlitebrowser/
    • OR Root Explorer && SQlite Editor (thanks to Fisher_9511)

    I'm not responsible if you damage your phone, brick it or it does not start anymore. You're the one who's responsible for your device. You should know what you do

    I explain the process on the database of Europe and Germany, because there's nothing added for Germany.

    First thing to do is to download the database of your desired location. Save it somewhere where you find it again. Now start "SQLite Database Browser" and open the database. It should now look like thid (Attached Image 1). Switch to the tab "Browse Data" and select "hotcity" as the table (Attached Image 2).

    Now search for the abbreviation of your country, in my case it's "DE" for "Deutschland" (Germany). Remember the abbreviation and the posID of your country. So in my case I need "DE" and "110000001"

    Now head over to weather.com and search for your city, where you live in. In my case I search for "Cloppenburg, Germany". Now you should have an url like this: "weather.com/weather/today/GMXX0017:1:GM". The part which is necessary is "GMXX0017", the GM stands for Germany, the XX is a placeholder I think and 0017 is the ID we need.

    Now we have the posID of our country and the ID of our city. Now we have to sum the posID and the ID of our city. In my case it's "110000001" + "0017" which ends up in "110000018". This is the posID for our city.

    Now we switch back again to our SQLite Database Browser and select "city" as our table (Attached Image 3). Now we have to go to the last page (Attached Image 7) and look for the last ID used in the database. In my case it's "16619" (Attached Image 4), so the next ID is "16620".

    Now we create a new record and insert all our information we have, this happens when you double click the specific field of the new added empty line.
    This should look like this (Attached Image 5).

    When you entered every information it should look like this (Attached Image 6). Save your database and push it back to your device.
    Code:
    adb push miui_city_entire_eu.db /data/data/com.miui.weather/databases/miui_city.db

    Now you should be able to select your city in the weather app and use the app effeicient.

    (I hope it was the right forum :) )
    2
    I don't know Vietnam Post ID so MIUI weather fail to update.

    Sorry, but this works only for posID's which are in the "hotcity" table. I don't know the real backend of the app but I think that the posID's of the countries are just there to change them to the letters which wetter.com uses (e.g.: GMXX0017 for Cloppenburg).

    Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.[...]

    Maybe I have no clue about the real backend but it's not a full load of crap as you can see here. My Tutorial helped one to get his town working, so ...

    Followed all instructions to the letter, but the MIUI weather app won't open, well I hope that MIUI Devs will add some functionnality to MIUI Weather to add our own cities, or something similar.

    for the record
    using HTC HD2, with last MIUI and living in France.

    Try pushing it to /system/app/ ;)

    @ tkjeeper & ermacwins

    I'm not going to look further about him and don't really care about him but thanks ;)

    @ DragonKnight_91

    look at my first quote ;)

    Ok, I used SQLite Editor from android and it's now working

    HD2 with MIUI

    That's a possibility, too ;) it's cool that it worked for someone and that I could have helped one person :)
    1
    LOL!

    Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

    Good luck with your inaccurate ramblings about the id's.

    We actually made those up and make it correspond to our backend system for picking up data.

    Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

    If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

    Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.
    1
    Ok, I used SQLite Editor from android and it's now working

    HD2 with MIUI