Author Topic: Developing a Weather Plugin, videos  (Read 100024 times)

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #45 on: December 11, 2014, 11:00:54 am »
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

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #46 on: December 13, 2014, 03:17:53 am »
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

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #47 on: December 13, 2014, 07:00:03 pm »

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

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #48 on: December 13, 2014, 07:47:22 pm »
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

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #49 on: December 13, 2014, 08:18:14 pm »
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

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Developing a Weather Plugin, videos
« Reply #50 on: December 13, 2014, 08:29:49 pm »
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.

darkwizard864

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #51 on: December 13, 2014, 08:42:46 pm »
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

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #52 on: December 13, 2014, 09:15:01 pm »
posde

this script is only one test  that  i build .

is simple to use php longname

a make the corrections .


 

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Developing a Weather Plugin, videos
« Reply #53 on: December 13, 2014, 09:20:56 pm »
:)

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

Thank you!

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #54 on: December 13, 2014, 09:30:43 pm »
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.

darkwizard864

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #55 on: December 13, 2014, 09:36:03 pm »
yahoo does it?

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #56 on: December 13, 2014, 10:06:10 pm »
i'll try

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #57 on: December 15, 2014, 04:37:48 am »
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.

Code: [Select]
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

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #58 on: December 17, 2014, 04:33:49 am »
cf

any luck with yahoo?

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: Developing a Weather Plugin, videos
« Reply #59 on: December 20, 2014, 02:11:47 pm »
i make some progress  using  worldweatheronline.com

now i need to fix  some records from  install table