Problem bei Erweiterung von IPSComponent's

Hallo, habe Problem mit der Einbindung einer eigenen IPSComponente in die IPS-Console.

Bin noch folgender Anleitung vorgegangen.
https://www.symcon.de/wiki/Erweiterung_von_IPSComponent’s

Als erstes habe ich eine vorhandene Komponente / Datei „IPSComponentCam_Foscam89x.class.php“
im Ordner „IP-Symcon\scripts\IPSLibrary\app\core\IPSComponent\IPSComponentCam“ kopiert und nach
„IPSComponentCam_MyCAM.class.php“ umbenannt.
Ebenso die Zeile 40 in dem Script:

 class IPSComponentCam_MyCAM extends IPSComponentCam {

Danach in der IPS-Console ein neues Script angelegt

IPSUtils_Include ("IPSComponentCam_MyCAM.class.php","IPSLibrary::app::core::IPSComponent::IPSComponentCam");
   $component = new IPSComponentCam_MyCAM(12345);
   $component->SetState(true);

und gestartet.

Bekomme aber hier schon Fehlermeldungen:

Warning:  Missing argument 2 for IPSComponentCam_MyCAM::__construct(), called in D:\SERVER\IP-Symcon\scripts\17360.ips.php on line 7 and defined in D:\SERVER\IP-Symcon\scripts\IPSLibrary\app\core\IPSComponent\IPSComponentCam\IPSComponentCam_MyCAM.class.php on line 55

Warning:  Missing argument 3 for IPSComponentCam_MyCAM::__construct(), called in D:\SERVER\IP-Symcon\scripts\17360.ips.php on line 7 and defined in D:\SERVER\IP-Symcon\scripts\IPSLibrary\app\core\IPSComponent\IPSComponentCam\IPSComponentCam_MyCAM.class.php on line 55

Notice:  Undefined variable: username in D:\SERVER\IP-Symcon\scripts\IPSLibrary\app\core\IPSComponent\IPSComponentCam\IPSComponentCam_MyCAM.class.php on line 57

Notice:  Undefined variable: password in D:\SERVER\IP-Symcon\scripts\IPSLibrary\app\core\IPSComponent\IPSComponentCam\IPSComponentCam_MyCAM.class.php on line 58

Fatal error:  Call to undefined method IPSComponentCam_MyCAM::SetState() in D:\SERVER\IP-Symcon\scripts\17360.ips.php on line 8
Abort Processing during Fatal-Error: Call to undefined method IPSComponentCam_MyCAM::SetState()
   Error in Script D:\SERVER\IP-Symcon\scripts\17360.ips.php on Line 8

Was mache ich hier falsch??

Du musst im Konstruktor die richtigen Parameter setzen:


        public function __construct($ipAddress, $username, $password) {

Hat alles funktioniert. Danke für den Tipp.