As you can see
here, there is no functions called devSetArguments() and devAddDevice(). Those are only in our 1.x API.
I strongly advice you not to add your own devices in the software. This is stated in the documentation:
All of the devices used by TellStick must be predefined before they can be used in any software. Under all platforms this can be done with the software TelldusCenter but under Linux this can also be done by editing the file /etc/tellstick.conf with your favorite text editor.
Having the devices preconfigured is an advantage to both the developer and the end user.
- The end user might use more then one program for controling his/hers TellStick. By having the devices preconfigured he/she doesn't have to reconfigure the same devices twice. If some settings changes in one of the devices, this change will affect all softwares using Telldus TellStick SDK.
- Telldus is adding support for new devices constantly. If every software defines it's own devices it will also mean that the developer has to keep it's software up to date with all the new devices and settings Telldus implements. By querying Telldus Tellstick SDK all the new devices will be available automaticly to the end user.
Especially the last item. If you only support KlikAanKlikUit, users of other types of devices cannot use your software.
If you still insist on adding a KlikAanKlikUit-device, this is how it can be done:
- Code: Select all
int id = tdAddDevice();
tdSetName(id, "Dummy device");
tdSetProtocol(id, "arctech");
tdSetModel(id, "codeswitch");
tdSetDeviceParameter(id, "house", "K");
tdSetDeviceParameter(id, "unit", "1");
This is C-code, how to do the same in C# is up to you to figure out.
Please also not that using functions outside the documentation is unsupported and the behavior could be changed without notice.