yrWeather Plugin 1.3.0.0 (1 Viewer)

burr

MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Re: yrWeather Plugin

    Ok to make life a little bit easier
    use
    <visible>string.equals(#yrWeather.forecastByHour,true)</visible>
    and
    <visible>string.equals(#yrWeather.forecastByDay,true)</visible>

    Then i have a strategy for hour by hour the id's are as follows
    Weekday = 300,
    Time = 301,
    Temp = 302,
    Preciptation= 303,
    Wind= 304,
    WeatherIcon= 305,
    Condition = 306,

    if you then take the next hour the will have id as before but you add hour * 10 "notice hour iteriation starts from zero"
    example
    hour 2
    Weekday = 310,
    Time = 311,

    hour 3
    Weekday = 320,
    Time = 321,

    This way it's not limited to 4x3 screens :)

    Backdrops - now that you have #yrWeather.weatherIcon - all we need is a property such as #yrWeather.weatherIcon.no to expose the icon number to the skin. Then any skin can use <texture>\animations\Weather\#yrWeather.weatherIcon.no.jpg</texture> to display a backdrop that applies to the current hourly weather condition if they wish.
    #yrWeather.weatherIcon.nr


    I can confirm all the skin properties work here on Basic Home or any window. The only minor issue I noticed is that#yrWeather.windSpeed does not have a space before the m/s like it does in all the wind speeds within yrWeather window.

    Fixed
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    Re: yrWeather Plugin

    Hi Burr , thanks for the update :)

    1-with new version got error log (some string "False") see attachment "yrWeatherLog".
    2-#yrWeather.weatherIcon.nr for backdrops ,not work for me ?
    3- i'm abit Confused abut hour by hour forecast , how many hour to display on screen 6 hours / 7 hours or lass ? can you explain more .... :)
    4- tack long time for screen to change from forecast by days to forecast by hours with new version , with one version before the change was very fast ... ?
    5- abut condition "Sun and clear Skies" (see first screenshot) with day icon(sun image) text " Sun and clear Skies" . with Night icon(moon image)
    text "Clear skies" .... Can the day be like night ? only text "Clear skies" the user can see the deffrent with moon/sun image (sort text more nice for skinners :) as have more place on screen and less use of fadelabel code ... to say sort is better :) .
    6- there was no need to add ID for the Divider , as it use a image code (ID 1) and some skins will not use it (i add it to default skin ,to mack the screen more nicer and little like the old mp weather plugin)
    7- wich buttons you like more ? image buttons - 1 or image buttons - 2 ? (me i like No.2) :)

    thanks .
     
    Last edited:

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Re: yrWeather Plugin

    Hi Burr , thanks for the update :)

    1-with new version got error log (some string "False") see attachment "yrWeatherLog".
    2-#yrWeather.weatherIcon.nr for backdrops ,not work for me ?
    3- i'm abit Confused abut hour by hour forecast , how many hour to display on screen 6 hours / 7 hours or lass ? can you explain more .... :)
    4- tack long time for screen to change from forecast by days to forecast by hours with new version , with one version before the change was very fast ... ?
    5- abut condition "Sun and clear Skies" (see first screenshot) with day icon(sun image) text " Sun and clear Skies" . with Night icon(moon image)
    text "Clear skies" .... Can the day be like night ? only text "Clear skies" the user can see the deffrent with moon/sun image (sort text more nice for skinners :) as have more place on screen and less use of fadelabel code ... to say sort is better :) .
    6- there was no need to add ID for the Divider , as it use a image code (ID 1) and some skins will not use it (i add it to default skin ,to mack the screen more nicer and little like the old mp weather plugin)
    7- wich buttons you like more ? image buttons - 1 or image buttons - 2 ? (me i like No.2) :)

    thanks .

    1. You dont have to care about this, some leftovers when i was debugging this will be deleted.

    2. What do you mean dont work you have to remeber it will only give you a number example "26" has to be used like dadeo suggested <texture>\animations\Weather\#yrWeather.weatherIcon.no.jpg</texture>

    3. There is no constraint anymore the total amount of hours is more than 24, so what i did was a base ID 300-306 for the next hour take ID 300-306 and add 10 next hour ID 300-306 and add 20 and so on, if you use 6 or 7 doesnt matter as long as you follow ID 300-306 uppwards the plugin will check how many valid collections of theese controls there is, so for
    4x3 skin you can use less because they wont fit, see my skin file.

    4. I can see this also some times can't say why but the properties and the evaluation in the visible tag seems to be slower but now it's easier for you to add a divider for example.

    5. Always possible i think i got the string Sun and clear skies from somewhere and then i thought it wasn't suitable at night :)

    6. Use the divider and <visible>string.equals(#yrWeather.forecastByHour,true)</visible> or <visible>string.equals(#yrWeather.forecastByDay,true)</visible>

    7. I like number 2 i must say
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    Re: yrWeather Plugin

    Hi Burr ,
    abut Backdrops i use the same code but no backdros view on screen at all .

    this is the full code :

    <control>
    <description>Weather Background Fanart</description>
    <id>0</id>
    <type>image</type>
    <posx>0</posx>
    <posy>0</posy>
    <width>1280</width>
    <height>720</height>
    <texture>\animations\weather\#yrWeather.weatherIcon.no.jpg</texture>
    <animation effect="fade" start="0" end="100" time="250" delay="100" reversible="false">Visible</animation>
    <animation effect="fade" start="100" end="0" time="250" reversible="false">Hidden</animation>
    </control>

    any idea ?
     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Re: yrWeather Plugin

    Hi Burr ,
    abut Backdrops i use the same code but no backdros view on screen at all .

    this is the full code :

    <control>
    <description>Weather Background Fanart</description>
    <id>0</id>
    <type>image</type>
    <posx>0</posx>
    <posy>0</posy>
    <width>1280</width>
    <height>720</height>
    <texture>\animations\weather\#yrWeather.weatherIcon.no.jpg</texture>
    <animation effect="fade" start="0" end="100" time="250" delay="100" reversible="false">Visible</animation>
    <animation effect="fade" start="100" end="0" time="250" reversible="false">Hidden</animation>
    </control>

    any idea ?

    test this #(string.format('\animations\weather\{0}.jpg', #yrWeather.weatherIcon.nr))
    dadeo's suggestion was interpreted in a very interesting way basically it was looking for property #yrWeather.weatherIcon.no.jpg instead
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    Re: yrWeather Plugin

    test this #(string.format('\animations\weather\{0}.jpg', #yrWeather.weatherIcon.nr))
    dadeo's suggestion was interpreted in a very interesting way basically it was looking for property #yrWeather.weatherIcon.no.jpg instead

    Sorry also this code no view any backdrop .... must say first time i see code like that ... or i did not use it corect ?
    can you show me sample of full code , comper to the code i post abouve .
     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Re: yrWeather Plugin

    test this #(string.format('\animations\weather\{0}.jpg', #yrWeather.weatherIcon.nr))
    dadeo's suggestion was interpreted in a very interesting way basically it was looking for property #yrWeather.weatherIcon.no.jpg instead

    Sorry also this code no view any backdrop .... must say first time i see code like that ... or i did not use it corect ?
    can you show me sample of full code , comper to the code i post abouve .

    <control>
    <description>Location and Date Value</description>
    <type>label</type>
    <id>13210</id>
    <posX>400</posX>
    <posY>10</posY>
    <label>#(string.format('weather\128x128\{0}.png', #yrWeather.weatherIcon.nr))</label>
    <font>font12</font>
    <width>750</width>
    <textcolor>White</textcolor>
    </control>
    <control>
    <description>Night Icon Image</description>
    <type>image</type>
    <id>101237</id>
    <posX>250</posX>
    <posY>10</posY>
    <width>128</width>
    <height>128</height>
    <visible>string.equals(#yrWeather.forecastByDay,true)</visible>
    <texture>#(string.format('weather\128x128\{0}.png', #yrWeather.weatherIcon.nr))</texture>
    <colorkey>FFFF00FF</colorkey>
    <colordiffuse>FFFFFFFF</colordiffuse>
    </control>

    This works for me please test this, labelcontrol is only in debugging purpose to see i get the correct path
    can the problem be that you have a '\' character in the beginning?
     

    ysmp

    Design Group
  • Team MediaPortal
  • May 17, 2008
    1,863
    744
    Seoul.
    Home Country
    South Korea South Korea
    Re: yrWeather Plugin

    Hi Burr , I think is not clear for you , so i will try to explain more clear :)

    the string(propertey) is like icon image (128x128) but for 1280x720 image that will view in backgrownd ,so the plugin same way select nomber for icon (screen icons) like No. (1) , the plugin will select backdrop No.1(screen backdrops) , if contition change to icon No.(10) also the No.(10) backdrop will view .

    the link folder can be where we wont ?
    or if the plugin need can put the folder in Weather folder ?

    so if need we can mack like this :
    icons folder ... \skin\DefaultWide\Media\Weather\128x128 \.0.1.2.3.4.....
    bacdrops ...\skin\DefaultWide\Media\Weather\weather_BG \.0.1.2.3.4....

    hope this more clear ? thanks for all the great work you do :)
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    Re: yrWeather Plugin

    Sorry I didn't get time to check about the backdrops before now.

    The problem appears to be that the plugin recognizes and interprets #yrWeather.weatherIcon and so does not recognize #yrWeather.weatherIcon.no (or #yrWeather.weatherIcon.nr - not sure which one you ended up using but I tried both!)

    I suspect it doesn't work because the properties are not unique (i.e. #yrWeather.weatherIcon is already a skin property). In any case, the property does not return valid data. It should display only the icon number such as 0, 1, 2, etc. but it doesn't. Instead it returns 'weather\128x128\xx.png .no' (or 'nr') where xx is the icon number. So I think you need to use a property such as #yrWeather.Icon.no or something that does not contain #yrWeather.weatherIcon. Sorry for not thinking of that sooner :oops: But I am not a coder! (disclaimer :p)

    Code:
    <label>#(string.format('weather\128x128\{0}.png', #yrWeather.weatherIcon.nr))</label>
    Does not work for me either. It only returns weather\128x128\.png since it can't recognize #yrWeather.weatherIcon.nr - you can only format the string if the property returns valid data. (0) represents the index number so it is trying to replace it with #yrweatherIcon.nr rather than extract the icon number from the string. (see skin expressions) I am not sure how it was working for you!

    ysmp - yes if the property worked, and only displayed the icon number, you could use any folder you like in the texture tag.

    Hope that all helps?
     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Re: yrWeather Plugin

    I do understand very well what you mean.
    #yrWeather.weatherIcon.nr is a property that will return a number corresponding to a certain type of weather.

    My example shows how to get the correct image from the 128X128 folder cause i dont have any of 1280x720 pictures as you want.

    what i think is the problem in your case ysmp is that you use \ in the begginning of the path, try this code and i believe it will work.
    <control>
    <description>Weather Background Fanart</description>
    <id>0</id>
    <type>image</type>
    <posx>0</posx>
    <posy>0</posy>
    <width>1280</width>
    <height>720</height>
    <texture> #(string.format(animations\weather\{0}.png', #yrWeather.weatherIcon.nr))</texture>
    <animation effect="fade" start="0" end="100" time="250" delay="100" reversible="false">Visible</animation>
    <animation effect="fade" start="100" end="0" time="250" reversible="false">Hidden</animation>
    </control>


    When i test at my end using this an image will show
    <texture>#(string.format('weather\128x128\{0}.png', #yrWeather.weatherIcon.nr))</texture>
    this way nothing will show
    <texture>#(string.format('\weather\128x128\{0}.png', #yrWeather.weatherIcon.nr))</texture>

    Maybe i should change this property
    #yrWeather.weatherIcon.nr
    to
    #yrWeather.weatherCodeNo ?
     

    Users who are viewing this thread

    Top Bottom