Ankündigung

Einklappen
Keine Ankündigung bisher.

Berker B.IQ Textanzeige

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

    Berker B.IQ Textanzeige

    Hallo,

    laut Forumsuche scheint das Textanzeige-Feature bei einem B.IQ ja nicht ganz einfach zu sein, aber klappen sollte es doch!?

    Ich versuche mit einem Perl-Skript einen Text anzeigen zu lassen, aber das Display zeigt den Text nicht an. GA 2/3/10 ist mit B.IQ Objekt 73 verbunden.

    Code:
    use URI::Escape;
    my $ts = time;
    my $url = 'http://192.168.x.x/proxy/visu/cgi-bin/w?';
    my $params = 's=SESSION&a=';
    
    # original
    # $params .= '2/3/10&v='.uri_escape($knxMessage).'&d=16&ts='.$ts;
    # debug: Mime64 encoded "blah"
    $params .= '2/3/10&v=dGVzdA==&d=16&ts='.$ts;
    }
    else {
    $params .= '2/3/11&v=81&ts='.$ts;
    }
    
    my $ua = new LWP::UserAgent();
    my $response = $ua->get($url.$params);
    $url sieht dann so aus: http://192.168.x.x/proxy/visu/cgi-bi...&ts=1620684941.

    $response ist: {'success':7}


    Anstelle von Mime64-encoded have ich auch schon "v=blah" versucht.

    Im Busmonitor sehe ich dass ein Wert gesendet wird, z.B. für nicht-kodiertes blah "626C6168".


    Habt ihr eine Idee was ich hier falsch mache?

    Vielen Dank und viele Grüße

    #2
    Ohoh, schon schwierig um gute Bedienungsanleitungen zu schreiben... bei der Erklärung der "2.3 Textanzeige (Alarmtext)" fehlt der Hinweis dass das Anzeigen des Alarmtextes explizit freigegeben muss in den Displayeinstellungen. Dann hat man aber nur eine sehr eingeschränkte Wahl der Anzeigemöglichkeiten. Verstehe die Frustration über Berker. Nun ja, für die neue Etage werde ich mir mal die MDTs anschauen...

    Für die Berkers habe ich den folgenden Workaround.

    Ziel: Anzeigen einer Meldung, mit beleuchtetem Display (wenn ein Raspi noch läuft). Dies allerdings nicht als Alarmtext um noch alle Displayanzeigemöglichkeiten zu erhalten.

    Workaround
    - Displaybeleuchtung nur über Objekt (Folge ist dass bei einem Tastendruck das Display nicht mehr angeht)
    - Ausschalten nach 610 Sekunden
    - Definieren von drei Texten (Textanzeige über 3 x 1 Bit)
    - Bashscript das einen der Texte triggert (cronjob)
    - Wiregate/timberwolf script das bei einem Tastendruck kurz das Display ein- und ausschaltet


    Bashscript (cron: */10 23,0,1,2 * * *):
    Code:
    #!/usr/bin/perl
    use Switch;
    use strict;
    use warnings;
    use LWP::UserAgent;
    
    my $mailOrNot;
    
    if ($ARGV[0]) {
    $mailOrNot = 1;
    }
    else {
    $mailOrNot = 0;
    }
    
    #debug
    #my @ipsToCheck = ('192.168.x.x', '192.168.x.x';
    #my @names = ('name1', 'name2');
    
    my $ping;
    my $mail;
    my $counter=0;
    my @stillRunning = ();
    
    foreach my $ip (@ipsToCheck) {
    
    #print "\nDebug: $ip\n";
    
    $ping = `ping -c 2 $ip | grep Unreachable`;
    
    #print "Debug:\n"
    #print "|".$ping."|";
    
    if ($ping ne '') {
    # print "nothing";
    push @stillRunning, 0;
    }
    else {
    # print "somthing";
    
    if ($mailOrNot) {
    $mail = `echo "" | mail -s "$names[$counter] laeuft noch" \"test\@email.com\"`;
    }
    
    push @stillRunning, 1;
    }
    
    $counter++;
    }
    
    my $ts = time;
    my $url = 'http://192.168.x.x/proxy/visu/cgi-bin/w?';
    my $paramsBase = 's=SESSION&a=';
    my $params;
    my $name1 = 0;
    my $name2 = 0;
    my $other = 0;
    
    $counter=0;
    foreach my $running (@stillRunning) {
    
    if ($running) {
    if ($names[$counter] eq 'name1') {
    $name1 = 1;
    }
    elsif ($names[$counter] eq 'name2') {
    $name2 = 1;
    }
    else {
    $other = 1;
    }
    }
    
    $counter++;
    }
    
    my $ua = new LWP::UserAgent();
    my $response;
    
    
    if ($name1 || $name2 || $other) {
    
    if ($name1 && !$name2 && !$other) {
    $params = $paramsBase.'2/3/12&v=81&ts='.$ts;
    }
    elsif (!$name1 && $name2 && !$other) {
    $params = $paramsBase.'2/3/13&v=81&ts='.$ts;
    }
    else {
    $params = $paramsBase.'2/3/14&v=81&ts='.$ts;
    }
    
    # debug
    #print "url:\n";
    #print $url.$params;
    #print "\n";
    
    $response = $ua->get($url.$params);
    
    # debug
    #print "response:\n";
    #print $response->message;
    #print $response->as_string;
    #print "\n";
    
    # turn on illumination
    $params = $paramsBase.'2/3/16&v=81&ts='.$ts;
    
    $response = $ua->get($url.$params);
    
    # debug
    #print "response:\n";
    #print $response->message;
    #print $response->as_string;
    #print "\n";
    }
    else {
    $params = $paramsBase.'2/3/15&v=81&ts='.$ts;
    $response = $ua->get($url.$params);
    }

    Wiregate/Timberwolf script:
    Code:
    no warnings 'redefine';
    ################################################## ##################################################
    # actorBIQillumination
    # v0.1, 2021-05-13
    # (c) 2021 kg, GPL (v3)
    #
    # Turns on the illumination of a B.IQ when a one of the GAs associated to one of the buttons is triggered
    # This to circumvent the dumb application: when illumination can be switched on by object, pressing a button
    # does not switch on the illumincation anymore.
    # But switching on with object is required to immediately see one of the texts.
    #
    ################################################## ##################################################
    
    
    ### CONFIGURATION
    
    # debugging on/off
    my $debugBerker = '1';
    
    my @berkers;
    push @berkers, {
    ga01 => '1/0/8',
    ga02 => '1/0/102',
    ga03 => '1/0/103',
    ga04 => '1/1/102',
    ga05 => '1/1/103',
    ga06 => '5/1/8',
    ga07 => '5/2/8',
    illuminationGA => '2/3/16',
    room => 'Wohnzimmer',
    roomIdent => 'WK',
    };
    
    # in seconds
    my $illuminationTime = 5;
    
    ### end CONFIGURATION
    
    my $berker;
    
    # http://knx-user-forum.de/wiregate/17791-pruefung-ob-plugin-durch-codeaenderung-ausgefuehrt.html
    if (!$plugin_initflag || ($plugin_info{$plugname.'_lastsaved'} > $plugin_info{$plugname.'_last'})) {
    
    # subscribe to GA
    foreach $berker (@berkers) {
    $plugin_subscribe{$berker->{ga01}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga02}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga03}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga04}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga05}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga06}}{$plugname} = 1;
    $plugin_subscribe{$berker->{ga07}}{$plugname} = 1;
    
    plugin_log($plugname,'INIT Subscribed to B.IQ in room '.$berker->{room}.':');
    plugin_log($plugname,'- GA 01 : '.$berker->{ga01});
    plugin_log($plugname,'- GA 02 : '.$berker->{ga02});
    plugin_log($plugname,'- GA 03 : '.$berker->{ga03});
    plugin_log($plugname,'- GA 04 : '.$berker->{ga04});
    plugin_log($plugname,'- GA 05 : '.$berker->{ga05});
    plugin_log($plugname,'- GA 06 : '.$berker->{ga06});
    plugin_log($plugname,'- GA 07 : '.$berker->{ga07});
    }
    }
    
    # Aufruf durch Telegramm
    elsif (%msg) {
    CHECKING: foreach $berker (@berkers) {
    if ($debugBerker) {
    plugin_log($plugname,'Telegram --------------------------------------------------------------');
    plugin_log($plugname,'msg{dst} :'.$msg{'dst'}.'|');
    plugin_log($plugname,'msg{data}:'.$msg{'data'}.'|' );
    }
    
    # proxy GA
    if ($msg{'apci'} eq 'A_GroupValue_Write') {
    
    if ($debugBerker) {
    plugin_log($plugname,'Write 1 to '.$berker->{illuminationGA}. ' and enable cyclic calling.');
    }
    
    knx_write($berker->{illuminationGA},1,'1.001');
    
    #TODO if ever more than one B.IQ with this issue
    # $plugin_info{$berker->{varTimeVerschiebungEnabled}} = time();
    $plugin_info{$plugname.'_cycle'} = $illuminationTime;
    
    last CHECKING;
    }
    }
    if ($debugBerker) {plugin_log($plugname,'END TG --------------------------------------------------------------');}
    }
    # Aufruf durch Daten am Socket
    elsif ($fh) {
    }
    # Aufruf durch Zyklus
    else {
    if ($debugBerker) {
    plugin_log($plugname,'Cycle check --------------------------------------------------------------');
    }
    
    # time's up, switch off illumination
    #TODO if ever more than one BIQ with this issue
    foreach $berker (@berkers) {
    
    if ($debugBerker) {
    plugin_log($plugname,'Write 0 to '.$berker->{illuminationGA}. ' and disable cyclic calling.');
    }
    
    knx_write($berker->{illuminationGA},0,'1.001');
    
    $plugin_info{$plugname.'_cycle'} = 0;
    }
    
    if ($debugBerker) {plugin_log($plugname,'END cycle --------------------------------------------------------------');}
    }
    
    undef(@berkers);
    undef($berker);
    return 0;

    Kommentar

    Lädt...
    X