-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


, , , ! , ADSL-

, 01 2017 . 16:04 +
,
.
.
...


! ! ! , , , , , .


. D-Link !

; , , , , ?

- ! , EAS (Emergency Alert System) , , TV .

, . 'o EAS-; .





, , , . , ; , - , - .

Raspberry Pi B+ EAS- epiphany kiosk-. -, , , :

...



...



...


, js- iframe, ; , , , , , ( - , - ), iframe.

, , EAS- ; , :

  1. (raspbian)
  2. /etc/rc.local
  3. xinit

/etc/rc.local - :

sudo xinit ./home/eas/eas.boot & ##   

/home/eas/eas.boot :

#!/bin/sh
xset -dpms
xset s off
xset s noblank
matchbox-window-manager -use_titlebar no & ##   
unclutter -idle 0.01 -root & ##   
WEBKIT_DISABLE_TBS=1 epiphany-browser -a http://podivilov.local/ --profile /home/eas/.config ##    kiosk-   

, podivilov.local; , , , default extra (default , ; EAS , ; extra , , ).

:

$code_default = file_get_contents('https://***.podivilov.ru/api/method/weather.getCode/?token=********************');
$code_extra = file_get_contents('https://***.podivilov.ru/api/method/weather.getCode.extra/?token=********************');

openweathermap.org:

$json = file_get_contents('http://api.openweathermap.org/data/2.5/weather?lat=**.******&lon=**.******&APPID=********************************'); // lat & lon -   ,  APPID - api-,       
$data = json_decode($json,true);
$result = substr($data['weather'][0]['icon'], 0, -1);

extra- , , , .

: , 1 (/) 2 ( ), EAS- 12 ( 1 2).



, ( , ; , , ):

dim xHttp: Set xHttp = createobject("MSXML2.ServerXMLHTTP")

xHttp.Open "GET", "https://***.podivilov.ru/api/method/weather.getCode/?token=********************", False
xHttp.setOption 2, 13056
xHttp.Send

If xHttp.responseText = "1" Then

	Set objShell = CreateObject("WScript.Shell") 
	objShell.Run """C:\__\EAS.exe""" 
	Set objShell = Nothing

Else

	WScript.Quit

End If

, . , , :




, !

!
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/332072/

:  

: [1] []
 

:
: 

: ( )

:

  URL