ioBroker Forum


Nutzungsbedingungen |Datenschutzrichtlinie
Cloud |Dokumentation
Aktuelle Zeit: 22.01.2018, 13:20

Alle Zeiten sind UTC+01:00




Ein neues Thema erstellen  Auf das Thema antworten  [ 12 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Pincode Eingabe Alarmanlage
BeitragVerfasst: 14.05.2016, 21:05 
Offline
starter

Registriert: 07.04.2016, 19:42
Beiträge: 52
Danksagung erhalten: 1 Mal
Hallo,

Ich würde gerne meine Alarmanlage neben einen versteckten Taster am Tablet über eine Pin abschalten können.

Hat jemand eine Idee wie man ich das in VIS sauber hinbekomme???

Gruß
Thomas



Gesendet von iPad mit Tapatalk

_________________
*** iobroker auf Intel NUC und ESX VMWare Server + Homematic CCU2 ***


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 26.06.2016, 20:16 
Offline
starter

Registriert: 10.06.2015, 21:08
Beiträge: 51
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal
Hier gibts eine Lösung dafür.
http://homematic-forum.de/forum/viewtop ... e+#p285076


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 11.09.2017, 22:12 
Offline

Registriert: 20.08.2017, 08:24
Beiträge: 8
Wohnort: Wuppertal
Hat sich bedankt: 4 Mal
Nabend!

Na ja das stimmt nur so halb, der User gibt zwar einen wirklich guten Ansatz, aber er hat es ja nicht mit iobroker umgesetzt.... Ich habe eine solche PIN Eingabe schon bei vielen gesehen, vielleicht könnte ja einer der User uns hier weiterhelfen?

_________________
Grüße

______________________________________
Raspberry 3 mit iobroker / Homematic CCU2


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 11.09.2017, 22:38 
Offline
professional

Registriert: 19.03.2017, 13:28
Beiträge: 186
Hat sich bedankt: 12 Mal
Danksagung erhalten: 22 Mal
Hi,

es gab hier mal einen Beitrag der einen guten Ansatz für ein Alarmanlagen Script hatte, den Beitrag selbst finde ich gerade nicht aber hier mal das Script aus dem Beitrag:
Spoiler: Show hidden text
Code:
// *****************************************************************************
//
// Alarmanlage über ioBroker.vis
//
//
// Funktionen: 1. Scharfschalten mit Prüfen auf offene Verschlüsse (Fenster/Tür)
//                   2. Unscharf über PIN
//
//
//
//
//
//
// *****************************************************************************


// -----------------------------------------------------------------------------
// allgemeine Variablen
// -----------------------------------------------------------------------------
var logging = false;                                                        // Logging on/off
var instanz = 'javascript.0';  instanz = instanz + '.';                     //
                                                                            //
var pfad0 =     'Alarmanlage.Status.';                                      // Pfad innerhalb der Instanz - Status allgemien
var pfad1 =     'Alarmanlage.CountDown.Scharfschalten.';                    // Pfad innerhalb der Instanz
var pfad2 =     'Alarmanlage.CountDown.Unscharfschalten.';                  // Pfad innerhalb der Instanz 
var pfad3 =     'Alarmanlage.Pin.Unscharfschalten.';                        // Pfad innerhalb der Instanz



// -----------------------------------------------------------------------------
// Variablen für Pin-Abfrage
// -----------------------------------------------------------------------------
var PinReturn = 0;                                                          // Status der Returntaste (0 - #-Taste sichtbar || 1 - Returntaste sichtbar)
var PinTast = "";                                                           // Inhalt der Eingabe
var PinTemp ="";                                                            // Puffer für eingegebe Ziffern
var PinLae = 0;                                                             // Pin-Länge bei Eingabe

var PinState = false ;                                                      // Eingabestatus - Eingabe beginnt nach Taste '#' und wird mit Taste '#' abgeschlossen
var PinFehl =false;                                                         // Statusflag für fehlerhafte Eingabe
var PinAnz = "";                                                            // Angezeiger 'Displaytext' z.B. ****
var PinAnzStat = 0;                                                         // Status der PinAnzeige im Display (0-Ruhe | 1-Start [grau] | 2-richtig [gruen] | 3-falsch [rot])

var PinSoll = 1607;

// -----------------------------------------------------------------------------
// Variablen für Alarmstatus
// -----------------------------------------------------------------------------

var Ueberwachung = "hm-rega.0.26414";

// -----------------------------------------------------------------------------
// Objekte
// -----------------------------------------------------------------------------
// Counter für Scharfschaltung
createState(pfad1 + 'countdown', 60, {name: 'Timerzeit'});
createState(pfad1 + 'afterCount', false, {name: 'Bolean nach Timerablauf'});
createState(pfad1 + 'countTrigger', false, {name: 'Trigger für Count'});

// Counter für Unscharf-Schalten
createState(pfad2 + 'countdown', 60, {name: 'Timerzeit'});
createState(pfad2 + 'afterCount', false, {name: 'Bolean nach Timerablauf'});
createState(pfad2 + 'countTrigger', false, {name: 'Trigger für Count'});

// Objekte für Pin-Eingabe
createState(pfad3 + 'PinSelect', "" , {name: 'Pin-Eingabe'});
createState(pfad3 + 'Pin', '0000' ,  {name: 'Pin'});
createState(pfad3 + 'PinFehler', false ,  {name: 'Pin-Fehler'});
createState(pfad3 + 'PinAnzStat', 0 ,  {name: 'PinAnzeigeStatus'});
createState(pfad3 + 'PinAnz', '' ,  {name: 'Pin-Anzeige'});
createState(pfad3 + 'PinReturn', '' ,  {name: 'Pin-ReturnTaste'});

// Objekte für Status
createState(pfad0 + 'Status', 3, {name: 'Status für Scharfmeldung'});
createState(pfad0 + 'ScharfStatus', false, {name: 'Status für Scharfschaltung'});

// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$



// #############################################################################
// #                                                                           #
// #  Scharfschalten                                                           #
// #                                                                           #
// #############################################################################

//  Counter für Scharfschaltung
on((instanz + pfad1 + 'countTrigger'), function (obj) {
    if (obj.newState.val === true || obj.newState.val === 'true' || obj.newState.val == 1) {
        setState(pfad1 + 'countdown', 60);
        setState(pfad1 + 'afterCount', false);
        countscharf();
    }   
});

on((instanz + pfad1 + 'afterCount'), function (obj) {
    if (obj.newState.val === true || obj.newState.val === 'true' || obj.newState.val == 1) {
 
    }   
});

function countscharf() {
    setTimeout(function () {
        var timer = getState(pfad1 + 'countdown').val || 60;
        if (timer > 1) {
            setState(pfad1 + 'countTrigger', false);
            setState(pfad1 + 'countdown', timer - 1);
            countscharf();
        } else {
            setState(pfad1 + 'countdown', 0);
            setState(pfad1 + 'afterCount', true);
            setState(Ueberwachung, true);
        }
    }, 1000);
}




function pruefscharf() {
   
}

// #############################################################################
// #                                                                           #
// #  Unscharfschalten                                                         #
// #                                                                           #
// #############################################################################

//Counter für Unscharf-Schalten
on((instanz + pfad2 + 'countTrigger'), function (obj) {
    if (obj.newState.val === true || obj.newState.val === 'true' || obj.newState.val == 1) {
        setState(pfad2 + 'countdown', 60);
        setState(pfad2 + 'afterCount', false);
        countunscharf();
    }   
});

function countunscharf() {
    setTimeout(function () {
        var timer = getState(pfad2 + 'countdown').val || 60;
        if (timer > 1) {
            setState(pfad2 + 'countTrigger', false);
            setState(pfad2 + 'countdown', timer - 1);
            countunscharf();
        } else {
            setState(pfad2 + 'countdown', 0);
            setState(pfad2 + 'afterCount', true);
        }
    }, 1000);
}

// #############################################################################
// #                                                                           #
// #  Pin-Abfrage                                                              #
// #                                                                           #
// #############################################################################


on((instanz + pfad3 + 'PinSelect'), function (obj) {
    if (obj.newState.val === '#') {
        PinStart();
    }
    if (obj.newState.val === 0 || obj.newState.val === 1 || obj.newState.val === 2 || obj.newState.val === 3 || obj.newState.val === 4 || obj.newState.val === 5 || obj.newState.val === 6 || obj.newState.val === 7 || obj.newState.val === 8 || obj.newState.val === 9) {
        PinTast = obj.newState.val;
        PinEingabe();
    } 
    if (obj.newState.val === '$') {
        PinPruef();
    }     
    if (obj.newState.val === '*') {
        PinReset(); 
    }     
});

function PinStart () {
    PinReturn = 1;
    PinLae = 0;
    PinAnzStat = 1;
    PinAnz = "";
    setState(pfad3 + 'PinAnzStat', PinAnzStat);
    setState(pfad3 + 'PinAnz', PinAnz);
    setState(pfad3 + 'PinReturn', PinReturn);
}
function PinEingabe () {
    PinTemp = (PinTemp + PinTast);
    PinAnz = (PinAnz + '*');
    setState(pfad3 + 'PinAnz',PinAnz);
    PinLae = (PinLae +1) ;
    log ('PinTast = ' + PinTast);
    log ('PinTemp = ' + PinTemp);
    log ('PinLae =  ' + PinLae);
    log ('PinSoll = ' + PinSoll);



}

function PinPruef() {
    if (PinTemp === '1234') {
        log ('PinEingabe erfolgreich');
        PinAnzStat = 2;
        setState(pfad3 + 'PinAnzStat', PinAnzStat);
        PinReturn = 3;
        setState(pfad3 + 'PinReturn', PinReturn);
        PinAnz = 'unscharf';
        setState(Ueberwachung,false);
        setState(pfad3 + 'PinAnz',PinAnz);
        setTimeout(function() {
            PinAnz = '';
            setState(pfad3 + 'PinAnz',PinAnz);
            PinReset();
        }, 5 * 1000);

    } else {
        log ('PinEingabe Fehler');   
    }
}   

function PinReset() {
        PinReturn = 0;
        PinLae=0;
        PinAnzStat=0;
        PinAnz="";
        PinTemp="";
        setState(pfad3 + 'PinAnz', PinReturn);
        setState(pfad3 + 'PinAnzStat', PinAnzStat);
        setState(pfad3 + 'PinAnz', PinAnz);
        setState(pfad3 + 'PinReturn', PinReturn);     
}


Dieses habe ich für meine Bedürfnisse ergänzt und bin auch voll zufrieden.

Und Hier ein Bild wie die Eingabe bei mir in Vis aussieht:
Dateianhang:
pincode.JPG
pincode.JPG [ 48.97 KiB | 674 mal betrachtet ]




Wenn ich den Beitrag wieder finde poste ich euch noch den Link.

Gruß Peoples

_________________
Gruß
Steffen


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 11.09.2017, 22:53 
Offline
professional

Registriert: 10.03.2017, 21:00
Beiträge: 814
Hat sich bedankt: 59 Mal
Danksagung erhalten: 41 Mal
hättest du auch ein widget dazu?

_________________
Gruß Alex

HP Gen 8 ESXi + HP Gen 7 ESXi Backup Server - VM Debian FHEM + ioBroker
Pi3 RaspberryMatic, Wemos D1, NodeMCU, Odroid C2, Pi3 + Zero W


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 11.09.2017, 23:07 
Offline
professional

Registriert: 19.03.2017, 13:28
Beiträge: 186
Hat sich bedankt: 12 Mal
Danksagung erhalten: 22 Mal
Ein "einziges" Widget nicht.

Aber hier ein Export meiner View:
Spoiler: Show hidden text
Code:
[{},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":true,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"3","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"value":"3","gestures-swipeLeft-limit":"-2","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"1066px","top":"372px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"2","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"2","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"912px","top":"372px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"5","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"5","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"912px","top":"526px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"6","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"6","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"1066px","top":"526px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"7","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"7","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"758px","top":"680px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"8","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"8","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"912px","top":"680px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"9","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"9","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"1066px","top":"680px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"R","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","views":["Klima","Licht","Strom","System","Fenster"],"value":"R"},"style":{"left":"758px","top":"834px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"0","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"0","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"912px","top":"834px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"E","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"E","views":["Klima","Licht","Strom","System","Fenster"]},"style":{"left":"1066px","top":"834px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"1","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"1","views":["Klima"]},"style":{"left":"758px","top":"372px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplBulbOnOffCtrl","data":{"oid":"hm-rega.0.1234","g_fixed":false,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"icon_off":"/vis.0/Wandtablet/img/background/alarm_system/state_off.png","icon_on":"/vis.0/Wandtablet/img/background/alarm_system/state_on.png","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"min":"","readOnly":true,"views":["Klima","Licht","Strom","System","Fenster"],"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","g_ccontrol":false},"style":{"left":"730px","top":"335px","width":"520px","height":"686px","z-index":"1"},"widgetSet":"basic"},{"tpl":"tplJquiButtonState","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinSelect","g_fixed":true,"g_visibility":false,"g_css_font_text":false,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","buttontext":"4","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"no_style":false,"class":"","value":"4","views":["Klima"]},"style":{"left":"758px","top":"526px","width":"150px","height":"150px","z-index":"3","opacity":""},"widgetSet":"jqui"},{"tpl":"tplHtml","data":{"g_fixed":true,"g_visibility":false,"g_css_font_text":true,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"refreshInterval":"0","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","class":"","html":"! Alarmanlage aktiviert !","locked":false},"style":{"left":"538px","top":"43px","width":"937px","height":"100px","z-index":"2","color":"#f00000","font-size":"80px","font-weight":"bold","text-shadow":""},"widgetSet":"basic"},{"tpl":"tplHtml","data":{"g_fixed":true,"g_visibility":false,"g_css_font_text":true,"g_css_background":false,"g_css_shadow_padding":false,"g_css_border":false,"g_gestures":false,"g_signals":false,"refreshInterval":"0","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","class":"","html":"Bitte Pincode eingeben um die Alarmanlage zu deaktivieren","locked":false},"style":{"left":"564px","top":"150px","width":"852px","height":"40px","z-index":"2","color":"#f00000","font-size":"25px","font-weight":"bold","text-align":"center"},"widgetSet":"basic"},{"tpl":"tplValueString","data":{"oid":"javascript.0.Alarmanlage.Pin.Unscharfschalten.PinAnz","g_fixed":false,"g_visibility":false,"g_css_font_text":true,"g_css_background":true,"g_css_shadow_padding":false,"g_css_border":true,"g_gestures":false,"g_signals":false,"visibility-cond":"==","visibility-val":1,"visibility-groups-action":"hide","signals-cond-0":"==","signals-val-0":true,"signals-icon-0":"/vis/signals/lowbattery.png","signals-icon-size-0":0,"signals-blink-0":false,"signals-horz-0":0,"signals-vert-0":0,"signals-hide-edit-0":false,"signals-cond-1":"==","signals-val-1":true,"signals-icon-1":"/vis/signals/lowbattery.png","signals-icon-size-1":0,"signals-blink-1":false,"signals-horz-1":0,"signals-vert-1":0,"signals-hide-edit-1":false,"signals-cond-2":"==","signals-val-2":true,"signals-icon-2":"/vis/signals/lowbattery.png","signals-icon-size-2":0,"signals-blink-2":false,"signals-horz-2":0,"signals-vert-2":0,"signals-hide-edit-2":false,"html_append":"","test_html":"****"},"style":{"left":"734px","top":"205px","border-width":"3px","border-style":"solid","border-color":"#969696","border-radius":"20px","width":"500px","height":"100px","background-color":"#6f716f","opacity":"0.8","color":"#ffffff","text-align":"center","line-height":"180px","font-size":"180px"},"widgetSet":"basic"}]



Sind letztendlich nur eine Anordnung von Buttons die ich mit CSS grafisch aufgewertet habe.

Gruß
Peoples

_________________
Gruß
Steffen


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 15:30 
Offline
professional

Registriert: 20.12.2017, 19:55
Beiträge: 183
Hat sich bedankt: 6 Mal
Danksagung erhalten: 1 Mal
Hallo zusammen
Habe eine Frage die nicht ganz, sondern nur teilweise mit der Sache hier zu tun hat.
Ich möchte eine Pin Abfrage für den Türöffner machen.
Dafür werde ich ein Script brauchen.
kann man das auf einen Teil eures Scriptes aufbauen? (Pin Abfrage)
Bin kein Programmierer und kenne mich nur bedingt mit Scripete aus.
Daher meine bitte an euch ob mir da wer helfen kann.
Danke


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 15:33 
Offline
professional

Registriert: 19.03.2017, 13:28
Beiträge: 186
Hat sich bedankt: 12 Mal
Danksagung erhalten: 22 Mal
Hi,

wenn ich dich richtig verstanden habe möchtest du aus dem Script oben den Teil rausnehmen der die Zahlenkombi abfragt und bei richtiger Eingabe dann den Türöffner betätigt?
Wenn dem so ist kann ich das mit ja beantworten das würde gehen ob es sicher ist sei aber mal dahin gestellt :D
Gruß
Steffen

_________________
Gruß
Steffen


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 15:46 
Offline
professional

Registriert: 20.12.2017, 19:55
Beiträge: 183
Hat sich bedankt: 6 Mal
Danksagung erhalten: 1 Mal
Hallo
Danke für die rasche Antwort.
Ja ich möchte, wenn ich auf den Taster für die Tür drücke das dann eine Pin Abfrage gemacht wird.
Es soll nur eine kleine Sicherheit sein das das nicht jeder machen kann.
Aber in erster Linie soll es davor schützen das man unabsichtlich auf den Taster kommt und dann die Tür aufmacht.
Wenn du mir dabei helfen würdest wäre ich sehr froh.
Danke


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 15:51 
Offline
guru

Registriert: 10.08.2014, 19:15
Beiträge: 1174
Hat sich bedankt: 42 Mal
Danksagung erhalten: 88 Mal
Hallo SmarthomeMF

Schau mal hier.http://forum.iobroker.net/viewtopic.php?f=21&t=4818&hilit=pin#p47264
Vielleicht geht das als Grundlage.

Grüße

_________________
Rantanplan
CCU2 (2.29.18) * ioBroker.vis
ioBrocker auf Win10/64 bit Enterprise (VM)
Scripten mit Blockly


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 18:15 
Offline
professional

Registriert: 20.12.2017, 19:55
Beiträge: 183
Hat sich bedankt: 6 Mal
Danksagung erhalten: 1 Mal
danke für den Tipp


Nach oben
   
 Betreff des Beitrags: Re: Pincode Eingabe Alarmanlage
BeitragVerfasst: 13.01.2018, 20:54 
Offline
professional

Registriert: 19.03.2017, 13:28
Beiträge: 186
Hat sich bedankt: 12 Mal
Danksagung erhalten: 22 Mal
Hi,

hab mal das was nicht benötigt wird rausgelöscht. So sollte es gehen habs aber nicht getestet:
Code:
// -----------------------------------------------------------------------------
// allgemeine Variablen
// -----------------------------------------------------------------------------
var logging = true;                                                        // Logging on/off
var instanz = 'javascript.0';  instanz = instanz + '.';                     //

var pfad0 =     'Tueroeffner.Pin.';                        // Pfad innerhalb der Instanz


// -----------------------------------------------------------------------------
// Variablen für Pin-Abfrage
// -----------------------------------------------------------------------------
var PinReturn = 0;                  // Status der Returntaste (0 - #-Taste sichtbar || 1 - Returntaste sichtbar)
var PinTast = "";                   // Inhalt der Eingabe
var PinTemp ="";                    // Puffer für eingegebe Ziffern
var PinLae = 0;                     // Pin-Länge bei Eingabe

var PinState = false ;              // Eingabestatus - Eingabe beginnt nach Taste '#' und wird mit Taste '#' abgeschlossen
var PinFehl =false;                 // Statusflag für fehlerhafte Eingabe
var PinAnz = "";                    // Angezeiger 'Displaytext' z.B. ****
var PinAnzStat = 0;                 // Status der PinAnzeige im Display (0-Ruhe | 1-Start [grau] | 2-richtig [gruen] | 3-falsch [rot])

var PinSoll = 1111;                 // Pin die zur Deaktivierung der Alarmanlage benötigt wird

// -----------------------------------------------------------------------------
// Variablen für Alarmstatus
// -----------------------------------------------------------------------------
var logging = true;


// -----------------------------------------------------------------------------
// Objekte
// -----------------------------------------------------------------------------

// Objekte für Pin-Eingabe
createState(pfad0 + 'PinSelect', "" , {name: 'Pin-Eingabe'});
createState(pfad0 + 'Pin', '0000' ,  {name: 'Pin'});
createState(pfad0 + 'PinFehler', false ,  {name: 'Pin-Fehler'});
createState(pfad0 + 'PinAnzStat', 0 ,  {name: 'PinAnzeigeStatus'});
createState(pfad0 + 'PinAnz', '' ,  {name: 'Pin-Anzeige'});
createState(pfad0 + 'PinReturn', '' ,  {name: 'Pin-ReturnTaste'});

// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$



// #############################################################################
// #                                                                           #
// #  Pin-Abfrage                                                              #
// #                                                                           #
// #############################################################################


on((instanz + pfad0 + 'PinSelect'), function (dp) {
    if (dp.newState.val === 0 || dp.newState.val === 1 || dp.newState.val === 2 || dp.newState.val === 3 || dp.newState.val === 4 || dp.newState.val === 5 || dp.newState.val === 6 || dp.newState.val === 7 || dp.newState.val === 8 || dp.newState.val === 9) {
        PinTast = dp.newState.val;
        PinEingabe();
    } 
    if (dp.newState.val === 'E') {
        PinPruef();
    }     
    if (dp.newState.val === 'R') {
        PinReset(); 
    }     
});


function PinEingabe () {
    PinTemp = (PinTemp + PinTast);
    PinAnz = (PinAnz + '*');
    setState(pfad0 + 'PinAnz',PinAnz);
    PinLae = (PinLae +1) ;
}


function unscharf(){
    setState(pfad0 + 'PinAnzStat', PinAnzStat);
    setState(pfad0 + 'PinReturn', PinReturn);
///////////////////////////////////////////////////// Hier musst du dann deinen Türöffner auf machen reinschreiben   
}


function PinPruef() {
    if (PinTemp == PinSoll) {
        if(logging) log('PinEingabe erfolgreich');
        PinAnzStat = 2;
        PinReturn = 3;
        unscharf();
       
        setTimeout(function() {
           
            PinReset();
        }, 5 * 1000);

    } else {
        if(logging) log('PinEingabe Fehler');
        PinReset();
    }
}   

function PinReset() {
        PinReturn = 0;
        PinLae=0;
        PinAnzStat=0;
        PinAnz="";
        PinTemp="";
        setState(pfad0 + 'PinAnz', PinReturn);
        setState(pfad0 + 'PinAnzStat', PinAnzStat);
        setState(pfad0 + 'PinAnz', PinAnz);
        setState(pfad0 + 'PinReturn', PinReturn);     
}


Bei unscharf musst du dann deine auszulösende Aktion reinschreiben ala' "Tür Auf!"

Gruß
Steffen

_________________
Gruß
Steffen


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 12 Beiträge ] 

Alle Zeiten sind UTC+01:00


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu Forum:  
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de