Sobota, Duben 29, 2017

Wunderground

Po jednoduché registraci můžete na jejich ftp server (webcam.wunderground.com) ukládat obrázky z webkamery (image.jpg). Zde je příklad php kóddu pro odesílání naměřených hodnot na server wunderground:

$temp = teplota;
$hum = vlhkost;
$utc_wu = gmdate(”Y-m-d+H:i:s”, time()); // datum a čas ze serveru
$tempf = round((($temp*1.8)+32),1);   // převod na F
// výpočet rosného bodu
$dpc = round((-430.22+237.7*log($hum*(6.11*pow(10, (7.5*$temp/(237.7+$temp))))/100))/(-log($hum*(6.11*pow(10, (7.5*$temp/(237.7+$temp))))/100)+19.08),1);
$dpf = round((($dpc*1.8)+32),1);   // převod na F
$url = ’http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=youID&PASSWORD=youPassword’;   // vaše ID/Password
$fields = array(
            ’dateutc’=>urlencode($utc_wu),   // čas
            ’tempf’=>urlencode($tempf),      // teplota
            ’humidity’=>urlencode($hum),     // vlhkost
            ’dewptf’=>urlencode($dpf)        // rosný bod
        );
foreach($fields as $key=>$value) { $fields_string .= $key.’=’.$value.’&’; }
$url = $url.’&’.$fields_string;
$ch = curl_init(); //init connection
curl_setopt($ch,CURLOPT_URL,$url);
$result = curl_exec($ch); //execute post
curl_close($ch); //close connection

Proč server wunderground?

Můžete si nainstalovat widget na displej vašeho telefonu (nezapomeňte v nastavení přepnout na °C), v mapě WunderMap najdete “adresu obrázku” webové kamery, graf teploty nebo různé widgety:

Find more about Weather in Rouchovany, CZ

wxStationGraphAll?ID=IROUCHOV3&type=3&showtemp=1&showtitle=0&width=500
wxStationGraphAll?ID=IROUCHOV3&type=2&showtemp=1&showtitle=0&width=500

Čtvrtek, Duben 27, 2017

Plugin teploměr

Zobrazuje data z wifi teploměru

Naměřené hodnoty jsou ukládány do free cloudu na tmep.cz

lze tedy zobrazovat historii naměřených hodnot, např. rouchovany.tmep.cz

Zobrazení posledního měření:

function plugin_thermometer_widget() {
$url = ”http://tmep.cz/vystup-json.php?id=658&export_key=t6e3c5wbrj”;
$quote = file_get_contents($url);
$json =’[ ’.$quote.’ ]’;
$data = json_decode($json, TRUE);
$rate = $data[0][”teplota”]; 
$rate1 = $data[0][”vlhkost”]; 
$rate2 = $data[0][”cas”]; 
$rate2=substr($rate2,0,(strlen($rate2)-3)); // zkrácení o sekundy
$rate3 = $data[0][”umisteni”]; 
  $content=’<div><p style=”font: normal 9pt Arial, Helvetica, sans-serif; color: red; font-weight: bold; margin: 5px 0 0 0px; padding: 0;”>’;
  $content=$content.’<a href=”http://rouchovany.tmep.cz” target=”_blank”>Teplota:</a>&nbsp’.$rate.’°C’.'&nbsp&nbsp<a href=”http://rouchovany.tmep.cz” target=”_blank”>Vlhkost:</a>&nbsp’.$rate1.’%';
  $content=$content.’
<a href=”https://tmep.cz/mapa/” target=”_blank”>’.$rate3.’</a>&nbsp’.$rate2;
  $content=$content.’</p></div>’;
      $entry[’subject’] = ”";
    $entry[’content’] = $content;
    return $entry;
}
register_widget(’thermometer’, ’thermometer’, ’plugin_thermometer_widget’);
?>

Widget pro android cz.monkeytech

Pokud adresa začíná protokolem https:// zakažte kontrolu certifikátu:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    function get_data($url) {
    $ch = curl_init();
    $timeout = 5;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_USERAGENT, ”My User Agent Name”);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
        $details = json_decode($data);
        echo $details->teplota;

Sobota, Duben 22, 2017

Flatpress blogs

http://wiki.flatpress.org/

https://github.com/e … i/flatpress/releases

https://github.com/e … chi/flatpress-extras

FlatPress web

https://flatpress.info/

http://wiki.flatpress.org/res:users

https://www.google.c … tPress%22&lr=lang_cs

https://www.google.c … ered by FlatPress%22

http://drevodomek.nevilias.net/

http://archim.wz.cz/ … y:entry140117-010046

http://arne-strupat.de/flatpress/

http://www.pierovdfn.it/progetti/

http://eggoez.com/flatpress/?x=cat:52

https://www.igorkrom … /category/flatpress/

http://noinsider.bpl … 15-134433;comments:1

https://www.gsys.biz … rchbox-for-flatpress

http://wayback.archi … atpress.georgi.co.uk

http://baguz.cf

https://www.musicletter.it/

http://code1.okbase. … 2012120616188_97.htm

https://fahrrad.arvidzimmermann.de PhotoSwipe

https://www.arvidzim … %20FlatPress&i18n=en

http://www.andreas-volkmar.de/

http://noinsider.bpl … d.net/0cent/?x=cat:4

http://smizko.php5.sk/flatpress/?paged=2

http://relatos.in/

http://relatos.in/fp-plugins/

http://relatos.in/fp-interface/themes/