Squeezebox Modul - erste Version

Begonnen von bugster_de, 17 Dezember 2013, 22:12:10

Vorheriges Thema - Nächstes Thema

siggi85

Zitat von: oliv06 am 04 März 2014, 23:32:45
I have plans to implement the feature in the module but at the present time I have a problem because you need to wait until the talk command is finished and I see no simple way to know when it is

In the meantime a quick and dirty workaround is to wait for a while, hoping it is ok :

set SB_boom cliraw playlist save temp_playlist_SB_boom
set SB_boom talk hello world
sleep 10
set SB_boom cliraw playlist resume temp_playlist_SB_boom


Today it was the first time for me to test your workaround. The resume or save command doesn't work at me. Where is the playlist save and how can i control an successful save? Do i have to see it in the squeezer android app under playlists?

DJAlex

Ich würde gerne an einer stelle zentral alle Weckfunktionen auf die richtige Uhrzeit stellen das funktioniert auch bis jetzt ganz gut. Mit wakeupchange kann ich die Uhrzeit einstellen wann das Locht angehen soll. Jetzt hätt ich gern das der Wecker der Squeezebox sich automatisch auf die Uhrzeit sellt die im wakupchange steht. Das notify von mir klappt soweit auch. Allerdings gibts da zwei Probleme. Das erste hat was mit der Formatierung der Uhrzeit zu tun das klappt. Das klappt so wenn keine Uhrzeiten mit 2 stelliger Stunden zahl angegeben werden. Schlimmer ist das ich zum stellen des Weckers immer den Tag mit angeben muss. In meiner Codezeile ist das die 4 Deshalb die Frage wie stelle ich die Weckzeit tagesunabhängig? Oder für alle Tage auf einmal?

d0np3p3

Mit Komma kann man mehre Tage setze also 0,1,3,5 zumindest direkt per cli

Gesendet von meinem Nexus 4 mit Tapatalk

FHEM: Raspberry Pi (COC) & Fritz 7270 (freetz FHEM2FHEM)
IT (Elro AB440 AB600D) - Max! (6*regler 1*Thermostat 5*Fenster) Hue Bridge mit Bulbs - 2*Living-white Adapter - Iris
XBMC (Zbox) 4*SqueezeRadios 3*squeezelite dbox
AndFhem (Nexus4)

bugster_de

Tage mit komma trennen sollte auch gehen. Ein Kommando für alle Tage hat die SB nicht (ergo FHEM auch nicht)

oliv06

@siggi85 :

ZitatThe resume or save command doesn't work at me. Where is the playlist save and how can i control an successful save?
You can check on the SB server web interface ( http://myserver:9090/ ) that your playlist exists. In order to be able to save playlists you need first to go in SB server settings (button in lower right corner of the web interface) and define the place where they are saved

ZitatDo i have to see it in the squeezer android app under playlists?
I had to struggle with the app in order to find out how to use it but it eventually seems quite nice. PLAYLIST contains the current playlist, not saved playlists...



DJAlex

Vielen Dank Leute!!!!

Funktioniert super. Ich stell hier mal mein Teil aus der fhem.cfg rein vielleicht kanns jemand brauchen hab des ganze mit nem Siri Proxy am laufen um die Weckzeit per Siri für alles auf einmal zu stellen. Wenns jemand verbessern kann darf er das gerne tun. Ich könnt mir vorstellen das die Geschichte mit alter Wecker löschen neuer setzen schöner lösbar ist als ich es gemacht hab.


define wakeup at *6:50 {\
  if (!$we) {\
   {fhem("set Nachttischlampe 100 3600 600") }\
   {fhem("define wakeup2 at +00:20:00 set Nespresso on") }\
}\
}
define wakeupChange dummy
attr wakeupChange setList state:time
attr wakeupChange webCmd state
define n_wakeupChange notify wakeupChange {fhem("modify wakeup *%");;}
define d_wakeupChange notify wakeupChange {fhem("set SqueezeboxSchlafzimmer alarm1 delete")}


define wr_wakeupChange notify wakeupChange {fhem("set SqueezeboxSchlafzimmer alarm1 set 1,2,3,4,5 %:00")}


Ist alles wild zusammen kopiert!


siggi85

#186
Zitat von: oliv06 am 12 März 2014, 23:28:37
You can check on the SB server web interface ( http://myserver:9090/ ) that your playlist exists. In order to be able to save playlists you need first to go in SB server settings (button in lower right corner of the web interface) and define the place where they are saved

I think this could be the solution. I will check this and report back. :)

EDIT: It worked. Thanks! :)

siggi85

I am sorry, but i have on more question to my TTS problem. How can i delete a playlist from my LMS? If nothing is playing and i start the commands, the old saved playlist starts after saying my TTS text.
I think i can avoid this deleting the playlist after resuming it. But after studying the commandref of the LMS CLI in the LMS help Section nothing worked for me. Any advice would be nice. :)

bugster_de

you might be checking the FHEM Module about the play status. If it is "playing" then you resume, if it is "paused" or "stopped", then you don't have to resume.

oliv06

@siggi85 & bugster_de :
I have written some code changes in order to take care about this.

It adds the following commands :
    save : saves the current playlist + the current status + the current playStatus
    recall : recalls all of them, but if a talk is playing or pending, wait for its ending before playing
it also adds some Readings :
   talkStatus
   savedPlayStatus
   savedState

I can send it you by mail if you want to test and give me some feedback

bugster_de

Hi oliv,

sure ! Send that and I'll try it out. Although I have to admit, that I have no real use-case for the talking feature. I implemented it initially just because it worked :-). So don't exepect a too thorough testing of this feature.

What I need to look at is the behaviour of the connection to the SB-Server: it has been running fine for weeks now, but since a week, I get get disconnects even if the SB-Server is up and running. I have no clue why that is
I had no time so far to check if my sourceforge account works for commiting (and can get a working copy)

siggi85

#191
Oliv send me his New Version but i think i will not have time to test it the next few days.  :-\ I will Report back when i had the time.

EDIT: Ok I took the time and tested it. :)
This is the code I've tested:
set bad_squeezelite save;set bad_squeezelite talk Das ist ein Test;set bad_squeezelite recall

When something is playing it worked good. The only thing is that the song starts from beginning. Doesn't know if you can save the part of the song where it stopped?! With radio streams there is no problem, work as expected.  ;)

When I try the code when noting is playing: nothing happens, not even the talk command. I don't want to add a perl if condition to the play status. I always try to keep it simple where it is possible.

Here the output of the logfile while trying the code when nothing is playing.
2014.03.17 18:58:26 1: SB_PLAYER_Set: talk: bad_squeezelite: http%3A%2F%2Ftranslate.google.com%2Ftranslate_tts%3Ftl%3Dde%26q%3DDas%2Bist%2Bein%2BTest
2014.03.17 18:58:26 1: SB_PLAYER_Set: recall on stopped
2014.03.17 18:58:26 1: SB_PLAYER: recall : paused
2014.03.17 18:58:27 1: SB_PLAYER: no recall pending - talkstatus = requested


The save and the recall command is the right way! Thanks for your work!  :)

bugster_de

Problem seit fhem update:

ich habe letzte Woche ein FHEM Update gemacht und habe seither Probleme:
wenn ich den PC, auf dem SB-Server läuft ausschalte, geht in FHEM der Status des Servers auf disconnected --> korrekt
wenn ich nun den PC wieder einschalte, dann geht er nicht mehr auf open --> Fehler
ich muss dann jedemals in der SB_SERVER detailansicht auf DEF gehen und modify anklicken. Dann geht es. Es scheint mir, als ob SB_SERVER_Ready nicht mehr angesprungen wird.
Kennt jemand das Problem auch?

siggi85

Also ich nicht, liegt aber daran dass das Gerät 24/7 bei mir läuft.  ::)
Sobald ich Zeit habe werde ich mal testen.

oliv06

Zitat von: siggi85 am 17 März 2014, 17:38:21
When something is playing it worked good. The only thing is that the song starts from beginning. Doesn't know if you can save the part of the song where it stopped?!
Using the SB server CLI I think there is no way to do better

Zitat
When I try the code when noting is playing: nothing happens, not even the talk command.
Bug ! I have to change the code, but I have no time just right now. I will tell you.