Ich hab als Umsteiger von 1.x auf jetzt so meine Probleme...

Bitte nicht laut Lachen, meine Scriptkenntnisse sind halt rudimentär.

Unter 1.x funktioniert das

$iC15_ZaehlerStand =$lines[15]/1000;//Autolader
$iC15_AktVerbr =    $lines[24]/1000;
SetValueFloat("Autolader_kWh",$iC15_ZaehlerStand);
SetValueFloat("Autolader_Leistung",$iC15_AktVerbr);
//$Autolader=GetValueFloat("Autolader_Leistung");
If ($iC15_AktVerbr<=1)
{SetValueFloat("Autolader_Ladung_Start",$iC15_ZaehlerStand);}
$Autolader_Ladung_Start=GetValueFloat("Autolader_Ladung_Start");
$value = ($iC15_ZaehlerStand-$Autolader_Ladung_Start);
$value_heute=GetValueFloat("Autolader_heute");
If (($iC15_AktVerbr>=1)and($value_heute>=0.001))
{SetValueFloat("Autolader_heute",$value);}

Aber jetzt bekomme ich 2 verschiedene Werte je nachdem was ich mache.


setvalue(23117 /*[IPSwitch-Add\Autoladestation]*/,((float)$werte[15])/1000);
setvalue(52791 /*[IPSwitch-Add\Autoladestation_aktl]*/,((float)$werte[6])/1000);
$aktl=GetValueFloat(52791 /*[IPSwitch-Add\Autoladestation_aktl]*/);
$start=GetValueFloat(32765 /*[IPSwitch-Add\Autolader_Ladung_Start]*/);
$stand=GetValueFloat(23117 /*[IPSwitch-Add\Autoladestation]*/);
If ($aktl<=1)
{SetValueFloat($start,$stand);}
$Autolader_Ladung_Start=GetValueFloat(32765 /*[IPSwitch-Add\Autolader_Ladung_Start]*/);
$value = ($stand-$Autolader_Ladung_Start);
$value_heute=GetValueFloat(55669 /*[IPSwitch-Add\Autolader_heute]*/);
If (($aktl>=1)and($value_heute>=0.001))
{SetValueFloat($value_heute,$value);}
print_r($value);

//$Autolader=GetValueFloat("Autolader_Leistung");
If (52791 /*[IPSwitch-Add\Autoladestation_aktl]*/<=1)
{SetValueFloat(32765 /*[IPSwitch-Add\Autolader_Ladung_Start]*/,23117 /*[IPSwitch-Add\Autoladestation]*/);}
$Autolader_Ladung_Start=GetValueFloat(32765 /*[IPSwitch-Add\Autolader_Ladung_Start]*/);
$value = (23117 /*[IPSwitch-Add\Autoladestation]*/-32765 /*[IPSwitch-Add\Autolader_Ladung_Start]*/);
$value_heute=GetValueFloat(55669 /*[IPSwitch-Add\Autolader_heute]*/);
If ((52791 /*[IPSwitch-Add\Autoladestation_aktl]*/>=1)and(55669 /*[IPSwitch-Add\Autolader_heute]*/>=0.001))
{SetValueFloat(55669 /*[IPSwitch-Add\Autolader_heute]*/,$value);}

Ich versteh das nicht…

Keine Ahnung was du vorhast[emoji6], aber deine letzten beiden if abfragen im zweiten Beispiel sind falsch.

Es muss lauten: If (getValueFloat(52791)<=1)…

Gruß

Burkhard

Danke, was ein kleiner Anstupser schon hilft.
Jetzt läuft es, verstanden hab ich es auch so halbwegs…

Gestern ist von E-Service ein neues Installationsscript veröffentlicht.
Das läuft ohne Fehler durch.

Jetzt komme ich allerdings trotzdem nicht so richtig weiter.
Es werden ja wohl alle Bausteine über ein Textbaustein angesprochen.
Kann mir jemand auf den richtigen Weg helfen?
Ich komme mit der Anleitung für die anzusetzenden Befehle nicht klar.
Wie setze ich z.B. Relais 1 auf Ein/Aus?

Dann wollte ich das Script „Support-Informationen zusammenstellen“ laufen lassen um zu sehen welche Bausteine erkannt wurden.
Angeschlossen sind jetzt
1x Dual Schaltmodul 230V 5A SSR Artikel-Nr.: 11204-R
2x Dual S0 Zählermodul Artikel-Nr.: 11211
1x Analog Ausgang 0-10V Isoliert Artikel-Nr.: 11208

<?
/*
// Dieses Script stellt Informationen für den Support von Eservice-Online zusammen
*/

$Parent = 45556 /*[1-Wire Controller E-Service Online]*/; 
RegVar_SendText(36637 /*[1-Wire Controller E-Service Online\RegisterVariable 1-Wire Controller]*/, "GET,SYS,SETTING" . chr(13)); 
RegVar_SendText(36637 /*[1-Wire Controller E-Service Online\RegisterVariable 1-Wire Controller]*/, "GET,SYS,INFO" . chr(13)); 
IPS_Sleep(3000); 
$ARTNO         = GetValue(IPS_GetVariableIDByName("1_ARTNO.exchange", $Parent)); 
$CONTNO        = GetValue(IPS_GetVariableIDByName("1_CONTNO.exchange", $Parent)); 
$COUNT         = GetValue(IPS_GetVariableIDByName("1_COUNT.exchange", $Parent)); 
$DATASEND      = GetValue(IPS_GetVariableIDByName("1_DATASEND.exchange", $Parent)); 
$DATASENDTIME  = GetValue(IPS_GetVariableIDByName("1_DATASENDTIME.exchange", $Parent)); 
$DATE          = GetValue(IPS_GetVariableIDByName("1_DATE.exchange", $Parent)); 
$DEBUG         = GetValue(IPS_GetVariableIDByName("1_DEBUG.exchange", $Parent)); 
$FW            = GetValue(IPS_GetVariableIDByName("1_FW.exchange", $Parent)); 
$HW            = GetValue(IPS_GetVariableIDByName("1_HW.exchange", $Parent)); 
$KAL           = GetValue(IPS_GetVariableIDByName("1_KAL.exchange", $Parent)); 
$KALREC        = GetValue(IPS_GetVariableIDByName("1_KALREC.exchange", $Parent)); 
$KALRECTIME    = GetValue(IPS_GetVariableIDByName("1_KALRECTIME.exchange", $Parent)); 
$KALSEND       = GetValue(IPS_GetVariableIDByName("1_KALSEND.exchange", $Parent)); 
$KALSENDTIME   = GetValue(IPS_GetVariableIDByName("1_KALSENDTIME.exchange", $Parent)); 
$SERNO         = GetValue(IPS_GetVariableIDByName("1_SERNO.exchange", $Parent)); 
$TIME          = GetValue(IPS_GetVariableIDByName("1_TIME.exchange", $Parent)); 
$OWDID         = GetValue(IPS_GetVariableIDByName("1_OWDID.exchange", $Parent)); 

// Script für Support-Informationen anlegen 
$InfoScript = IPS_CreateScript(0); 
$ScriptPath = $InfoScript . ".ips.php"; 
IPS_SetParent($InfoScript, $Parent); 
IPS_SetName($InfoScript, "Support-Informationen"); 

$Script3="<?"."
"; 
$Script3.="/*"."
"; 
$Script3.="// Support-Informationen 1-Wire Controller" ."
"; 
$Script3.="// Bitte senden Sie den Inhalt dieses Scriptes nach vorheriger Rücksprache an info@eservice-online.de" ."
"; 
$Script3.="*/"."

"; 
$Script3.="/*" . "
"; 
$Script3.="Parameter des 1-Wire Controllers: 
"; 
$Script3.="ARTNO: " . $ARTNO . "
"; 
$Script3.="CONTNO: " . $CONTNO . "
"; 
$Script3.="COUNT: " . $COUNT . "
"; 
$Script3.="DATASEND: " . $DATASEND . "
"; 
$Script3.="DATASENDTIME: " . $DATASENDTIME . "
"; 
$Script3.="DATE: " . $DATE . "
"; 
$Script3.="DEBUG: " . $DEBUG . "
"; 
$Script3.="FW: " . $FW . "
"; 
$Script3.="HW: " . $HW . "
"; 
$Script3.="KAL: " . $KAL . "
"; 
$Script3.="KALREC: " . $KALREC . "
"; 
$Script3.="KALRECTIME: " . $KALRECTIME . "
"; 
$Script3.="KALSEND: " . $KALSEND . "
"; 
$Script3.="KALSENDTIME: " . $KALSENDTIME . "
"; 
$Script3.="SERNO: " . $SERNO . "
"; 
$Script3.="TIME: " . $TIME . "
"; 
$Script3.="OWDID: " . $OWDID . "
"; 
$Script3.="

"; 
$Script3.="Dieses Script wurde erstellt am " . date('d.m.Y') . " um " . date('H:i:s') . "
"; 
$Script3.="*/"; 
$Script3.="?>"; 
$FileName = IPS_GetKernelDir()."scripts\\".$InfoScript.".ips.php"; 
$FileHandle = fopen($FileName,"w"); 
fwrite($FileHandle,$Script3); 
fclose($FileHandle); 
IPS_SetScriptFile($InfoScript, $ScriptPath); 


?>

Leider gibt es dort eine Fehlermeldung

Variable with name 1_ARTNO.exchange could not be found in /usr/share/symcon/scripts/32832.ips.php on line 10
Parameter type of VariableID does not match in /usr/share/symcon/scripts/32832.ips.php on line 10
Variable with name 1_CONTNO.exchange could not be found in /usr/share/symcon/scripts/32832.ips.php on line 11
Parameter type of VariableID does not match in /usr/share/symcon/scripts/32832.ips.php on line 11
Variable with name 1_COUNT.exchange could not be found in /usr/share/symcon/scripts/32832.ips.php on line 12
Parameter type of VariableID does not match in /usr/share/symcon/scripts/32832.ips.php on line 12
Variable with name 1_DATASEND.exchange could not be found in /usr/share/symcon/scripts/32832.ips.php on line 13
Parameter type of VariableID does not match in /usr/share/symcon/scripts/32832.ips.php on line 13
Variable with name 1_DATASENDTIME.exchange could not be found in /usr/share/symcon/scripts/32832.ips.php on line 14
Parameter type of VariableID does not match in /usr/share/symcon/scripts/32832.ips.ph

Hallo,

das von Dir benutzte Script funktioniert aktuell nicht. Daher auch in dem Script ganz oben der Hinweis:

  • Fehlende Funktion: Support-Script wird zwar erstellt, funktioniert aber noch nicht.

Die vom Controller erkannten Bausteine sollten bei Dir als OWD1 bis OWDx in Variablen gelegt werden. Ansonsten empfehle ich Kapitel 3.13 der Befehlsliste. Dort findest Du verschiedene Listen und die dazugehörigen Befehle, um die entsprechenden Listen abzurufen.

EDIT: Ich sehe gerade Deinen Screeshot. Auf dem wird ein 1-Wire Device erkannt. Welches das genau ist, dazu findest Du mehr Informationen in einer der o.g. Listen.

Gruß,
Christoph