Plugin ‚appletv‘ Konfiguration

plugin logo

Im folgenden sind etwaige Anforderungen und unterstützte Hardware beschrieben. Danach folgt die Beschreibung, wie das Plugin appletv konfiguriert wird. Außerdem ist im folgenden beschrieben, wie das Plugin in den Item Definitionen genutzt werden kann. [1]

Es handelt sich bei diesem Plugin um ein interface Plugin.

Beschreibung

Steuerung eines Apple TV’s

Anforderungen

  • Minimum SmartHomeNG Version: 1.6

Konfiguration

Im folgenden ist beschrieben, wie das Plugin appletv konfiguriert wird. Außerdem ist im folgenden beschrieben, wie das Plugin in den Item Definitionen genutzt werden kann.

Parameter

Das Plugin verfügt über folgende Parameter, die in der Datei ../etc/plugin.yaml konfiguriert werden:

ip

IP Adresse des Gerätes. Bei 0.0.0.0 wir das erste erkannte Gerät genutzt.

  • Datentyp: ip

  • Standardwert: 0.0.0.0

scan_timeout

Timeout in Sekunden beim scannen des Netzwerkes nach AppleTV Geräten

  • Datentyp: num

  • Standardwert: 5

Item Attribute

Das Plugin unterstützt folgende Item Attribute, die in den Dateien im Verzeichnis ../items verwendet werden:

appletv

ATV Funktion

  • Datentyp: str

  • Mögliche Werte:

    • name

    • ip

    • mac

    • model

    • os

    • power

    • playing_app_identifier

    • playing_app_name

    • playing_state

    • playing_state_text

    • playing_fingerprint

    • playing_genre

    • playing_artist

    • playing_album

    • playing_title

    • playing_type

    • playing_type_text

    • playing_position

    • playing_total_time

    • playing_position_percent

    • playing_repeat

    • playing_repeat_text

    • playing_shuffle

    • playing_shuffle_text

    • artwork_width

    • artwork_height

    • artwork_mimetype

    • artwork_base64

    • rc_top_menu

    • rc_home

    • rc_home_hold

    • rc_menu

    • rc_select

    • rc_next

    • rc_previous

    • rc_play

    • rc_pause

    • rc_stop

    • rc_play_pause

    • rc_down

    • rc_up

    • rc_left

    • rc_right

    • rc_set_position

    • rc_set_repeat

    • rc_set_shuffle

    • rc_skip_backward

    • rc_skip_forward

    • rc_volume_down

    • rc_volume_up

    • rc_suspend

    • rc_wakeup

Item-Structs

Das Plugin stellt die folgenden Item-Structs zur Verfügung. Diese Informationen sind aus der plugin.yaml entnommen und möglicherweise nicht vollständig.

commands

  • commands (foo, —)
    • top_menu (bool, RC top menu key)

    • home (bool, RC kome key)

    • home_hold (bool, RC hold home key)

    • menu (bool, RC menu key)

    • select (bool, RC select key)

    • next (bool, RC next key)

    • previous (bool, RC previous key)

    • pause (bool, RC pause key)

    • play (bool, RC play key)

    • play_pause (bool, RC toggle between play and pause)

    • stop (bool, RC stop key)

    • down (bool, RC down key)

    • up (bool, RC up key)

    • right (bool, RC right key)

    • left (bool, RC left key)

    • set_position (num, RC set position)

    • set_repeat (num, RC set repeat mode)

    • set_shuffle (num, RC set shuffle mode)

    • skip_backward (bool, RC skip backward key)

    • skip_forward (bool, RC skip forward key)

    • volume_down (bool, RC volume down key)

    • volume_up (bool, RC volume up key)

    • suspend (bool, RC suspend key)

    • wakeup (bool, RC wakeup key)

device

  • device (foo, OrderedDict([(‚remark‘, ‚Name of device‘), (‚type‘, ‚str‘), (‚visu_acl‘, ‚ro‘), (‚cache‘, True), (‚appletv@instance‘, ‚name‘)]))
    • remark (str, Name of device)

    • ip (str, IP address of device)

    • mac (str, MAC address of device)

    • model (str, MAC address of device)

    • os (str, MAC address of device)

    • power (bool, Power state of the device)

playing

  • playing (foo, —)
    • app (foo, OrderedDict([(‚type‘, ‚str‘), (‚visu_acl‘, ‚ro‘), (‚cache‘, True), (‚appletv@instance‘, ‚playing_app_name‘)]))
      • identifier (str, —)

      • remark (str, —)

    • state (num, —)

    • state_text (str, —)

    • fingerprint (str, —)

    • genre (str, —)

    • artist (str, —)

    • album (str, —)

    • title (str, —)

    • media_type (num, —)

    • media_type_text (str, —)

    • position (num, —)

    • totaltime (num, —)

    • position_percent (num, —)

    • repeat (num, —)

    • repeat_text (str, —)

    • shuffle (num, —)

    • shuffle_text (str, —)

    • artwork (foo, —)
      • width (num, Width of the currently playing artwork)

      • height (num, Height of the currently playing artwork)

      • mimetype (str, Mimetype of the currently playing artwork)

      • base64 (foo, The actual playing artwork in base64)

Logik Parameter

Das Plugin verfügt über folgende Parameter, die in der Datei ../etc/logic.yaml konfiguriert werden:

Keine Logik Parameter in den Metadaten beschrieben - Bitte in der README nachsehen (siehe Fußnote)

Plugin Functions

Das Plugin verfügt über folgende öffentliche Funktionen, die z.B. in Logiken aufgerufen werden können.

is_on()

Ist das Gerät eingeschaltet

  • Ergebnistyp der Funktion: bool

is_playing()

Ist das Gerät am abspielen

  • Ergebnistyp der Funktion: bool

pause()

Pause

  • Ergebnistyp der Funktion: bool

play()

Abspielen

  • Ergebnistyp der Funktion: bool