Ankündigung

Einklappen
Keine Ankündigung bisher.

Neues Plugin: AV Device (für Yamaha, Pioneer, Denon, etc.)

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

    #16
    Hab deine Änderungen gemach. Hier das Resultat.

    Kommandos waren Power On / Mute On / Mute Off / Power Off. Es wurde wieder nur das erste Kommande korrekt ausgeführt, Power On in diesem Fall, und die danach nur noch gequeued.

    Power on:
    Code:
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Starting to update item avr.power. Lock is: True. Reconnectrigger is True -- __init__.py:update_item:1475
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Trying to connect while updating item -- __init__.py:update_item:1478
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Visu trying to update avr.power -- __init__.py:update_item:1483
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Command power is a standard command. Message: 'power' -- __init__.py:update_item:1579
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Visu set power to True for avr.power in zone 0 -- __init__.py:update_item:1583
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Update Zone 0 Command On PWON|PWON for avr.power -- __init__.py:update_item:1617
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Command Power On for zone: 0. Appending relevant query commands: ['PW?,PW?,PW'] -- __init__.py:update_item:1620
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'PW?,PW?,PW']. Sendingcommand: PWON|PWON,PW?,PW1. Lock is released. Now it is False -- __init__.py:update_item:1740
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Sending : Starting to send command PWON|PWON from list ['PWON|PWON,PW?,PW1', 'PW?,PW?,PW']. Caller: updateitem. Lock is: True -- __init__.py:_send:1794
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Sending : Trying to connect while sending command -- __init__.py:_send:1822
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Sending TCP : command was sent PWON from Multicommand-List ['PWON', 'PWON']. Returns 5 -- __init__.py:_send:1840
    
    2017-07-17 18:08:11 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'PW?,PW?,PW']. Return from send is 5. Lock is released. Now it is False -- __init__.py:update_item:1748
    Mute On:
    Code:
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Starting to update item avr.mute. Lock is: True. Reconnectrigger is True -- __init__.py:update_item:1475
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Trying to connect while updating item -- __init__.py:update_item:1478
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Visu trying to update avr.mute -- __init__.py:update_item:1483
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Command mute is a standard command. Message: 'mute' -- __init__.py:update_item:1579
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Visu set mute to True for avr.mute in zone 1 -- __init__.py:update_item:1583
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Update Zone 1 Command On MUON for avr.mute -- __init__.py:update_item:1617
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'PW?,PW?,PW']. Sendingcommand: PWON|PWON,PW?,PW1. Lock is released. Now it is False -- __init__.py:update_item:1740
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Sending : Starting to send command PWON|PWON from list ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'PW?,PW?,PW']. Caller: updateitem. Lock is: True -- __init__.py:_send:1794
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Sending : Trying to connect while sending command -- __init__.py:_send:1822
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Sending TCP : command was sent PWON from Multicommand-List ['PWON', 'PWON']. Returns 5 -- __init__.py:_send:1840
    
    2017-07-17 18:08:31 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'PW?,PW?,PW']. Return from send is 5. Lock is released. Now it is False -- __init__.py:update_item:1748
    Mute Off:
    Code:
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Starting to update item avr.mute. Lock is: True. Reconnectrigger is True -- __init__.py:update_item:1475
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Trying to connect while updating item -- __init__.py:update_item:1478
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Visu trying to update avr.mute -- __init__.py:update_item:1483
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Command mute is a standard command. Message: 'mute' -- __init__.py:update_item:1579
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Visu set mute to False for avr.mute in zone 1 -- __init__.py:update_item:1583
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Update Zone 1 Command Off MUOFF for avr.mute -- __init__.py:update_item:1648
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PW?,PW?,PW']. Sendingcommand: PWON|PWON,PW?,PW1. Lock is released. Now it is False -- __init__.py:update_item:1740
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Sending : Starting to send command PWON|PWON from list ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PW?,PW?,PW']. Caller: updateitem. Lock is: True -- __init__.py:_send:1794
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Sending : Trying to connect while sending command -- __init__.py:_send:1822
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Sending TCP : command was sent PWON from Multicommand-List ['PWON', 'PWON']. Returns 5 -- __init__.py:_send:1840
    
    2017-07-17 18:08:48 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PW?,PW?,PW']. Return from send is 5. Lock is released. Now it is False -- __init__.py:update_item:1748
    Power Off:
    Code:
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Starting to update item avr.power. Lock is: True. Reconnectrigger is True -- __init__.py:update_item:1475
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Trying to connect while updating item -- __init__.py:update_item:1478
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Visu trying to update avr.power -- __init__.py:update_item:1483
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Command power is a standard command. Message: 'power' -- __init__.py:update_item:1579
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Visu set power to False for avr.power in zone 0 -- __init__.py:update_item:1583
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Update Zone 0 Command Off PWOFF for avr.power -- __init__.py:update_item:1648
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PWOFF,PW?,PW0', 'PW?,PW?,PW']. Sendingcommand: PWON|PWON,PW?,PW1. Lock is released. Now it is False -- __init__.py:update_item:1740
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Sending : Starting to send command PWON|PWON from list ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PWOFF,PW?,PW0', 'PW?,PW?,PW']. Caller: updateitem. Lock is: True -- __init__.py:_send:1794
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Sending : Trying to connect while sending command -- __init__.py:_send:1822
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:921
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:934
    
    2017-07-17 18:09:05 DEBUG    __init__     Main         Sending TCP : command was sent PWON from Multicommand-List ['PWON', 'PWON']. Returns 5 -- __init__.py:_send:1840
    
    2017-07-17 18:09:06 DEBUG    __init__     Main         Updating Item for avdevice_: Updating item. Command list is ['PWON|PWON,PW?,PW1', 'MUON,MU?,MU1', 'MUOFF,MU?,MU0', 'PWOFF,PW?,PW0', 'PW?,PW?,PW']. Return from send is 5. Lock is released. Now it is False -- __init__.py:update_item:1748

    Kommentar


      #17
      Das Spiel ist immer das Gleiche.. das Problem liegt darin, dass aus irgendeinem Grund die Antwort nicht geparst wird. Ich hab den Aufruf der Funktion nun etwas umgebaut und hoffe, dass es nun klappt.

      Bitte nochmal um das Log von Beginn an bis zum Senden des ersten Befehls, egal obs klappt oder nicht

      Vielen Dank!

      Angehängte Dateien

      Kommentar


        #18
        Also, wir kommen der Sache schon näher:

        debug.log = Power On und dann ein Mute On und Mute Off. Hat soweit geklappt
        debug2.log = Das Ding gestresst: Mehrere male Mute getoggelt. Plötzlich ging nichts mehr

        Desweiteren kann man SHNG nicht mehr richtig mit ctrl-c beenden. Da scheinen einige Threads von avdevice zu hängen. Nach mehrmaligem ctrl-c beendet sich Python mit einer Fehlermeldung:

        Code:
        2017-07-18 16:16:46 INFO     smarthome    Main         Thread: Main, still alive -- smarthome.py:stop:384
        
        2017-07-18 16:16:46 INFO     smarthome    Main         Thread: avdevice-tcp-reconnect, still alive -- smarthome.py:stop:384
        
        2017-07-18 16:16:46 INFO     smarthome    Main         Thread: Thread-8, still alive -- smarthome.py:stop:384
        
        2017-07-18 16:16:46 INFO     smarthome    Main         Thread: Thread-7, still alive -- smarthome.py:stop:384
        
        2017-07-18 16:16:46 INFO     smarthome    Main         Thread: Thread-6, still alive -- smarthome.py:stop:384
        
        Exception ignored in: <module 'threading' from '/usr/lib/python3.4/threading.py'>
        
        Traceback (most recent call last):
        
          File "/usr/lib/python3.4/threading.py", line 1294, in _shutdown
        
            t.join()
        
          File "/usr/lib/python3.4/threading.py", line 1060, in join
        
            self._wait_for_tstate_lock()
        
          File "/usr/lib/python3.4/threading.py", line 1076, in _wait_for_tstate_lock
        
            elif lock.acquire(block, timeout):
        
          File "bin/smarthome.py", line 384, in stop
        
            self.logger.info("Thread: {}, still alive".format(thread.name))
        
          File "/usr/lib/python3.4/logging/__init__.py", line 1274, in info
        
            self._log(INFO, msg, args, **kwargs)
        
          File "/usr/lib/python3.4/logging/__init__.py", line 1408, in _log
        
            exc_info, func, extra, sinfo)
        
          File "/usr/lib/python3.4/logging/__init__.py", line 1380, in makeRecord
        
            sinfo)
        
          File "/usr/lib/python3.4/logging/__init__.py", line 273, in __init__
        
            self.levelname = getLevelName(level)
        
          File "/usr/lib/python3.4/logging/__init__.py", line 133, in getLevelName
        
            return _levelToName.get(level, _nameToLevel.get(level, ("Level %s" % level)))
        
          File "bin/smarthome.py", line 390, in stop
        
            exit()
        
          File "/usr/lib/python3.4/_sitebuiltins.py", line 26, in __call__
        
            raise SystemExit(code)
        
        SystemExit: None
        Angehängte Dateien

        Kommentar


          #19
          Vielen Dank für den Stresstest
          Ich hatte eigentlich eine Funktion integriert, die für Folgendes sorgt:
          a) Ist der Befehl bereits in der Commandliste, wird er ignoriert
          b) Ist der gegenteilige Befehl (also Off wenn On gesendet wird) in der Liste, wird dieser ersetzt.

          Letzteres war aber nicht so wirklich funktionstüchtig, jedenfalls nicht mit dem Denon. Code ist nun ersetzt und hat zumindest bei mir einiges an Stress überstanden
          Was ich prinzipiell noch machen müsste/sollte: Sobald ein Power Off Command für eine Zone kommt, sollten alle Befehle für diese Zone (also Mute, diverse Query-Commands, die die aktuelle Volume, etc. einlesen, ...) aus der Kommandoliste verschwinden. Ansonsten wird es immer so sein, dass Befehle gesendet werden, zu denen keine Rückmeldung oder nicht die gewünschte kommt. Das könnte aber bei nem Stresstest mit etlichen An/Aus hintereinander wieder zu Problemen führen, hehe..

          Soweit, so gut. Kannst du mal die neue Version testen bitte? Ich hoffe, das Threadproblem erledigt sich dadurch auch selbst... Wobei es noch bestehen könnte, wenn eben Befehle gesendet werden, die auf Grund des ausgeschalteten Zustands nicht angenommen werden (können).

          Kommentar


            #20
            Jetzt sollte es auch mit Setzen der volume sowie Ändern des Inputs funktionieren.
            Komisch ist, dass es bei Letzterem immer 2 Anläufe braucht. Hat jemand eine Ahnung warum?
            Es ist nun möglich, im plugin.yaml noch ein Timeout dran zu hängen, vielleicht kann man damit noch etwas experimentieren..
            tcp: 10.0.0.130, 23, 2
            IP, Port, Timeout
            Angehängte Dateien

            Kommentar


              #21
              Onkelandy Hi.

              Hab deine letzte Version jetzt getestet.

              Power On: OK
              Gefühlte 15 x MUTEON / MUTEOFF: OK, Stresstest bestanden :-)))

              Power Off: Hat nicht funktioniert, keine Ahnung warum. Um sicher ze gehen hab ich dir auch meine .txt angehängt, nicht dass ich da was falsch gemach habe.

              Jetzt ist es schon fast perfekt :-)
              Angehängte Dateien

              Kommentar


                #22
                Ich hänge euch morgen mal Logs an. Kriege immer noch x Timeouts. Dachte, dass evtl das andere Denon Plugin den Receiver überlastet, das ist jetzt aber auskommentiert.. Mhmm

                Achja: sollte das Plugin es eigentlich schaffen, den aktuellen Status des Receivers zu bekommen? Selbst wenn er an ist, bleibt Power initial FALSE

                Kommentar


                  #23
                  Foxi352 hast du schon mal probiert, im txt File PWSTANDBY einzutragen?
                  0;power off;PWOFF;PW?;PWSTANDBY;RW

                  Denon macht zwar bei den Zonen ein OFF, aber beim Haupt-Power ein Standby, wenn's "aus" ist. Mir erschließt sich der Sinn von PW ehrlich gestanden eh nicht... gehe nur über die einzelnen Zonen.

                  psilo Ja, das Plugin fragt automatisch alle Query-Kommandos raus, sobald es mit dem Gerät eine Verbindung aufbauen konnte. Allerdings geht das nur, wenn du im Text-File die Zeile mit "statusupdate" drin hast und ein Item hast, das darauf referenziert. Also zB Denon.Statusupdate

                  Ich werde das mit dem Textfile noch überarbeiten, macht eigentlich keinen Sinn. Stattdessen werde ich den Befehl einfach fix beim Start festlegen. Wenn's dann ein passendes Item gibt, gut, wenn nicht, gibts einen Hinweis.

                  Kommentar


                    #24
                    Zitat von Onkelandy Beitrag anzeigen
                    Foxi352 hast du schon mal probiert, im txt File PWSTANDBY einzutragen?
                    0;power off;PWOFF;PW?;PWSTANDBY;RW

                    Denon macht zwar bei den Zonen ein OFF, aber beim Haupt-Power ein Standby, wenn's "aus" ist. Mir erschließt sich der Sinn von PW ehrlich gestanden eh nicht... gehe nur über die einzelnen Zonen.
                    Hat nichts wesentliches verändert. PWON, MUON, MUOFF immer noch ohne Probleme.

                    PWOFF:

                    Code:
                    017-07-23 21:47:21 INFO     __init__     denon        Initializing : Created query commands, including 3 entries. -- __init__.py:_create_querycommands:264
                    
                    2017-07-23 21:47:21 DEBUG    __init__     denon        Connecting : Starting to connect. Current Connections: [] -- __init__.py:connect:932
                    
                    2017-07-23 21:47:21 DEBUG    __init__     denon        Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:945
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Connecting TCP : Starting to connect to 192.168.2.52. -- __init__.py:connect_tcp:963
                    
                    2017-07-23 21:47:21 INFO     __init__     avdevice-tcp-reconnect Connecting TCP : Connected to 192.168.2.52:23 -- __init__.py:connect_tcp:971
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Connecting TCP : Deactivating reconnect scheduler. Command list while connecting: []. Keep Commands: {} -- __init__.py:connect_tcp:1005
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Connecting TCP : TCP is connected. -- __init__.py:connect_tcp:1008
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Connecting TCP : Starting Parse Input. -- __init__.py:connect_tcp:1010
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Received Parseinput Trigger from tcpconnect. -- __init__.py:parse_input:1084
                    
                    2017-07-23 21:47:21 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : No statusupdate defined, not querying status after connection. -- __init__.py:parse_input:1091
                    
                    root@srvsmarthome:/usr/local/smarthome/var/log# tail -n 100 avdevice.log
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function initializing... Lock is: True -- __init__.py:_send:1847
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Sending : Starting to send command PWOFF from list ['PWOFF,PW?,PWSTANDBY']. Caller: parseinput_final. Lock is: True -- __init__.py:_send:1858
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Sending : Trying to connect while sending command -- __init__.py:_send:1890
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:932
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:945
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Sending TCP : command was sent PWOFF from Multicommand-List ['PWOFF']. Returns 6 -- __init__.py:_send:1908
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Sending again because list is not empty yet. Sending return is 6. Lock is released. Now it is False. -- __init__.py:parse_input:1481
                    
                    2017-07-23 21:47:08 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Starting to parse input. Lock is: False. Alive: True. Connected: ['TCP']. Sendcommand:PWOFF,PW?,PWSTANDBY -- __init__.py:parse_input:1097
                    
                    2017-07-23 21:47:11 DEBUG    __init__     avdevice-tcp-reconnect Processing Response : Error reading.. Error: timed out. Sending Command: PWOFF,PW?,PWSTANDBY. RS232: None, Host: 192.168.2.52, Socket: <socket.socket fd=14, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.2.1', 44655), raddr=('192.168.2.52', 23)> -- __init__.py:_processing_response:726
                    
                    2017-07-23 21:47:11 WARNING  __init__     avdevice-tcp-reconnect Processing Response : Problems buffering TCP response. Error: timed out. Increasing timeout temporarily. -- __init__.py:_processing_response:742
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function called by: getresponse. Lock is: False -- __init__.py:_send:1843
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function initializing... Lock is: True -- __init__.py:_send:1847
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Sending : Starting to send Resendcommand PWOFF,PW?,PWSTANDBY from list ['PWOFF,PW?,PWSTANDBY']. Caller: getresponse. Lock is: True -- __init__.py:_send:1858
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Sending : Trying to connect while sending command -- __init__.py:_send:1890
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:932
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:945
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Sending TCP : Resendcommand was sent PWOFF,PW?,PWSTANDBY from Multicommand-List ['PWOFF,PW?,PWSTANDBY']. Returns 20 -- __init__.py:_send:1908
                    
                    2017-07-23 21:47:12 DEBUG    __init__     avdevice-tcp-reconnect Processing Response : Error reading.. Return from send is 20. Error: timed out -- __init__.py:_processing_response:749
                    
                    2017-07-23 21:47:15 ERROR    __init__     avdevice-tcp-reconnect Processing Response : Connection error. Error: timed out Resend Counter: 1. Resend Max: 10 -- __init__.py:_processing_response:755
                    
                    2017-07-23 21:47:15 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Response: ERROR. -- __init__.py:parse_input:1161
                    
                    2017-07-23 21:47:15 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Parsing input while waiting for response. Lock is: True -- __init__.py:parse_input:1164
                    
                    2017-07-23 21:47:15 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Expected response while parsing: ['PWSTANDBY']. -- __init__.py:parse_input:1168
                    
                    2017-07-23 21:47:15 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Depending is false. Message 'NoneType' object is not callable. -- __init__.py:parse_input:1233
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Requesting query from PWOFF,PW?,PWSTANDBY because response was ERROR. Requery Counter: 3 -- __init__.py:parse_input:1287
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Newly sorted send commands at end of parsing: ['PWOFF,PW?,PWSTANDBY'] -- __init__.py:parse_input:1462
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function called by: parseinput_final. Lock is: False -- __init__.py:_send:1843
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function initializing... Lock is: True -- __init__.py:_send:1847
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Sending : Starting to send query PW? from list ['PWOFF,PW?,PWSTANDBY']. Caller: parseinput_final. Lock is: True -- __init__.py:_send:1858
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Sending : Trying to connect while sending command -- __init__.py:_send:1890
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:932
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:945
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Sending TCP : query was sent PW? from Multicommand-List ['PW?']. Returns 4 -- __init__.py:_send:1908
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Sending again because list is not empty yet. Sending return is 4. Lock is released. Now it is False. -- __init__.py:parse_input:1481
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Starting to parse input. Lock is: False. Alive: True. Connected: ['TCP']. Sendcommand:PWOFF,PW?,PWSTANDBY -- __init__.py:parse_input:1097
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Response: PWON. -- __init__.py:parse_input:1161
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Parsing input while waiting for response. Lock is: True -- __init__.py:parse_input:1164
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Expected response while parsing: ['PWSTANDBY']. -- __init__.py:parse_input:1168
                    
                    2017-07-23 21:47:16 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Depending is false. Message 'NoneType' object is not callable. -- __init__.py:parse_input:1233
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Requesting command from PWOFF,PW?,PWSTANDBY because response was PW1. Requery Counter: 4 -- __init__.py:parse_input:1287
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Neither Display nor Now Playing in response. receivedvalue: 1. -- __init__.py:parse_input:1354
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Found key PW in response at position 0 with value 1. -- __init__.py:parse_input:1382
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Newly sorted send commands at end of parsing: ['PWOFF,PW?,PWSTANDBY'] -- __init__.py:parse_input:1462
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function called by: parseinput_final. Lock is: False -- __init__.py:_send:1843
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Sending : Sending function initializing... Lock is: True -- __init__.py:_send:1847
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Sending : Starting to send command PWOFF from list ['PWOFF,PW?,PWSTANDBY']. Caller: parseinput_final. Lock is: True -- __init__.py:_send:1858
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Sending : Trying to connect while sending command -- __init__.py:_send:1890
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Starting to connect. Current Connections: ['TCP'] -- __init__.py:connect:932
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Connecting : Depending is false. Message: 'NoneType' object is not callable -- __init__.py:connect:945
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Sending TCP : command was sent PWOFF from Multicommand-List ['PWOFF']. Returns 6 -- __init__.py:_send:1908
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Sending again because list is not empty yet. Sending return is 6. Lock is released. Now it is False. -- __init__.py:parse_input:1481
                    
                    2017-07-23 21:47:17 DEBUG    __init__     avdevice-tcp-reconnect Parsing Input : Starting to parse input. Lock is: False. Alive: True. Connected: ['TCP']. Sendcommand:PWOFF,PW?,PWSTANDBY -- __init__.py:parse_input:1097

                    Kommentar


                      #25
                      Sorry, da war ich zu voreilig.. die Zeile muss natürlich so heißen:
                      0;power off;PWSTANDBY;PW?;PWSTANDBY;RW

                      Kommentar


                        #26
                        Zitat von Onkelandy Beitrag anzeigen
                        Sorry, da war ich zu voreilig.. die Zeile muss natürlich so heißen:
                        0;power off;PWSTANDBY;PW?;PWSTANDBY;RW
                        Uh ja ... sorry... wie blöd. Da hätte ich auch selbst drauf kommen können :-S

                        Das ist wenn man sich selbst hetzt und solche Sachen zwischen 5 anderen macht...

                        Geb dir nochmals feedback heute Abend.

                        Eine andere Frage: Hab noch nicht richtig verstanden, wie das mit Status abfragen geht. Beim Starten des Plugins wäre es schon sinnvoll die Items zu pollen.
                        Ich habe die Statusupdate Zeile auf deiner .txt so übernommen. Wenn ich dich aber richtig verstanden habe muss ich noch was in meine items.yaml eintragen ? Hast du ein Beispiel ?

                        Kommentar


                          #27
                          Also, dass das statusupate so komisch im Text-File stehen muss, hab ich abgeändert. Bin auch grad dran, die Zone 2 und 3 Sachen zu implementieren. Sehr mühsam leider, dass hier 3 Stati zurück gegeben werden, die alle gleich beginnen. Ich muss hier mit den Daten-Typen arbeiten, um nicht alles über den Haufen schmeißen zu müssen. Also bool = power on/off, num = volume, string = input source.

                          Wegen dem Statusupdate. Ich habe das so gelöst, dass man einfach ein Item erstellt, das auf das statusupdate referenziert.
                          Also zB
                          Code:
                                     Update:
                                          type: bool
                                          visu_acl: rw
                                          avdevice_zone0: statusupdate
                                          enforce_updates: 'yes'
                          Somit kann man das auch ganz ohne Umwege in Logiken, etc. einbinden. zB, falls Steckdose an, Frage Status nach X Sekunden ab. Genauso kannst du über eval = True und eval_trigger = init dafür sorgen, dass direkt beim Start von Smarthome der Status abgefragt wird. Wobei das Plugin das eigentlich selbst macht, aber eben nur, wenn es dieses Item gibt. Ich werde das aber auch noch anpassen, dass beim Start der Status immer aktualisiert wird, unabhängig vom Item, abhängig von dependson (zB Steckdose)

                          Kommentar


                            #28
                            Zwischenstand: Ein / Aus / Mute on / Mute off scheinen soweit jetzt schon mal 1A zu funktionieren. Jetzt schaue ich mir das mit dem Statusupdate, Volumeregelung und Input Auswahl mal an. Ist mein __init__.py noch aktuell ? (das letzte hier aus den Posts)

                            Kommentar


                              #29
                              Ich habe ein neues init.py, aber das ist noch recht roh und gerade im Umbau. Sobald bei mir alles funktioniert, poste ich es gerne für weitere Tests.

                              Kommentar


                                #30
                                So, jetzt müsste alles funktionieren, inklusive Zonen, Reset, etc.
                                Für power off mittels "PWOFF" muss nun als erwarteter Wert "PW*******" angegeben werden. Die * werden dann durch STANDBY ersetzt.

                                Es wird nun auch beim Start des Plugins der Status upgedatet, selbst wenn kein entsprechendes Item existiert.
                                Ich behaupte, das Plugin ist bereit für den nächsten Härtetest. Ich hab ab und an noch ein Problem mit den Thread Locks, aber nur beim Pioneer aktuell. Mal sehen wie das bei euch aussieht

                                Bitte um Feedback.
                                Angehängte Dateien

                                Kommentar

                                Lädt...
                                X