Is there anyway I can check if a TellStick is connected without issuing an ON/OFF command ?
If I do a 'tdtool --list' I get a list of known switches whether or not the TellStick is connected.
Is there a 'tdtool --status' command that says whether a TellStick is connected ?
I'm currently having to read the USB device list for 'TellStick', but it would be nice if tdtool did this.
Detecting TellStick
Moderator: Telldus
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Detecting TellStick
There will be functions in the API for this in the next versions of the software. Currently there is no functions for it.
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
-
- Posts: 10
- Joined: Fri Mar 17, 2023 9:45 am
Re: Detecting TellStick
OK, thanks Micke.....
I downloaded the source and hacked a quick 'status' option into tdtool, it does what I need.
And when the TellStick is unplugged
I kept the output simple as I use PHP to run the script, and I get a simple 2 part array returned [0]=TellStick and [1]=connected/disconnected. Does just what I need.
I downloaded the source and hacked a quick 'status' option into tdtool, it does what I need.
Code: Select all
C:\Program Files\Telldus\tdtool --status
TellStick connected
C:\
Code: Select all
C:\Program Files\Telldus\tdtool --status
TellStick disconnected
C:\
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Detecting TellStick
You could parhaps return one of the error-codes from tdtool?
TELLSTICK_SUCCESS if the TellStick is found, TELLSTICK_ERROR_NOT_FOUND if it's not.
That would make it even easier to parse from a script.
TELLSTICK_SUCCESS if the TellStick is found, TELLSTICK_ERROR_NOT_FOUND if it's not.
That would make it even easier to parse from a script.
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Detecting TellStick
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies