Ankündigung

Einklappen
Keine Ankündigung bisher.

XBMC Notification - PopUp Message

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

    [WireGate-Plugin] XBMC Notification - PopUp Message

    Das kleine Plugin reagiert auf eine GA und sendet dann eine Nachricht an das XBMC Mediacenter. Kann man noch schön anpassen und den Inhalt der Nachricht per Bus senden lassen, ich wollte es bloss erstmal hier sichern bevor ich es versehentlich lösche

    Code:
    # Plugin zum versenden von Textmeldungen an XBMC
    # Version 0.1 24.06.2011
    # erstellt von JuMi2006 (https://knx-user-forum.de/members/JuMi2006.html)
    # GPL 
    # Erstellt mit Unterstützung des KNX-User-Forums
    
    ####################
    ###Einstellungen:###
    ####################
    
    
    my $aufrufende_ga = "1/1/60"; #GA die die Benachrichtigung auslöst
    my $xbmc_ip = "192.168.2.30"; #IP des XBMC Rechners
    my $xbmc_port = "8080"; #Port des XBMC Webservers
    my $user = "media"; #Username XMBC Webserver
    my $pwd = "media"; #Password XBMC Webserver
    my $text_head = "Licht"; #Überschrift für Benachrichtigung
    my $text = "Jetzt wurde das Licht geschalten"; #Inhalt der Benachrichtigung
    my $timeout = "5000"; #Zeit in Millisekunden in der die Meldung angezeigt wird
    my $img = "http://icons.iconarchive.com/icons/deleket/sleek-xp-basic/256/Lamp-icon.png"; #Bildadresse für Benachrichtigung
    
    
    ######################
    ##ENDE Einstellungen##
    ######################
    
    # Plugin an Gruppenadresse anmelden
    $plugin_subscribe{$aufrufende_ga}{$plugname} = 1;
    
    # Zusammensetzen der URL aus den Einstellungen
    my $url= "http://".$user.":".$pwd."@".$xbmc_ip.":".$xbmc_port."/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(".$text_head.",".$text.",".$timeout.",".$img."))";
    
    # Eigenen Aufruf-Zyklus auf 1 Tag setzen, das Script reagiert auf ankommende Telegramme
    $plugin_info{$plugname.'_cycle'} = 86400; 
    
    # Hier wird die Gruppenadresse abgefangen und weiterverarbeitet
    if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $aufrufende_ga) {
    
    # Mit Hilfe von LWP wird die entsprechende Website aufgerufen - Die Rückmeldung wird protokolliert.
    use LWP::Simple;
    my $requestURL = $url;
    my $response = get($requestURL)
    }
    Umgezogen? Ja! ... Fertig? Nein!
    Baustelle 2.0 !

    #2
    Vielen Dank für den Tipp. Mir war gar nicht bewusst, dass man so einfach Meldungen an XBMC senden kann.

    Kommentar


      #3
      Die beschriebene Schnittstelle gibts es leider im aktuellen XBMC nicht mehr.

      Hier ist eine Möglichkeit beschrieben wie es jetzt funktioniert:
      https://knx-user-forum.de/smarthome-...mc-plugin.html

      Gruß
      Carsten

      Kommentar


        #4
        Hallo
        Code:
        Message Popup einblenden
        http://192.168.2.46:80/jsonrpc?request={"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Title Message","message":"Main message"}}
        Und hier noch weitere
        Code:
        Wird so aufgerufen
        http://192.168.2.46:80/jsonrpc?request={"jsonrpc":"2.0","method":"Input.Down","id":1}
        
        XBMC DOWN={"jsonrpc":"2.0","method":"Input.Down","id":1}
        XBMC RIGHT={"jsonrpc":"2.0","method":"Input.Right","id":1}
        XBMC SELECT={"jsonrpc":"2.0","method":"Input.Select","id":1}
        XBMC LEFT={"jsonrpc":"2.0","method":"Input.Left","id":1}
        XBMC INFO={"jsonrpc":"2.0","method":"Input.Info","id":1}
        XBMC HOME={"jsonrpc":"2.0","method":"Input.Home","id":1}
        XBMC UP={"jsonrpc":"2.0","method":"Input.Up","id":1}
        XBMC ContextMenu={"jsonrpc":"2.0","method":"Input.ContextMenu","id":1}
        XBMC 30SecForward={"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"smallforward"}}
        XBMC 30SecBkwd={"jsonrpc":"2.0","id":1,"method":"Player.Seek","params":{"playerid":1,"value":"smallbackward"}}
        XBMC QUIT={"jsonrpc":"2.0","method":"Application.Quit","id":1}
        XBMC BACK={"jsonrpc":"2.0","method":"Input.Back","id":1}
        XBMC PLAYPAUSE={"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1},"id":1}
        XBMC STOP={"jsonrpc":"2.0","method":"Player.Stop","params":{"playerid":1},"id":1}
        XBMC SUBTITLENEXT={"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"next"}}
        XBMC SUBTITLEOFF={"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"off"}}
        XBMC SUBTITLEON={"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"off"}}
        XBMC SHOWOSD={"jsonrpc":"2.0","method":"Input.ShowOSD","id":1}
        XBMC SETFULLSCREEN={"jsonrpc": "2.0", "method": "GUI.SetFullscreen", "params": { "fullscreen": "toggle" }, "id": "1"}
        XBMC MOVIESLIST={ "jsonrpc": "2.0", "method": "GUI.ActivateWindow", "params": { "window": "video", "parameters": [ "MovieTitles" ] }, "id": 1 }
        XBMC TVLIST={"jsonrpc": "2.0", "method": "GUI.ActivateWindow", "params": { "window": "video", "parameters": [ "TvShowTitles" ] }, "id": 1 }
        Ich suche noch nach einer Möglichkeit ein Addon das läuft abzubrechen.
        Ich habe das hier versucht, geht aber nicht.
        Weis jemand weiter?
        Code:
        #http://xbmc:xbmc@192.168.2.46:80/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.SetAddonEnabled","disable":{"addonid":"script.doorbell"}}
        Gruß NetFritz
        KNX & Wago 750-849 ,Wiregate u. Cometvisu, iPad 3G 64GB.
        WP Alpha-Innotec WWC130HX (RS232-Moxa-LAN),Solaranlage für Brauchwasser und Heizung.
        PV-Anlage = SMA Webbox2.0 , SunnyBoy 4000TL, Sharp 4kWP

        Kommentar

        Lädt...
        X