So. Das Problem ist nun gelöst.
on({id: 'mqtt.0.domoticz.in', change: "any"}, function (obj) {
var NFC;
//der try ist wichtig, dass der adapter nicht abschmiert bei einem Fehler. Hiermit parsen wir die json in ein object
try {obj = JSON.parse(getState('mqtt.0.domoticz.in').val);
} catch (e) {
console.error('Cannot parse: ' + getState('mqtt.0.domoticz.in').val);
return;
}
log(obj.svalue);
NFC = obj.svalue;
if ( NFC === "xxxx47091" || NFC === "xxxx076275" || NFC === "xxxx880515" || NFC === "xxxx213571" || NFC === "xxxx486467" || NFC === "xxxx713987" || NFC === "xxxx057774" ) {
setState("hm-rpc.2.000218A9916FDA.3.STATE", true);//schaltet Aktor ein
log("Einschalten ausgeführt");
setStateDelayed("hm-rpc.2.000218A9916FDA.3.STATE", false, 2000, true);//schaltet Aktor in 1 Sekunde aus und aktiviert Planung für nächste Aktivierung
log("Ausschalten ausgeführt");
}
});