txt_original txt_search txt_switch path_pre function search_room value array_long objID term term_old objID_sum term_sum ObjectID name_active count_devices show_rooms functions path_rooms_all path_rooms_active path_active path_devices_all path_incative bool limit part1 txt_result part2 datapoint list_rooms count_rooms list_devices txt_search_length list_rooms_short position active_sum_all devices_sum_all i location inactive_sum_all list_devices_txt count count_rooms_counter j path_inactive k count_rooms_active_counter list_rooms_active_short name_inactive name_all name_rooms_all name_rooms_active >>> DP für Gerätesumme anlegen count_devices TRUE >>> Räume nutzen ??? count_rooms TRUE show_rooms count_rooms >>> Funktion function Rollläden functions state[id=*](functions=shutters) >>> Speicherort unter 0_userdata. einstellen location 0_userdata.0. devices >>> boolean ja/nein bool FALSE >>> Wenn nicht boolean dann Schwellwert erfassen limit 25 Ab hier nichts mehr ändern path_pre location . function path_active path_pre .devices_active path_inactive path_pre .devices_inactive path_devices_all path_pre .devices_all path_rooms_all path_pre .rooms_all path_rooms_active path_pre .rooms_active name_active function (aktiv) name_inactive function (inaktiv) name_all function (gesamt) name_rooms_all Räume mit function (gesamt) name_rooms_active Räume mit function (aktiv) path_active name_active path_inactive name_inactive count_devices path_devices_all name_all count_rooms path_rooms_all name_rooms_all path_rooms_active name_rooms_active name_active count_devices show_rooms path_pre function functions path_rooms_all path_rooms_active path_active path_devices_all path_inactive bool limit ne default functions name_active count_devices show_rooms path_pre function functions path_rooms_all path_rooms_active path_active path_devices_all path_inactive bool limit changeText Entferne Sonderzeichen part1 part2 txt_result txt_original txt_search_length abc txt_search position FIRST txt_result %0D%0A txt_search WHILE GT position 0 Wenn nicht erste Zeichen im Text! GT position 1 part1 FIRST FROM_START txt_result MINUS 1 position 1 part2 FROM_START LAST txt_result ADD 1 position 0 txt_search_length txt_result part1 txt_switch part2 position FIRST txt_result %0D%0A txt_search txt_result write_datapoint Liefere Ergebnis Zustand je Raum Entferne Sonderzeichen datapoint search_room ä ae datapoint txt_result ö oe datapoint txt_result ü ue datapoint txt_result ß ss datapoint txt_result _ objID path_pre . datapoint objID txt_result function - search_room true FALSE Object ID objID TRUE value 0 remove bGV0IGFycmF5X3Nob3J0ID0gQXJyYXkuZnJvbShuZXcgU2V0KGFycmF5X2xvbmcpKTsNCnJldHVybiBhcnJheV9zaG9ydDs= Entfernen von Duplikaten aus Liste create_dp_boolean aWYgKCFleGlzdHNPYmplY3Qob2JqSUQpKSB7DQpjcmVhdGVTdGF0ZShvYmpJRCwgZmFsc2UsIHsNCiAgcmVhZDogdHJ1ZSwgDQogIHdyaXRlOiB0cnVlLCANCiAgbmFtZTogdGVybV9vbGQsIA0KICB0eXBlOiAiYm9vbGVhbiIsIA0KICBkZWY6IGZhbHNlDQp9KTsNCiBhd2FpdCB3YWl0KDEwMDApOw0KfQ== Erstelle DP je Raum create_dp_number_sum aWYgKCFleGlzdHNPYmplY3Qob2JqSURfc3VtKSkgew0KY3JlYXRlU3RhdGUob2JqSURfc3VtLCAwLCB7DQogICAgdHlwZTogJ251bWJlcicsIA0KICAgIHJlYWQ6IHRydWUsIA0KICAgIHdyaXRlOiB0cnVlLA0KICAgIG5hbWU6IHRlcm1fc3VtDQp9KTsNCiBhd2FpdCB3YWl0KDEwMDApOw0KfQ0K Erstelle DP für aktive Geräte rooms_extract bGV0IHJvb20gPSBnZXRPYmplY3QoT2JqZWN0SUQsICdyb29tcycpLmVudW1OYW1lc1swXTsgaWYodHlwZW9mIHJvb20gPT0gJ3N0cmluZycpIHJldHVybiByb29tOyByZXR1cm4gcm9vbS5kZTs= Finde Raumname script Script log Licht geschalten name_active list_rooms list_devices list_rooms_short active_sum_all 0 count_devices devices_sum_all 0 i functions show_rooms INSERT LAST list_rooms i count_devices devices_sum_all 1 bool val i INSERT LAST list_devices i active_sum_all 1 GTE val i limit INSERT LAST list_devices i active_sum_all 1 count_devices devices_sum_all 1 bool val i active_sum_all 1 GTE val Object ID i limit active_sum_all 1 inactive_sum_all MINUS 1 devices_sum_all 1 active_sum_all log test active_sum_all show_rooms list_devices_txt list_devices count 0 j list_rooms count 1 search_room GET FROM_START list_rooms count GT FIRST list_devices_txt abc search_room 0 path_pre function search_room TRUE path_pre function search_room FALSE count_rooms count_rooms_counter 0 list_rooms list_rooms_short list_rooms k list_rooms_short count_rooms_counter 1 true FALSE Object ID path_rooms_all TRUE count_rooms_counter 0 count_rooms_active_counter 0 list_devices list_rooms_active_short list_devices k list_rooms_active_short count_rooms_active_counter 1 true FALSE Object ID path_rooms_active TRUE count_rooms_active_counter 0 true FALSE Object ID path_active TRUE active_sum_all 0 true FALSE Object ID path_inactive TRUE inactive_sum_all 0 count_devices true FALSE Object ID path_devices_all TRUE devices_sum_all 0