Squeezebox mit Tablet UI

Begonnen von TWART016, 14 März 2016, 01:02:14

Vorheriges Thema - Nächstes Thema

TWART016

Hallo,

ich bin gerade dabei mein Multiroomaudio mit Squeezebox aufzubauen.

Auf einem Raspberry Pi läuft FHEM, sowie der Logitech Media Server (LMS). Die Squeezeplayer laufen zum Testen auf 3 Windows Clients mit Squeezeplay. Irgendwann sollen Linux Systeme im Einsatz kommen, ggf. Raspberry Pi mit Lautsprechern dahinter.

Als Beispiel habe ich den Threat genommen:
https://forum.fhem.de/index.php/topic,45188.msg374883.html#msg374883

Im Endeffekt hätte ich es gerne so
- Widget in Tablet UI zur Übersicht und Steuerung
- Titel, Interpret, Cover, ... sollen angezeigt werden
- Musiksteuerung: nächster Song, Lautstärke, ... soll möglich sein
- Titelwahl soll einfach möglich sein. Musikquelle vom LMS sind interne mp3's
- Für jeden Slave-Player soll ein Button für sync / unsync zur Verfügung stehen

Anbei mein Szenario:
- Raspberry Pi mit FHEM und LMS
- SB_PLAYER_PCT (Master)
- SB_PLAYER_VM (Slave)
- SB_PLAYER_PCT

Hier schonmal meine Codes, Bilder füge ich am Ende an:

FHEM:
#Logitech  Media Server (Squeeze)
define LMS SB_SERVER 192.168.178.25
attr LMS alivetimer 120
attr LMS doalivecheck true
attr LMS httpport 9000
attr LMS maxcmdstack 200
attr LMS maxfavorites 30
attr LMS room tests

#Squeeze Player VM
define SB_PLAYER_VM SB_PLAYER 00:0c:29:81:3e:59
attr SB_PLAYER_VM IODev LMS
attr SB_PLAYER_VM amplifier play
attr SB_PLAYER_VM coverartheight 50
attr SB_PLAYER_VM coverartwidth 50
attr SB_PLAYER_VM donotnotify true
attr SB_PLAYER_VM fadeinsecs 10
attr SB_PLAYER_VM idismac true
attr SB_PLAYER_VM room SB_PLAYER
attr SB_PLAYER_VM serverautoon true
attr SB_PLAYER_VM syncedNamesSource FHEM
attr SB_PLAYER_VM ttslanguage de
attr SB_PLAYER_VM ttslink http://translate.google.com/translate_tts?ie=UTF-8&tl=<LANG>&q=<TEXT>&client=tw-ob
attr SB_PLAYER_VM volumeLimit 100
attr SB_PLAYER_VM volumeStep 10
define FileLog_SB_PLAYER_VM FileLog ./log/SB_PLAYER_VM-%Y.log SB_PLAYER_VM
attr FileLog_SB_PLAYER_VM logtype text
attr FileLog_SB_PLAYER_VM room SB_PLAYER

#Squeeze Player PCT
define SB_PLAYER_PCT SB_PLAYER 00:50:56:c0:00:08
attr SB_PLAYER_PCT IODev LMS
attr SB_PLAYER_PCT amplifier play
attr SB_PLAYER_PCT coverartheight 50
attr SB_PLAYER_PCT coverartwidth 50
attr SB_PLAYER_PCT donotnotify true
attr SB_PLAYER_PCT fadeinsecs 0
attr SB_PLAYER_PCT idismac true
attr SB_PLAYER_PCT room SB_PLAYER,tests
attr SB_PLAYER_PCT serverautoon true
attr SB_PLAYER_PCT syncedNamesSource FHEM
attr SB_PLAYER_PCT ttslanguage de
attr SB_PLAYER_PCT ttslink http://translate.google.com/translate_tts?ie=UTF-8&tl=<LANG>&q=<TEXT>&client=tw-ob
attr SB_PLAYER_PCT userReadings SB_PLAYER_VM:synced {if(index(ReadingsVal($name,'synced',''),'SB_PLAYER_VM')!=-1){return 'synced'} else {return('not synced')}},\
SB_PLAYER_Surface:synced {if(index(ReadingsVal($name,'synced',''),'SB_PLAYER_Surface')!=-1){return 'synced'} else {return('not synced')}},
attr SB_PLAYER_PCT volumeLimit 100
attr SB_PLAYER_PCT volumeStep 10
attr SB_PLAYER_PCT webCmd on:off:volume:play:pause:mute
define FileLog_SB_PLAYER_PCT FileLog ./log/SB_PLAYER_PCT-%Y.log SB_PLAYER_PCT
attr FileLog_SB_PLAYER_PCT logtype text
attr FileLog_SB_PLAYER_PCT room SB_PLAYER

define SB_PLAYER_Surface SB_PLAYER c0:33:5e:08:ec:d5
attr SB_PLAYER_Surface IODev LMS
attr SB_PLAYER_Surface amplifier play
attr SB_PLAYER_Surface coverartheight 50
attr SB_PLAYER_Surface coverartwidth 50
attr SB_PLAYER_Surface donotnotify true
attr SB_PLAYER_Surface fadeinsecs 10
attr SB_PLAYER_Surface idismac true
attr SB_PLAYER_Surface room SB_PLAYER
attr SB_PLAYER_Surface serverautoon true
attr SB_PLAYER_Surface syncedNamesSource FHEM
attr SB_PLAYER_Surface ttslanguage de
attr SB_PLAYER_Surface ttslink http://translate.google.com/translate_tts?ie=UTF-8&tl=<LANG>&q=<TEXT>&client=tw-ob
attr SB_PLAYER_Surface volumeLimit 100
attr SB_PLAYER_Surface volumeStep 10
define FileLog_SB_PLAYER_Surface FileLog ./log/SB_PLAYER_Surface-%Y.log SB_PLAYER_Surface
attr FileLog_SB_PLAYER_Surface logtype text
attr FileLog_SB_PLAYER_Surface room SB_PLAYER


Tablet UI:
<div class="cell">
       

</div>
<div class="container top-space">
        <div class="label top-space">Synchronisieren mit:</div>
<div class="inline">
        <div data-type="multistatebutton"
        data-device="SB_PLAYER_PCT"
        data-get="synced"
        data-get-on="none"
        data-icon="fa-link"
        data-set="unsync"
        data-background-icon=""
        data-on-colors="#aa6900"
        class="cell small narrow top-space"></div>
        <div data-type="label" >PCT</div>
</div>
<div class="inline">
        <div data-type="multistatebutton"
        data-device="SB_PLAYER_VM"
        data-get="synced"
        data-get-on='["(.*?PCT.*?)","none"]'
        data-icons='["fa-link","fa-unlink"]'
        data-set='["unsync","sync SB_PLAYER_VM asSlave"]'

        data-on-colors='["#aa6900","#505050"]'
        class="cell small narrow"></div>
        <div data-type="label" >VM</div>
        </div>
        <div class="inline">
        <div data-type="multistatebutton"
        data-device="SB_PLAYER_PCT"
        data-get="synced"
        data-get-on='["(.*?Surface.*?)","none"]'
        data-icons='["fa-link","fa-unlink"]'
        data-set='["unsync","sync SB_PLAYER_Surface"]'
        data-background-icon=""
        data-on-colors='["#aa6900","#505050"]'
        class="cell small narrow"></div>
        <div data-type="label">Surface</div>
        </div>
</div>

<br>
<br>

<div class="cell top-space">

<div data-type="push"
data-device="SB_PLAYER_PCT"
data-icon="fa-step-backward"
data-background-icon="-"
data-off-color="#505050"
data-set-on="prev"
class="inline">
</div>

        <div data-type="switch"
            data-device="SB_PLAYER_PCT"
            data-get="playStatus"
            data-get-on="playing"
            data-get-off="pause"
            data-icon="fa-play"
            data-background-icon="-"
            data-set-on="play"
            data-on-color="#aa6900"
            data-off-color="#505050"
class="inline">
        </div>
<div data-type="switch"
            data-device="SB_PLAYER_PCT"
            data-get="playStatus"
            data-get-on="paused"
            data-get-off="play"
            data-icon="fa-pause"
            data-background-icon="-"
            data-set-on="pause"
            data-on-color="#aa6900"
            data-off-color="#505050"
class="inline">
</div>
        <div data-type="switch"
            data-device="SB_PLAYER_PCT"
            data-get="playStatus"
            data-get-on="stopped"
            data-get-off="!on"
            data-icon="fa-stop"
            data-background-icon="-"
            data-set-on="stop"
            data-on-color="#aa6900"
            data-off-color="#505050"
class="inline">
</div>
<div data-type="push"
data-device="SB_PLAYER_PCT"
data-icon="fa-step-forward"
data-background-icon="-"
data-off-color="#505050"
data-set-on="next"
class="inline">
</div>

</div>


<div class="container cell top-space">
        <div data-type="itunes_artwork"
                data-device="SB_PLAYER_PCT"
                data-size="210"
                data-stripbrackets="true"
                data-notfoundimg="SB_PLAYER_PCT:COVERARTURL"
data-get='["currentArtist","currentTitle"]'></div>

<br>

<div data-type="itunes_artwork"
            data-device="MPD_WOPR"
            data-get='["now_artist","now_album","now_title"]'
            data-opacity="0.2"
            data-size=400
            style="position:absolute;top:20px;left:-10px;"></div>

        <div data-type="mpdnowplaying"
                data-device="SB_PLAYER_PCT"
                data-name="currentPlaylistName"
                data-title="currentTitle"
                data-artist="currentArtist"></div>
</div>



Nun zu den Problemen bzw. Fragen:
1) In der FHEM GUI kann ich mit dem Master und einen Slave (Surface) jeweils kein sync für den Slave VM auswählen. Im Dropdown wird das einfach nicht angezeigt.

2)
a) Was ist bei den "Mit Synchronisieren" in TUI korrekt? Macht PCT überhaupt Sinn, wenn es der Master ist? Wird sync asSlave empfohlen?
b) Wenn ich auf ein Symbol klicke wird immer nur unsync (PCT) und sync (Slaves) angezeigt, aber kein Switch.
c) Was bedeutet data-get-off="!on"?
d) Ich möchte, dass immer nur ein Icon farbig ist, das es immer nur einen Zustand geben kann. Erst nach dem Neuladen der Seite funktioniert es. (Longpoll steht auf 1)
e) Wenn mal ein unsync gemacht wird, wird dies bei einem falschen Player ausgeführt. Kann das beeinflusst werden?

3) Der Titel der Songs wird nicht angezeigt.

4) Das Cover wird nicht korrekt angezeigt, zumeist ein Cover von einem vorherigen Song.

5) Sind die userReadings für den Master korrekt gesetzt?


Gruß
TWART016

TWART016

ausversehen doppelt angelegt, bitte löschen :)