Ankündigung

Einklappen
Keine Ankündigung bisher.

AVM Plugin

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

  • psilo
    antwortet
    mach halt watch_item auf das jew. item des CallMonitors.. habe ja sogar trigger-items die spezielle Telefonnummern dort auswerten. In [...].newest.event sollte bspw. das letzte Event stehen, da kannst Du dann bspw Dein CONNECT abfangen.

    Code:
    [[monitor]]
            [[[trigger]]]
                type = bool
                avm_data_type@fritzbox_7490 = monitor_trigger
                avm_incoming_allowed = xxxxxxxx
                avm_target_number = xxxxxxxx
                enforce_updates = yes
            [[[trigger2]]]
                type = bool
                avm_data_type@fritzbox_7490 = monitor_trigger
                avm_incoming_allowed = xxxxxxxx
                avm_target_number = xxxxxxxx
                enforce_updates = yes
            [[[trigger3]]]
                type = bool
                avm_data_type@fritzbox_7490 = monitor_trigger
                avm_incoming_allowed = xxxxxxxx
                avm_target_number = xxxxxxxx
                enforce_updates = yes
            [[[trigger4]]]
                type = bool
                avm_data_type@fritzbox_7490 = monitor_trigger
                avm_incoming_allowed = xxxxxxxx
                avm_target_number = xxxxxxxx
                enforce_updates = yes
            [[[incoming]]]
                [[[[is_call_incoming]]]]
                    type = bool
                    avm_data_type@fritzbox_7490 = is_call_incoming
                [[[[duration]]]]
                    type = num
                    avm_data_type@fritzbox_7490 = call_duration_incoming
                [[[[last_caller]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_caller_incoming
                [[[[last_calling_number]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_number_incoming
                [[[[last_called_number]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_called_number_incoming
                [[[[last_call_date]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_call_date_incoming
                [[[[event]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = call_event_incoming
            [[[outgoing]]]
                [[[[is_call_outgoing]]]]
                    type = bool
                    avm_data_type@fritzbox_7490 = is_call_outgoing
                [[[[duration]]]]
                    type = num
                    avm_data_type@fritzbox_7490 = call_duration_outgoing
                [[[[last_caller]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_caller_outgoing
                [[[[last_calling_number]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_number_outgoing
                [[[[last_called_number]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_called_number_outgoing
                [[[[last_call_date]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = last_call_date_outgoing
                [[[[event]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = call_event_outgoing
            [[[newest]]]
                [[[[direction]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = call_direction
                    cache = yes
                [[[[event]]]]
                    type = str
                    avm_data_type@fritzbox_7490 = call_event
                    cache = yes
    Zuletzt geändert von psilo; 19.07.2016, 15:29.

    Einen Kommentar schreiben:


  • blutwurst
    antwortet
    Hallo,

    leider funktioniert bei mir seit dem letzten Update das alte FritzBox Plugin nicht mehr.
    Daher habe ich die Gunst der Stunde genutzt, um auf das neue AVM Plugin umzusteigen.

    Jetzt muss ich meine Logiken etwas anpassen und hänge fest.

    Gibt es die Möglichkeit den Callmonitor zum triggern einer Logic zu nutzen?
    Früher ging das beim Fritzbox Plugin mit:
    Code:
    [fbmonitor]
        filename = callmonitor.py
        fritzbox = callmonitor
    Danach werte ich in der Logik die Events aus, ob "Ring", "Connect" .......
    mit
    Code:
    if 'CONNECT' in trigger['value']:
    denke mal, dass diese Möglichkeit weiter besteht, nur ich seh die nicht...

    Danke


    Gruß

    Axl

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Ok super und danke für das Feedback. Ne Stelle mehr wo ich Exceptions abfangen konnte... Man denkt da nicht an jede von Anfang an

    Einen Kommentar schreiben:


  • ivande
    antwortet
    Hallo psilo,

    ssid konnte vom Gastzugang nicht ausgelesen werden, den hatte ich noch nicht eingerichtet,. gf_wlan_1_ssid konnte gelesen werden,..

    der Rest passt jetzt :-) danke


    widget_avm.jpg

    Gruß Ivan

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Du kannst testweise mal das response.content das in zeile 1469 abgefragt wird ausgeben lassen und für den avm_data_type wlanconfig_ssid schauen was drinsteht

    Einen Kommentar schreiben:


  • psilo
    antwortet
    gf_wlan_1_ssid liest den Namen des ersten Wifis aus. Bei der 7490 sollte das das 2,4 ghz wlan sein. das 5er ist das 2te und das "3te" ist das gäste-wlan

    Einen Kommentar schreiben:


  • ivande
    antwortet
    die Box ist eine 7490 OS 06:51(zur Zeit noch)

    Der Fehler wird nun abgefangen.

    2016-07-08 15:33:30 ERROR __init__ plugins.avm_fritzbox_7490 Attribute wlanconfig_ssid not available on the FritzDevice -- __init__.py:_update_wlan_config:1388
    ssid habe ich einen Namen vergeben und WPA2 verschlüsselt.., sonst hab ich nichts spezielles eingestellt..
    wozu dient denn das Item "gf_wlan_1_ssid"?

    Gruß Ivan

    Einen Kommentar schreiben:


  • psilo
    antwortet
    hast du sogar die xxxxx'e dringelassen? naja 1:1 werden die items nicht funktionieren, bitte schon lesen was du da übernimmst ;-) ggf auch erstmal mit einer untermenge meiner items anfangen
    BTW: welche box wäre natürlich auch toll zu wissen

    Der Fehler tritt auf, wenn Du die WLAN SID Abfragst. Ist da bei Deiner Box was spezielles? Notfalls halt das item [[[gf_wlan_1_ssid]]] erstmal rausnehmen.

    ivande ich pushe gleich nen fix, der in deinem fall vernuenftige errors ausgibt. denke da gibt es eben bestimmte features nicht zum abfragen. meine items fragen so ziemlich alles ab, wenn es was nicht gibt oder was abgeschaltet ist gibt es halt fehler
    Zuletzt geändert von psilo; 08.07.2016, 13:15.

    Einen Kommentar schreiben:


  • ivande
    antwortet
    Hallo psilo,

    ich bin zu Testzwecken auf smarthomeNG 1.2 gewechselt. dort habe ich nun das Problem:

    2016-07-08 13:01:32 INFO connectionpool plugins.avm_fritzbox_7490 Resetting dropped connection: fritz.box -- connectionpool.py:_get_conn:242
    2016-07-08 13:01:32 ERROR scheduler plugins.avm_fritzbox_7490 Method plugins.avm_fritzbox_7490 exception: 'NoneType' object has no attribute 'data' -- scheduler.py:_task:375
    Traceback (most recent call last):
    File "/usr/local/smarthome_dev/lib/scheduler.py", line 371, in _task
    obj()
    File "/usr/local/smarthome_dev/plugins/avm/__init__.py", line 559, in _update_loop
    self._update_wlan_config(item)
    File "/usr/local/smarthome_dev/plugins/avm/__init__.py", line 1384, in _update_wlan_config
    item(element_xml[0].firstChild.data)
    AttributeError: 'NoneType' object has no attribute 'data'

    plugin.conf
    PHP-Code:
    [fb1]
        
    class_name AVM
        class_path 
    plugins.avm
        username 
    smarthome
        password 
    hätschpätsch
        host 
    fritz.box
        port 
    49443 #port = 49000
        
    cycle 300
        ssl 
    True     # use https or not # ssl = True
        
    verify False # verify ssl certificate
        
    call_monitor True
        
    #avm_identifier = fritzbox_1
        
    instance fritzbox_7490 

    die items habe ich aus der readme.md übernommen..

    PHP-Code:
    [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
        
    [[monitor]]
            [[[
    trigger]]]
                
    type bool
                avm_data_type
    @fritzbox_7490 monitor_trigger
                avm_incoming_allowed 
    xxxxxxxx
                avm_target_number 
    xxxxxxxx
                enforce_updates 
    yes
            
    [[[trigger2]]]
                
    type bool
                avm_data_type
    @fritzbox_7490 monitor_trigger
                avm_incoming_allowed 
    xxxxxxxx
                avm_target_number 
    xxxxxxxx
                enforce_updates 
    yes
            
    [[[trigger3]]]
                
    type bool
                avm_data_type
    @fritzbox_7490 monitor_trigger
                avm_incoming_allowed 
    xxxxxxxx
                avm_target_number 
    xxxxxxxx
                enforce_updates 
    yes
            
    [[[trigger4]]]
                
    type bool
                avm_data_type
    @fritzbox_7490 monitor_trigger
                avm_incoming_allowed 
    xxxxxxxx
                avm_target_number 
    xxxxxxxx
                enforce_updates 
    yes
            
    [[[incoming]]]
                [[[[
    is_call_incoming]]]]
                    
    type bool
                    avm_data_type
    @fritzbox_7490 is_call_incoming
                
    [[[[duration]]]]
                    
    type num
                    avm_data_type
    @fritzbox_7490 call_duration_incoming
                
    [[[[last_caller]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_caller_incoming
                
    [[[[last_calling_number]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_number_incoming
                
    [[[[last_called_number]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_called_number_incoming
                
    [[[[last_call_date]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_call_date_incoming
                
    [[[[event]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 call_event_incoming
            
    [[[outgoing]]]
                [[[[
    is_call_outgoing]]]]
                    
    type bool
                    avm_data_type
    @fritzbox_7490 is_call_outgoing
                
    [[[[duration]]]]
                    
    type num
                    avm_data_type
    @fritzbox_7490 call_duration_outgoing
                
    [[[[last_caller]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_caller_outgoing
                
    [[[[last_calling_number]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_number_outgoing
                
    [[[[last_called_number]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_called_number_outgoing
                
    [[[[last_call_date]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 last_call_date_outgoing
                
    [[[[event]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 call_event_outgoing
            
    [[[newest]]]
                [[[[
    direction]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 call_direction
                    cache 
    yes
                
    [[[[event]]]]
                    
    type str
                    avm_data_type
    @fritzbox_7490 call_event
                    cache 
    yes
        
    [[tam]]
            
    index 1
            type 
    bool
            visu_acl 
    rw
            avm_data_type
    @fritzbox_7490 tam
            
    [[[name]]]
                
    type str
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 tam_name
            
    [[[message_number_old]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 tam_old_message_number
                
    eval = (sh.avm.tam.message_number_total()-sh.avm.tam.message_number_new())
                
    eval_trigger avm.tam.message_number_total avm.tam.message_number_new
            
    [[[message_number_new]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 tam_new_message_number
            
    [[[message_number_total]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 tam_total_message_number
        
    [[wan]]
            [[[
    connection_status]]]
                   
    type str
                   visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_connection_status
            
    [[[connection_error]]]
                   
    type str
                   visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_connection_error
            
    [[[is_connected]]]
                
    type bool
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_is_connected
            
    [[[uptime]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_uptime
            
    [[[ip]]]
                
    type str
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_ip
            
    [[[upstream]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_upstream
            
    [[[downstream]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_downstream
            
    [[[total_packets_sent]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_total_packets_sent
            
    [[[total_packets_received]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_total_packets_received
            
    [[[total_bytes_sent]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_total_bytes_sent
            
    [[[total_bytes_received]]]
                
    type num
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_total_bytes_received
            
    [[[link]]]
                
    type bool
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wan_link
        
    [[wlan]]
            [[[
    gf_wlan_1]]]
                
    type bool
                visu_acl 
    rw
                avm_data_type
    @fritzbox_7490 wlanconfig #2,4ghz
                
    avm_wlan_index 1
            
    [[[gf_wlan_1_ssid]]]
                
    type str
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wlanconfig_ssid #2,4ghz
                
    avm_wlan_index 1
            
    [[[gf_wlan_2]]]
                
    type bool
                visu_acl 
    rw
                avm_data_type
    @fritzbox_7490 wlanconfig #5 GHz
                
    avm_wlan_index 2
            
    [[[gf_wlan_3]]]
                
    type bool
                visu_acl 
    rw
                avm_data_type
    @fritzbox_7490 wlanconfig # Guest
                
    avm_wlan_index 3
            
    [[[gf_wlan_3_ssid]]]
                
    type str
                visu_acl 
    ro
                avm_data_type
    @fritzbox_7490 wlanconfig_ssid #2,4ghz
                
    avm_wlan_index 3
            
    [[[gf_wlan_3_tr]]]
                
    type num
                visu_acl 
    rw
                avm_data_type
    @fritzbox_7490 wlan_guest_time_remaining # Guest
                
    avm_wlan_index 


    Fritzbox 7490 06.51




    Gruß Ivan
    Zuletzt geändert von ivande; 08.07.2016, 12:14.

    Einen Kommentar schreiben:


  • psilo
    antwortet
    http://www.heise.de/newsticker/meldu...0-3258193.html

    Bei mir erfolgreich mit Plugin nachgetestet.

    Einen Kommentar schreiben:


  • psilo
    antwortet
    ist in der Fritzbox aktiviert, dass du überhaupt auf diese Art Telefonate auslösen darfst?
    Triggert die Logik? Debug-Ausgaben einbauen!

    Mind. sollte "Nutzung von Internettelefonie aus dem Heimnetz unterbinden" unter Eigene Rufnummern -> Anschlußeinstellungen AUS sein.

    Bei meinem Alarmcall musste ich zudem irgendwie noch die Wählhilfe aktivieren, damit ich mit internen Nummern was machen konnte.. Teste aber erstmal von Deiner Festnetz auf Deine Handynr. Calls auszulösen. Wenn das geht liegt es nur noch an der Fritzbox selber..
    Zuletzt geändert von psilo; 25.06.2016, 11:40.

    Einen Kommentar schreiben:


  • Yfkt5A
    antwortet
    Irgendwie will das bei mir nicht funktionieren

    zuerst versuch über die GA zu triggern, anschliessend auslösen der Logik über das Backend-Plugin... jeweils ohne das was klingelt
    hier der Log
    Code:
    2016-06-25  12:21:45 INFO     Main         KNX[default]: 1.1.1 set 0/0/1 to True
    2016-06-25  12:21:45 DEBUG    Main         Triggering Test_Callto - by: Item source: tuerklingel dest: None value: True
    2016-06-25  12:21:45 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 401 188
    2016-06-25  12:21:45 INFO     Test_Callto  Resetting dropped connection: fritz.box
    2016-06-25  12:21:45 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 500 428
    2016-06-25  12:21:45 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 401 188
    2016-06-25  12:21:45 INFO     Test_Callto  Resetting dropped connection: fritz.box
    2016-06-25  12:21:45 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 500 428
    2016-06-25  12:22:08 WARNING  CP Server Thread-9 Backend: visu plugin v1.0.0 is too old to support BackendServer, please update
    2016-06-25  12:22:08 INFO     CP Server Thread-9 192.168.x.x - - [25/Jun/2016:12:22:08] "GET / HTTP/1.1" 200 3275 "" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0"
    2016-06-25  12:22:10 WARNING  CP Server Thread-9 Backend: visu plugin v1.0.0 is too old to support BackendServer, please update
    2016-06-25  12:22:10 WARNING  CP Server Thread-9 Backend: logics_html: trigger = 'None', reload = 'None'
    2016-06-25  12:22:11 INFO     CP Server Thread-9 192.168.x.x - - [25/Jun/2016:12:22:11] "GET /logics.html HTTP/1.1" 200 6839 "http://192.168.x.x:8383/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0"
    2016-06-25  12:22:13 WARNING  CP Server Thread-9 Backend: visu plugin v1.0.0 is too old to support BackendServer, please update
    2016-06-25  12:22:13 WARNING  CP Server Thread-9 Backend: logics_html: trigger = 'Auslösen', reload = 'None'
    2016-06-25  12:22:13 WARNING  CP Server Thread-9 Backend: logics_html: Trigger logic = 'Test_Callto'
    2016-06-25  12:22:13 DEBUG    CP Server Thread-9 Triggering Test_Callto - by: Backend source: None dest: None value: None
    2016-06-25  12:22:13 INFO     CP Server Thread-9 192.168.x.x - - [25/Jun/2016:12:22:13] "POST /logics.html HTTP/1.1" 200 6839 "http://192.168.x.x:8383/logics.html" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0"
    2016-06-25  12:22:13 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 401 188
    2016-06-25  12:22:13 INFO     Test_Callto  Resetting dropped connection: fritz.box
    2016-06-25  12:22:14 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 500 428
    2016-06-25  12:22:14 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 401 188
    2016-06-25  12:22:14 INFO     Test_Callto  Resetting dropped connection: fritz.box
    2016-06-25  12:22:14 DEBUG    Test_Callto  "POST /upnp/control/x_voip HTTP/1.1" 500 428
    item.conf
    Code:
    [tuerklingel]
        name = Türklingel
        type = bool
        knx_dpt = 1
        knx_init = 0/0/1
        enforce_updates = yes
    logic.conf
    Code:
    [Test_Callto]
         filename = test_callto.py
         watch_item = tuerklingel
    test_callto.py
    Code:
    sh.fb1.set_call_origin("**621")
    sh.fb1.start_call("01xxxxxxx61")
    Wenn es bei dir so funktioniert, kann es sein das die FritzBox irgendetwas blockt?
    Hast du einen eigenen Benutzer in der FB angelegt oder meldest du dich ohne Benutzernamen an?

    Entschuldige bitte wenn ich nerve, aber ich komm da jetzt seit Tagen nicht weiter
    Zuletzt geändert von Yfkt5A; 30.08.2016, 22:46.

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Bau ne Logik die den Call auslöst und auf watch_item = ... (bspw zum einfachen Testen eine Deiner Lampen) hört. Wenn das geht sollte es mit Deiner Klingel ja auch gehen. Im Backend solltest Du jetzt übrigens Logiken auch per "Knopfdruck" trigger können

    Einen Kommentar schreiben:


  • Yfkt5A
    antwortet
    Wie/wo kann ich das am einfachsten testen?

    Einen Kommentar schreiben:


  • psilo
    antwortet
    d.h. ein sh.fb1.start_call('017xxxxxxx1') funktioniert schon nicht?
    ich triggere auf diese Art hier bspw einen Alarmcall:

    sh.fritzbox_7490.set_call_origin("**610")
    sh.fritzbox_7490.start_call('**9')

    habe das ganze aber als "echte" Logik die auf ein Item watched...

    Einen Kommentar schreiben:

Lädt...
X