Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,303 Members 44,942 Now Online
XDA Developers Android and Mobile Development Forum

HTC Homeplug Weather fix - get your LOCAL weather! [New universal patch uploaded!]

Tip us?
 
N2A
Old
(Last edited by N2A; 23rd January 2012 at 10:58 PM.) Reason: Updated server script to 0.2.5, fixed missing countries
#1  
N2A's Avatar
Senior Member - OP
Thanks Meter 4
Posts: 513
Join Date: Jan 2007
Location: Colne, United Kingdom
Lightbulb HTC Homeplug Weather fix - get your LOCAL weather! [New universal patch uploaded!]

THIS SERVER HAS NOW BEEN DEACTIVATED - See below / my final post

WARNING! The old IP-based/Pocket Hosts method using my server HAS BEEN DEACTIVATED, as I have had to remove the code in question from the direct IP. This means that selecting the custom weather server purely via the HTC home customizing utilities without installing a patched version of the HTC Home DLL, it WILL NOT WORK and you will just get "unable to retrieve data" messages. If this is the case, please uninstall your existing HTC Home plugin, and use one of the ones off the download page.

You can, if necessary, set up your own IP address to base it on, if you can't use my system for some reason, and use the pocket host method that way (requires your own server). Otherwise, please use the cabs below.


NEW! UNIVERSAL PATCH PACKAGE
I've written a universal patcher, so people can now get the HTC Home package they want, and just patch the HTCHome.dll from \WINDOWS. Simply get the package, unzip, drop your HTCHome.dll file in the N2A-Patcher folder, and run the n2a-patcher script inside. It'll magically create you a package! (This won't work for DLLs which people have already patched, you need to use the unmodified original.) This should negate the need for me to create individual packages anymore. Feedback welcome! As a result, I won't be releasing any more complete packages - just install your personal favorite, get the \WINDOWS\HTCHome.dll from your device, drop it in the packager, and let it do it's magic, then install the newly created cab.

Coming soon, if I can figure it out - drop the installer in, and get a patched full installer out! Of course, I have to figure out how to batch extract the cabfile correctly first... *laughs*

I've also just created a DLL to CAB packager (so you can drop your own pre-patched DLL in, and it'll turn it into a ready-to-install cabfile), and a DLL patcher (which just patches the DLL itself, ready for cooking etc - perfect for all you flashers out there!) - all on the download page.

PLEASE DON'T PM ME ABOUT THIS - KEEP IT TO THE THREAD UNLESS I SPECIFICALLY REQUEST A PM OR PM YOU!

Help Request
If anyone has an unpatched Sprint Touch XML file, I could do with a backup copy, for those who corrupt their XML files...

If you've got a Touch, Kaiser/TyTN II or Sprint Touch...
There are specific device DLL replacement packages on the new file download page.

NEW DOWNLOAD AND INSTRUCTION SITE
I've moved all the downloads and instructions to a new page, which will hopefully make it clearer on what people need to download. It also contains full instructions on hexediting the DLL if you wish, and re-signing. I'm not entirely sure if it's more readable or not, but it's certainly more manageable! Feedback welcome. There's some specific overlays now for certain versions of the ROMs too.

FAQ:
Can I install colour customisations to this?
Sure. Take a look around the forum. There's plenty of guides elsewhere.

What does this do?
It reroutes the request to the AccuWeather server to my server instead, which then requests the appropriate data from the AccuWeather server, and translates it into the HTC Weather XML format.

Can I run this via my own server?
Yup. It's running on mine via PHP 5.2.x, using the SimpleXML extension. The code is downloadable from the main download page, and I've even commented it. Once you get it running, you'll need to hexedit the HTCHome.dll file in the same way as described for the ROM chefs. I'd recommend keeping the same length of file for replacement - using directories to pad it out if necessary - it could cause unpredictable results otherwise.

Do I need to run my own server to get my local weather?
Nope, feel free to use mine.

Your server isn't working!
Oops. It's a rarity, but occasionally network outages happen. The server won't be disappearing anytime soon though without any warning! I'm sorry to say that I'll be taking the server down for this shortly as I'm wrapping up my web hosting business and transferring it to another company, but quite a few other people seem to have hosted a copy if people still need it. I hope it's been of use over the years everyone!

Why have you done this?
It was really annoying me that I could only get the weather for a city 25 miles away, that had nothing to do with mine.

Can you make me an XML file for such-a-place?
No, I've done enough already, and it's documented fairly heavily above. If you can't follow instructions, give up and stop trying to hack your phone. I'm not here to hold your hand. I'll help fix bugs and obvious issues, but if you can't edit a textfile, you're on your own.

Release Notes
I've stripped most local data from the return info apart from the town/city and country, but the HTC plugin seems to ignore that anyway. Works for all international locations I've tested. I welcome feedback on anything that's not working though, and I'll try to get it nailed pretty quickly. As said above, also works on zip codes, which will make it easier for our US friends on here.

New release fixes countries that weren't in the list, by removing the country checks altogether - I'm confident it'll "just work" - in theory Report bugs in the usual way.

Known Issues
  • The WM5 version will NOT update over GPRS/3G, unless you are using an AKU3.3 ROM. WM5 Weather update over GPRS has been proven with Wizard AKU3.3 (like the T-Mobile or WM5SEr5). Other devices/ROM's still to be confirmed.
  • The temperature in Farhenheit can occasionally be a degree or two out, as I convert from the Celsius scale. To get both readings would mean two calls to the server, which would be more work and bandwidth for my server. I'm sure you can live with a degree out occasionally.

Kudos
Thanks PAPPL for the info on signing files, Schen for his great work on the plugin, and to all those who contributed to getting these plugins (and getting them working!) in the first place!

Enjoy!

As I've taken the server down, I've attached all the relevant files to this post. If someone does want to provide somewhere to point the weather.not2advanced.com domain to, I still own the domain and can add the appropriate A address to it for the purpose if they want to continue hosting for the many users that still seem to be using this plugin. Sorry I had to take it down, but I no longer run the hosting operation this was being held on, and it can be a bit heavy on resources at times.

- Rick
Attached Files
File Type: 7z website.7z - [Click for QR Code] (55.2 KB, 195 views)
File Type: 7z patchers.7z - [Click for QR Code] (2.56 MB, 237 views)
File Type: zip weathertranslator-0_2_5.zip - [Click for QR Code] (3.7 KB, 213 views)
File Type: 7z cabs.7z - [Click for QR Code] (7.95 MB, 235 views)
 
speckledpig
Old
#2  
Senior Member
Thanks Meter 10
Posts: 322
Join Date: Feb 2007
Location: Mobile, AL
Wow, sounds like a lot of work went into this.

Do you think it would be possible, using this framework, to pull data from the NWS website instead of Accuweather?
 
N2A
Old
(Last edited by N2A; 24th July 2007 at 04:20 PM.)
#3  
N2A's Avatar
Senior Member - OP
Thanks Meter 4
Posts: 513
Join Date: Jan 2007
Location: Colne, United Kingdom
Theroetically, I could, providing they set up an appropriate XML feed. However, I can only do one such setup per IP address (and the IP addresses I have are somewhat limited), but if someone wanted to set it up, I've no doubt it'd be possible. However, it wouldn't be trivial - I've had to manually grab bits of data from the XML and process it into the format the home plugin expects. As a UK resident, the NWS isn't huge amounts of use to me

On a more technical note though, it'd require a similar format - at least 5 days in advance for a particular area, and the exact parameters (or something that can be adjusted / mangled / processed into the exact parameters) that the plugin needs. (Take a look at the code in the zipfile if you want to see how much of a pain in the neck THAT was!) Adapting it would also need a complete conversion matrix, or a hacky method using (say) the RSS feed ID for the BBC, or however the NWS does it.
Current: Google/LG Nexus 4 (Testing CM11, Stock, Nexus 5 Experience, OmniROM)
Previous: Sony Xperia Pro MK16i running Jelly Sandwich 8.5
Previous: Nokia N900 - Maemo 5/CSSU
Previous: T-Mobile UK, Vario II (Hermes HERM300), WM6 - Pandora ROM

Once-upon-a-time HTC Home hacker to put local weather on Windows Mobile devices...
 
singrysweets
Old
#4  
singrysweets's Avatar
Member
Thanks Meter 0
Posts: 88
Join Date: Mar 2007
Location: Kingston
Will this work for cingular/att customer?
TC
Rom Date: 12/11/07
Rom Version: 1.25.405.1 WWE
Radio Version: 1.58.21.23
 
N2A
Old
#5  
N2A's Avatar
Senior Member - OP
Thanks Meter 4
Posts: 513
Join Date: Jan 2007
Location: Colne, United Kingdom
If it works already for the major cities, then it'll work the same way, but with more localised weather available.

If you're having trouble with the normal weather plugin setup though, you may still have trouble. Then again, it might work! I've no idea. Try it and find out
Current: Google/LG Nexus 4 (Testing CM11, Stock, Nexus 5 Experience, OmniROM)
Previous: Sony Xperia Pro MK16i running Jelly Sandwich 8.5
Previous: Nokia N900 - Maemo 5/CSSU
Previous: T-Mobile UK, Vario II (Hermes HERM300), WM6 - Pandora ROM

Once-upon-a-time HTC Home hacker to put local weather on Windows Mobile devices...
 
TorbenKB
Old
#6  
TorbenKB's Avatar
Senior Member
Thanks Meter 52
Posts: 348
Join Date: Feb 2006
Location: Right here
Talking Yeeaah

Hi N2A / Rick.

Great job - really! I can't thank you enough.
It finally works for me.

Thanks
/Torben


Primary phones ATM:
Samsung Note II LTE (Rooted Stock 4.4.2.)
LG Nexus 5 (Stock 4.4.4.)

Other devices in use ATM:
Samsung Galaxy Gear (Tizen stock)
Samsung Galaxy Tab 3 (Stock)
Nokia Lumia 820 (Stock)



“We all know that light travels faster than sound. That's why certain people appear bright until you hear them speak.”
― Albert Einstein


If I helped - or encouraged - you, please push the Thanks button below. My Thanks Meter thanks you in Advance.
 
gdbtg
Old
#7  
Junior Member
Thanks Meter 0
Posts: 27
Join Date: Jun 2007
Default HTC Homeplug Weather

Hello,

Thanks for sharing your great work. (I am french so sorry for my poor english)
However, I working on HTC Homeplug Weather because it wont let me download weather forecast when I am using 3G connection.
It works great when I an using wifi connection so I think it is coming from the proxy of vodaphone France (SFR) wich is blocking the access. So I was wondering if I will be able to connect to your server ? (for the moment it is not working) or redirecting the plugin to my tunnel...
Second is there a way to be sure that htc weather plugin is trying to connect to htc.accuweather.com and not to another web site.

Thanks in advance

A french guy wich is also living in a small city and wishto have his weather forecast ;)
 
N2A
Old
(Last edited by N2A; 10th December 2007 at 03:07 PM.)
#8  
N2A's Avatar
Senior Member - OP
Thanks Meter 4
Posts: 513
Join Date: Jan 2007
Location: Colne, United Kingdom
Quote:
Originally Posted by TorbenKB View Post
Hi N2A / Rick.

Great job - really! I can't thank you enough.
It finally works for me.

Thanks
You're most welcome Glad I could help.

Quote:
Originally Posted by gdbtg View Post
Hello,
However, I working on HTC Homeplug Weather because it wont let me download weather forecast when I am using 3G connection.
It works great when I an using wifi connection so I think it is coming from the proxy of vodaphone France (SFR) wich is blocking the access. So I was wondering if I will be able to connect to your server ? (for the moment it is not working) or redirecting the plugin to my tunnel...
Second is there a way to be sure that htc weather plugin is trying to connect to htc.accuweather.com and not to another web site.

Thanks in advance

A french guy wich is also living in a small city and wishto have his weather forecast ;)
Well, if it's the HTC accuweather site specifically blocked, then it will help you. If it's generically blocking sites, then it won't.

Re a tunnel - depends what you mean by it.

The HTC home plugin *always* tries to connect to htc.accuweather.com - hence the host file change, which diverts it to my server instead, which provides the correct data. (NO LONGER APPLIES WITH NEW PLUGINS!)

However, if it's still not working with the hosts file modification (may require soft reset, not sure!), then I'm afraid there's not a lot I can do, unless you can tunnel it as you said, but it depends on what you're using to tunnel.
Current: Google/LG Nexus 4 (Testing CM11, Stock, Nexus 5 Experience, OmniROM)
Previous: Sony Xperia Pro MK16i running Jelly Sandwich 8.5
Previous: Nokia N900 - Maemo 5/CSSU
Previous: T-Mobile UK, Vario II (Hermes HERM300), WM6 - Pandora ROM

Once-upon-a-time HTC Home hacker to put local weather on Windows Mobile devices...
 
gdbtg
Old
#9  
Junior Member
Thanks Meter 0
Posts: 27
Join Date: Jun 2007
Default HTC Homeplug Weather

Thanks for your quick answer !
It's still not worling ;-(
But I wondering how can I test if Pockets Hosts is redirecting properly the htc weather address.

Sincerely
 
N2A
Old
(Last edited by N2A; 10th December 2007 at 03:08 PM.)
#10  
N2A's Avatar
Senior Member - OP
Thanks Meter 4
Posts: 513
Join Date: Jan 2007
Location: Colne, United Kingdom
Quote:
Originally Posted by gdbtg View Post
Thanks for your quick answer !
It's still not worling ;-(
But I wondering how can I test if Pockets Hosts is redirecting properly the htc weather address.

Sincerely
***************** REMOVED OLD CONTENT, NO LONGER APPLIES WITH THE NEW PLUGINS *****************
Current: Google/LG Nexus 4 (Testing CM11, Stock, Nexus 5 Experience, OmniROM)
Previous: Sony Xperia Pro MK16i running Jelly Sandwich 8.5
Previous: Nokia N900 - Maemo 5/CSSU
Previous: T-Mobile UK, Vario II (Hermes HERM300), WM6 - Pandora ROM

Once-upon-a-time HTC Home hacker to put local weather on Windows Mobile devices...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes