@Fozi
that’s how I solved it
Program on CCU
var sec=dom.GetObject("Verschlussensoren");
string i;
string list;
string seit;
string itemName;
string status_new;
string stunde=system.Date("%H").ToInteger();
string minute=system.Date("%M").ToInteger();
string textReplace = "Kontakt";
list="";
integer textReplaceLength = textReplace.Length();
foreach(i,sec.EnumUsedIDs()) {
var item=dom.GetObject(i);
var dev=dom.GetObject(item.Device());
if((dev.HssType()=="HM-Sec-RHS") ||
(dev.HssType()=="HM-Sec-SC") ||
(dev.HssType()=="HM-Sec-SC-2")||
(dev.HssType()=="HM-Sec-RHS-2")||
(dev.HssType()=="HM-Sec-SCo")) {
var status = item.DPByHssDP("STATE").Value();
if(status.Value()) {
if (status == 1 ) { status_new = "gekippt"; }
if (status == 2 ) { status_new = "offen"; }
itemName=dev.Name();
if(itemName.Length() >= textReplaceLength){
itemName = itemName.Substr(textReplaceLength, itemName.Length() - textReplaceLength);
}
list=list # itemName #",";
}
}
}
if(list.Length() < 5){
list=" kein Fenster ";
}
WriteLine(list);
dom.GetObject("offene Fenster").State(list);
settings MMM-ioBroker
// iobroker offene Fenster / brennende Lampen
{
disabled: false,
module: 'MMM-ioBroker',
position: 'top_right',
config: {
host: 'localhost',
port: '8082',
https: false,
devices: [
{ name: 'offene Fenster:',
deviceStates: [
{ id: 'hm-rega.0.3102', icon: '', suffix: '' },
]
},
{ name: 'brennende Lampen:',
deviceStates: [
{ id: 'hm-rega.0.9048', icon: '', suffix: '' },
]
}
]
}
},