Ankündigung

Einklappen
Keine Ankündigung bisher.

Sonos Anbindung

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

  • manu241
    antwortet
    Hallo, ich habe heute versucht einen Radiosender direkt aus sh.py auszuwählen. Dazu habe ich im Backend nachgesehen, welchen Link bei dem Radiosender unter: Bad.track.uri steht. Diesen Link habe ich dann genommen um den Sender so auszuwählen:

    Code:
    sh.Bad.play_uri('x-rincon-mp3radio://ndr-ndr2-nds-mp3.akacast.akamaistream.net/7/400/252763/v1/gnl.akacast.akamaistream.net/ndr_ndr2_nds_mp3')
    Jedoch wird dann der Sender nicht als Radio-Station erkannt, sondern als mp3.file. Wie habt ihr das gelöst?

    Gruß Manuel
    Zuletzt geändert von manu241; 07.11.2016, 00:59.

    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Zitat von aschwith Beitrag anzeigen
    Hi Stefan,

    ich habe gesehen, dass es bereits set_playlist und get_playlist Kommandos zum Erstellen und Laden eigener Playlisten gibt. Meine Frage, ich habe in Sonos direkt schon verschiedene Listen erstellt, gibt es hierfür die Möglichkeit, diese auch direkt mit einem Kommando abzuspielen? Wie nutzt du ansonsten die Playlist Funktion?
    Viele Grüße
    Alex
    Ich würde dich gerne nochmal aufs WE vertrösten, dann kann ich die Beispielcode posten.

    Gruss,

    Stefan

    Einen Kommentar schreiben:


  • aschwith
    antwortet
    Hi Stefan,

    ich habe gesehen, dass es bereits set_playlist und get_playlist Kommandos zum Erstellen und Laden eigener Playlisten gibt. Meine Frage, ich habe in Sonos direkt schon verschiedene Listen erstellt, gibt es hierfür die Möglichkeit, diese auch direkt mit einem Kommando abzuspielen? Wie nutzt du ansonsten die Playlist Funktion?
    Viele Grüße
    Alex

    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Schaue ich mir an, habe wieder Zeit, am Plugin zu arbeiten. Was geht im speziellen nicht bzw. was hast du probiert?

    Gruss,

    Stefan

    Einen Kommentar schreiben:


  • aschwith
    antwortet
    Hallo zusammen,

    hat jemand schon mal über das Sonos Plugin bzw. den Sonos Broker eine in Sonos erstellte Playliste gestartet bekommen?

    Viele Grüße
    Alex

    Einen Kommentar schreiben:


  • marcel0509
    antwortet
    Hallo zusammen,

    vielen Dank für das super Plugin, jetzt wollte ich TTS ausprobieren (über das Backend-Plugin). Leider hat es keine Sprachausgabe durchgeführt, wenn ich den Broker normal über
    Code:
     sonos_broker
    starte wird zwar die mp3 erzeugt aber nicht abgespielt. Wenn ich aber den Broker mittels
    Code:
     sonos_broker -d
    starte geht alles einwandfrei.

    Der einzige Unterschied welchen ich festgestellt habe ist (vermutlich die Ursache) das diese mp3 mit anderen Rechten abgespeichert wird (s. Screenshot).

    Kann sich das jemand erklären, bzw. welche Rechte muss der Sonos Ordner mit welchem Eigentümer haben?

    Auch ein Start als "sudo broker" bringt keine Änderung.

    P.S. ich nutze die aktuelle DEV-Version
    Mp3_Rechte.png



    Code:
    #This is the config file for sonos broker
    #Adapt and uncomment the lines to your purpose
    
    ########################################################################
    [logging]
    
    #Sets the log level for the server. WARNING is the default value.
    #Possible values are: debug, info, warning, error, critical
    #Default logfile path: /tmp/sonos_broker.log
    
    #loglevel = debug
    logfile = /tmp/sonos_log.txt
    
    ########################################################################
    [sonos_broker]
    
    #Binding host address. Default: 0.0.0.0
    host = 192.168.0.145
    
    #Server port. Default: 12900
    port = 12900
    
    ########################################################################
    [google_tts]
    
    #Enabled Google-Text-To-Speech. Default: false
    enabled = true
    
    #Select the path where sonos broker will save the converted mp3 files
    #Before a web request is made, sonos broker will check, if the requested file already exists.
    #Possible paths could be: local webserver, mounted smb share ...
    
    save_path = /var/www/html/sonos
    
    #Specifies the destination url which sonos broker refers to the sonos speakers. This url must point to 'save_path'.
    server_url = http://192.168.0.145/sonos
    
    #Maximum file size quota in megabytes. Up to this size, sonos broker will save files to 'save_path'.
    #Default: 100
    quota = 200
    Code:
    # sonos.conf
    #
    # This is an example for two sonos items
    # Place this file in '/etc/smarthome/items'
    
    [Sonos_Kueche]
        sonos_uid = rincon_5caafd28746401500
    
        [[mute]]
            type = bool
            enforce_updates = True
            visu_acl = rw
            sonos_recv = mute
            sonos_send = mute
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[led]]
            type = bool
            enforce_updates = True
            visu_acl = rw
            sonos_recv = led
            sonos_send = led
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[volume]]
            type = num
            enforce_updates = True
            visu_acl = rw
            sonos_recv = volume
            sonos_send = volume
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[max_volume]]
            type = num
            enforce_updates = True
            visu_acl = rw
            sonos_recv = max_volume
            sonos_send = max_volume
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[stop]]
            type = bool
            enforce_updates = True
            visu_acl = rw
            sonos_recv = stop
            sonos_send = stop
    
        [[play]]
            type = bool
            enforce_updates = True
            visu_acl = rw
            sonos_recv = play
            sonos_send = play
    
        [[seek]]
            type = str
            enforce_updates = True
            visu_acl = rw
            sonos_send = seek    #use HH:mm:ss
    
        [[pause]]
            type = bool
            enforce_updates = True
            visu_acl = rw
            sonos_recv = pause
            sonos_send = pause
    
        [[next]]
            type = foo
            enforce_updates = True
            sonos_send = next
            visu_acl = rw
    
        [[previous]]
            type = foo
            enforce_updates = True
            sonos_send = previous
            visu_acl = rw
    
        [[track_title]]
            type = str
            sonos_recv = track_title
    
        [[track_duration]]
            type = str
            sonos_recv = track_duration
            visu_acl = rw
    
        [[track_position]]
            type = str
            sonos_recv = track_position
            visu_acl = rw
    
        [[track_artist]]
            type = str
            sonos_recv = track_artist
    
        [[track_uri]]
            type = str
            sonos_recv = track_uri
            visu_acl = rw
    
        [[track_album_art]]
            type = str
            sonos_recv = track_album_art
    
        [[playlist_position]]
            type = num
            sonos_recv = playlist_position
            visu_acl = rw
    
        [[streamtype]]
            type = str
            sonos_recv = streamtype
            visu_acl = rw
    
        [[play_uri]]
            type = str
            enforce_updates = True
            sonos_send = play_uri
            visu_acl = rw
    
        [[play_snippet]]
            type = str
            enforce_updates = True
            sonos_send = play_snippet
            visu_acl = rw
    
            [[[volume]]]
                type = num
                value = 5
    
            [[[group_command]]]
                type = bool
                value = 0
    
            [[[fade_in]]]
                type = bool
                value = 1
    
        [[play_tts]]
            type = str
            enforce_updates = True
            sonos_send = play_tts
            visu_acl = rw
    
            [[[volume]]]
                type = num
                value = 5
    
            [[[language]]]
                type = str
                value = 'de'
    
            [[[group_command]]]
                type = bool
                value = 0
    
            [[[force_stream_mode]]]
                type = bool
                value = 0
    
            [[[fade_in]]]
                type = bool
                value = 1
    
        [[radio_show]]
            type = str
            sonos_recv = radio_show
            visu_acl = rw
    
        [[radio_station]]
            type = str
            sonos_recv = radio_station
            visu_acl = rw
    
        [[uid]]
            type = str
            sonos_recv = uid
            visu_acl = rw
    
        [[ip]]
            type = str
            sonos_recv = ip
            visu_acl = rw
    
        [[model]]
            type = str
            sonos_recv = model
            visu_acl = rw
    
        [[model_number]]
            type = str
            sonos_recv = model_number
            visu_acl = rw
    
        [[display_version]]
            type = str
            sonos_recv = display_version
            visu_acl = rw
    
        [[household_id]]
            type = str
            sonos_recv = household_id
            visu_acl = rw
    
        [[zone_name]]
            type = str
            sonos_recv = zone_name
            visu_acl = rw
    
        [[zone_icon]]
            type = str
            sonos_recv = zone_icon
            visu_acl = rw
    
        [[serial_number]]
            type = str
            sonos_recv = serial_number
            visu_acl = rw
    
        [[software_version]]
            type = str
            sonos_recv = software_version
            visu_acl = rw
    
        [[hardware_version]]
            type = str
            sonos_recv = hardware_version
            visu_acl = rw
    
        [[mac_address]]
            type = str
            sonos_recv = mac_address
            visu_acl = rw
    
        [[status]]
            type = bool
            sonos_recv = status
            visu_acl = rw
    
        [[join]]
            type = str
            enforce_updates = True
            sonos_send = join
            visu_acl = rw
    
        [[unjoin]]
            type = foo
            enforce_updates = True
            sonos_send = unjoin
            visu_acl = rw
    
        [[partymode]]
            type = foo
            enforce_updates = True
            sonos_send = partymode
            visu_acl = rw
    
        [[volume_up]]
            type = foo
            enforce_updates = True
            visu_acl = rw
            sonos_send = volume_up
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[volume_down]]
            type = foo
            enforce_updates = True
            visu_acl = rw
            sonos_send = volume_down
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[additional_zone_members]]
            type = str
            visu_acl = rw
            sonos_recv = additional_zone_members
    
        [[bass]]
            type = num
            visu_acl = rw
            sonos_recv = bass
            sonos_send = bass
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[treble]]
            type = num
            visu_acl = rw
            sonos_recv = treble
            sonos_send = treble
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[loudness]]
            type = bool
            visu_acl = rw
            sonos_recv = loudness
            sonos_send = loudness
    
            [[[group_command]]]
                type = bool
                value = 0
    
        [[playmode]]
            type = str
            enforce_updates = True
            visu_acl = rw
            sonos_recv = playmode
            sonos_send = playmode
    
        [[alarms]]
            type = dict
            enforce_updates = True
            visu_acl = rw
            sonos_recv = alarms
            sonos_send = alarms
    
        [[is_coordinator]]
            type = bool
            sonos_recv = playmode
    
        [[tts_local_mode]]
            type = bool
            sonos_recv = tts_local_mode
    
        [[get_playlist]]
            type = str  # the give item value represents the local file path
                        # where to save the playlist
            sonos_send = get_playlist
            enforce_updates = True
    
        [[set_playlist]]
            type = str  # the give item value represents the file path where
                        # the playlist is stored (previously saved with
                        # 'get_playlist')
            sonos_send = set_playlist
            enforce_updates = True
    
            [[[play_after_insert]]]
                type = bool
                value = 0
    
        [[wifi_state]]
            type = bool
            visu_acl = rw
            sonos_recv = wifi_state
            sonos_send = wifi_state
    
            [[[persistent]]]
                type = bool
                value = 0
    Angehängte Dateien

    Einen Kommentar schreiben:


  • DerTomsn
    antwortet
    Hallo liebes Forum,
    ich bin nun in mein neues Heim mit vieeel KNX eingezogen.
    Soweit habe ich auch schon alles programmiert. Auch der Raspi 2 inkl. SmartHome.py und SmartVISU laufen ohne Probleme. Einzig, dass mir beim Sonos Widget in der SmartVISU kein Album angezeigt wird stört.
    Die URL hinter dem Bild (bei Rechtsklick -> Bild URL kopieren) sieht wie folgt aus:
    http://<ip>/smartVISU/SONOS_Kueche.track_art

    Wenn ich das gad item mit basic.value auslese, wird die richtige URL zum Cover ausgelesen.

    Kann mir hier jemand helfen?


    Sollte sich jemand für Baublogs interessieren, hier mein steiniger Weg zum Eigenheim: http://carinaundtom.wordpress.com

    Danke!

    DerTomsn

    Einen Kommentar schreiben:


  • manu241
    antwortet
    Hallo Stefan,

    das es habe ich schon probiert, dann passiert aber gar nichts.

    gruß Manuel

    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Versuche mal die Anführungszeichen weg zu lasssen, also sh.Kindezimmer.play_tts(sh.Kinderzimmer.Temp())

    Gruss,

    Stefan

    Einen Kommentar schreiben:


  • manu241
    antwortet
    Hallo Stefan,

    super und danke.
    Eine Frage habe ich aber noch. Bekommt man es hin, dass der Wert eines Items vorgelesen wird ? Z.b. mit sh.Kinderzimmer.play_tts('sh.Kinderzimmer.Temp()')

    Ich würde mir damit gerne Telefonnummern oder Anrufer bei einem Anruf vorlesen lassen :-)

    Gruß Manuel

    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Ok, schaue ich mir nochmal an.

    Einen Kommentar schreiben:


  • manu241
    antwortet
    Hallo Stefan,

    bitte heute doch schon Zuhause und habe soebend deine Änderungen ausprobiert. Dafür schonmal Danke.
    Die TTS funktioniert schonmal, jedoch ist mir dabei ein Fehler aufgefallen.

    Wenn Radio oder ein anderer Song (nennen wir den Song Lied 3) aus meiner Playliste auf dem Sonos-Player läuft und dann eine Sprachnaricht kommt, wird diese auch abgespielt.
    Sobald diese Nachricht abgespielt wurde, fängt das erste Lied aus meiner Playliste anzuspielen, für ca 1min.
    Nach der Minute wird wieder das Radio abgespielt bzw der Song (Lied 3) wieder von vorne abgespielt.


    Gruß Manuel


    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Hallo zusammen,

    im dev-Zweig ist HIER [click me] ist eine neue Version des Broker draussen. Es gab ein paar Änderungen bei GoogleTTS, die habe ich nachgezoen und sollte wieder funktionieren. (danke @manu241)

    Gruss,

    Stefan

    Einen Kommentar schreiben:


  • manu241
    antwortet
    Hallo Stefan,

    super und besten Dank für deine Hilfe.
    ich werde es allerdings frühestens am Freitag testen können, da ich gerade beruflich Unterwegs bin.

    gruß und danke

    Manuel

    Einen Kommentar schreiben:


  • pfischi
    antwortet
    Ich glaube tatsächlich, das schon beim Speichern / Laden der Google mp3 etwas nicht hinhaut. Ich mache dir eine spezielle Debugversion, dann haben wir mehr Ausgaben zur Fehleranalyse. Wenn ichs schaffe hast du morgen eine PM.

    Gruss,

    Stefan

    Einen Kommentar schreiben:

Lädt...
X