Ultraschallsensor *wein*

Hallo,

also ich hab mir hier den Ultraschallsensor von icplan.de gekauft und habe es versucht mit diesem Skribt

Jedoch in der V2 gibt es zum einen die Cutchars nicht mehr und irgendwie weiß ich nicht mehr weiter.

  1. Ich habe nun einen Comport Angelegt
  2. eine Variable angelegt
  3. Ich glaube hier hängts eine Register Variable und hier weiß ich net so recht was ich einstellen soll.

Kann mir jemand helfen?

Danke
Gruß
Christian

Also wenn ich IPS beende und über Hyperterminal den Port öffne und dort den Steuerbefehl „12000“ schreibe bekomme ich die Entfernung zurückgeschickt Aber wie setze ich dies mit IPs um?

Danke.

Gruß
Christian

Hallo Christian

Jedoch in der V2 gibt es zum einen die Cutchars nicht mehr und irgendwie weiß ich nicht mehr weiter.

In der V2 unter Splitter, Cutter auswählen.

Solltest Du dieses nicht sehen, das Häckchen bei alle Module setzen.

jo… und dann klappt das auch mit dem Ultraschallsensor… :slight_smile:

Habs auch mit der V2 am laufen …

Gruß

Mit welchen Skribt hast du den am laufen könntest du das vielleicht posten ?

Hallo,

zum einen wird das class.IcplanUsSensor Skript benötigt;


<?php

error_reporting(E_ALL);

/**
 * This class implements the protocol of the Icplan ultrasound distance sensor.
 *
 * @author Jrn Lentes
 * @see http://www.icplan.de
 * @version 1.0
 */

if (0 > version_compare(PHP_VERSION, '5')) {
    die('This file was generated for PHP 5');
}

/* user defined includes */
// section -64--88-1-6-1950198:117da2b3893:-8000:000000000000077C-includes begin
$includeFile = IPS_GetScriptFile("class.IcplanUsSensorConfig");
require_once $includeFile;
// section -64--88-1-6-1950198:117da2b3893:-8000:000000000000077C-includes end

/* user defined constants */
// section -64--88-1-6-1950198:117da2b3893:-8000:000000000000077C-constants begin

// commands with single sensor connected
define ('GET_SENS_NR', '00000');
define ('SET_SENS_NR','00100');
define ('SEND_US','00200');
define ('SELFCALIB_ON', '00300');
define ('SELFCALIB_OFF','00400');
define ('RESET_FLOOD_COUNT','00700');
define ('GET_FLOOD_COUNT','00800');
define ('TEST_SENSOR','00900');

// commands with multiple sensors connected
define ('GETTEMP',  1000);
define ('GETDISTANCE', 2000);
define ('GETVERSION', 3000);
define ('SETMINDIST', 6000);
define ('SETSTATISTIC', 6100);
define ('SETAUTOSEND', 6200);
define ('SETHEATING', 6300);
define ('SETSENSSTART', 6400);
define ('SETSENSSTEP', 6500);
define ('SETSENSEND', 6600);
define ('SETTEST', 6700); # meaning unclear
define ('GETCONFIG', 6800);
define ('GETSERIAL', 7000);
define ('STARTCALIB', 8000);

// section -64--88-1-6-1950198:117da2b3893:-8000:000000000000077C-constants end

/**
 * This class implements the protocol of the Icplan ultrasound distance sensor.
 *
 * @access public
 * @author Jrn Lentes
 * @see http://www.icplan.de
 * @version 1.0
 */
class IcplanUsSensor
{
    // --- ATTRIBUTES ---

    /**
     * The sensor number addresses the sensor on the serial bus.
     *
     * @access private
     * @var int
     */
    private $sensorNumber = 0;

    /**
     * The IPS Com-Port instance ID defines the ID of the Com-Port instance
     * IPS.
     *
     * @access private
     * @var int
     */
    private $ipsComPortInstanceId = 0;

    /**
     * Name of the IPS variable to read sensor anwsers from.
     *
     * @access private
     * @var char
     */
    private $ipsResultVariableName = '';

    /**
     * Time to wait for sensor anwser.
     *
     * @access public
     * @var int
     */
    public $waitTime = 0;

    // --- OPERATIONS ---

    /**
     * Initializes this class and assigns parameters to attributes.
     *
     * @access public
     * @author Jrn Lentes
     * @param int
     * @param int
     * @param char
     * @param int
     * @return void
     * @version 1.1
     */
    public function __construct($instanceId, $sensorNr, $resultVarName, $waitTime)
    {
        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000857 begin

        $this->ipsComPortInstanceId = $instanceId;
        $this->sensorNumber = $sensorNr;
        $this->ipsResultVariableName = $resultVarName;
        $this->waitTime = $waitTime;

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000857 end
    }

    /**
     * Initialize sensor configuration with values of parameter initConfig.
     *
     * @access public
     * @author Jrn Lentes
     * @param IcplanUsSensorConfig
     * @return void
     * @version 1.0
     */
    public function initializeSensor( IcplanUsSensorConfig $initConfig)
    {
        // section -64--88-1-6-5f6303:117f4d00600:-8000:00000000000008A9 begin

        $this->setSensorMinimalDistance($initConfig->minimalDistance);
        $this->setSensorStatisticalMeassuring($initConfig->enableStats);
        $this->setSensorAutoSend($initConfig->enableAutoSend);
        $this->setSensorHeating($initConfig->enableHeating);
        $this->setSensorSensitivityStart($initConfig->sensitivityStart);
        $this->setSensorSensitivityStep($initConfig->sensitivityStep);
        $this->setSensorSensitivityTarget($initConfig->sensitivityEnd);

        // section -64--88-1-6-5f6303:117f4d00600:-8000:00000000000008A9 end
    }

    /**
     * Sends the Icplan protocol command to the sensor.
     *
     * @access private
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param char
     * @return void
     */
    private function sendCommand($command)
    {
        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000848 begin
				$len = strlen($command);
        if ($len = 5)
        {
        	COMPort_SendText($this->ipsComPortInstanceId, $command{0} );
        	IPS_Sleep(100);
        	COMPort_SendText($this->ipsComPortInstanceId, $command{1} );
        	IPS_Sleep(100);
        	COMPort_SendText($this->ipsComPortInstanceId, $command{2} );
        	IPS_Sleep(100);
        	COMPort_SendText($this->ipsComPortInstanceId, $command{3} );
        	IPS_Sleep(100);
        	COMPort_SendText($this->ipsComPortInstanceId, $command{4} );
        }

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000848 end
    }

    /**
     * Short description of method getResult
     *
     * @access private
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return char
     */
    private function getResult()
    {
        $returnValue = (string) '';

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000084B begin

				$value = GetValueString($this->ipsResultVariableName);
				$array = explode(" ", $value);
				$returnValue = $array[count($array)-1];

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000084B end

        return (string) $returnValue;
    }

    /**
     * Sets the attribute sensorNumber to parameter sensorNr.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return void
     */
    public function setSensorNumber($sensorNr)
    {
        // section -64--88-1-6-1950198:117da2b3893:-8000:000000000000078F begin

        if (is_int($sensorNr) && $sensorNr > 0 && $sensorNr < 10)
        {
        	$this->sensorNumber = $sensorNr;
        }

        // section -64--88-1-6-1950198:117da2b3893:-8000:000000000000078F end
    }

    /**
     * Returns the value of attribute sensorNumber.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return int
     */
    public function getSensorNumber()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007AC begin

        $returnValue = $this->sensorNumber;

        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007AC end

        return (int) $returnValue;
    }

    /**
     * Sets the attribute ipsComPortInstanceId to parameter instanceId.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return void
     */
    public function setIpsComPortInstanceId($instanceId)
    {
        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007B0 begin

        if ( is_int($instanceId) )
        {
        	$this->ipsComPortInstanceId = $instanceId;
        }

        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007B0 end
    }

    /**
     * Returns the value of attribute ipsComPortInstanceId.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return int
     */
    public function getIpsComPortInstanceId()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007B2 begin

        $returnValue = $this->ipsComPortInstanceId;

        // section -64--88-1-6-1950198:117da2b3893:-8000:00000000000007B2 end

        return (int) $returnValue;
    }

    /**
     * Sets the attribute ipsResultVariableName to parameter resultVarName.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param char
     * @return void
     */
    public function setIpsResultVariableName($resultVarName)
    {
        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000085E begin

        if ( is_string($resultVarName) )
        {
        	$this->ipsResultVariableName = $resultVarName;
        }

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000085E end
    }

    /**
     * Returns the value of attribute ipsResultVariableName.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return char
     */
    public function getIpsResultVariableName()
    {
        $returnValue = (string) '';

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000861 begin

        $returnValue = $this->ipsResultVariableName;

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000861 end

        return (string) $returnValue;
    }

    /**
     * Assign parameter sensorNr to connected sensor. Only one sensor must be
     * to assign sensor number.
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return void
     */
    public static function assignSensorNumber($sensorNr = 1)
    {
        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000083B begin

				$result = 0;

        if ( $sensorNr < 10 && $sensorNr > 0 )
        {
	        $command = SET_SENS_NR + $sensorNr;
	        $this->sendCommand(strval($command));
					IPS_Sleep($this->waitTime);
					$result = intval($this->getResult());
        }

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:000000000000083B end
    }

    /**
     * Read sensor number from single connected sensor.
     *
     * @access public
     * @author Jrn Lentes
     * @return int
     * @version 1.0
     */
    public static function readSensorNumber()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000838 begin

        $command = GET_SENS_NR;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000838 end

        return (int) $returnValue;
    }

    /**
     * Returns the actual temperature at the sensor.
     *
     * @access public
     * @author Jrn Lentes
     * @return int
     * @version 1.0
     */
    public function getSensorTemperature()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000842 begin

        $command = $this->sensorNumber * 10000 + GETTEMP;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117da9ece9a:-8000:0000000000000842 end

        return (int) $returnValue;
    }

    /**
     * Get actual distance the sensor meassured.
     *
     * @access public
     * @author Jrn Lentes
     * @return int
     * @version 1.0
     */
    public function getSensorDistance()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:000000000000082E begin

        $command = $this->sensorNumber * 10000 + GETDISTANCE;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:000000000000082E end

        return (int) $returnValue;
    }

    /**
     * Get software version of the sensor.
     *
     * @access public
     * @author Jrn Lentes
     * @return char
     * @version 1.0
     */
    public function getSensorSoftwareVersion()
    {
        $returnValue = (string) '';

        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:0000000000000830 begin

        $command = $this->sensorNumber * 10000 + GETVERSION;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$temp = $this->getResult();
				$len = strlen($temp);
				if ( $len = 3 )
				{
					$returnValue = $temp{$len-3} . '.' . $temp{$len-2} . $temp{$len-1};
				}

        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:0000000000000830 end

        return (string) $returnValue;
    }

    /**
     * Set distance to ignore echos below that distance.
     *
     * @access public
     * @author Jrn Lentes
     * @param int
     * @return int
     * @version 1.0
     */
    public function setSensorMinimalDistance($distance)
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:0000000000000832 begin

				if ($distance < 100 && $distance > 0 )
				{
	        $command = $this->sensorNumber * 10000 + SETMINDIST + $distance;
	        $this->sendCommand(strval($command));
					IPS_Sleep($this->waitTime);
					$returnValue = intval($this->getResult());
				}
        // section -64--88-1-6-5f6303:117e3b16fcd:-8000:0000000000000832 end

        return (int) $returnValue;
    }

    /**
     * Short description of method setSensorStatisticalMeassuring
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param boolean
     * @return boolean
     */
    public function setSensorStatisticalMeassuring($enableStats)
    {
        $returnValue = (bool) false;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000868 begin

        $command = $this->sensorNumber * 10000 + SETSTATISTIC + intval($enableStats);
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000868 end

        return (bool) $returnValue;
    }

    /**
     * Short description of method setSensorAutoSend
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param boolean
     * @return boolean
     */
    public function setSensorAutoSend($enableAutoSend)
    {
        $returnValue = (bool) false;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000086C begin

        $command = $this->sensorNumber * 10000 + SETAUTOSEND + intval($enableAutoSend);
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000086C end

        return (bool) $returnValue;
    }

    /**
     * Short description of method setSensorHeating
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param boolean
     * @return boolean
     */
    public function setSensorHeating($enableHeating)
    {
        $returnValue = (bool) false;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000086F begin

        $command = $this->sensorNumber * 10000 + SETHEATING + intval($enableHeating);
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000086F end

        return (bool) $returnValue;
    }

    /**
     * Short description of method setSensorSensitivityStart
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return int
     */
    public function setSensorSensitivityStart($start)
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000872 begin

        $command = $this->sensorNumber * 10000 + SETSENSSTART + $start;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000872 end

        return (int) $returnValue;
    }

    /**
     * Short description of method setSensorSensitivityStep
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return int
     */
    public function setSensorSensitivityStep($step)
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000875 begin

        $command = $this->sensorNumber * 10000 + SETSENSSTEP + $step;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000875 end

        return (int) $returnValue;
    }

    /**
     * Short description of method setSensorSensitivityTarget
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @param int
     * @return void
     */
    public function setSensorSensitivityTarget($target)
    {
        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000878 begin

        $command = $this->sensorNumber * 10000 + SETSENSEND + $target;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:0000000000000878 end
    }

    /**
     * Short description of method getSensorConfig
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return IcplanUsSensorConfig
     */
    public function getSensorConfig()
    {
        $returnValue = null;

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087B begin

        $command = $this->sensorNumber * 10000 + GETCONFIG;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087B end

        return $returnValue;
    }

    /**
     * Short description of method getSensorSerial
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return int
     */
    public function getSensorSerial()
    {
        $returnValue = (int) 0;

        // section -64--88-1-6-6b2d8ab3:117f4f8e2f0:-8000:0000000000000892 begin

        $command = $this->sensorNumber * 10000 + GETSERIAL;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-6b2d8ab3:117f4f8e2f0:-8000:0000000000000892 end

        return (int) $returnValue;
    }

    /**
     * Short description of method startSensorCalibration
     *
     * @access public
     * @author Jrn Lentes, <joern.lentes@web.de>
     * @return void
     */
    public function startSensorCalibration()
    {
        // section -64--88-1-6-6b2d8ab3:117f4f8e2f0:-8000:0000000000000894 begin

        $command = $this->sensorNumber * 10000 + STARTCALIB;
        $this->sendCommand(strval($command));
				IPS_Sleep($this->waitTime);
				$returnValue = intval($this->getResult());

        // section -64--88-1-6-6b2d8ab3:117f4f8e2f0:-8000:0000000000000894 end
    }

} /* end of class IcplanUsSensor */

?>

Dann wird die Class.IcplanUsSensorConfig benötigt;


<?php

error_reporting(E_ALL);

/**
 * This class contains the configuration values of the ultrasound sensor.
 *
 * @author Jrn Lentes
 * @version 1.0
 */

if (0 > version_compare(PHP_VERSION, '5')) {
    die('This file was generated for PHP 5');
}

/* user defined includes */
// section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087D-includes begin
// section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087D-includes end

/* user defined constants */
// section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087D-constants begin
// section -64--88-1-6-5f6303:117f4d00600:-8000:000000000000087D-constants end

/**
 * This class contains the configuration values of the ultrasound sensor.
 *
 * @access public
 * @author Jrn Lentes
 * @version 1.0
 */
class IcplanUsSensorConfig
{
    // --- ATTRIBUTES ---

    /**
     * Short description of attribute minimalDistance
     *
     * @access public
     * @var int
     */
    public $minimalDistance = 0;

    /**
     * Short description of attribute enableStats
     *
     * @access public
     * @var boolean
     */
    public $enableStats = false;

    /**
     * Short description of attribute enableAutoSend
     *
     * @access public
     * @var boolean
     */
    public $enableAutoSend = false;

    /**
     * Short description of attribute enableHeating
     *
     * @access public
     * @var boolean
     */
    public $enableHeating = false;

    /**
     * Short description of attribute sensitivityStart
     *
     * @access public
     * @var int
     */
    public $sensitivityStart = 0;

    /**
     * Short description of attribute sensitivityStep
     *
     * @access public
     * @var int
     */
    public $sensitivityStep = 0;

    /**
     * Short description of attribute sensitivityEnd
     *
     * @access public
     * @var int
     */
    public $sensitivityEnd = 0;

    // --- OPERATIONS ---

} /* end of class IcplanUsSensorConfig */

?>

… und zu guter letzt das GetUsTemperatur Skript was getriggert wird. Alle 5 Minuten oder so … je nach dem für was du das brauchst.


<?
/*
*******************************
 IP-SYMCON Event Scripting
*******************************
File     : GetUsTemperatur.ips.php
Trigger  : 
Interval : 
*/
include "Konstanten.ips.php";

$instanceId = 13623 /*[Zisternen Modul]*/;
$sensorNr   = 1;
$varName    = 20666 /*[Nebenanlage\Zisterne\ultraschall]*/;
$waitTime   = 3000;
$includeFile =  IPS_GetScriptFile("class.IcplanUsSensor");
require_once $includeFile;
$includeFile =  IPS_GetScriptFile("class.IcplanUsSensorConfig");
require_once $includeFile;

$usConfig = new IcplanUsSensorConfig();
$usConfig->minimalDistance = 20;
$usConfig->enableStats = false;
$usConfig->enableAutoSend = false;
$usConfig->enableHeating = true;
$usConfig->sensitivityStart = 31;
$usConfig->sensitivityStep = 1;
$usConfig->sensitivityEnd = 56;

$usSensor = new IcplanUsSensor($instanceId, $sensorNr, $varName, $waitTime);

$usSensor->initializeSensor($usConfig);

echo "initialized sensor!
";
Sleep(2);

$distance = $usSensor->getSensorDistance();
echo $distance ."
";
$crad = $usSensor->getSensorTemperature();
echo $crad ."
";
$SVersion = $usSensor->getSensorSoftwareVersion();
echo $SVersion ."
";

?>


und schon haste deine Ausgabe als Echo. Hab das Skript aus hier dem Forum was netterweise erstellt wurde von einem User hier aus dem Board.

Damit das Skript läuft musst du ein SerialPort in IPS anlegen was auf den Ultraschallsensor connectet und eine Registervariable die immer überschrieben wird das als übergeordnete Instanz den SerialPort hat mit einer String Variable.

Gruß

@Hollowman,

musstest du an den Skripten etwas ändern, damit es in V2 läuft?
Wenn ja, könntest du mir die Änderungen per PM schicken.
Dann würde ich das Paket aktualisieren und demnächst auch einen neue Beschreibung beilegen.

Gruß,
Jörn

Hallo,

ja in der V2 läuft das Skript so nicht ganz. IPS2 versteht IPS_GetScriptFile nicht mehr.
Deswegen hab ich eine Funktion mit drin. Ich habe ein Skript das Konstanten heißt und in diesem alle ID’s sowie Funktionen beinhaltet was ich dann auch in dem GetUsTemperatur.ips.php include sowie in anderen Skripten.

Somit funktioniert dann auch wieder IPS_GetScriptFile.
Die Funktion;


function IPS_GetScriptFile($var="") {
  if ($var!="") {
     $id=IPS_GetScriptID($var);
     $var = IPS_GetScript($id);
     return $var['ScriptFile'];
  }
   return $var;
}

Gruß
Boris

Hi Jörg also eine neue Beschreibenn währe echt super bei mir läuft es zwar aber irgendwie ganz ohne die Skribte von dir und ich glaube so ganz lauber ist das nicht. Also ich währe dir sehr Dankbar.

Gruß
Christian