Ankündigung

Einklappen
Keine Ankündigung bisher.

Neues Plugin: THZ/LWZ 30x/40x

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

    #31
    Zitat von krumboeck Beitrag anzeigen
    Die Serviceschnittstelle liegt hinter dem Deckel des Geräts. Ein Betrieb mit geöffnetem Gehäuseteil ist soweit mir bekannt ist nicht vorgesehen.
    Das RS232-Kabel läßt sich sehr einfach nach außen verlegen, so dass die Gerätetür/wand sich einwandfrei schließen läßt.
    Zitat von krumboeck Beitrag anzeigen
    Auch ist eine Anwenderschnittstelle und eine Debug/Serviceschnittstelle nicht das selbe, da nur erstere für die Verwendung durch den Endkunden vorgesehen ist.
    Meines Wissens ist nirgends geschrieben, dass der Betrieb der Serviceschnittstelle für den Endkunden untersagt ist oder dass dies zum sofortigen Garantieverlust führt. Es gibt einen Fachmann-Bereich in der Menü-Hierarchie der WP, der explizit von Fachhandwerkern/Technikern benutzt werden darf. Solche Einstellungen werden vom Plugin nicht offengelegt.

    Kommentar


      #32
      Zitat von arnix Beitrag anzeigen
      Ist die Buchse bei mir evtl. an einem anderen Platz oder habe ich die falsche Buchse genommen?
      Wenn das Plugin funktioniert, dann wird es schon die richtige Buchse sein.

      Nur der USB-Anschluß befindet sich in einem Bereich, wo es nebenan 230V gibt. Deswegen ist die Abschaltung der Anlage zum Anschließen des USB erforderlich, wenn es unbedingt der USB-Anschluß sein muss.

      Kommentar


        #33
        Zitat von toggle Beitrag anzeigen
        Meines Wissens ist nirgends geschrieben, dass der Betrieb der Serviceschnittstelle für den Endkunden untersagt ist oder dass dies zum sofortigen Garantieverlust führt.
        Wenn ich mal Klugscheisser spielen darf:
        Bedienungsanleitung Kapitel 2.1 und 2.2.

        Debug/Serviceschnittstellen werden in Bedienungs und Installationsanleitungen für Endkunden eher selten bis nie erwähnt.

        Solange sich die Probleme für alle Beteiligten in Grenzen halten wird auch nichts passieren. Wo kein Kläger da kein Richter, sagt man. Damit dies so bleibt würde ich persönlich zusätzliche Schutzmaßnahmen ergreifen (Überspannungsfeinschutz, USV, etc.). Besser wäre eine vollkommene galvanische Trennung: USB Isolator. Entstörfilter. Galvanische Trennung: Amazon.de: Musikinstrumente

        Und jetzt höre ich mal auf den Spielverderber zu spielen und wünsche allen hier einen schönen Rutsch und viel Erfolg beim jeweiligen SmartHome Projekt!

        Kommentar


          #34
          Herzlichen Dank für das Umsetzen dieses Plugins.
          Da ich eine LWZ 404 besitze werde ich es, so bald ich das Kabel zum Raspi gebastelt habe, testen.

          Gebe dann auch Rückmeldung.
          mfg
          Markus

          Kommentar


            #35
            Hi toggle,

            bei mir funktioniert der Parameter relHumidity nicht. Funktioniert der bei dir? Ist damit die Luftfeuchte in der LWZ gemeint?

            Viele Grüße

            Arne

            Kommentar


              #36
              Der Parameter relHumidity ist bei mir auch 0. Ich vermute, dass die relative Feuchtigkeit nicht ständig überwacht wird, sondern nur, wenn die Feuchteshutzlüftung aktiv ist und die Lüftungsstufe 0 seit mehr als 24h eingestellt ist (Anleitung, Kapitel 7.2.1).

              Es ist auch nicht auszuschließen, dass der Parameter im fhem-Code nicht richtig decodiert wird.

              Kommentar


                #37
                alles klar, Danke!

                Kommentar


                  #38
                  Anbei eine aktualisierte Plugin-Version.

                  Änderungen:
                  • Neue Parameter zum Überwachen vom Kommunikationsstatus
                  • Verbesserte Stabilität
                  • Korrigierte Datum-Decodierung in Fehlereinträgen

                  Gruß
                  toggle
                  Angehängte Dateien

                  Kommentar


                    #39
                    Hi,

                    also ich hab noch nicht alles durchgelesen und bin grad eher zufällig darüber gestolpert - aber ich schicke schon mal ein freudiges DANKE raus
                    Die Bastel-Liste ist soeben einen Punkt länger geworden...
                    CU,
                    Mathias

                    Kommentar


                      #40
                      Man freut sich eigentlich selten, wenn die TODO-Liste länger wird.

                      Kommentar


                        #41
                        Ich hätte eine Frage an die Python-Kenner - wie kann man die Queues so tunen, dass sie effizient werden.
                        Ich wollte wissen, wie viel CPU-Last mein Plugin verursacht, und habe den Profiler benutzt. Auf den ersten Blick könnte man das Ergebnis so deuten, dass die Funktionen PortHandler.py:readData() und ThzProtocol.py:_sendGetRequest() sehr stark zu Buche schlagen:
                        Code:
                                 357857 function calls (357854 primitive calls) in 129.190 seconds
                        
                           Ordered by: standard name
                        
                           ncalls  tottime  percall  cumtime  percall filename:lineno(function)
                             5120    0.213    0.000    3.377    0.001 PortHandler.py:173(sendData)
                             5120    0.342    0.000  110.927    0.022 PortHandler.py:176(readData)
                                1    0.008    0.008    0.124    0.124 PortHandler.py:26(<module>)
                                1    0.000    0.000    0.000    0.000 PortHandler.py:53(PortHandler)
                                1    0.000    0.000    0.171    0.171 PortHandler.py:54(__init__)
                                1    0.365    0.365  129.190  129.190 ThzProtocol.py:26(<module>)
                              114    0.012    0.000    0.027    0.000 ThzProtocol.py:46(decodeShort)
                                2    0.000    0.000    0.000    0.000 ThzProtocol.py:52(decodeLong)
                                4    0.000    0.000    0.001    0.000 ThzProtocol.py:58(decodeHex)
                                8    0.000    0.000    0.000    0.000 ThzProtocol.py:59(<genexpr>)
                               16    0.000    0.000    0.000    0.000 ThzProtocol.py:61(decodeBit)
                                1    0.000    0.000    0.000    0.000 ThzProtocol.py:672(ThzProtocol)
                                1    0.004    0.004    0.177    0.177 ThzProtocol.py:674(__init__)
                                2    0.000    0.000    0.000    0.000 ThzProtocol.py:68(decodeNBit)
                                1    0.000    0.000    0.000    0.000 ThzProtocol.py:683(<dictcomp>)
                             5517    0.226    0.000    0.226    0.000 ThzProtocol.py:702(_computeChecksum)
                             5120    0.505    0.000    0.880    0.000 ThzProtocol.py:708(_encodeGetMsg)
                             5120    0.705    0.000    2.891    0.001 ThzProtocol.py:725(_decodeMsg)
                             3995    0.083    0.000    0.213    0.000 ThzProtocol.py:741(<genexpr>)
                                5    0.000    0.000    0.000    0.000 ThzProtocol.py:75(decodeTime)
                             5120    1.229    0.000  128.128    0.025 ThzProtocol.py:768(_sendGetRequest)
                                5    0.000    0.000    0.000    0.000 ThzProtocol.py:79(decodeDate)
                                1    0.000    0.000    0.000    0.000 ThzProtocol.py:83(decodeOpMode)
                                1    0.000    0.000    0.000    0.000 ThzProtocol.py:90(decodeOpModeHC)
                                1    0.000    0.000    0.000    0.000 __init__.py:1009(_StderrHandler)
                                2    0.008    0.004    0.107    0.053 __init__.py:101(Pipe)
                                1    0.000    0.000    0.001    0.001 __init__.py:1015(__init__)
                                1    0.000    0.000    0.000    0.000 __init__.py:1033(PlaceHolder)
                                1    0.000    0.000    0.000    0.000 __init__.py:1077(Manager)
                                1    0.000    0.000    0.000    0.000 __init__.py:1082(__init__)
                                2    0.000    0.000    0.001    0.000 __init__.py:1093(getLogger)
                                1    0.000    0.000    0.000    0.000 __init__.py:1144(_fixupParents)
                                1    0.000    0.000    0.000    0.000 __init__.py:1185(Logger)
                                2    0.000    0.000    0.000    0.000 __init__.py:1200(__init__)
                                1    0.000    0.000    0.000    0.000 __init__.py:1212(setLevel)
                             5517    0.606    0.000    9.516    0.002 __init__.py:1218(debug)
                             5517    0.631    0.000    1.321    0.000 __init__.py:1306(findCaller)
                             5517    0.403    0.000    5.908    0.001 __init__.py:1336(makeRecord)
                             5517    0.577    0.000    8.550    0.002 __init__.py:1351(_log)
                             5517    0.308    0.000    0.745    0.000 __init__.py:1374(handle)
                             5517    0.311    0.000    0.311    0.000 __init__.py:1428(callHandlers)
                             5517    0.133    0.000    0.133    0.000 __init__.py:1458(getEffectiveLevel)
                             5517    0.228    0.000    0.360    0.000 __init__.py:1472(isEnabledFor)
                             5517    0.460    0.000    0.526    0.000 __init__.py:148(getLevelName)
                                1    0.000    0.000    0.000    0.000 __init__.py:1499(RootLogger)
                                1    0.000    0.000    0.000    0.000 __init__.py:1505(__init__)
                                1    0.000    0.000    0.000    0.000 __init__.py:1513(LoggerAdapter)
                                2    0.000    0.000    0.001    0.000 __init__.py:1701(getLogger)
                                4    0.000    0.000    0.000    0.000 __init__.py:177(_checkLevel)
                                1    0.000    0.000    0.000    0.000 __init__.py:1827(NullHandler)
                                3    0.000    0.000    0.000    0.000 __init__.py:206(_acquireLock)
                                2    0.007    0.003    0.161    0.081 __init__.py:212(Queue)
                                3    0.000    0.000    0.000    0.000 __init__.py:215(_releaseLock)
                                1    0.000    0.000    0.000    0.000 __init__.py:226(LogRecord)
                             5517    2.630    0.000    5.505    0.001 __init__.py:238(__init__)
                                1    0.024    0.024    0.048    0.048 __init__.py:24(<module>)
                                1    0.000    0.000    0.000    0.000 __init__.py:357(PercentStyle)
                                1    0.000    0.000    0.000    0.000 __init__.py:363(__init__)
                                1    0.000    0.000    0.000    0.000 __init__.py:372(StrFormatStyle)
                                1    0.000    0.000    0.000    0.000 __init__.py:381(StringTemplateStyle)
                                1    0.000    0.000    0.000    0.000 __init__.py:403(Formatter)
                                1    0.030    0.030    0.082    0.082 __init__.py:44(<module>)
                                1    0.000    0.000    0.000    0.000 __init__.py:447(__init__)
                                1    0.000    0.000    0.000    0.000 __init__.py:573(BufferingFormatter)
                                1    0.000    0.000    0.000    0.000 __init__.py:615(Filter)
                                1    0.000    0.000    0.000    0.000 __init__.py:652(Filterer)
                                3    0.000    0.000    0.000    0.000 __init__.py:657(__init__)
                             5517    0.126    0.000    0.126    0.000 __init__.py:677(filter)
                                1    0.000    0.000    0.000    0.000 __init__.py:71(ProcessError)
                                1    0.000    0.000    0.000    0.000 __init__.py:722(_addHandlerRef)
                                1    0.000    0.000    0.000    0.000 __init__.py:732(Handler)
                                1    0.000    0.000    0.000    0.000 __init__.py:74(BufferTooShort)
                                1    0.000    0.000    0.001    0.001 __init__.py:741(__init__)
                             5517    0.155    0.000    0.261    0.000 __init__.py:76(<lambda>)
                                1    0.000    0.000    0.000    0.000 __init__.py:77(TimeoutError)
                                1    0.000    0.000    0.000    0.000 __init__.py:770(createLock)
                                1    0.000    0.000    0.000    0.000 __init__.py:80(AuthenticationError)
                                1    0.000    0.000    0.000    0.000 __init__.py:896(StreamHandler)
                                1    0.008    0.008    0.033    0.033 __init__.py:9(<module>)
                                1    0.000    0.000    0.000    0.000 __init__.py:949(FileHandler)
                                1    0.001    0.001    0.001    0.001 _compat_pickle.py:8(<module>)
                               52    0.000    0.000    0.000    0.000 _compat_pickle.py:80(<genexpr>)
                               11    0.000    0.000    0.000    0.000 _compat_pickle.py:81(<genexpr>)
                               11    0.001    0.000    0.001    0.000 _weakrefset.py:36(__init__)
                                3    0.000    0.000    0.000    0.000 _weakrefset.py:79(add)
                                3    0.001    0.000    0.005    0.002 abc.py:116(__new__)
                                3    0.000    0.000    0.001    0.000 abc.py:119(<setcomp>)
                               89    0.003    0.000    0.003    0.000 collections.py:130(move_to_end)
                                1    0.000    0.000    0.000    0.000 collections.py:57(__setitem__)
                                1    0.000    0.000    0.000    0.000 connection.py:128(Listener)
                                2    0.000    0.000    0.001    0.000 connection.py:196(Pipe)
                                1    0.000    0.000    0.000    0.000 connection.py:261(SocketListener)
                                1    0.021    0.021    0.099    0.099 connection.py:35(<module>)
                                1    0.000    0.000    0.000    0.000 connection.py:446(ConnectionWrapper)
                                1    0.000    0.000    0.000    0.000 connection.py:468(XmlListener)
                                1    0.000    0.000    0.000    0.000 forking.py:114(Popen)
                                1    0.003    0.003    0.006    0.006 forking.py:35(<module>)
                                1    0.000    0.000    0.000    0.000 forking.py:59(ForkingPickler)
                                4    0.000    0.000    0.000    0.000 forking.py:61(register)
                                1    0.000    0.000    0.000    0.000 forking.py:76(_C)
                               90    0.007    0.000    0.021    0.000 functools.py:170(wrapper)
                             5517    0.465    0.000    0.604    0.000 genericpath.py:85(_splitext)
                                1    0.037    0.037    0.038    0.038 hashlib.py:53(<module>)
                                6    0.001    0.000    0.001    0.000 hashlib.py:94(__get_openssl_constructor)
                                1    0.000    0.000    0.003    0.003 os.py:35(_get_exports_list)
                                1    0.001    0.001    0.001    0.001 os.py:39(<listcomp>)
                                1    0.002    0.002    0.030    0.030 pickle.py:173(<listcomp>)
                                1    0.000    0.000    0.000    0.000 pickle.py:177(_Pickler)
                                1    0.009    0.009    0.044    0.044 pickle.py:24(<module>)
                                1    0.000    0.000    0.000    0.000 pickle.py:68(PickleError)
                                1    0.000    0.000    0.000    0.000 pickle.py:72(PicklingError)
                                1    0.001    0.001    0.001    0.001 pickle.py:781(_Unpickler)
                                1    0.000    0.000    0.000    0.000 pickle.py:79(UnpicklingError)
                                1    0.000    0.000    0.000    0.000 pickle.py:92(_Stop)
                             5517    0.263    0.000    0.988    0.000 posixpath.py:117(splitext)
                             5517    0.300    0.000    0.677    0.000 posixpath.py:138(basename)
                                1    0.000    0.000    0.000    0.000 posixpath.py:339(normpath)
                                1    0.000    0.000    0.001    0.001 posixpath.py:376(abspath)
                             5518    0.127    0.000    0.263    0.000 posixpath.py:38(_get_sep)
                             5518    0.169    0.000    0.365    0.000 posixpath.py:49(normcase)
                                1    0.000    0.000    0.000    0.000 posixpath.py:61(isabs)
                             5517    0.054    0.000    0.054    0.000 process.py:163(name)
                                1    0.000    0.000    0.000    0.000 process.py:295(AuthenticationString)
                                1    0.000    0.000    0.000    0.000 process.py:309(_MainProcess)
                                1    0.000    0.000    0.001    0.001 process.py:311(__init__)
                                1    0.002    0.002    0.004    0.004 process.py:35(<module>)
                             5517    0.047    0.000    0.047    0.000 process.py:60(current_process)
                                1    0.000    0.000    0.000    0.000 process.py:87(Process)
                                1    0.001    0.001    0.003    0.003 queue.py:1(<module>)
                                1    0.000    0.000    0.000    0.000 queue.py:13(Empty)
                                1    0.000    0.000    0.000    0.000 queue.py:17(Full)
                                1    0.000    0.000    0.000    0.000 queue.py:21(Queue)
                                1    0.000    0.000    0.000    0.000 queue.py:229(PriorityQueue)
                                1    0.000    0.000    0.000    0.000 queue.py:248(LifoQueue)
                        [COLOR=Red]     5120    1.438    0.000  110.584    0.022 queues.py:113(get)
                        [/COLOR]        1    0.001    0.001    0.006    0.006 queues.py:177(_start_thread)
                                1    0.000    0.000    0.000    0.000 queues.py:301(JoinableQueue)
                                1    0.012    0.012    0.036    0.036 queues.py:35(<module>)
                                1    0.000    0.000    0.000    0.000 queues.py:354(SimpleQueue)
                                1    0.000    0.000    0.000    0.000 queues.py:56(Queue)
                                2    0.001    0.000    0.118    0.059 queues.py:58(__init__)
                                2    0.000    0.000    0.001    0.001 queues.py:86(_after_fork)
                             5120    0.661    0.000    3.164    0.001 queues.py:99(put)
                                1    0.006    0.006    0.048    0.048 random.py:37(<module>)
                                1    0.000    0.000    0.000    0.000 random.py:625(SystemRandom)
                                1    0.000    0.000    0.000    0.000 random.py:68(Random)
                                1    0.000    0.000    0.001    0.001 random.py:84(__init__)
                                1    0.000    0.000    0.001    0.001 random.py:93(seed)
                               90    0.002    0.000    0.028    0.000 re.py:153(match)
                               90    0.003    0.000    0.023    0.000 re.py:262(_compile)
                                1    0.000    0.000    0.011    0.011 re.py:265(_compile_typed)
                                1    0.018    0.018    0.025    0.025 serialposix.py:15(<module>)
                                1    0.000    0.000    0.000    0.000 serialposix.py:260(PosixSerial)
                                1    0.000    0.000    0.007    0.007 serialposix.py:265(open)
                                1    0.001    0.001    0.001    0.001 serialposix.py:295(_reconfigurePort)
                                1    0.000    0.000    0.000    0.000 serialposix.py:599(Serial)
                                1    0.000    0.000    0.000    0.000 serialposix.py:602(PosixPollSerial)
                                1    0.001    0.001    0.001    0.001 serialutil.py:199(SerialBase)
                                1    0.000    0.000    0.008    0.008 serialutil.py:212(__init__)
                                1    0.000    0.000    0.000    0.000 serialutil.py:285(setPort)
                                1    0.000    0.000    0.000    0.000 serialutil.py:311(setBaudrate)
                                1    0.000    0.000    0.000    0.000 serialutil.py:329(setByteSize)
                                1    0.000    0.000    0.000    0.000 serialutil.py:342(setParity)
                                1    0.000    0.000    0.000    0.000 serialutil.py:355(setStopbits)
                                1    0.000    0.000    0.000    0.000 serialutil.py:368(setTimeout)
                                1    0.000    0.000    0.000    0.000 serialutil.py:386(setWriteTimeout)
                                1    0.000    0.000    0.000    0.000 serialutil.py:405(setXonXoff)
                                1    0.000    0.000    0.000    0.000 serialutil.py:416(setRtsCts)
                                1    0.000    0.000    0.000    0.000 serialutil.py:427(setDsrDtr)
                                1    0.000    0.000    0.000    0.000 serialutil.py:443(setInterCharTimeout)
                                4    0.000    0.000    0.000    0.000 serialutil.py:51(to_bytes)
                                1    0.000    0.000    0.000    0.000 serialutil.py:79(SerialException)
                                1    0.000    0.000    0.000    0.000 serialutil.py:83(SerialTimeoutException)
                                1    0.000    0.000    0.004    0.004 serialutil.py:9(<module>)
                                1    0.000    0.000    0.000    0.000 serialutil.py:91(FileLike)
                                1    0.000    0.000    0.000    0.000 socket.py:244(SocketIO)
                                1    0.007    0.007    0.015    0.015 socket.py:44(<module>)
                                1    0.000    0.000    0.000    0.000 socket.py:87(socket)
                                3    0.000    0.000    0.004    0.001 sre_compile.py:178(_compile_charset)
                                3    0.003    0.001    0.004    0.001 sre_compile.py:207(_optimize_charset)
                               13    0.000    0.000    0.000    0.000 sre_compile.py:24(_identityfunction)
                                1    0.001    0.001    0.001    0.001 sre_compile.py:258(_mk_bitmap)
                              2/1    0.000    0.000    0.004    0.004 sre_compile.py:32(_compile)
                                1    0.000    0.000    0.000    0.000 sre_compile.py:355(_simple)
                                1    0.000    0.000    0.002    0.002 sre_compile.py:362(_compile_info)
                                2    0.000    0.000    0.000    0.000 sre_compile.py:468(isstring)
                                1    0.000    0.000    0.006    0.006 sre_compile.py:471(_code)
                                1    0.000    0.000    0.011    0.011 sre_compile.py:486(compile)
                                3    0.000    0.000    0.000    0.000 sre_parse.py:127(__len__)
                                6    0.000    0.000    0.000    0.000 sre_parse.py:131(__getitem__)
                                1    0.000    0.000    0.000    0.000 sre_parse.py:135(__setitem__)
                                3    0.000    0.000    0.000    0.000 sre_parse.py:139(append)
                              3/2    0.000    0.000    0.000    0.000 sre_parse.py:141(getwidth)
                                1    0.000    0.000    0.000    0.000 sre_parse.py:179(__init__)
                               19    0.001    0.000    0.002    0.000 sre_parse.py:183(__next)
                                8    0.000    0.000    0.000    0.000 sre_parse.py:202(match)
                               15    0.000    0.000    0.002    0.000 sre_parse.py:208(get)
                                1    0.000    0.000    0.004    0.004 sre_parse.py:308(_parse_sub)
                                1    0.001    0.001    0.004    0.004 sre_parse.py:386(_parse)
                                1    0.000    0.000    0.000    0.000 sre_parse.py:670(fix_flags)
                                1    0.000    0.000    0.000    0.000 sre_parse.py:68(__init__)
                                1    0.000    0.000    0.004    0.004 sre_parse.py:682(parse)
                                2    0.000    0.000    0.000    0.000 sre_parse.py:91(__init__)
                                1    0.000    0.000    0.000    0.000 synchronize.py:108(Semaphore)
                                1    0.000    0.000    0.000    0.000 synchronize.py:127(BoundedSemaphore)
                                2    0.000    0.000    0.003    0.001 synchronize.py:129(__init__)
                                1    0.000    0.000    0.000    0.000 synchronize.py:144(Lock)
                                4    0.000    0.000    0.006    0.002 synchronize.py:146(__init__)
                                1    0.000    0.000    0.000    0.000 synchronize.py:169(RLock)
                                1    0.000    0.000    0.000    0.000 synchronize.py:195(Condition)
                                1    0.000    0.000    0.000    0.000 synchronize.py:300(Event)
                                1    0.009    0.009    0.018    0.018 synchronize.py:36(<module>)
                                1    0.000    0.000    0.000    0.000 synchronize.py:72(SemLock)
                                6    0.006    0.001    0.008    0.001 synchronize.py:74(__init__)
                                6    0.000    0.000    0.000    0.000 synchronize.py:84(_make_methods)
                                1    0.000    0.000    0.000    0.000 tempfile.py:105(_RandomNameSequence)
                                1    0.010    0.010    0.060    0.060 tempfile.py:18(<module>)
                                1    0.000    0.000    0.000    0.000 tempfile.py:345(_TemporaryFileWrapper)
                                1    0.000    0.000    0.000    0.000 tempfile.py:481(SpooledTemporaryFile)
                                1    0.000    0.000    0.000    0.000 tempfile.py:614(TemporaryDirectory)
                                1    0.002    0.002    0.011    0.011 threading.py:1(<module>)
                             5519    0.171    0.000    0.208    0.000 threading.py:1019(current_thread)
                                8    0.000    0.000    0.002    0.000 threading.py:172(Condition)
                                1    0.000    0.000    0.000    0.000 threading.py:175(_Condition)
                                8    0.002    0.000    0.002    0.000 threading.py:177(__init__)
                                2    0.000    0.000    0.000    0.000 threading.py:211(_release_save)
                                2    0.000    0.000    0.000    0.000 threading.py:214(_acquire_restore)
                             5123    0.138    0.000    0.252    0.000 threading.py:217(_is_owned)
                                2    0.000    0.000    0.002    0.001 threading.py:226(wait)
                             5121    0.729    0.000    2.111    0.000 threading.py:284(notify)
                                1    0.000    0.000    0.000    0.000 threading.py:302(notify_all)
                                1    0.000    0.000    0.000    0.000 threading.py:311(_Semaphore)
                                1    0.000    0.000    0.000    0.000 threading.py:369(_BoundedSemaphore)
                                3    0.000    0.000    0.001    0.000 threading.py:381(Event)
                                1    0.000    0.000    0.000    0.000 threading.py:384(_Event)
                                3    0.000    0.000    0.001    0.000 threading.py:388(__init__)
                                3    0.000    0.000    0.000    0.000 threading.py:397(is_set)
                                1    0.000    0.000    0.000    0.000 threading.py:402(set)
                                2    0.000    0.000    0.003    0.001 threading.py:417(wait)
                                1    0.000    0.000    0.000    0.000 threading.py:43(_Verbose)
                                1    0.000    0.000    0.000    0.000 threading.py:439(Barrier)
                               14    0.000    0.000    0.000    0.000 threading.py:45(__init__)
                             5125    0.063    0.000    0.063    0.000 threading.py:50(_note)
                                1    0.000    0.000    0.000    0.000 threading.py:595(BrokenBarrierError)
                                1    0.000    0.000    0.000    0.000 threading.py:615(Thread)
                                3    0.001    0.000    0.003    0.001 threading.py:627(__init__)
                                2    0.000    0.000    0.000    0.000 threading.py:655(_set_daemon)
                                2    0.003    0.001    0.007    0.003 threading.py:672(start)
                                1    0.000    0.000    0.000    0.000 threading.py:719(_set_ident)
                             5517    0.114    0.000    0.114    0.000 threading.py:872(name)
                                2    0.000    0.000    0.000    0.000 threading.py:88(RLock)
                                2    0.000    0.000    0.000    0.000 threading.py:893(daemon)
                                1    0.000    0.000    0.000    0.000 threading.py:898(daemon)
                                1    0.000    0.000    0.000    0.000 threading.py:923(_Timer)
                                1    0.000    0.000    0.000    0.000 threading.py:95(_RLock)
                                1    0.000    0.000    0.000    0.000 threading.py:952(_MainThread)
                                1    0.000    0.000    0.001    0.001 threading.py:954(__init__)
                                1    0.000    0.000    0.000    0.000 threading.py:961(_set_daemon)
                                1    0.000    0.000    0.000    0.000 threading.py:992(_DummyThread)
                                8    0.001    0.000    0.003    0.000 util.py:159(register_after_fork)
                                1    0.000    0.000    0.000    0.000 util.py:170(Finalize)
                                1    0.000    0.000    0.000    0.000 util.py:174(__init__)
                                1    0.000    0.000    0.000    0.000 util.py:306(ForkAwareThreadLock)
                                1    0.000    0.000    0.000    0.000 util.py:313(ForkAwareLocal)
                                1    0.001    0.001    0.002    0.002 util.py:35(<module>)
                               11    0.000    0.000    0.000    0.000 util.py:70(debug)
                                1    0.001    0.001    0.002    0.002 warnings.py:1(<module>)
                                1    0.000    0.000    0.000    0.000 warnings.py:269(WarningMessage)
                                1    0.000    0.000    0.000    0.000 warnings.py:289(catch_warnings)
                                1    0.000    0.000    0.000    0.000 warnings.py:83(_OptionError)
                                1    0.000    0.000    0.000    0.000 warnings.py:88(_processoptions)
                                2    0.000    0.000    0.000    0.000 weakref.py:200(update)
                                8    0.000    0.000    0.000    0.000 weakref.py:237(__new__)
                                8    0.000    0.000    0.000    0.000 weakref.py:242(__init__)
                                2    0.000    0.000    0.000    0.000 weakref.py:45(__init__)
                                8    0.001    0.000    0.002    0.000 weakref.py:93(__setitem__)
                               88    0.043    0.000    0.057    0.001 {built-in method __build_class__}
                               11    0.002    0.000    0.002    0.000 {built-in method __new__ of type object at 0x29d788}
                             5517    0.106    0.000    0.106    0.000 {built-in method _getframe}
                               12    0.000    0.000    0.000    0.000 {built-in method allocate_lock}
                                1    0.000    0.000    0.000    0.000 {built-in method compile}
                                2    0.002    0.001    0.002    0.001 {built-in method dir}
                                1    0.000    0.000  129.190  129.190 {built-in method exec}
                                1    0.000    0.000    0.000    0.000 {built-in method exp}
                             8724    0.476    0.000    0.476    0.000 {built-in method format}
                              117    0.007    0.000    0.007    0.000 {built-in method from_bytes}
                            10240    0.173    0.000    0.173    0.000 {built-in method fromhex}
                            11037    0.098    0.000    0.098    0.000 {built-in method get_ident}
                               32    0.001    0.000    0.001    0.000 {built-in method getattr}
                                1    0.000    0.000    0.000    0.000 {built-in method getcwd}
                             5520    0.048    0.000    0.048    0.000 {built-in method getpid}
                                6    0.000    0.000    0.000    0.000 {built-in method globals}
                            11064    0.129    0.000    0.129    0.000 {built-in method hasattr}
                                8    0.000    0.000    0.000    0.000 {built-in method id}
                            16589    0.452    0.000    0.452    0.000 {built-in method isinstance}
                        5183/5182    0.033    0.000    0.033    0.000 {built-in method len}
                                2    0.000    0.000    0.000    0.000 {built-in method log}
                                4    0.000    0.000    0.000    0.000 {built-in method min}
                                9    0.000    0.000    0.000    0.000 {built-in method next}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_md5}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_sha1}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_sha224}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_sha256}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_sha384}
                                1    0.000    0.000    0.000    0.000 {built-in method openssl_sha512}
                                1    0.006    0.006    0.006    0.006 {built-in method open}
                                7    0.000    0.000    0.000    0.000 {built-in method ord}
                                3    0.000    0.000    0.000    0.000 {built-in method pack}
                                2    0.000    0.000    0.000    0.000 {built-in method pipe}
                              397    1.134    0.003    1.134    0.003 {built-in method print}
                                1    0.000    0.000    0.000    0.000 {built-in method proxy}
                                2    0.000    0.000    0.000    0.000 {built-in method register}
                              116    0.008    0.000    0.008    0.000 {built-in method round}
                                1    0.000    0.000    0.000    0.000 {built-in method sqrt}
                                2    0.001    0.000    0.001    0.000 {built-in method start_new_thread}
                                1    0.000    0.000    0.000    0.000 {built-in method tcgetattr}
                                1    0.000    0.000    0.000    0.000 {built-in method tcsetattr}
                            15758    0.179    0.000    0.179    0.000 {built-in method time}
                                2    0.001    0.000    0.001    0.000 {built-in method urandom}
                                1    0.000    0.000    0.000    0.000 {function seed at 0x18e54f8}
                        [COLOR=Red]    10240   15.477    0.002   15.477    0.002 {method 'acquire' of '_multiprocessing.SemLock' objects}
                        [/COLOR]        3    0.000    0.000    0.000    0.000 {method 'acquire' of '_thread.RLock' objects}
                            10252    0.218    0.000    0.218    0.000 {method 'acquire' of '_thread.lock' objects}
                                3    0.000    0.000    0.000    0.000 {method 'add' of 'set' objects}
                                4    0.000    0.000    0.000    0.000 {method 'append' of 'bytearray' objects}
                             5120    0.027    0.000    0.027    0.000 {method 'append' of 'collections.deque' objects}
                               57    0.000    0.000    0.000    0.000 {method 'append' of 'list' objects}
                                1    0.000    0.000    0.000    0.000 {method 'clear' of 'collections.deque' objects}
                                1    0.000    0.000    0.000    0.000 {method 'copy' of 'dict' objects}
                                1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
                                3    0.000    0.000    0.000    0.000 {method 'extend' of 'list' objects}
                            11035    0.114    0.000    0.114    0.000 {method 'get' of 'dict' objects}
                                8    0.000    0.000    0.000    0.000 {method 'items' of 'dict' objects}
                              402    0.061    0.000    0.274    0.001 {method 'join' of 'str' objects}
                              157    0.001    0.000    0.001    0.000 {method 'keys' of 'dict' objects}
                                2    0.000    0.000    0.000    0.000 {method 'lower' of 'str' objects}
                               90    0.002    0.000    0.002    0.000 {method 'match' of '_sre.SRE_Pattern' objects}
                        [COLOR=Red]     5120   92.997    0.018   92.997    0.018 {method 'poll' of '_multiprocessing.Connection' objects}
                        [/COLOR]     5120    0.678    0.000    0.678    0.000 {method 'recv' of '_multiprocessing.Connection' objects}
                            10240    0.064    0.000    0.064    0.000 {method 'release' of '_multiprocessing.SemLock' objects}
                                3    0.000    0.000    0.000    0.000 {method 'release' of '_thread.RLock' objects}
                            10244    1.041    0.000    1.041    0.000 {method 'release' of '_thread.lock' objects}
                             5119    0.073    0.000    0.073    0.000 {method 'remove' of 'list' objects}
                            16552    0.254    0.000    0.254    0.000 {method 'rfind' of 'str' objects}
                                5    0.000    0.000    0.000    0.000 {method 'setter' of 'property' objects}
                                1    0.000    0.000    0.000    0.000 {method 'split' of 'str' objects}
                                4    0.000    0.000    0.000    0.000 {method 'startswith' of 'str' objects}
                                1    0.000    0.000    0.000    0.000 {method 'union' of 'set' objects}
                        Wenn man aber genau hinschaut, verbringen die erwähnten Funktionen scheinbar viel Zeit in den Operationen get von queues.py sowie poll & acquire von multiprocessing. Ich habe die entsprechenden Zeilen im Log rot markiert.
                        1. Ist meine Interpretation korrekt?
                        2. Falls ja, was kann man besser/anders machen?

                        PS: Meiner Ansicht nach ist ein zweiter python-Thread zwingend erforderlich, um die asynchronen Operationen am seriellen Port gut im Griff zu haben.

                        Kommentar


                          #42
                          Hallo,

                          leider kann ich die Frage nicht einfach so beantworten, dazu müsste man den Code wirklich kennen.

                          Ja, ich teile Deine Meinung. Momentan führt kein Weg um einen zweiten Thread vorbei.

                          Dazu kann das Plugin ja einfach in der run - Methode bleiben.

                          Bis bald

                          Marcus

                          Kommentar


                            #43
                            Hi toggle,

                            ich habe gerade folgende Warning in meinem Protokoll gefunden:

                            Code:
                            2015-01-10 00:44:03,815 WARNING  Main         Item thz.heatingCircuitPumpOn: value 0.00758832040839552 does not match type bool. Via SQLite None -- item.py:set:447
                            Macht das ein Problem oder kann ich es so lassen? Normalerweise hat das Item den Wert 1 oder 0.

                            Grüße

                            Arne

                            Kommentar


                              #44
                              Zitat von mknx Beitrag anzeigen
                              leider kann ich die Frage nicht einfach so beantworten, dazu müsste man den Code wirklich kennen.
                              Meinst du den Code von python Bibliotheken? Die Frage ist - mache ich was falsch, wenn die Queues zur Kommunikation zwischen den Threads so benutzte? Ich hätte einfach nicht erwartet, dass python standardmäßig irgendwas pollen würde. Semaphoren & Co. werden doch schon seit Jahrzehnten effizienter implementiert.
                              Zitat von mknx Beitrag anzeigen
                              Dazu kann das Plugin ja einfach in der run - Methode bleiben.
                              Das hatte ich probiert, aber dann macht smarthome.py aus irgendeinem Grund nach der Instanziierung vom thz-Plugin nicht mehr weiter. Daher habe ich einen eigenen Thread angelegt.

                              Macht das ein Problem oder kann ich es so lassen? Normalerweise hat das Item den Wert 1 oder 0.
                              Das scheint etwas mit der Mittelwertbildung vom SQLite-Plugin zu tun. Denn das thz-Plugin liefert für diesen Parameter gundsätzlich 0 oder 1. Daher wäre es eher eine Frage an Marcus (mknx).

                              Kommentar


                                #45
                                Zitat von toggle Beitrag anzeigen
                                Meinst du den Code von python Bibliotheken? Die Frage ist - mache ich was falsch, wenn die Queues zur Kommunikation zwischen den Threads so benutzte? Ich hätte einfach nicht erwartet, dass python standardmäßig irgendwas pollen würde. Semaphoren & Co. werden doch schon seit Jahrzehnten effizienter implementiert.
                                Erst mal Deinen und dann den von den Bibliotheken.

                                Zitat von toggle Beitrag anzeigen
                                Das hatte ich probiert, aber dann macht smarthome.py aus irgendeinem Grund nach der Instanziierung vom thz-Plugin nicht mehr weiter. Daher habe ich einen eigenen Thread angelegt.
                                Code:
                                def run (....):
                                    self.alive = True
                                    while self.alive:
                                        # loop here
                                        time.sleep(0.1)
                                
                                def stop(...):
                                    self.alive = False
                                Dann bleibt Dein Plugin in einem separaten Thread.

                                Zitat von toggle Beitrag anzeigen
                                Das scheint etwas mit der Mittelwertbildung vom SQLite-Plugin zu tun. Denn das thz-Plugin liefert für diesen Parameter gundsätzlich 0 oder 1. Daher wäre es eher eine Frage an Marcus (mknx).
                                So ohne Kontext wer da was macht ist es schwierig etwas dazu zu sagen.

                                Bis bald

                                Marcus

                                Kommentar

                                Lädt...
                                X