PHP extension version dependent?

I’ve written a PHP extension for Telldus (Telldus Technologies), this extension works fine when running via the PHP server on my local machine. I copied the extension to the „ext“ folder and edited the php.ini of IPS to include it. The log file doesn’t report any errors:

24.08.2010 18:59:22.845 | 0 | MESSAGE | ScriptEngine | >Extension: php_telldus.dll
But I can’t use the methods of this extensions, and extension_loaded(‚telldus‘) returns nothing. Neither is the extension listed when looking through the result of get_loaded_extensions()

Fatal error: Call to undefined function tdTurnOn() in [test] on line 2

I compiled my extension against PHP 5.2.14 on VC9, could some kind of version incompatibility cause the problem?

You need to compile against 5.3.1 VC6.


Thanks for the quick reply! Do I need thread-safe or non-ts?

You need the thread-save version.

Hallo zusammen.
Ich hab mir auch grade den tellstick bestellt. Nun Frage ich mich ob das das richtige ist. Kann ich den Stick einfach über IPS ansteuern, oder muss ich auch die php Extension installieren?

Ich würde auf Fehlkauf tippen. Es gibt kein IPS Modul und ich wüsste auch nicht, dass kboek die PHP Extension irgendwo anbietet.


I stopped the development of a PHP extension for the Telldus stick, because I couldn’t get it to work the way I wanted. But no worries, there’s an other solution that works fine.

First, you must use the „Telldus Center“ application to give each of your appliances a unique number; then you can use a script in IPS to call the tdtool.exe with the correct parameters.

I’ve a Waveman switch; using the Telldus Center application I’ve given this switch the unique number 3. In IPS you can add a script and use the switch, see the code below:

// Syntax (n = ON and f = OFF)
// system('"[path to tdtool.exe]" -[n|f][number]'); 

// To switch on
system('"%ProgramFiles%\Telldus	dtool.exe" -n3'); 

// to switch off
system('"%ProgramFiles%\Telldus	dtool.exe" -f3'); ?>

Thank you very much. I will try this tomorrow, if my stick will arrive.

The stick arrived today.
in a dos box everything works fine

C:\Users\stefan>c:\Telldus	dtool.exe -n test
Turning on device 2, on - Success

in IPS there comes an error message

system('"c:\Telldus	dtool.exe" -n test');
Device 'test', not found!

if i do a listing in dos box

C:\Users\stefan>c:\Telldus	dtool.exe -l
Number of devices: 1
2       test    ON

in IPS

system('"c:\Telldus	dtool.exe" -l');
Number of devices: -1

Any suggestions?

Try using the IPS_ExecuteEx function.


Unfortunately does not either.

IPS_ExecuteEx("c:\Telldus	dtool.exe", "-f test", true, true,0);
Warning:  File does not exist in [Innen\Wohnzimmer\Switch_Test] on line 7

if i use

IPS_Execute("c:/Telldus/tdtool", "-f test", true, true);

there is no error message, but i dosn’t even work. „test“ is still switeched on

Your slashes are wrong.

IPS_ExecuteEx("c:\\Telldus\	dtool.exe", "-f test", true, true,0);  


still no reaction.

Have you tried the device number instead of its name?

system('"c:\Telldus	dtool.exe" -n2');  

No nothing.
I don’t understand why nochting is shown in listing. when i use

system('"c:\Telldus	dtool.exe" -n2');

error message is

Turning on device 2, on - The method you tried to use is not supported by the device


IPS_ExecuteEx("c:/Telldus/tdtool.exe", "-n test", true, true, 0);

0 or 1 see your system

IPS_ExecuteEx: IP-Symcon :: Automatisierungssoftware


I got it.
You have to change the registry value
HKEY_LOCAL_MACHINE\SOFTWARE\Telldus\Devices\SharedDevices to 1
run TelldusCenter as Administrator
Added Devices
Now in IPS

system('"c:\Telldus	dtool.exe" -l');


Number of devices: 1
2	ttt	OFF