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

Developing a Weather Plugin, videos

Started by tschak909, July 18, 2013, 07:33:38 AM

Previous topic - Next topic

cfernandes

darkwizard864

I know weather.com not have an api or xml service. then it gets a little tricky to do the work script.

but let's see if I can help you what's wrong?


Carlos

darkwizard864

I was tring to get to do f instead of c
plus was gona gt to do rest of what it needs 3-6 day .

cfernandes


i update the script  and  now  have  3 variables to configure 

to change from "C"  to "F"

uncomment the lines

#$temp_type="F";
#$temp_current="temp_F";
#$temp_max="tempMaxF";
#$temp_min="tempMinF";



darkwizard864

all good but a few problems it Spanish or something.. I change the c to f nothing works right local cast say just f

cfernandes

when change  C to F   you used capital letters ?

sorry  for that  the language.

days off week  is in portugues .

you can  change   "Domingo"  to "Sunday"
                          'Seguna-Feira" to "Monday"  ....

Marie.O

cfernandes,

is there a reason why you don't use the PHP function date to return the longname of the day of the week? That way, the text is in the local configured language.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

darkwizard864

when change  C to F   you used capital letters ? yes
look like this
$temp_type="F";
$temp_current="temp_F";
$temp_max="tempMaxF";
$temp_min="tempMinF";

cfernandes

posde

this script is only one test  that  i build .

is simple to use php longname

a make the corrections .



Marie.O

:)

Isn't it nice that sometimes build-in functions save a lot of code AND improve internationalisation.

Thank you!
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

cfernandes

another thing  on this test script  is  that i use a local  url  from brazil  to get   textual forecast for my area.

the variable on script 

$url2="http://www.climatempo.com.br/rss/destaque.xml"

this  need to changed.

i need to search other sites  that offer this services.

if some one know some sites   i can test.


cfernandes


mkbrown69

Thanks for building the updated packages for the weather plugin!

I was starting to think that the plugin wouldn't work with RoamingOrb & proxy orbitor, or that I hadn't configured the plugin properly, as it wasn't working with the test harness.  With the new packages, it's now working, and I can see the results in RoamingOrb.

One thing I did notice in RoamingOrb, is that when I tap the radar image button (and there isn't a radar image to go to, tapping any button (like the home button) causes the proxy orbitor to die.  It's reproducible, and I did manage to get a clean log trace from restart through to crash.  This is the tail end, where it died.


05      12/14/14 22:12:01.655           Socket::ReceiveData 0x8dedd88 failed, b
ytes left 0 start: 660000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 5 Event Dev #38 <0xb76d2
b40>
05      12/14/14 22:12:01.655           Socket::ReceiveString2 ReceiveData fail
ed m_Socket: -1 Event Dev #38 <0xb76d2b40>
05      12/14/14 22:12:01.655           Socket::SendReceiveMessage didn't get v
alid response ReceiveData failed <0xb76d2b40>
05      12/14/14 22:12:01.655           InternalSendCommand cannot send with re
turn message.  type 1 id 84 to 423 Going to quit <0xb76d2b40>
05      12/14/14 22:12:01.658           Socket::ReceiveData 0x8de57e0 failed, b
ytes left 0 start: 600000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 6 Command_Impl1 Dev #38
<0xb5fffb40>
05      12/14/14 22:12:01.659           Socket::ReceiveString2 ReceiveData fail
ed m_Socket: -1 Command_Impl1 Dev #38 <0xb5fffb40>
05      12/14/14 22:12:02.000           Socket::ReceiveData 0x8de8ff8 failed, b
ytes left 0 start: 660000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 4 Event Dev #38 <0xb57fe
b40>
05      12/14/14 22:12:02.000           Socket::ReceiveString2 ReceiveData fail
ed m_Socket: -1 Event Dev #38 <0xb57feb40>
01      12/14/14 22:12:02.000           Socket::PingFailed 0x8de8ff8 Event Dev
#38 (socket id in destructor: -1 0x8de57e0, ch: (nil)) <0xb57feb40>
01      12/14/14 22:12:02.001           Socket::PingFailed 0x8de57e0 Command_Im
pl1 Dev #38 (socket id in destructor: -1 (nil), ch: (nil)) <0xb57feb40>
05      12/14/14 22:12:04.246           TCPIP: Closing connection to -1 (Proxy_
Orbiter) 0xb60005e0 m_Socket: 10 <0xb3afcb40>
05      12/14/14 22:12:04.448           Dropping all sockets... <0xb76d4700>
05      12/14/14 22:12:04.459           Done dropping sockets! <0xb76d4700>
05      12/14/14 22:12:04.460           Socket::SendData socket is invalid <
0xb76d4700>
05      12/14/14 22:12:04.460           Socket::SendMessage *failed to send* ty
pe 1 id 255 from 38 to 9 <0xb76d4700>
05      12/14/14 22:12:04.460           InternalSendCommand cannot send with re
turn message.  type 1 id 255 to 9 Going to quit <0xb76d4700>
05      12/14/14 22:12:04.460           Orbiter reloading... <0xb76d4700>
05      12/14/14 22:12:04.460           Orbiter quiting... <0xb76d4700>
05      12/14/14 22:12:04.460           Got an on quit.  Pushing an event into
SDL <0xb76d4700>
05      12/14/14 22:12:04.460           Got an on quit.  Pushing an event into
SDL <0xb76d4700>



Want me to file a Trac ticket?  I have a complete log trace from the proxy orbitor re-spawning to where it quits.  It might need a default "No Radar image" image file...

Now that Universal Devices has released the new firmware for the ISY-994i with HAM Weather support (replacing the previous Weatherbug support), I now plan on adding support for the LMCE weather plugin to my ISY GSD driver.  It'll go a lot smoother now that I know I didn't mess up anything with the weather plugin.

Cheers!

/Mike

darkwizard864


cfernandes

i make some progress  using  worldweatheronline.com

now i need to fix  some records from  install table