I have a few (hopefully) quick questions about interfacing with the telldus API using php. I know dll-files can be loaded into php (as COM-objects) on Windows, but I will be running homebrew software on a Raspberry Pi. This means Linux and as far as I know, there is no way to load so-files into php.
Has anyone written something that makes interfacing with the Tellstick Duo a bit easier? I'm thinking of writing a small c-application that includes the telldus-core library, and will do the following:
- Listen for incoming commands on an UDP-socket (on, off, list, dim, bell, etc).
- The "list"-command would reply by way of UDP-broadcast (since no other channels of communication are open), allowing all Tellstick-related services on the LAN to get the same device list update as a side effect.
- UDP-broadcast event data whenever an event is triggered (sensor or device data).
(First, I'm thinking about using UDP simply because a proper multi-client TCP-server needs to be threaded and as such is beyond my current c-skills (or at least the time I'd spend, skill level considered). If someone wrote a TCP-interface for the telldus-api though, I'd be more than happy to use it.)
Thus, my php daemon would need to listen for UDP broadcasts on a given port, and trigger whatever event/sensor handler I choose to write. In addition, it should store the ip from which said broadcast originated, allowing the php daemon to send control commands in return.
Any input would be appreciated as I will be receiving my Tellstick Duo tomorrow, and I find it rather irksome that there seems to be no good way of controlling it using php. Why on Earth the Telldus-devs haven't seen fit to implement something simple such as a socket/file/device one can read from to get events is beyond me. Hopefully it's my lacking knowledge that stops me from controlling my Tellstick Duo using php, not a choice by the Telldus dev team to exclude one of the most used computer languages on the planet.

Oh, also, is there a command line utility that does the same thing as tdtool.exe, only.. you know.. better? Tdtool's "list" option returns no info in the way of device type (dimmer, group, switch, etc). As of right now, I have to maintain data about the devices in a separate file/database, despite the fact that this information exists somewhere in the Telldus software. TelldusCenter is, after all, aware whether a device is a dimmer, a group or a switch. If "tdtool -l" could tell me this I'd be a content, if not happy camper as far as device listing and control goes.
Still though.. getting those events..