Modérateurs: Modération Forum Home-Cinéma, Le Bureau de l’Association HCFR • Utilisateurs parcourant ce forum: BangoO, pierrot le fou et 141 invités

Tout ce qui concerne les logiciels lié au HC sur ordinateur (PC, Mac, Linux...)
Règles du forum
Avant de poster, merci de prendre connaissance des règles du forum : à lire avant de poster

Piloter une Dune avec XBMC

Message » 23 Juin 2014 12:44

lyksyr a écrit:il faudrait que tu te connecte en ssh sur le rpi et que tu lances la commande en manuel pour voir où ça cloche...


quelle commande exactement dois-je lancer stp,est -ce celle-ci?:
Code: Tout sélectionner
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url"
(192.168.0.18:adresse ip de ma dune)

ou une commande comme ton "pense bête" (adapté à un de mes films) genre:
# "/storage/.xbmc/userdata/dunefeeder.sh" "smb://FILMS/TOTO.mkv"
?

edit:pour le debug et les liens nfs je transmets tout ça se soir, merci! :thks:
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 23 Juin 2014 13:39

Sous le wget, tu as une ligne commençant par un #echo, enlève le le #.
Lance ton script en manuel.
Ca va t'afficher la commande wget complète avec l'url d'XBMC.

A partir de là, il te suffit d'exécuter manuellement cette commande et copier le résultat dans le forum
djoole
 
Messages: 3140
Inscription Forum: 25 Avr 2007 0:43
Localisation: Val d'oise
  • offline

Message » 23 Juin 2014 13:54

oui, comme mon pense bête, avec soit le lien smb à la fin (le même que te lances xbmc en direct, on l'a dans le debug log de xbmc), soit le lien nfs, au choix
lyksyr
 
Messages: 1821
Inscription Forum: 27 Déc 2007 17:08
Localisation: Angers
  • online

Message » 25 Juin 2014 14:16

Mon debug de xbmc (ou tout du moins une partie,parce sinon c'est plutôt long! :o )
Code: Tout sélectionner
12:29:08 T:3058078496  NOTICE: WakeOnAccess [192.168.0.13] trigged by accessing : smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv
12:29:08 T:3058078496  NOTICE: WakeOnAccess success exit, server already running
12:29:09 T:3058078496   DEBUG: OnPlayMedia smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv
12:29:09 T:3058078496   DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc
12:29:09 T:3058078496   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear
12:29:09 T:3058078496   DEBUG: CAnnouncementManager - Announcement: OnAdd from xbmc
12:29:09 T:3058078496   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnAdd
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers(smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv)
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerSelectionRule::GetPlayers: adding player: DUNE (5) for rule: un-named
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (4)
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DUNE (5)
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: OMXPlayer (4)
12:29:09 T:3058078496   DEBUG: CPlayerCoreFactory::GetPlayers: added 3 players
12:29:09 T:3058078496  NOTICE: ExternalPlayer Filename: /storage/.xbmc/userdata/dunefeeder.sh
12:29:09 T:3058078496  NOTICE: ExternalPlayer Tweaks: hideconsole (false), hidexbmc (false), islauncher (false), warpcursor ()
12:29:09 T:3058078496  NOTICE: OpenFile: smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv
12:29:09 T:3058078496   DEBUG: PlayFile : OpenFile succeed, play state 1
12:29:09 T:2682254416  NOTICE: Thread ExternalPlayer start, auto delete: false
12:29:09 T:2682254416  NOTICE: Process: Player : /storage/.xbmc/userdata/dunefeeder.sh
12:29:09 T:2682254416  NOTICE: Process: File   : smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv
12:29:09 T:2682254416  NOTICE: Process: Content:
12:29:09 T:2682254416  NOTICE: Process: Args   : "{1}"
12:29:09 T:2682254416  NOTICE: Process: Start
12:29:09 T:3058078496   DEBUG: Percentage is 0.000000
12:29:09 T:3048207440   DEBUG: CAESinkPi:Drain delay:99ms now:0ms
12:29:09 T:3048207440   DEBUG: CAESinkPi:Deinitialize
12:29:09 T:3048207440   DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000000
12:29:09 T:3048207440   DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0xa2b5a5d0
12:29:09 T:2682254416  NOTICE: ExecuteAppLinux: "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv"
12:29:09 T:2682254416    INFO: LIRC setUsed: disabled
12:29:09 T:3058078496   DEBUG: Percentage is 0.000000
12:29:09 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:09 T:2724197456   DEBUG: Previous line repeats 1 times.
12:29:09 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/Ratatouille/Ratatouille.mkv), query = select idMovie from movie where idFile=1636
12:29:10 T:3058078496   DEBUG: Percentage is 0.000000
12:29:10 T:2847237200   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fPoster_xxx-285231.jpg%2F
12:29:10 T:3058078496   DEBUG: Previous line repeats 1 times.
12:29:10 T:3058078496   DEBUG: Percentage is 0.000000
12:29:10 T:2847237200   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fFanart_xxx-454967.jpg%2F
12:29:11 T:2724197456   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-41115.jpg%2F
12:29:11 T:2847237200   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxxx-61506.jpg%2F
12:29:11 T:2724197456   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-30927.jpg%2F
12:29:11 T:3058078496   DEBUG: Percentage is 0.000000
12:29:11 T:2847237200   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-54378.jpg%2F
12:29:11 T:2724197456   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-32527.jpg%2F
12:29:11 T:2847237200   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-31409.jpg%2F
12:29:11 T:2724197456   DEBUG: webserver: request received for /image/image%3A%2F%2Fhttp%253a%252f%252fpassion-xbmc.org%252fscraper%252fGallery%252fmain%252fxxxx-35933.jpg%2F
12:29:11 T:3058078496   DEBUG: Percentage is 0.000000
12:29:12 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:12 T:2724197456   DEBUG: Previous line repeats 1 times.
12:29:12 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/Ratatouille/Ratatouille.mkv), query = select idMovie from movie where idFile=1636
12:29:12 T:3058078496   DEBUG: Percentage is 0.000000
12:29:14 T:2847237200   DEBUG: Previous line repeats 3 times.
12:29:14 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:14 T:3058078496   DEBUG: Percentage is 0.000000
12:29:14 T:2724197456   DEBUG: webserver: request received for /jsonrpc
12:29:14 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv), query = select idMovie from movie where idFile=1636
12:29:14 T:3058078496   DEBUG: Percentage is 0.000000
12:29:16 T:2847237200   DEBUG: Previous line repeats 3 times.
12:29:16 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:16 T:2724197456   DEBUG: Previous line repeats 1 times.
12:29:16 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv), query = select idMovie from movie where idFile=1636
12:29:16 T:3058078496   DEBUG: Percentage is 0.000000
12:29:18 T:2847237200   DEBUG: Previous line repeats 2 times.
12:29:18 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:18 T:3058078496   DEBUG: Percentage is 0.000000
12:29:18 T:2724197456   DEBUG: webserver: request received for /jsonrpc
12:29:18 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv), query = select idMovie from movie where idFile=1636
12:29:19 T:3058078496   DEBUG: Percentage is 0.000000
12:29:20 T:2847237200   DEBUG: Previous line repeats 2 times.
12:29:20 T:2847237200   DEBUG: webserver: request received for /jsonrpc
12:29:20 T:3058078496   DEBUG: Previous line repeats 1 times.
12:29:20 T:3058078496   DEBUG: Percentage is 100.000000
12:29:20 T:2724197456   DEBUG: GetMovieId (smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv), query = select idMovie from movie where idFile=1636
12:29:20 T:2682254416    INFO: LIRC Initialize: using: /run/lirc/lircd
12:29:20 T:2682254416    INFO: LIRC Initialize: successfully started
12:29:20 T:2682254416  NOTICE: ExecuteAppLinux: Failure: 512
12:29:20 T:2682254416  NOTICE: Process: Stop
12:29:20 T:2682254416  NOTICE: Process: Showing XBMC window
12:29:20 T:3058062416    INFO: CAESinkALSA - Unable to open device "default" for playback
12:29:21 T:3058062416  NOTICE: Found 1 Lists of Devices
12:29:21 T:3058062416  NOTICE: Enumerated PI devices:
12:29:21 T:3058062416  NOTICE:     Device 1
12:29:21 T:3058062416  NOTICE:         m_deviceName      : HDMI
12:29:21 T:3058062416  NOTICE:         m_displayName     : HDMI
12:29:21 T:3058062416  NOTICE:         m_displayNameExtra:
12:29:21 T:3058062416  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
12:29:21 T:3058062416  NOTICE:         m_channels        : FL,FR
12:29:21 T:3058062416  NOTICE:         m_sampleRates     : 8000,11025,16000,22050,24000,32000,41400,48000,88200,96000,176400,192000
12:29:21 T:3058062416  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_AC3,AE_FMT_DTS,AE_FMT_EAC3
12:29:21 T:3058062416  NOTICE:     Device 2
12:29:21 T:3058062416  NOTICE:         m_deviceName      : Analogue
12:29:21 T:3058062416  NOTICE:         m_displayName     : Analogue
12:29:21 T:3058062416  NOTICE:         m_displayNameExtra:
12:29:21 T:3058062416  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
12:29:21 T:3058062416  NOTICE:         m_channels        : FL,FR
12:29:21 T:3058062416  NOTICE:         m_sampleRates     : 48000
12:29:21 T:3058062416  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE
12:29:21 T:3048207440    INFO: CActiveAESink::OpenSink - initialize sink
12:29:21 T:3048207440   DEBUG: CActiveAESink::OpenSink - trying to open device PI:HDMI
12:29:21 T:3048207440   DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000008
12:29:21 T:3048207440   DEBUG: CAESinkPi:Initialize Format:15 Channels:2 Samplerate:44100 framesize:8 bufsize:17640 bytes/s=352800.00
12:29:21 T:3048207440   DEBUG: CAESinkPi:Initialize
12:29:21 T:3048207440   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100 m_handle 0xa371c890
12:29:21 T:3048207440   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_render) - port(100), nBufferCountMin(1), nBufferCountActual(2), nBufferSize(17640), nBufferAlignmen(16)
12:29:21 T:3048207440   DEBUG: CActiveAESink::OpenSink - SinkPi Initialized:
12:29:21 T:3048207440   DEBUG:   Output Device : HDMI
12:29:21 T:3048207440   DEBUG:   Sample Rate   : 44100
12:29:21 T:3048207440   DEBUG:   Sample Format : AE_FMT_FLOAT
12:29:21 T:3048207440   DEBUG:   Channel Count : 2
12:29:21 T:3048207440   DEBUG:   Channel Layout: FL,FR
12:29:21 T:3048207440   DEBUG:   Frames        : 2205
12:29:21 T:3048207440   DEBUG:   Frame Samples : 4410
12:29:21 T:3048207440   DEBUG:   Frame Size    : 8
12:29:21 T:3058062416   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
12:29:21 T:2682254416   DEBUG: OnPlayBackStopped : play state was 1, starting 0
12:29:21 T:2682254416   DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
12:29:21 T:2682254416   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
12:29:21 T:2682254416   DEBUG: Thread ExternalPlayer 2682254416 terminating
12:29:21 T:2699031632   DEBUG: DoWork - Saving file state for video item smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv
12:29:21 T:2699031632   DEBUG: DoWork - Marking video item smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv as watched
12:29:22 T:2699031632   DEBUG: CAnnouncementManager - Announcement: OnUpdate from xbmc
12:29:22 T:2699031632   DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnUpdate
12:29:22 T:2682254416   DEBUG: webserver: request received for /jsonrpc
12:29:51 T:2925745232   DEBUG: Previous line repeats 18 times.
12:29:51 T:2925745232   DEBUG: Thread JobWorker 2925745232 terminating (autodelete)
12:29:51 T:2925745232   DEBUG: webserver: request received for /jsonrpc
12:29:52 T:2699031632   DEBUG: Thread JobWorker 2699031632 terminating (autodelete)
12:29:53 T:2699031632   DEBUG: webserver: request received for /jsonrpc
12:30:09 T:2788516944   DEBUG: Previous line repeats 10 times.
12:30:09 T:2788516944  NOTICE: ES: Client  from 192.168.0.44 timed out
12:30:10 T:2925745232   DEBUG: webserver: request received for /jsonrpc
12:30:21 T:3048207440   DEBUG: Previous line repeats 7 times.
12:30:21 T:3048207440   DEBUG: CAESinkPi:Drain delay:99ms now:0ms
12:30:22 T:2925745232   DEBUG: webserver: request received for /jsonrpc
12:30:31 T:3048207440   DEBUG: Previous line repeats 5 times.
12:30:31 T:3048207440   DEBUG: CAESinkPi:Deinitialize
12:30:31 T:3048207440   DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000000
12:30:31 T:3048207440   DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0xa371c890
12:30:31 T:2925745232   DEBUG: webserver: request received for /jsonrpc
12:30:41 T:3058078496   DEBUG: Previous line repeats 6 times.
12:30:41 T:3058078496  NOTICE: Samba is idle. Closing the remaining connections
12:30:42 T:2699031632   DEBUG: webserver: request received for /jsonrpc
12:32:21 T:3058078496   DEBUG: Previous line repeats 17 times.
12:32:21 T:3058078496   DEBUG: CAnnouncementManager - Announcement: OnScreensaverActivated from xbmc
12:32:21 T:3058078496   DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnScreensaverActivated
12:32:21 T:3058078496   DEBUG: ------ Window Init () ------
12:32:21 T:2950911056  NOTICE: /storage/.xbmc/userdata/guisettings.xml
12:32:21 T:2950911056  NOTICE: did not screensaver.randomtrailers in guisettings.html


Mon log de commande ssh sous putty :
Code: Tout sélectionner
XBMC:~ # "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv"
/storage/.xbmc/userdata/dunefeeder.sh: line 6: opening: not found
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="ok"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |******************************************************************|   309   0:00:00 ETA
/storage/.xbmc/userdata/dunefeeder.sh: line 37: syntax error: unexpected "else" (expecting "fi")


un log ssh selon les recommandations de djoole:
Code: Tout sélectionner
XBMC:~ # echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"
http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=
XBMC:~ # http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=
XBMC:~ # -sh: http://192.168.0.18/cgi-bin/do?cmd=launch_media_url: not found

[2]+  Done                       http://192.168.0.18/cgi-bin/do?cmd=launch_media_url
[1]+  Done(127)                  http://192.168.0.18/cgi-bin/do?cmd=launch_media_url


Pour les liens nfs je ne les mets pas parce que j'ai tout remis en partage smb...

Je vous remets mon script dunefeeder.sh, si besoin:
Code: Tout sélectionner
#!/bin/bash
# dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
# fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR Yamaha

# Telling the receiver to switch to DUNE input - HDMI 1
`echo "tx 1f 82 11 00" | cec-client -s -d 1`

# Waiting a little for the TV to sync
sleep 7;

# url encode via python for spaces and accents
url=$(python -c "import urllib; print urllib.quote('''$1''')");

# Telling the Dune to start playback
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url";
#echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"
#echo "Wait for 2s for video to launch"
#sleep 2;

# Now waiting for the playback to finish
play=1;
while [ $play -eq 1 ]
do
   sleep 1;
   wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cgi-bin/do?cmd=status";
   if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"
   then
     if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   else
     if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   else
     if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   
   fi
done


# Telling the receiver to switch back to XBMC input - HDMI 2
sleep 4;
`echo "tx 4f 82 12 00" | cec-client -s -d 1`
# the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
/storage/.xbmc/userdata/toxbmc.sh &


Voilà j'espère que ça va vous aider et m'aider à trouver ce qui ne va pas chez moi! :ane:
Si vous avez besoin d'autres choses n'hésitez pas! :thks:
Dernière édition par litfiba le 25 Juin 2014 17:43, édité 1 fois.
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 25 Juin 2014 14:57

Je t'ai pas demandé de taper la commande echo "http.. mais de décommenter le echo sous le wget dans ton script :)

Bref, l'exécution de ton script est interrompue : tu as 2 else dans ton if, tu n'as pas le droit.

Faut faire :

Code: Tout sélectionner
if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"

  then
  if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
    then
    play=0;
  fi

  else
  if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
    then
    play=0;
  fi

fi

if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
  then
  play=0;
fi
djoole
 
Messages: 3140
Inscription Forum: 25 Avr 2007 0:43
Localisation: Val d'oise
  • offline

Message » 25 Juin 2014 16:37

Je t'ai pas demandé de taper la commande echo "http.. mais de décommenter le echo sous le wget dans ton script :)

Comprends pas vite le gars, faut lui expliquer lgtps :oops:

Mon nouveau dunefeeder:
Code: Tout sélectionner
#!/bin/bash
# dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
# fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR Yamaha

# Telling the receiver to switch to DUNE input - HDMI 1
`echo "tx 1f 82 11 00" | cec-client -s -d 1`

# Waiting a little for the TV to sync
sleep 7;

# url encode via python for spaces and accents
url=$(python -c "import urllib; print urllib.quote('''$1''')");

# Telling the Dune to start playback
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url";
#echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"
#echo "Wait for 2s for video to launch"
#sleep 2;

# Now waiting for the playback to finish
play=1;
while [ $play -eq 1 ]
do
   sleep 1;
   wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cgi-bin/do?cmd=status";
    if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"

      then
      if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
        then
        play=0;
      fi

      else
      if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
        then
        play=0;
      fi

    fi

    if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
      then
      play=0;
    fi

done


# Telling the receiver to switch back to XBMC input - HDMI 2
sleep 4;
`echo "tx 4f 82 12 00" | cec-client -s -d 1`
# the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
/storage/.xbmc/userdata/toxbmc.sh &


Mon log ssh avec script lancé en manuel et commande echo decommenté (j'espère que j'ai pigé ce coup-ci!):

Code: Tout sélectionner
XBMC:~ # #!/bin/bash
XBMC:~ # # dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
XBMC:~ # # fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR Yamaha
XBMC:~ #
XBMC:~ # # Telling the receiver to switch to DUNE input - HDMI 1
XBMC:~ # `echo "tx 1f 82 11 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ #
XBMC:~ # # Waiting a little for the TV to sync
XBMC:~ # sleep 7;
XBMC:~ #
XBMC:~ # # url encode via python for spaces and accents
XBMC:~ # url=$(python -c "import urllib; print urllib.quote('''$1''')");
XBMC:~ #
XBMC:~ # # Telling the Dune to start playback
XBMC:~ # wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url"
;
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="failed"/>
<param name="error_kind" value="invalid_parameters"/>
<param name="error_description" value="'media_url' parameter value '' is invalid: qualified url is expected"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |******************************************************************|   478   0:00:00 ETA
XBMC:~ # echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"
http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=
XBMC:~ # #echo "Wait for 2s for video to launch"
XBMC:~ # #sleep 2;
XBMC:~ #
XBMC:~ # # Now waiting for the playback to finish
XBMC:~ # play=1;
XBMC:~ # while [ $play -eq 1 ]
> do
>    sleep 1;
>    wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cgi-bin/do?cmd=status";
>     if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"
>
>       then
>       if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
>         then
>         play=0;
>       fi
>
>       else
>       if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
>         then
>         play=0;
>       fi
>
>     fi
>
>     if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
>       then
>       play=0;
>     fi
>
> done
Connecting to 192.168.0.18 (192.168.0.18:80)
dunefeeder.html      100% |******************************************************************|   267   0:00:00 ETA
0
1
0
XBMC:~ #
XBMC:~ #
XBMC:~ # # Telling the receiver to switch back to XBMC input - HDMI 2
XBMC:~ # sleep 4;
XBMC:~ # `echo "tx 4f 82 12 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ # # the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
XBMC:~ # /storage/.xbmc/userdata/toxbmc.sh &
XBMC:~ #
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 25 Juin 2014 17:03

alors l'erreur du 2eme else, c'est de ma faute. je l'avais rajouté à l'arrache pour le status standby.

sinon, ton log ssh ce n'est pas ça non plus. refait juste ta commande "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv" sous putty (en enlevant les noms des films lorsque tu le recopies ici, charte oblige)


mais c'est le
Code: Tout sélectionner
/storage/.xbmc/userdata/dunefeeder.sh: line 6: opening: not found
qui me pose question, la ligne 6 c'est le cec, et il a l'air de bien basculer d'entrée comme tu nous l'a dit...

reposte ça et sinon on mettra des echo 'test 1' et des echo test 'coucou' un peu partout
lyksyr
 
Messages: 1821
Inscription Forum: 27 Déc 2007 17:08
Localisation: Angers
  • online

Message » 25 Juin 2014 17:38

sinon, ton log ssh ce n'est pas ça non plus. refait juste ta commande "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/xxx/xxx.mkv" sous putty (en enlevant les noms des films lorsque tu le recopies ici, charte oblige)


Voilà:
Code: Tout sélectionner
XBMC:~ # "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/XXX/XXX.mkv"
/storage/.xbmc/userdata/dunefeeder.sh: line 6: opening: not found
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="ok"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |********************************************************************|   309   0:00:00 ETA
Connecting to 192.168.0.18 (192.168.0.18:80)
dunefeeder.html      100% |********************************************************************|   267   0:00:00 ETA
0
1
0
/storage/.xbmc/userdata/dunefeeder.sh: line 52: opening: not found


mais c'est le

Code: Tout sélectionner
/storage/.xbmc/userdata/dunefeeder.sh: line 6: opening: not found

qui me pose question, la ligne 6 c'est le cec, et il a l'air de bien basculer d'entrée comme tu nous l'a dit...
OUI, OUI ça bascule bien sur hdmi 1 (dune) mais c'est tout après rien ne se passe...
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 25 Juin 2014 20:53

Tu vas la décommenter cette ligne nom di diou???? :)
Enlevé le dièse devant le echo juste en dessous du wget.

Et reposte la sortie du script.
Je veux voir ce qui est envoyé à la Dune.

Et sinon lorsque tu lances le script, strictement rien ne se passe sur la Dune?
djoole
 
Messages: 3140
Inscription Forum: 25 Avr 2007 0:43
Localisation: Val d'oise
  • offline

Message » 26 Juin 2014 1:51

Tu vas la décommenter cette ligne nom di diou???? :)
Enlevé le dièse devant le echo juste en dessous du wget.

Nom di diou :mdr: je ne comprends plus c'est pourtant ce que j'ai fais :ko: :
Code: Tout sélectionner
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url";
    echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"

Après J'ai fais un copier/coller de tout le script dans le ssh que j'ai posté aussi plus haut!

Code: Tout sélectionner
OpenELEC (official) Version: 4.0.5
XBMC:~ #     #!/bin/bash
XBMC:~ #     # dunefeeder for feeding videos to your dune from a Windows Seven P
C with XBMC - by djoole - v0.1
XBMC:~ #     # fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR
Yamaha
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch to DUNE input - HDMI 1
XBMC:~ #     `echo "tx 1f 82 11 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ #
XBMC:~ #     # Waiting a little for the TV to sync
XBMC:~ #     sleep 7;
XBMC:~ #
XBMC:~ #     # url encode via python for spaces and accents
XBMC:~ #     url=$(python -c "import urllib; print urllib.quote('''$1''')");
XBMC:~ #
XBMC:~ #     # Telling the Dune to start playback
XBMC:~ #     wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&acti
on_on_exit=black_screen&media_url=$url";
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="failed"/>
<param name="error_kind" value="invalid_parameters"/>
<param name="error_description" value="'media_url' parameter value '' is invalid: qualified url is expected"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |*******************************|   478   0:00:00 ETA
XBMC:~ #     echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on
_exit=black_screen&media_url=$1"
http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=
XBMC:~ #     #echo "Wait for 2s for video to launch"
XBMC:~ #     #sleep 2;
XBMC:~ #
XBMC:~ #     # Now waiting for the playback to finish
XBMC:~ #     play=1;
XBMC:~ #     while [ $play -eq 1 ]
>     do
>        sleep 1;
>        wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cg
i-bin/do?cmd=status";
>         if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/sto
rage/.xbmc/userdata/dunefeeder.html"
>
>           then
>           if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/stora
ge/.xbmc/userdata/dunefeeder.html"
>             then
>             play=0;
>           fi
>
>           else
>           if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/stora
ge/.xbmc/userdata/dunefeeder.html"
>             then
>             play=0;
>           fi
>
>         fi
>
>         if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.
xbmc/userdata/dunefeeder.html"
>           then
>           play=0;
>         fi
>
>     done
Connecting to 192.168.0.18 (192.168.0.18:80)
dunefeeder.html      100% |*******************************|   267   0:00:00 ETA
0
1
0
XBMC:~ #
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch back to XBMC input - HDMI 2
XBMC:~ #     sleep 4;
XBMC:~ #     `echo "tx 4f 82 12 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ #     # the dune player reswitch via CEC, we need to switch again to xbmc
, but without blocking xbmc control
XBMC:~ #     /storage/.xbmc/userdata/toxbmc.sh &
XBMC:~ # /storage/.xbmc/userdata/toxbmc.sh: line 2: opening: not found



Et sinon lorsque tu lances le script, strictement rien ne se passe sur la Dune?

Alors:
-ma dune est en veille
-je lance le script via ssh
-la dune démarre, la tv commute bien sur l'entrée hdmi de la dune HDMI 1
-je suis sur l'onglet "sources" de la dune et c'est tout.

Même topo lorsque la dune est déjà allumée, seule la tv commute encore sur hdmi 1, la dune elle reste sur l'onglet "sources" (donc rien ne se passe)
Bon c'est bien prise de tête ce truc merci en tout cas pour votre patience et votre aide :thks: je vais faire dodo la nuit porte conseil paraît-il :lol:
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 26 Juin 2014 8:59

essaye ce dunefeeder :
Code: Tout sélectionner
#!/bin/bash
# dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
# fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR Yamaha

# Telling the receiver to switch to DUNE input - HDMI 1
echo "test1"
`echo "tx 4f 82 12 00" | cec-client -s -d 1`

# Waiting a little for the TV to sync
echo "test2"
sleep 7;

# url encode via python for spaces and accents
echo "test3"
url=$(python -c "import urllib; print urllib.quote('''$1''')");

# Telling the Dune to start playback
echo "test4"
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url"

# Now waiting for the playback to finish
echo "test5"
play=1;
while [ $play -eq 1 ]
do
   sleep 1;
   wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cgi-bin/do?cmd=status";
   if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"
   then
     if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   else
     if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   fi
   if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
   then
     play=0;
   fi
   echo "loop"
done

echo "test6"

# Telling the receiver to switch back to XBMC input - HDMI 2
sleep 4;
echo "test7"

`echo "tx 1f 82 11 00" | cec-client -s -d 1`
# the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
echo "test8"

/storage/.xbmc/userdata/toxbmc.sh &
echo "test9"


avec le ssh "/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/XXX/XXX.mkv" et poste le résultat
lyksyr
 
Messages: 1821
Inscription Forum: 27 Déc 2007 17:08
Localisation: Angers
  • online

Message » 26 Juin 2014 10:10

litfiba a écrit:
Tu vas la décommenter cette ligne nom di diou???? :)
Enlevé le dièse devant le echo juste en dessous du wget.

Nom di diou :mdr: je ne comprends plus c'est pourtant ce que j'ai fais :ko: :
Code: Tout sélectionner
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url";
    echo "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$1"


Bah non tu l'as pas fait sinon je le verrai dans le résultat.

Bref, utilise ce script, j'ai rajouté un truc :

Code: Tout sélectionner
#!/bin/bash
# dunefeeder for feeding videos to your dune from a Windows Seven PC with XBMC - by djoole - v0.1
# fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR Yamaha

# Telling the receiver to switch to DUNE input - HDMI 1
echo "test1"
`echo "tx 4f 82 12 00" | cec-client -s -d 1`

# Waiting a little for the TV to sync
echo "test2"
sleep 7;

# url encode via python for spaces and accents
echo "test3"
url=$(python -c "import urllib; print urllib.quote('''$1''')");

# Telling the Dune to start playback
echo "test4"
echo "******** url = $url ********"
wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&action_on_exit=black_screen&media_url=$url"

# Now waiting for the playback to finish
echo "test5"
play=1;
while [ $play -eq 1 ]
do
   sleep 1;
   wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cgi-bin/do?cmd=status";
   if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/storage/.xbmc/userdata/dunefeeder.html"
   then
     if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   else
     if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
     then
       play=0;
     fi
   fi
   if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
   then
     play=0;
   fi
   echo "loop"
done

echo "test6"

# Telling the receiver to switch back to XBMC input - HDMI 2
sleep 4;
echo "test7"

`echo "tx 1f 82 11 00" | cec-client -s -d 1`
# the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
echo "test8"

/storage/.xbmc/userdata/toxbmc.sh &
echo "test9"
djoole
 
Messages: 3140
Inscription Forum: 25 Avr 2007 0:43
Localisation: Val d'oise
  • offline

Message » 26 Juin 2014 20:24

script djoole via ssh log:
Code: Tout sélectionner
login as: root
root@192.168.0.50's password:
##############################################
# OpenELEC - The living room PC for everyone #
# ...... visit http://www.openelec.tv ...... #
##############################################

OpenELEC (official) Version: 4.0.6
XBMC:~ #     #!/bin/bash
XBMC:~ #     # dunefeeder for feeding videos to your dune from a Windows Seven P
C with XBMC - by djoole - v0.1
XBMC:~ #     # fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR
Yamaha
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch to DUNE input - HDMI 1
XBMC:~ #     echo "test1"
test1
XBMC:~ #     `echo "tx 4f 82 12 00" | cec-client -s -d 1`
       then
         if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
         then
           play=0;
         fi
       else
         if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
         then
           play=0;
         fi
       fi
       if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
       then
         play=0;
       fi
       echo "loop"
    done

    echo "test6"

    # Telling the receiver to switch back to XBMC input - HDMI 2
    sleep 4;
    echo "test7"

    `echo "tx 1f 82 11 00" | cec-client -s -d 1`
    # the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
    echo "test8"

    /storage/.xbmc/userdata/toxbmc.sh &
    echo "test9"
-sh: opening: not found
XBMC:~ #
XBMC:~ #     # Waiting a little for the TV to sync
XBMC:~ #     echo "test2"
test2
XBMC:~ #     sleep 7;
XBMC:~ #
XBMC:~ #     # url encode via python for spaces and accents
XBMC:~ #     echo "test3"
test3
XBMC:~ #     url=$(python -c "import urllib; print urllib.quote('''$1''')");
XBMC:~ #
XBMC:~ #     # Telling the Dune to start playback
XBMC:~ #     echo "test4"
test4
XBMC:~ #     echo "******** url = $url ********"
******** url =  ********
XBMC:~ #     wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&acti
on_on_exit=black_screen&media_url=$url"
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="failed"/>
<param name="error_kind" value="invalid_parameters"/>
<param name="error_description" value="'media_url' parameter value '' is invalid: qualified url is expected"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |*******************************|   478   0:00:00 ETA
XBMC:~ #
XBMC:~ #     # Now waiting for the playback to finish
XBMC:~ #     echo "test5"
test5
XBMC:~ #     play=1;
XBMC:~ #     while [ $play -eq 1 ]
>     do
>        sleep 1;
>        wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cg
i-bin/do?cmd=status";
>        if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/stor
age/.xbmc/userdata/dunefeeder.html"
>        then
>          if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storag
e/.xbmc/userdata/dunefeeder.html"
>          then
>            play=0;
>          fi
>        else
>          if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storag
e/.xbmc/userdata/dunefeeder.html"
>          then
>            play=0;
>          fi
>        fi
>        if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.x
bmc/userdata/dunefeeder.html"
>        then
>          play=0;
>        fi
>        echo "loop"
>     done
Connecting to 192.168.0.18 (192.168.0.18:80)
dunefeeder.html      100% |*******************************|   267   0:00:00 ETA
0
1
0
loop
XBMC:~ #
XBMC:~ #     echo "test6"
test6
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch back to XBMC input - HDMI 2
XBMC:~ #     sleep 4;
XBMC:~ #     echo "test7"
test7
XBMC:~ #
XBMC:~ #     `echo "tx 1f 82 11 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ #     # the dune player reswitch via CEC, we need to switch again to xbmc
, but without blocking xbmc control
XBMC:~ #     echo "test8"
test8
XBMC:~ #
XBMC:~ #     /storage/.xbmc/userdata/toxbmc.sh &
XBMC:~ #     echo "test9"
test9
XBMC:~ # /storage/.xbmc/userdata/toxbmc.sh: line 2: opening: not found


Log ssh script lyksir:
Code: Tout sélectionner
XBMC:~ #     #!/bin/bash
XBMC:~ #     # dunefeeder for feeding videos to your dune from a Windows Seven P
C with XBMC - by djoole - v0.1
XBMC:~ #     # fork for raspberry pi by Lyksyr - switch hdmi port by cec on AVR
Yamaha
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch to DUNE input - HDMI 1
XBMC:~ #     echo "test1"
test1
XBMC:~ #     `echo "tx 4f 82 12 00" | cec-client -s -d 1`
         if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storage/.xbmc/userdata/dunefeeder.html"
         then
           play=0;
         fi
       else
         if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storage/.xbmc/userdata/dunefeeder.html"
         then
           play=0;
         fi
       fi
       if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.xbmc/userdata/dunefeeder.html"
       then
         play=0;
       fi
       echo "loop"
    done

    echo "test6"

    # Telling the receiver to switch back to XBMC input - HDMI 2
    sleep 4;
    echo "test7"

    `echo "tx 1f 82 11 00" | cec-client -s -d 1`
    # the dune player reswitch via CEC, we need to switch again to xbmc, but without blocking xbmc control
    echo "test8"

    /storage/.xbmc/userdata/toxbmc.sh &
    echo "test9"
-sh: opening: not found
XBMC:~ #
XBMC:~ #     # Waiting a little for the TV to sync
XBMC:~ #     echo "test2"
test2
XBMC:~ #     sleep 7;
XBMC:~ #
XBMC:~ #     # url encode via python for spaces and accents
XBMC:~ #     echo "test3"
test3
XBMC:~ #     url=$(python -c "import urllib; print urllib.quote('''$1''')");
XBMC:~ #
XBMC:~ #     # Telling the Dune to start playback
XBMC:~ #     echo "test4"
test4
XBMC:~ #     wget -O - "http://192.168.0.18/cgi-bin/do?cmd=launch_media_url&acti
on_on_exit=black_screen&media_url=$url"
Connecting to 192.168.0.18 (192.168.0.18:80)
<?xml version="1.0" ?>
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="failed"/>
<param name="error_kind" value="invalid_parameters"/>
<param name="error_description" value="'media_url' parameter value '' is invalid: qualified url is expected"/>
<param name="player_state" value="navigator"/>
<param name="pip_zorder" value="400"/>
<param name="video_zorder" value="200"/>
<param name="osd_zorder" value="500"/>
</command_result>
-                    100% |*******************************|   478   0:00:00 ETA
XBMC:~ #
XBMC:~ #     # Now waiting for the playback to finish
XBMC:~ #     echo "test5"
test5
XBMC:~ #     play=1;
XBMC:~ #     while [ $play -eq 1 ]
>     do
>        sleep 1;
>        wget -O /storage/.xbmc/userdata/dunefeeder.html "http://192.168.0.18/cg
i-bin/do?cmd=status";
>        if grep -c -h -e 'name=\"player_state\" value=\"file_playback\"' "/stor
age/.xbmc/userdata/dunefeeder.html"
>        then
>          if grep -c -h -e 'name=\"playback_state\" value=\"stopped\"' "/storag
e/.xbmc/userdata/dunefeeder.html"
>          then
>            play=0;
>          fi
>        else
>          if grep -c -h -e 'name=\"player_state\" value=\"navigator\"' "/storag
e/.xbmc/userdata/dunefeeder.html"
>          then
>            play=0;
>          fi
>        fi
>        if grep -c -h -e 'name=\"player_state\" value=\"standby\"' "/storage/.x
bmc/userdata/dunefeeder.html"
>        then
>          play=0;
>        fi
>        echo "loop"
>     done
Connecting to 192.168.0.18 (192.168.0.18:80)
dunefeeder.html      100% |*******************************|   267   0:00:00 ETA
0
1
0
loop
XBMC:~ #
XBMC:~ #     echo "test6"
test6
XBMC:~ #
XBMC:~ #     # Telling the receiver to switch back to XBMC input - HDMI 2
XBMC:~ #     sleep 4;
XBMC:~ #     echo "test7"
test7
XBMC:~ #
XBMC:~ #     `echo "tx 1f 82 11 00" | cec-client -s -d 1`
-sh: opening: not found
XBMC:~ #     # the dune player reswitch via CEC, we need to switch again to xbmc
, but without blocking xbmc control
XBMC:~ #     echo "test8"
test8
XBMC:~ #
XBMC:~ #     /storage/.xbmc/userdata/toxbmc.sh &
XBMC:~ #     echo "test9"
test9
XBMC:~ # /storage/.xbmc/userdata/toxbmc.sh: line 2: opening: not found


Dans les 2 cas toujours les mêmes symptômes la dune démarre-commutation sur hdm1-recommutation au bout d'un moment sur hdmi 1 et c'est tout.
Si je lance un film dpuis xbmc via ma tablette c'est pareil et la dune reste au final sur l'écran d'accueuil et lorsque je reviens via ma telecommande sur xbmc (hdmi2) le film est marqué vu. (sans s'être lancé)
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline

Message » 27 Juin 2014 8:51

litfiba, ton "log ssh" ne sert à rien en fait.

à chaque fois, ce qu'on appelle le log ssh, c'est le résultat de la commande

"/storage/.xbmc/userdata/dunefeeder.sh" "smb://192.168.0.13/video/ANIMES/XXX/XXX.mkv"

utilise le script modifié de djoole dans ton dunefeeder.sh et poste le résultat de la commande

ça va faire pareil encore cette fois-ci, c'est normal on a juste rajouté des codes de controle.
lyksyr
 
Messages: 1821
Inscription Forum: 27 Déc 2007 17:08
Localisation: Angers
  • online

Message » 27 Juin 2014 9:36

Merci lyksyr pour tes explications :thks: , j'avoue qu'à force je suis complétement embrouillé :ko: . Je vous mets le résultat de la commande ce soir...
litfiba
 
Messages: 356
Inscription Forum: 08 Fév 2004 17:34
  • offline


Retourner vers Logiciel PC Home-cinéma

 
  • Articles en relation
    Dernier message