News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Status / overview page?

Started by brononius, October 10, 2012, 07:57:02 AM

Previous topic - Next topic

brononius

These are the blocks that i'm using for the weather:


Quote
$_LOCALTIMEZONE = file_get_contents('/etc/timezone', NULL, NULL, 0, 1000);
$_LOCALWEATHER = $_LOCALTIMEZONE;
$_FORECAST = str_replace("/","_",$_LOCALWEATHER);

echo "<script src=\"http://www.weatherforecastmap.com/weather21.php?zona=$_FORECAST\"></script>";
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

iberium

Isn't going by timezone a little vague for weather?  I live in Florida, so when I ran that script, it gave me totally wrong results.  I might as well have been in Canada.

brononius

If i'm not wrong, it doesn't really check your TIMEzone. But it looks more at your timeZONE.  :-X
Have a check what you see when you do 'more /etc/timezone'. If all is well, you should see your city. Or at the least a city nearby.

more /etc/timezone
Europe/Brussels
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

iberium

i see the idea behind it.  I'm not sure if its like this in other parts of the states, but my central time shows up as chicago, which would be the closest major city as far as time goes as it is directly north, but it is about 900 miles north of us.  im pretty sure chicago is the standard setting for our location as all devices that i have ever run across give us that option as the closest.  i would think the best way to do it would be somehow by lat/long, but i dont really know anything about weather systems and api's outside of america.

phenigma

City/Town information is stored in lmce and can be pulled from the database for use in scripts.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]