Ankündigung

Einklappen
Keine Ankündigung bisher.

AVM Plugin

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

    Halle , habe es nun angepasst.

    bekomme auch eine Ausgabe jedoch möchte er das DECT thermostat nicht finden...



    Code:
            socket_bath:
                type: bool
                avm_data_type@fritzbox7490: aha_device
                ain: 10971 0270088    # has to be identical to id in fritzbox (also with spaces!)
                visu_acl: rw
    
               
                # these items need to be child items from aha_device, an @... must not be set
                temperature:
                    avm_data_type: temperature
                    type: num
                    visu_acl: ro
    Funktionieren DECT Thermostate überhaupt mit dem Plugin?
    Gruss Oliver

    Projektleiter Technische Gebäudeausrüstung

    Kommentar


      welche version des plugins verwendest du? in den neueren muss auch die temperatur an die instanz gebunden werden.. steht aber in der jew. readme..

      Code:
              socket_bath:
                  type: bool
                  avm_data_type@fritzbox7490: aha_device
                  ain: 10971 0270088    # has to be identical to id in fritzbox (also with spaces!)
                  visu_acl: rw
      
                
                  # these items need to be child items from aha_device, an @... must not be set
                  temperature:
                      avm_data_type@fritzbox7490: temperature
                      type: num
                      visu_acl: ro

      Kommentar


        PS: ob sie funktionieren: keine ahnung, ich habe keines

        Kommentar


          Zitat von psilo Beitrag anzeigen
          welche version des plugins verwendest du? in den neueren muss auch die temperatur an die instanz gebunden werden.. steht aber in der jew. readme..

          Code:
          socket_bath:
          type: bool
          avm_data_type@fritzbox7490: aha_device
          ain: 10971 0270088 # has to be identical to id in fritzbox (also with spaces!)
          visu_acl: rw
          
          
          # these items need to be child items from aha_device, an @... must not be set
          temperature:
          avm_data_type@fritzbox7490: temperature
          type: num
          visu_acl: ro
          funktioniert.

          jedoch passen die komme stellen noch nicht .

          Code:
           [TABLE]
           	 		[TR]
           			[TD]avm.dect.socket_bath.temperature[/TD]
           			[TD]num[/TD]
           			[TD]temperature[/TD]
           			[TD]210[/TD]
           			[TD]21.10.2018 13:53:29[/TD]
           		[/TR]
           	 [/TABLE]
          Gruss Oliver

          Projektleiter Technische Gebäudeausrüstung

          Kommentar


            mach halt ein hilfsitem und teile sie durch 10... oder direkt hier nen eval ausdruck rein. oder zeig sie nur in der sv in grad an...

            eval: value / 10


            zudem erneut der hinweis bitte die doku zu lesen!!!!! das EVAL hat nichts mit dem plugin zu tun. ich sehe es auch korrekter, dass das item ohne eval 1:1 den wert liefert, den der webservice der fritzbox liefert. und der ist halt "mal 10". frag avm warum
            Zuletzt geändert von psilo; 21.10.2018, 13:24.

            Kommentar


              schaust du im README des masters bspw beim power item:

              Code:
                          power:
                              avm_data_type: power
                              type: num
                              sqlite: 'yes'
                              enforce_updates: 'true'
                              visu_acl: ro
                              eval: value / 100
              Oder in der Doku: https://www.smarthomeng.de/user/konf...bute_eval.html

              Kommentar


                Hallo,

                ich habe einen Fritz DECT-Repeater 100 an der Fritzbox angeschlossen und würde nun gern dessen Temperatur in shNG einbinden.

                Hier die Daten aus der Fritzbox:
                Unbenannt.JPG

                Meine Items:

                Code:
                avm:
                
                    fritzbox_7362:
                
                        info:
                
                            uptime:
                                type: num
                                visu_acl: ro
                                avm_data_type@fritzbox_7362: uptime
                
                            serial_number:
                                type: str
                                visu_acl: ro
                                avm_data_type@fritzbox_7362: serial_number
                
                            firmware:
                                type: str
                                visu_acl: ro
                                avm_data_type@fritzbox_7362: software_version
                
                            hardware_version:
                                type: str
                                visu_acl: ro
                                avm_data_type@fritzbox_7362: hardware_version
                
                        dect:
                
                            dect_repeater:
                                type: bool
                                avm_data_type@fritzbox_7362: aha_device
                                ain: 08761 0985219    # has to be identical to id in fritzbox (also with spaces!)
                                visu_acl: rw
                
                                temperature:
                                    avm_data_type: temperature
                                    type: num
                                    visu_acl: ro

                Das klappt so nicht.
                Mache ich was falsch?

                Danke und beste Grüße
                You do not have permission to view this gallery.
                This gallery has 1 photos.

                Kommentar


                  in den neueren versionen des plugin MUSS der avm_data_type auch für temperatur und die anderen child-items an die plugininstanz mit @ gehängt werden. siehe dazu auch beispiele im README.

                  ich weiss leider nicht mehr mit welcher version sich das geändert hat, es stand auf jdn fall auch in den release notes
                  Zuletzt geändert von psilo; 24.11.2018, 19:23.

                  Kommentar


                    psilo

                    Kaum macht man es richtig, schon geht es.
                    Im Readme Beispiel fehlen die Einträge aber auch, oder?
                    https://www.smarthomeng.de/user/plugins/avm/README.html

                    Code:
                      
                         dect:          socket_living:             type: bool             avm_data_type@fritzbox_7490: aha_device             ain: 14324 0432601    # has to be identical to id in fritzbox (also with spaces!)             visu_acl: rw              # these items need to be child items from aha_device, an @... must not be set             energy:                 avm_data_type: energy                 type: num                 visu_acl: ro              # these items need to be child items from aha_device, an @... must not be set             power:                 avm_data_type: power                 type: num                 sqlite: 'yes'                 enforce_updates: 'true'                 visu_acl: ro                 eval: value / 100              # these items need to be child items from aha_device, an @... must not be set             temperature:                 avm_data_type: temperature                 type: num                 visu_acl: ro [URL="https://www.smarthomeng.de/user/plugins/avm/README.html"][/URL]


                    Vielleicht kannst Du das noch ergänzen.

                    Danke schön.

                    Kommentar


                      Sisamiwe das ist das README aus dem MASTER, da ist es noch nicht drin, das hatte ich damals vergessen.. im DEVELOP ist es drin.

                      Kommentar


                        Hallo,

                        ich bräuchte mal wieder Hilfe. Bekomme Fehlermeldungen im Log.
                        Die Fehlermeldung im Log sagt:
                        Code:
                        [LIST][*][h=3]09.12.2018 21:09:46 Item it.avm.dect.akku_laden: value "UNDEFINED" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 21:04:46 Item it.avm.dect.akku_laden: value "UNDEFINED" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 20:59:47 Item it.avm.dect.akku_laden: value "UNDEFINED" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 20:54:46 Item it.avm.dect.akku_laden: value "TOGGLE" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 20:49:46 Item it.avm.dect.akku_laden: value "TOGGLE" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 20:44:46 Item it.avm.dect.akku_laden: value "TOGGLE" does not match type bool. Via Logic None[/h][*][h=3]09.12.2018 20:39:46 Item it.avm.dect.akku_laden: value "TOGGLE" does not match type bool. Via Logic None[/h][/LIST]
                        die plugin.yaml:

                        Code:
                        fb1:
                            class_name: AVM
                            class_path: plugins.avm
                            username: smarthome
                            password: smarthome
                            host: 192.168.1.1
                            port: 49443
                            cycle: 300
                            ssl: true
                            verify: false
                            call_monitor: true
                            instance: fritzbox_7490
                        fb2:
                            class_name: AVM
                            class_path: plugins.avm
                            username: smarthome
                            password: smarthome
                            host: 192.168.1.98
                            port: 49443
                            cycle: 300
                            ssl: true
                            verify: false
                            instance: fritzbox_4040
                        fb3:
                            class_name: AVM
                            class_path: plugins.avm
                            password: 1980
                            host: 192.168.1.97
                            port: 49443
                            cycle: 300
                            ssl: true
                            verify: false
                            instance: wlan_repeater_300E
                        die it_avm.yaml:

                        Code:
                        %YAML 1.1
                        ---
                        it:
                            avm:
                                uptime_7490:
                                    type: num
                                    visu_acl: ro
                                    avm_data_type@fritzbox_7490: uptime
                                serial_number_7490:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_7490: serial_number
                                firmware_7490:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_7490: software_version
                                hardware_version_7490:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_7490: hardware_version
                                myfritz:
                                    type: bool
                                    avm_data_type@fritzbox_7490: myfritz_status
                                uptime_300E:
                                    type: num
                                    visu_acl: ro
                                    avm_data_type@wlan_repeater_300E: uptime
                                serial_number_300E:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@wlan_repeater_300E: serial_number
                                firmware_300E:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@wlan_repeater_300E: software_version
                                hardware_version_300E:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@wlan_repeater_300E: hardware_version
                                uptime_4040:
                                    type: num
                                    visu_acl: ro
                                    avm_data_type@fritzbox_4040: uptime
                                serial_number_4040:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_4040: serial_number
                                firmware_4040:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_4040: software_version
                                hardware_version_4040:
                                    type: str
                                    visu_acl: ro
                                    avm_data_type@fritzbox_4040: hardware_version
                                monitor:
                        
                        #           ab hier von mir gekürzt! 
                        
                                devices:
                                    wlan_repeater_300E:
                                        danny_handy:
                                            mac: 0C:70:4A:F8:76:7A
                                            avm_data_type@wlan_repeater_300E: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_hostname
                                                visu_acl: ro
                                        martina_handy:
                                            mac: 74:C1:4F:2A:B5:FF
                                            avm_data_type@wlan_repeater_300E@wlan_repeater_300E: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@wlan_repeater_300E: device_hostname
                                                visu_acl: ro
                                    fritzbox_7490:
                                        danny_handy:
                                            mac: 0C:70:4A:F8:76:7A
                                            avm_data_type@fritzbox_7490: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_hostname
                                                visu_acl: ro
                                        martina_handy:
                                            mac: 74:C1:4F:2A:B5:FF
                                            avm_data_type@fritzbox_7490: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@fritzbox_7490: device_hostname
                                                visu_acl: ro
                                    fritzbox_4040:
                                        danny_handy:
                                            mac: 0C:70:4A:F8:76:7A
                                            avm_data_type@fritzbox_4040: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_hostname
                                                visu_acl: ro
                                        martina_handy:
                                            mac: 74:C1:4F:2A:B5:FF
                                            avm_data_type@fritzbox_4040: network_device
                                            type: bool
                                            cache: 'yes'
                                            visu_acl: ro
                                            ip:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_ip
                                                visu_acl: ro
                                            connection_type:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_connection_type
                                                visu_acl: ro
                                            hostname:
                                                type: str
                                                avm_data_type@fritzbox_4040: device_hostname
                                                visu_acl: ro
                                    handy_anwesend:
                                        type: bool
                                        visu_acl: rw
                                        eval: or
                                        eval_trigger:
                                          - it.avm.devices.fritzbox_7490.danny_handy
                                          - it.avm.devices.fritzbox_7490.martina_handy
                                          - it.avm.devices.fritzbox_4040.danny_handy
                                          - it.avm.devices.fritzbox_4040.martina_handy
                                          - it.avm.devices.wlan_repeater_300E.danny_handy
                                          - it.avm.devices.wlan_repeater_300E.martina_handy
                                        danny:
                                            type: bool
                                            visu_acl: rw
                                            eval: or
                                            eval_trigger:
                                              - it.avm.devices.fritzbox_7490.danny_handy
                                              - it.avm.devices.fritzbox_4040.danny_handy
                                              - it.avm.devices.wlan_repeater_300E.danny_handy
                                        martina:
                                            type: bool
                                            visu_acl: rw
                                            eval: or
                                            eval_trigger:
                                              - it.avm.devices.fritzbox_7490.martina_handy
                                              - it.avm.devices.fritzbox_4040.martina_handy
                                              - it.avm.devices.wlan_repeater_300E.martina_handy  
                                dect:
                                    akku_laden:
                                        type: bool
                                        cache: 'yes'
                                        avm_data_type@fritzbox_7490: aha_device
                                        ain: 08761 0029619
                                        visu_acl: rw
                                        energy:
                                            avm_data_type@fritzbox_7490: energy
                                            type: num
                                            visu_acl: ro
                                        power:
                                            avm_data_type@fritzbox_7490: power
                                            type: num
                                            sqlite: 'yes'
                                            enforce_updates: 'true'
                                            visu_acl: ro
                                            eval: value / 100
                                        temperature:
                                            avm_data_type@fritzbox_7490: temperature
                                            type: num
                                            visu_acl: ro
                                            eval: value / 10
                                    dect_repeater:
                                        type: bool
                                        avm_data_type@fritzbox_7490: aha_device
                                        ain: 08761 0919625
                                        visu_acl: rw
                                        cache: 'yes'
                                        temperature:
                                            avm_data_type@fritzbox_7490: temperature
                                            type: num
                                            visu_acl: ro
                                            eval: value / 10
                        Ich habe Version: 1.5b.9e91943f.develop installiert. Plugins sind auch Devolop.

                        Fehlt noch was dann einfach schreiben. Danke schon mal für Hilfe.

                        Gruß Danny



                        Kommentar


                          was fuer dect devices sind das? im log steht was von logik?? sicher dass der fehler im plugin entsteht??

                          In https://github.com/smarthomeNG/plugi...nit__.py#CL822 siehst Du, dass ich die States ON und OFF in ein Bool umwandle. Meine DECT Steckdosen liefern wohl auch nur ON und OFF wenn ich aus der Fritzbox auslese.
                          Bei Dir kommt offenbar TOGGLE und UNDEFINED zurück?! Verstehe ich derzeit aber nicht.. Ich habe DECT 200 und 210 im Einsatz... Wenn Du andere hast, kann ich das mangels Hardware leider nicht nachtesten.

                          Spannend wäre auch, wie Du schaltest? Via VISU oder LOGIK? Direkt an der Dose? Via Fritzbox GUI?

                          Ich schätze bei Dir kracht es in https://github.com/smarthomeNG/plugi...it__.py#CL1481 (sagt das Log nichts genaueres?!). Wobei ich jetzt auch nicht wüsste, wie ich hier TOGGLE und UNDEFINED als Itemwert interpretieren soll. Ich könnte nur im ON und OFF Fall das Item belegen, aber dazu will ich erst sichergehen, was bei Dir genau los ist..
                          Zuletzt geändert von psilo; 10.12.2018, 05:42.

                          Kommentar


                            Ich habe im DEV gerade eine neue Version des Plugins gepusht. Das Verhalten sollte nun so sein:

                            ein Request gegen die Box wirft eine Exception -> es wird ein fehler geloggt und der callmonitor disconnected, da das device vermutlich unavailable ist
                            sobald ein request wieder erfolgreich ist, wird der status des devices wieder auf available gesetzt. der callmonitor sollte neu verbinden und erstmal keine fehler geloggt werden. sobald die box wieder nicht verfuegbar ist, gibt es wieder eine request exception und das ganze geht von vorne los

                            über tests würde ich mich freuen damit der kram stabil ins release kann!

                            Kommentar


                              danny zu dem UNDEFINED und TOGGLE Thema ist jetzt auch was in den DEV committed.. bitte mal testen, ich kriege die Stati leider nicht

                              Code:
                              Code:
                                          if len(element_xml) > 0:
                                              if element_xml[0].firstChild.data not in ['UNDEFINED', 'TOGGLE']:
                                                  item(element_xml[0].firstChild.data)
                                              elif element_xml[0].firstChild.data in 'TOGGLE':
                                                  value = item()
                                                  item(not value)
                                              else:
                                                  self.logger.error(
                                                      'NewSwitchState für AHA Device has a non-supported value of %s' % element_xml[0].firstChild.data)

                              Kommentar


                                psilo ich kann mit der neuen Version nicht mehr auf das Webif zugreifen.
                                Allerdings nutze ich das dev Plugin auch im shng master.

                                Ausgabe:
                                Code:
                                 [B][SIZE=12px]The server encountered an unexpected condition which prevented it from fulfilling the request.[/SIZE][/B]
                                Code:
                                2018-12-13  20:42:29 ERROR    CP Server Thread-12 [13/Dec/2018:20:42:29] HTTP
                                Traceback (most recent call last):
                                  File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cprequest.py", line 670, in respond
                                    response.body = self.handler()
                                  File "/usr/local/lib/python3.5/dist-packages/cherrypy/lib/encoding.py", line 221, in __call__
                                    self.body = self.oldhandler(*args, **kwargs)
                                  File "/usr/local/lib/python3.5/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
                                    return self.callable(*self.args, **self.kwargs)
                                  File "/usr/local/smarthome/plugins/avm/__init__.py", line 2248, in index
                                    p=self.plugin)
                                  File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 1008, in render
                                    return self.environment.handle_exception(exc_info, True)
                                  File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 780, in handle_exception
                                    reraise(exc_type, exc_value, tb)
                                  File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise
                                    raise value.with_traceback(tb)
                                  File "/usr/local/smarthome/plugins/avm/webif/templates/index.html", line 7, in top-level template code
                                    {% set language = 'en' %}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base_plugin.html", line 150, in top-level template code
                                    {% if scroll_heading is not defined %}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base.html", line 1, in top-level template code
                                    {% block doc -%}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base.html", line 4, in block "doc"
                                    {%- block html %}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base.html", line 72, in block "html"
                                    {% block body -%}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base.html", line 75, in block "body"
                                    {% block content -%}
                                  File "/usr/local/smarthome/modules/http/webif/gtemplates/base_plugin.html", line 132, in block "content"
                                    {% block bodytab2 %}
                                  File "/usr/local/smarthome/plugins/avm/webif/templates/index.html", line 71, in block "bodytab2"
                                    {%  for function, dict in p.metadata.plugin_functions.items() %}
                                  File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 430, in getattr
                                    return getattr(obj, attribute)
                                jinja2.exceptions.UndefinedError: 'plugins.avm.AVM object' has no attribute 'metadata'
                                2018-12-13  20:42:29 INFO     CP Server Thread-12 [13/Dec/2018:20:42:29] HTTP
                                Request Headers:
                                  HOST: 192.168.178.153:8383
                                  USER-AGENT: Mozilla/5.0 (Windows NT 10.0; rv:64.0) Gecko/20100101 Firefox/64.0
                                  REFERER: http://192.168.178.153:8383/backend/plugins.html
                                  ACCEPT-LANGUAGE: de,en-US;q=0.7,en;q=0.3
                                  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                                  ACCEPT-ENCODING: gzip, deflate
                                  Remote-Addr: 192.168.178.123
                                  CONNECTION: keep-alive
                                  UPGRADE-INSECURE-REQUESTS: 1
                                Zuletzt geändert von schuma; 13.12.2018, 20:44.

                                Kommentar

                                Lädt...
                                X