Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - SmartVisu Gallery

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    - √ - SmartVisu Gallery

    Hallo, Hi,

    Sorry to write in English but I don't know German. Hopefully you won't hold it against me

    First I would like to congratulate Martin/Apollo for smartVisu. Well done!

    I just started to customize smartVisu for my installation on a beaglebone black and thought it would be a good idea if we could share the pictures of our smartVisu installs. It doesn't take long to post a picture and it could help the others with new ideas....

    I tried to use Yr.no with location 'Belgium/Wallonia/Namur' without success. I checked the HTML generated page and found that the location was correctly inserted in "$.getJSON('lib/weather/service/yr.no.php?location=Belgium/Wallonia/Namur', function (data) {"

    but the weather doesn't appears...

    You will find my first 'home screen' in attach.

    Long life to smartVisu!
    Angehängte Dateien

    #2
    Here's the html on the index:

    <script type="text/javascript">
    $('#index').on('pagebeforeshow', function (event, ui) {
    $.getJSON('lib/weather/service/yr.no.php?location=Belgium/Wallonia/Namur', function (data) {
    $('#index-weather-weather').css('background', 'url(lib/weather/pics/' + data.current.icon + '.png) 50% 0 no-repeat')
    $('#index-weather-weather .city').html(data.city);
    $('#index-weather-weather .cond').html(data.current.conditions);
    $('#index-weather-weather .temp').html(data.current.temp);
    $('#index-weather-weather .humi').html(data.current.more);
    $('#index-weather-weather .wind').html(data.current.wind);
    })
    .error(notify.json);
    });
    </script>




    <hr>






    <div id="index-weather_forecast-forecastweek" class="forecastweek">
    </div>


    <script type="text/javascript">
    $('#index').on('pagebeforeshow', function (event, ui) {
    $.getJSON('lib/weather/service/yr.no.php?location=Belgium/Wallonia/Namur', function (data) {
    var forecast = '';
    for (var i in data.forecast) {
    forecast += '<div class=\'day\'>'
    forecast += '<div>' + data.forecast[i].date + '</div>';
    forecast += '<img src="lib/weather/pics/' + data.forecast[i].icon + '.png" alt="' + data.forecast[i].conditions + '" title="' + data.forecast[i].conditions + '" />';
    forecast += '<div>' + data.forecast[i].temp + '</div>';
    forecast += '</div>';
    }
    $('#index-weather_forecast-forecastweek').html(forecast);
    })
    .error(notify.json);
    });
    </script>
    any idea on why the weather widget doesn't display something ?

    Kommentar


      #3
      Hi Magbolo8,

      your writing of the location 'Belgium/Wallonia/Namur' should work, I just tested it in my system. Do you have a working internet setup? Did you trie to ping Best Regards,

      Jan

      Kommentar


        #4
        Thanks Jan for the insight.

        ubuntu@ubuntu-armhf:~$ ping yr.no ? Været for Norge og verden fra NRK og Meteorologisk institutt
        PING a1949.g1.akamai.net (212.56.132.72) 56(84) bytes of data.
        ...
        --- a1949.g1.akamai.net ping statistics ---
        27 packets transmitted, 27 received, 0% packet loss, time 26042ms
        rtt min/avg/max/mdev = 6.580/8.579/16.363/1.743 ms

        but

        ubuntu@ubuntu-armhf:~$ ping yr.no
        PING yr.no (160.68.205.237) 56(84) bytes of data.
        ...
        --- yr.no ping statistics ---
        6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5005ms

        Kommentar


          #5
          I checked the code in /lib/weather/service/yr.no.php

          the download take place at "$url = 'http://www.yr.no/place/'.urlencode($this->location).'/forecast.xml';"

          so I tried

          ubuntu@ubuntu-armhf:~$ wget http://www.yr.no/place/Belgium/Wallo...r/forecast.xml
          --2013-12-08 15:07:00-- http://www.yr.no/place/Belgium/Wallo...r/forecast.xml
          Resolving yr.no ? Været for Norge og verden fra NRK og Meteorologisk institutt (yr.no ? Været for Norge og verden fra NRK og Meteorologisk institutt)... 212.56.132.72, 212.56.132.80
          Connecting to yr.no ? Været for Norge og verden fra NRK og Meteorologisk institutt (www.yr.no)|212.56.132.72|:80... connected.
          HTTP request sent, awaiting response... 200 OK
          Length: 21711 (21K) [text/xml]
          Saving to: ‘forecast.xml.1’

          100%[================================================== ================================================== ================================================== ================================================== ====================================>] 21.711 --.-K/s in 0,003s

          2013-12-08 15:07:01 (8,13 MB/s) - ‘forecast.xml.1’ saved [21711/21711]

          forecast.xml was downloaded without problem...

          Kommentar


            #6
            I also checked in the /temp directory and there's a yr.no_namur.xml file 22Ko with the correct weather info inside it...

            Kommentar


              #7
              Kindly find my smartvisu directory at http://www.filedropper.com/smartvisu

              about 32Mb

              Kommentar


                #8
                SOLVED!

                it was a problem with json...

                I had to sudo apt-get install php5-json

                Kommentar

                Lädt...
                X