"Statuscode", "ReadAddress" => array("\x01","\xf1") , "Abfrage" =>"cont","Icon" => "Talk", "Type" => "STATUS"), array("Titel" => "Modus", "ReadAddress" => array("\x01","\x2c") ,"Abfrage" =>"cont", "Profil" => "Modus", "Type" => "INT", "Min" => 0 , "Max" => 3), // In welchem Modus läuft der Automower //----------------------------- // Batteriefunktinoen //----------------------------- array("Titel" => "Batterietemperatur", "ReadAddress" => array("\x02","\x33") ,"Abfrage" =>"cont", "Profil" => "Temperatur","Icon" => "Temperature","Unit" => "°C", "DIGITS" => 1, "Type" => "FLOAT", "Min" => 0 , "Max" => 60), // Battery temp. [°C] array("Titel" => "Batteriespannung_1", "ReadAddress" => array("\x2e","\xfe") ,"Abfrage" =>"cont", "Profil" => "Volt","Icon" => "Battery","Unit" => "V", "DIGITS" => 2, "Type" => "FLOAT", "Min" => 15, "Max" => 25, "Math" => "/1000"), // Battery voltage current compensated [mV] array("Titel" => "Batteriespannung_2", "ReadAddress" => array("\x2e","\xf4") ,"Abfrage" =>"cont", "Profil" => "Volt","Icon" => "Battery","Unit" => "V", "DIGITS" => 2, "Type" => "FLOAT", "Min" => 15, "Max" => 25, "Math" => "/1000"), // Battery voltage [mV] array("Titel" => "Batterietemp_laden", "ReadAddress" => array("\x02","\x35") ,"Abfrage" =>"cont", "Profil" => "Temperatur","Icon" => "Temperature","Unit" => "°C", "DIGITS" => 1, "Type" => "FLOAT", "Min" => 0 , "Max" => 60), // "R_AKKU-TEMPERATUR-LADEN" {set hexin "0F02350000"} // "R_AKKU-LETZTER-LADEVORGANG_MIN" {set hexin "0F02350000"} array("Titel" => "naechste_Temp_Messung","ReadAddress" => array("\x02","\x36") ,"Abfrage" =>"cont", "Profil" => "Zeit","Icon" => "Clock","Unit" => "min.", "Type" => "INT","Min" => -100000 , "Max" =>100000),// "R_AKKU-NAECHSTE_TEMPERATURMESSUNG_SEK" {set hexin "0F02360000"} // Batterieleistung ist nötig, um die Kapazität in % zu berechnen. Daher immer abfragen array("Titel" => "Batterieleistung", "ReadAddress" => array("\x2e","\xe0") ,"Abfrage" =>"cont", "Profil" => "Ampher","Icon" => "Electricity","Unit" => "Ah", "DIGITS" => 2, "Type" => "FLOAT", "Min" => 0 , "Max" => 3, "Math" => "/1000"), // Used battery amount [mAh] //----------------------------- // Stromverbrauch //----------------------------- array("Titel" => "Stromfluss", "ReadAddress" => array("\x01","\xeb") ,"Abfrage" =>"cont", "Profil" => "Ampher","Icon" => "Electricity","Unit" => "Ah", "DIGITS" => 2, "Type" => "FLOAT", "Min" => -50 , "Max" => 50, "Math" => "/1000"), // Current [mA] gibt den Verbrauch durch den Mäher an bzw. mit wieviel Strom er geladen wird array("Titel" => "Akku_Kapazitaet_Suchstart", "ReadAddress" => array("\x01","\xef") ,"Abfrage" =>"cont", "Profil" => "Ampher","Icon" => "Electricity","Unit" => "Ah", "DIGITS" => 2, "Type" => "FLOAT", "Min" => 0 , "Max" => 3, "Math" => "/1000"), // Akku Kapazität beim Begin der Suche nach der Ladestation / Charging battery ammount? array("Titel" => "Akku_Kapazitaet_Suchstart2", "ReadAddress" => array("\x01","\xf0") ,"Abfrage" =>"cont", "Profil" => "Ampher","Icon" => "Electricity","Unit" => "Ah", "DIGITS" => 2, "Type" => "FLOAT", "Min" => 0 , "Max" => 3, "Math" => "/1000"), // Akku Kapazität beim Begin der Suche nach der Ladestation / Charging amount left when starting search [mAh] array("Titel" => "Stromverbrauch_Maehwerk", "ReadAddress" => array("\x02","\x2d") ,"Abfrage" =>"cont", "Profil" => "Ampher","Icon" => "Electricity","Unit" => "Ah", "DIGITS" => 2, "Type" => "FLOAT", "Min" => -50 , "Max" => 50, "Math" => "/1000"), //Blade motor currency consumption [??] // --------------------------- // Mähwerk und Motoren //---------------------------- array("Titel" => "Drehzahl_Maehwerk", "ReadAddress" => array("\x2e","\xea") ,"Abfrage" => "cont","Profil" => "Drehzahl","Icon" >= "TurnRight", "Unit" => "rpm","Type" => "INT", "Min" => 0, "Max" => 10000 ), // Drehzahl des Mähwerks Blade motor speed [rpm] array("Titel" => "Drehzahl_Messer", "ReadAddress" => array("\x02","\x2c") ,"Abfrage" => "cont","Profil" => "Drehzahl","Icon" >= "TurnRight", "Unit" => "rpm","Type" => "INT", "Min" => 0, "Max" => 10000 ), // Drehzahl des Messers Cutting speed [time/puls] // Die Werte gehen wohl nie unter 6 und springen alle paar Stunden auf über 1000, wenn der Mower sich nicht bewegt array("Titel" => "Geschwindigkeit_rechts", "ReadAddress" => array("\x24","\xbf") ,"Abfrage" => "cont","Profil" => "Drehzahl","Icon" >= "TurnRight", "Unit" => "rpm","Type" => "INT", "Min" => 6, "Max" => 50, "Korrektur" => -6), // "R_GESCHWINDIGKEIT-RECHTS" {set hexin "0F24BF0000"} array("Titel" => "Geschwindigkeit_links", "ReadAddress" => array("\x24","\xc0") ,"Abfrage" => "cont","Profil" => "Drehzahl","Icon" >= "TurnRight", "Unit" => "rpm","Type" => "INT", "Min" => 6, "Max" => 50, "Korrektur" => -6), // "R_GESCHWINDIGKEIT-LINKS" {set hexin "0F24C00000"} //--------------------------- // Zeitangaben //--------------------------- array("Titel" => "letzte_Ladezeit", "ReadAddress" => array("\x01","\xec") ,"Abfrage" =>"cont", "Profil" => "Zeit","Icon" => "Clock","Unit" => "min.", "Type" => "INT", "Min" => 0 , "Max" =>10000), // Charging time [min] array("Titel" => "letzte_Maehzeit", "ReadAddress" => array("\x00","\x56") ,"Abfrage" =>"cont", "Profil" => "Zeit","Icon" => "Clock", "Unit" => "min.", "Type" => "INT", "Min" => 0 , "Max" =>60), //..... array("Titel" => "Maehzeit", "ReadAddress" => array("\x00","\x38") ,"Abfrage" =>"cont", "Profil" => "Zeit","Icon" => "Clock", "Unit" => "min.", "Type" => "INT", "Min" => 0 , "Max" =>60), // "R_MAEHZEIT" {set hexin "0F00380000"} //------------------------------------- // Angaben zu den Timer Einstellungen //------------------------------------- array("Titel" => "Timer1_Start", "ReadAddress" => array("\x4a","\x38") , "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer1_Stop", "ReadAddress" => array("\x4a","\x3a") , "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer2_Start", "ReadAddress" => array("\x4a","\x40") , "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer2_Stop", "ReadAddress" => array("\x4a","\x42") , "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer1_FrSo_Start","ReadAddress" => array("\x4a","\x3c"), "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer1_FrSo_Stop", "ReadAddress" => array("\x4a","\x3e"), "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer2_FrSo_Start","ReadAddress" => array("\x4a","\x44"), "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "Timer2_FrSo_Stop", "ReadAddress" => array("\x4a","\x46"), "Type" => "TIMER","Profil" => "Timer_Zeit","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once", "Script" => "Mower_Timerzeit"), array("Titel" => "R_TIMER_TAGE", "ReadAddress" => array("\x4a","\x50"), "Type" => "FLOAT","Kategorie" =>"TimerKat","Icon" => "Clock","Abfrage" =>"once"),// "R_TIMER-TAGE" {set hexin "0F4A500000"} //------------------------------------------------------------------------------------------------------------------------------------------------ // Diverse Statusangaben //------------------------------------------------------------------------------------------------------------------------------------------------ array("Titel" => "Schleifensignal", "ReadAddress" => array("\x01","\xb9") ,"Abfrage" =>"cont", "Profil" => "Prozent","Icon" => "Intensity", "Unit" => "%", "Type" => "INT", "Min" => 0 , "Max" => 500, "Math"=> "/5" ), // Loop Quality signal (max 500) //------------------------------------------------------------------------------------------------------------------------------------------------- // Unklare Variabeln // Sinn dieser Variabeln nicht klar. Siehe auch Kommentare //------------------------------------------------------------------------------------------------------------------------------------------------- // Unter Werkseinstellungen steht bei mir 50. Mal wird dieser Wert angezeigt, mal nicht array("Titel" => "Viereckmodus_Prozent","ReadAddress" => array("\x01","\x34") ,"Abfrage" =>"once", "Type" => "INT" ), // 1 if average calculating is ready array("Titel" => "Viereckmodus_Status", "ReadAddress" => array("\x01","\x38") ,"Abfrage" =>"cont", "Min" => 0 , "Max" =>100000, "Type" => "INT" ), // Zählt von 6800 runter ... Long average blade motor currency [??] array("Titel" => "Viereckmodus_Status_1", "ReadAddress" => array("\x01","\x37") ,"Abfrage" =>"cont","Min" => -100000 , "Max" =>100000, "Type" => "INT" ), //01db Front loop sensor A0 array("Titel" => "Schleifensonsor_vorne", "ReadAddress" => array("\x01","\xdb") ,"Abfrage" =>"cont","Min" => -100000 , "Max" =>100000, "Type" => "INT" ), // 01dc Rear loop sensor A0 array("Titel" => "Schleifensonsor_hinten", "ReadAddress" => array("\x01","\xdc") ,"Abfrage" =>"cont","Min" => -100000 , "Max" =>100000, "Type" => "INT" ), // Time since charging [min] Hat zeitweise verrückte Werte bis zu 23.xxx hoch. Warum nicht klar. Zählt sonst die Zeit seit dem letzten abgeschlossenen Ladevorgang array("Titel" => "zuletzt_geladen_vor","ReadAddress" => array("\x02","\x34") ,"Abfrage" =>"cont", "Profil" => "Zeit","Icon" => "Clock","Unit" => "min.", "Type" => "INT", "Min" => 0 , "Max" => 50000), // 0 = aus 1 = an. Die Abfrage ergibt aber immer gleichen Wert array("Titel" => "Status_Software_Stop", "ReadAddress" => array("\x46","\x78") ,"Abfrage" =>"once", "Type" => "INT", "Profil" => "AusAn"), // Die Abfrage ergibt aber immer den Wert 0 array("Titel" => "Timerstatus", "ReadAddress" => array("\x4a","\x4e"), "Type" => "INT","Kategorie" =>"TimerKat","Abfrage" =>"once"), // "R_TIMERSTATUS" {set hexin "0F4A4E0000"} //----------------------------------------------------------------------------------------------------------------------------------------------------------- // Variabeln ohne Abfrage, diese dürfen nicht auskommentiert werden // ----------------------------------------------------------------------------------------------------------------------------------------------------------- array("Titel" => "Aktualisiert", "ReadAddress" => array("","") , "Abfrage" =>"no", "Icon" => "Clock", "Type" => "STRING"), array("Titel" => "Socketstatus", "ReadAddress" => array("","") , "Abfrage" =>"no", "Icon" => "Information", "Type" => "STRING"), array("Titel" => "ErrorCounter", "ReadAddress" => array("","") , "Abfrage" =>"no","Profil" => "Fehler","Unit" => "ERR","Icon" => "Warning", "Type" => "INT"), array("Titel" => "Maehe", "ReadAddress" => array("","") , "Abfrage" =>"no","Profil" => "AusAn","Icon" => "Motion", "Type" => "INT"), array("Titel" => "Warte_nach_Regen", "ReadAddress" => array("","") ,"Abfrage" =>"no","Type" => "STRING"), array("Titel" => "Ladestatus_Batterie", "ReadAddress" => array("","") , "Abfrage" =>"no","Profil" => "Prozent","Icon" => "Battery", "Unit" => "%", "Type" => "INT") ); //############################################################################################################################################################# // AB HIER NICHTS MEHR ÄNDERN //############################################################################################################################################################# // Ermittel die Script ID und RootID $ScripteID= IPS_GetParent($_IPS['SELF']); $rootCategoryID = IPS_GetParent($ScripteID); // Ermittel Betriebsdaten ID, welche im Install Script angelegt wurden $BetriebsdatenID = @IPS_GetObjectIDByIdent($VarIdentPrefix."BetriebsdatenKat", $rootCategoryID); // Ermitteln Einstellungen $EinstellungenID = @IPS_GetObjectIDByIdent($VarIdentPrefix."EinstellungenKat", $rootCategoryID); // Ermitteln Timer Kat. $TimerKatID = @IPS_GetObjectIDByIdent($VarIdentPrefix."TimerKat", $EinstellungenID); // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Namen der Scripte // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Ermittel alle Script ID's $ScripteNamen = array( array("Name" => "Mower_Abfrage_Betriebsdaten", "Hide" => false), array("Name" => "Mower_Install_Script", "Hide" => True), array("Name" => "Mower_Auswertung", "Hide" => True), array("Name" => "Mower_Variabeln", "Hide" => True), array("Name" => "Mower_Abfrage_Einstellungen", "Hide" => false), array("Name" => "Mower_Timerzeit", "Hide" => True), array("Name" => "Mower_Berechnungen", "Hide" => True), array("Name" => "Mower_programmieren", "Hide" => True), array("Name" => "Mower_Set_Variable", "Hide" => True), array("Name" => "Mower_Tastatur", "Hide" => True), array("Name" => "Mower_Install_Script_App-Interface","Hide" => True), array("Name" => "Mower_Set_Saison", "Hide" => True) ); $ScriptID = array(); // Ermittel die ID Nummern aller Scripte foreach($ScripteNamen as $data) { // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Prüfe, ob die ID ggf schon angelegt wurde // ------------------------------------------------------------------------------------------------------------------------------------------------------ $ScriptID[$data["Name"]] = @IPS_GetScriptIDByName($data["Name"], $ScripteID); } // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Tastaturcodes // ------------------------------------------------------------------------------------------------------------------------------------------------------ $TastaturArray = array( "0" => "\x0f\x80\x5f\x00\x00", "1" => "\x0f\x80\x5f\x00\x01", "2" => "\x0f\x80\x5f\x00\x02", "3" => "\x0f\x80\x5f\x00\x03", "4" => "\x0f\x80\x5f\x00\x04", "5" => "\x0f\x80\x5f\x00\x05", "6" => "\x0f\x80\x5f\x00\x06", "7" => "\x0f\x80\x5f\x00\x07", "8" => "\x0f\x80\x5f\x00\x08", "9" => "\x0f\x80\x5f\x00\x09", "Prog_A" => "\x0f\x80\x5f\x00\x0a", "Prog_B" => "\x0f\x80\x5f\x00\x0b", "Prog_C" => "\x0f\x80\x5f\x00\x0c", "Home" => "\x0f\x80\x5f\x00\x0d", "ManAuto" => "\x0f\x80\x5f\x00\x0e", "C" => "\x0f\x80\x5f\x00\x0f", "Up" => "\x0f\x80\x5f\x00\x10", "Down" => "\x0f\x80\x5f\x00\x11", "Yes" => "\x0f\x80\x5f\x00\x12" ); // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Ablaufscripte // Die Tastaturangaben werden nach einander ausgeführt. Bei allen Werten, welche [] gekennzeichnet sind, wird die entsprechende Variable ausgelesen // und die Daten als Tastatureingaben durchgeführt, wenn diese die Werte 0-9 haben. Alle anderen Zeichen werden ignoriert. // Am Anfang immer am besten mehrfach C = Cancel, damit sichergestellt ist, das man wirklich in der ersten Maske der Tastatur ist // sonst gibt es unverhergesehene Eingaben und Einstellungen. // ------------------------------------------------------------------------------------------------------------------------------------------------------ $ScriptArray = array( "Tagestimer" => array("0","C","C","C","2","2","2","[Timer1_Start]","Yes","3","[Timer1_Stop]","Yes","4","[Timer2_Start]","Yes","5","[Timer2_Stop]","Yes","0"), "Wochenendtimer" => array("0","C","C","C","2","4","2","[Timer1_FrSo_Start]","Yes","3","[Timer1_FrSo_Stop]","Yes","4","[Timer2_FrSo_Start]","Yes","5","[Timer2_FrSo_Stop]","Yes","0") ); // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Statusmeldungen // ------------------------------------------------------------------------------------------------------------------------------------------------------ $statusArray = array( array("Value" => 6, "Maehe" => 0, "Type" => "ALERT", "Text" => "Rad links blockiert"), array("Value" => 10, "Maehe" => 0, "Type" => "ALERT", "Text" => "Befinde mich außerhalb"), array("Value" => 12, "Maehe" => 0, "Type" => "ALERT", "Text" => "Kein Schleifensignal"), array("Value" => 16, "Maehe" => 0, "Type" => "ALERT", "Text" => "Befinde mich außerhalb"), array("Value" => 18, "Maehe" => 0, "Type" => "ALERT", "Text" => "Niedrige Batteriespannung"), array("Value" => 26, "Maehe" => 0, "Type" => "ALERT", "Text" => "in Ladestation blockiert"), array("Value" => 28, "Maehe" => 0, "Type" => "ALERT", "Text" => "Manuelles Laden erforderlich"), array("Value" => 30, "Maehe" => 0, "Type" => "ALERT", "Text" => "Messer blockiert"), array("Value" => 34, "Maehe" => 0, "Type" => "ALERT", "Text" => "Mäher hochgehoben"), array("Value" => 52, "Maehe" => 0, "Type" => "ALERT", "Text" => "Kein Kontakt in Ladestation"), array("Value" => 54, "Maehe" => 0, "Type" => "ALERT", "Text" => "PIN abgelaufen" , "RenewPIN" => true), array("Value" => 1000, "Maehe" => 0, "Type" => "WORKING", "Text" => "Ladestation verlassen"), array("Value" => 1002, "Maehe" => 1, "Type" => "WORKING", "Text" => "Mähen"), array("Value" => 1006, "Maehe" => 0, "Type" => "WORKING", "Text" => "Mähwerk starten"), array("Value" => 1008, "Maehe" => 1, "Type" => "WORKING", "Text" => "Mähwerk gestartet"), array("Value" => 1012, "Maehe" => 0, "Type" => "WORKING", "Text" => "Signal starte Mähwerk"), array("Value" => 1014, "Maehe" => 0, "Type" => "WAITING", "Text" => "In Ladestation ladend"), array("Value" => 1016, "Maehe" => 0, "Type" => "WAITING", "Text" => "In Ladestation wartend"), array("Value" => 1024, "Maehe" => 0, "Type" => "WORKING", "Text" => "Aus Ladestation ausfahren"), array("Value" => 1036, "Maehe" => 1, "Type" => "WORKING", "Text" => "Viereckmodus"), array("Value" => 1038, "Maehe" => 0, "Type" => "ALERT", "Text" => "Festgefahren"), array("Value" => 1040, "Maehe" => 1, "Type" => "WORKING", "Text" => "Kollission / Schleife erreicht"), array("Value" => 1042, "Maehe" => 0, "Type" => "WORKING", "Text" => "Suche Ladestation"), array("Value" => 1044, "Maehe" => 0, "Type" => "WAITING", "Text" => "Stop"), array("Value" => 1048, "Maehe" => 0, "Type" => "WORKING", "Text" => "Andocken"), array("Value" => 1050, "Maehe" => 0, "Type" => "WORKING", "Text" => "Aus Ladestation fahren"), array("Value" => 1052, "Maehe" => 0, "Type" => "WAITING", "Text" => "Bitte Yes drücken"), array("Value" => 1056, "Maehe" => 0, "Type" => "WAITING", "Text" => "Wartend (Manuell/Home)"), array("Value" => 1058, "Maehe" => 0, "Type" => "WORKING", "Text" => "Bregrenzung folgend"), array("Value" => 1060, "Maehe" => 0, "Type" => "WORKING", "Text" => "N-Signal gefunden"), array("Value" => 1062, "Maehe" => 0, "Type" => "WORKING", "Text" => "Folge Schleife zur L/S"), array("Value" => 1064, "Maehe" => 0, "Type" => "WORKING", "Text" => "Suche Ladestation"), array("Value" => 1070, "Maehe" => 0, "Type" => "WORKING", "Text" => "Suchschleife folgen"), array("Value" => 1072, "Maehe" => 0, "Type" => "WORKING", "Text" => "Schleife folgen") ); // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Diverse Einstellungen // ------------------------------------------------------------------------------------------------------------------------------------------------------ $EinstellungenArray = array( array("Titel" => "Modus_soll", "Profil" => "Modus", "Script" => "Mower_Auswertung", "SetupWert" =>"1"), array("Titel" => "Tastatur", "Profil" => "Tastatur", "Script" => "Mower_Tastatur"), array("Titel" => "App_Push", "Profil" => "~Switch", "Type" => "BOOLEAN" , "Script" => "Mower_Tastatur", "Script" => "Mower_Set_Variable","SetupWert" => "1"), array("Titel" => "WebKonfig_Push", "Profil" => "~Switch", "Type" => "BOOLEAN" , "Script" => "Mower_Tastatur", "Script" => "Mower_Set_Variable","SetupWert" => "1"), array("Titel" => "PIN", "Type" => "PIN", "SetupWert" => "0000","Script" => "Mower_Set_Variable"), array("Titel" => "Abfrage_Timer", "Type" => "INT", "Profil" => "Timer","SetupWert" => "30","Script" => "Mower_Set_Variable"), array("Titel" => "min_Maehtemperatur","Type" => "INT", "Profil" => "Temperatur_Setup","SetupWert" =>"12", "Script" => "Mower_Set_Variable"), array("Titel" => "Wartezeit_nach_Regen","Type" => "INT", "Profil" => "Wartezeit","SetupWert" =>"10", "Script" => "Mower_Set_Variable") ); $TimerArray = array( array("Titel" => "Timer_anaus", "Type" => "INT", "Profil" => "AusAn", "Icon" => "Clock","Script" => "Mower_Auswertung"), array("Titel" => "Programmieren", "Type" => "INT", "Profil" => "Programmieren", "Icon" => "Clock","Script" => "Mower_programmieren") ); $RootCategoryArray = array( array("Titel" => "Saison", "Type" => "INT", "Profil" => "Saison", "Script" => "Mower_Set_Saison", "SetupWert" =>"0","Linkunsichtbar" => false) ); // Falls Aufruf vom Install, dann beende Script ab hier. if (isset($Install)) if ($Install == True) return; // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Ermittel die ID's von diversen Variabeln // ------------------------------------------------------------------------------------------------------------------------------------------------------ $DoInstall = ""; // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Variabeln ermitteln und ggf. anlegen, falls noch nicht vorhanden // ------------------------------------------------------------------------------------------------------------------------------------------------------ // Speicher hier später die ID Nummer der Variabel $Variabeln= array(); foreach($dataArray as $data) { if (isset($data['Kategorie'])) { switch ($data['Kategorie']) { case "TimerKat": $kat = $TimerKatID; break; default: $kat = $BetriebdatenID; } } ELSE $kat = $BetriebsdatenID; // Prüfe, ob die ID ggf schon angelegt wurde $VariablenID = @IPS_GetObjectIDByIdent($VarIdentPrefix.$data["Titel"], $kat); // Wenn diese nicht existiert, dann geben Fehler aus if ($VariablenID === false) { IPS_LogMessage($skriptName,$data["Titel"]." - Nicht alle Variabeln angelegt. Bitte rufen Sie das Installscript auf."); return; } // Speichere VariabelnID $Variabeln[$data["Titel"]] = $VariablenID; } foreach($TimerArray as $data) { // Prüfe, ob die ID ggf schon angelegt wurde $VariablenID = @IPS_GetObjectIDByIdent($VarIdentPrefix.$data["Titel"], $TimerKatID); // Wenn diese nicht existiert, dann geben Fehler aus if ($VariablenID === false) { IPS_LogMessage($skriptName,$data["Titel"]." - Nicht alle Variabeln angelegt. Bitte rufen Sie das Installscript auf."); return; } // Speichere VariabelnID $Variabeln[$data["Titel"]] = $VariablenID; } foreach($EinstellungenArray as $data) { // Prüfe, ob die ID ggf schon angelegt wurde $VariablenID = @IPS_GetObjectIDByIdent($VarIdentPrefix.$data["Titel"], $EinstellungenID); // Wenn diese nicht existiert, dann geben Fehler aus if ($VariablenID === false) { IPS_LogMessage($skriptName,$data["Titel"]." - Nicht alle Variabeln angelegt. Bitte rufen Sie das Installscript auf."); return; } // Speichere VariabelnID $Variabeln[$data["Titel"]] = $VariablenID; } foreach($RootCategoryArray as $data) { // Prüfe, ob die ID ggf schon angelegt wurde $VariablenID = @IPS_GetObjectIDByIdent($VarIdentPrefix.$data["Titel"], $rootCategoryID); // Wenn diese nicht existiert, dann geben Fehler aus if ($VariablenID === false) { IPS_LogMessage($skriptName,$data["Titel"]." - Nicht alle Variabeln angelegt. Bitte rufen Sie das Installscript auf."); return; } // Speichere VariabelnID $Variabeln[$data["Titel"]] = $VariablenID; } // Ermittel die Verknüpften Links $VariablenID = @IPS_GetObjectIDByIdent("TTimer_programmieren", $TimerKatID); $Variabeln["TTimer_programmieren"] = $VariablenID; $VariablenID = @IPS_GetObjectIDByIdent("WTimer_programmieren", $TimerKatID); $Variabeln["WTimer_programmieren"] = $VariablenID; //--------------------------------------------------------------------------------------------- // Alle HEX Codes aus dem Internet, welche ich finden konnte. // http://homematic-forum.de/forum/viewtopic.php?f=31&t=7295&start=130 // Danke an alle, welche hier mit Ihren Daten weiter geholfen haben. // Nutzung auf eigenes Risiko. Falsche Codes können die Firmeware und // auch noch mehr des Automowers beschädigen //--------------------------------------------------------------------------------------------- /* "R_STATUS" {set hexin "0F01F10000"} "R_SEKUNDE" {set hexin "0F36B10000"} "R_MINUTE" {set hexin "0F36B30000"} "R_STUNDE" {set hexin "0F36B50000"} "R_TAG" {set hexin "0F36B70000"} "R_MONAT" {set hexin "0F36B90000"} "R_JAHR" {set hexin "0F36BD0000"} *"R_TIMERSTATUS" {set hexin "0F4A4E0000"} TIMER ANGABEN erstes Datenbyte und 2. Datenbyte Bei Std. ergibt dies Std. und Minuten also 8.35 = 0835 oder 1235=12:35 Min. ergibt dies irritierende Werte z.b. dezimal 3908=8:35 oder 3312=12:35 oder 5115=15:22 oder 5419=19:51 dies ist reproduzierbar, nur warum sind die Werte so? * R_WOCHEN-TIMER1-START-STD" {set hexin "0F4A380000"} "R_WOCHEN-TIMER1-START-MIN" {set hexin "0F4A390000"} * R_WOCHEN-TIMER1-STOP-STD" {set hexin "0F4A3A0000"} "R_WOCHEN-TIMER1-STOP-MIN" {set hexin "0F4A3B0000"} * R_WOCHENEND-TIMER1-START-STD" {set hexin "0F4A3C0000"} "R_WOCHENEND-TIMER1-START-MIN" {set hexin "0F4A3D0000"} * R_WOCHENEND-TIMER1-STOP-STD" {set hexin "0F4A3E0000"} "R_WOCHENEND-TIMER1-STOP-MIN" {set hexin "0F4A3F0000"} * R_WOCHEN-TIMER2-START-STD" {set hexin "0F4A400000"} "R_WOCHEN-TIMER2-START-MIN" {set hexin "0F4A410000"} * R_WOCHEN-TIMER2-STOP-STD" {set hexin "0F4A420000"} "R_WOCHEN-TIMER2-STOP-MIN" {set hexin "0F4A430000"} * R_WOCHENEND-TIMER2-START-STD" {set hexin "0F4A440000"} "R_WOCHENEND-TIMER2-START-MIN" {set hexin "0F4A450000"} * R_WOCHENEND-TIMER2-STOP-STD" {set hexin "0F4A460000"} "R_WOCHENEND-TIMER2-STOP-MIN" {set hexin "0F4A470000"} * R_TIMER-TAGE" {set hexin "0F4A500000"} * R_TIMER-STATUS" {set hexin "0F4A4E0000"} " R_WOCHENTIMER-TAGE" {set hexin "0F4A500000"} * R_MAEHZEIT" {set hexin "0F00380000"} * R_VIERECKMODUS-STATUS" {set hexin "0F01380000"} * R_VIERECKMODUS-PROZENT" {set hexin "0F01340000"} * R_VIERECKMODUS-STATUS" {set hexin "0F01370000"} * R_AKKU-LADEZEIT_MIN" {set hexin "0F01EC0000"} * R_AKKU-KAPAZITAET_MA" {set hexin "0F01EB0000"} * R_AKKU-KAPAZITAET_MAH" {set hexin "0F01EF0000"} * R_AKKU-KAPAZITAET-SUCHSTART_MAH" {set hexin "0F01EF0000"} * R_AKKU-KAPAZITAET-GENUTZT_MAH" {set hexin "0F2EE00000"} * R_AKKU-SPANNUNG_MV" {set hexin "0F2EF40000"} * R_AKKU-TEMPERATUR-AKTUELL" {set hexin "0F02330000"} * R_AKKU-TEMPERATUR-LADEN" {set hexin "0F02350000"} * R_AKKU-LETZTER-LADEVORGANG_MIN" {set hexin "0F02350000"} * R_AKKU-NAECHSTE_TEMPERATURMESSUNG_SEK" {set hexin "0F02360000"} * R_GESCHWINDIGKEIT-MESSERMOTOR" {set hexin "0F2EEA0000"} * R_GESCHWINDIGKEIT-RECHTS" {set hexin "0F24BF0000"} * R_GESCHWINDIGKEIT-LINKS" {set hexin "0F24C00000"} "R_FIRMWARE-VERSION" {set hexin "0F33900000"} "R_SPRACHDATEI-VERSION" {set hexin "0F3AC00000"} "W_TIMERAKTIV" {set hexin "0FCA4E0000"} "W_TIMERINAKTIV" {set hexin "0FCA4E0001"} "W_MODE_HOME" {set hexin "0F812C0003"} "W_MODE_MAN" {set hexin "0F812C0000"} "W_MODE_AUTO" {set hexin "0F812C0001"} "W_MODE_DEMO" {set hexin "0F812C0004"} "W_KEY_0" {set hexin "0F805F0000"} "W_KEY_1" {set hexin "0F805F0001"} "W_KEY_2" {set hexin "0F805F0002"} "W_KEY_3" {set hexin "0F805F0003"} "W_KEY_4" {set hexin "0F805F0004"} "W_KEY_5" {set hexin "0F805F0005"} "W_KEY_6" {set hexin "0F805F0006"} "W_KEY_7" {set hexin "0F805F0007"} "W_KEY_8" {set hexin "0F805F0008"} "W_KEY_9" {set hexin "0F805F0009"} "W_PRG_A" {set hexin "0F805F000A"} "W_PRG_B" {set hexin "0F805F000B"} "W_PRG_C" {set hexin "0F805F000C"} "W_KEY_HOME" {set hexin "0F805F000D"} "W_KEY_MANAUTO" {set hexin "0F805F000E"} "W_KEY_C" {set hexin "0F805F000F"} "W_KEY_UP" {set hexin "0F805F0010"} "W_KEY_DOWN" {set hexin "0F805F0011"} "W_KEY_YES" {set hexin "0F805F0012"} //--------------------------------------------------------------------------------------------- // Codes aus dem Internet, welche ich finden konnte. // http://www.razyboard.com/system/morethread-parameter-fuer-automower-g2-corsatimo-197397-6180907-0.html //--------------------------------------------------------------------------------------------- 76 Average calculating number [0-9] 77 Added cutting power 87 Different between left & right [pulses] 177 Akkunennkapazität in mAh 311 Long average blade motor currency [??] 312 1 if average calculating is ready 360 Spannung zur Rückkehr an Basis (Man.-Modus) 361 Spannung zur Rückkehr an Basis (Auto.-Modus) 365 Akkutemperaturgrenze 403 Pulses from left motor (inc. if forward) 404 Pulses from left motor (inc. if forward) 409 Power right 410 Power left 413 Length left motor (inc. if forward) [pulses] 415 Left wheel direction: 1=forward 416 1 if right wheel will go forward 417 1 if forward right wheel 418 1 if left wheel rotate forward 419 Length past wire [pulses] 424 Loop sensor (front&rear) A0 425 Loop sensor A1 426 Loop sensor N7 427 Loop sensor F9 441 Loop Quality signal (max 500) 442 Loop sensor average F9 458 Loop sensor Average (A0) 475 Front loop sensor A0 476 Rear loop sensor A0 491 Current [mA] 492 Charging time [min] 495 Charging battery amount [mAh] 496 Kapazität zur Rückkehr an Basis (Werte werden nicht behalten) 497 Statuscode 556 Cutting speed [time/puls] 557 Blade motor currency consumption [??] 563 Battery temp. [°C] 564 Time since charging [min] 565 Latest temp. (when charging) [°C] 566 Time to next temp. measure [Sec] 569 Charging number [1-10] 579 Reference wheel speed 592 X angle [??] 599 Up side down [??] 624 Blade motor status 637 Return fast 644 1 if more then 30 pulses outside wire (A0) 645 Time mower inside wire (A0) max 100 [ms] 653 Return run without wire 654 Return fast complex 655 Return fast platanos 656 Return wheel 669 Missing puls signal (0 if no error) 4748 Collision sensor[A/D] 4749 Lift sensors [A/D] 4750 Blade motor current [A/D] 4751 Current left [??] 4752 Current right [??] 4812 Stop button [A/D] 7419 Length past wire [cm] 9407 Speed right 9408 Speed left 12000 Used battery amount [mAh] 12010 Blade motor speed [rpm] 12020 /*[Fritzbox\Gäste\Kennwort]*/ Battery voltage [mV] 12030 Battery voltage current compensated [mV] //--------------------------------------------------------------------------------------------- // ich hatte mal ein Excel Blatt gespeichert mit Daten. // Leider kann ich die Quelle nicht mehr finden. //--------------------------------------------------------------------------------------------- Hex Text Modus 0040 Schleifenprüfung 1=an,0=aus 0049 004c Average calculating number [0-9] 004D Added cutting power 0057 Different between left & right [pulses] 005f 0069 010d 012f Software Stop 2=Stop,0=aus 0134 0137 Long average blade motor currency [??] 0138 1 if average calculating is ready 0193 Pulses from left motor (inc. if forward) 0194 Pulses from left motor (inc. if forward) 0199 Power right 019a Power left 019f Left wheel direction: 1=forward 01a0 1 if right wheel will go forward 01a1 1 if forward right wheel 01a2 1 if left wheel rotate forward 01a3 Length past wire [pulses] 01a8 Loop sensor (front&rear) A0 01a9 Loop sensor A1 01aa Loop sensor N7 01ab Loop sensor F9 01ac Loop sensor Average (A0) 01ad Length left motor (inc. if forward) [pulses] 01b8 01b9 Loop Quality signal (max 500) 01ba Loop sensor average F9 01db Front loop sensor A0 01dc Rear loop sensor A0 01e6 01eb Current [mA] 01ec Charging time [min] 01ef Charging battery amount [mAh] 01f0 Charging amount left when starting search [mAh] 01f1 Statuscode 022c Cutting speed [time/puls] 022d Blade motor currency consumption [??] 0233 Battery temp. [°C] 0234 Time since charging [min] 0235 Latest temp. (when charging) [°C] 0236 Time to next temp. measure [Sec] 0239 Charging number [1-10] 0243 Reference wheel speed 0250 X angle 0251 Y angle 0257 Up side down [??] 0270 Blade motor status 027d Return fast 0284 1 if more then 30 pulses outside wire (A0) 0285 Time mower inside wire (A0) max 100 [ms] 028d Return run without wire 028e Return fast complex 028f Return fast platanos 0290 Return wheel 029d Missing puls signal (0 if no error) 128c Collision sensor[A/D] 128d Lift sensors [A/D] 128e Blade motor current [A/D] 128f Current left [??] 1290 Current right [??] 12cc Stop button [A/D] 1806 als Freizeitbeschäftigung lesen ? 1cfb Length past wire [cm] 24bf Speed right 24c0 Speed left 2ee0 Used battery amount [mAh] 2eea Blade motor speed [rpm] 2ef4 Battery voltage [mV] 2efe Battery voltage current compensated [mV] Kundeneinstellungen 4a38 Timer 1 Start Std Start - Kundeneinstellungen ab 19000 4a39 Timer 1 Start Min 4a3a Timer 1 Stop Std 4a3b Timer 1 Stop Min 4a3c Wochen-Timer 1 Start Std 4a3d Wochen-Timer 1 Start Min 4a3e Wochen-Timer 1 Stop Std 4a3f Wochen-Timer 1 Stop Min 4a40 Timer 2 Start Std 4a41 Timer 2 Start Min 4a42 Timer 2 Stop Std 4a43 Timer 2 Stop Min 4a44 Wochen-Timer 2 Start Std 4a45 Wochen-Timer 2 Start Min 4a46 Wochen-Timer 2 Stop Std 4a47 Wochen-Timer 2 Stop Min 4a4e Timer aus 1=an,0=aus 4a50 W-Timer-Tage mo=1,di=2,mi=4,do=8,… 4a52 Demo-Modus 4=an,1=aus */ ?>