Raspberry Pi, Tellstick & Website Interface

Moderator: Telldus

Post Reply
Half-Dead
Posts: 9
Joined: Fri Mar 17, 2023 9:45 am

Raspberry Pi, Tellstick & Website Interface

Post by Half-Dead »

With help from a few people in this forum I have managed to get my Tellstick working with my Raspberry Pi. When I go into the terminal and type tdtool --on 3 my light turns on. However, I would now like to create a web interface to run this command when a button is clicked. I have set up L.A.M.P on my Raspberry Pi so it now functions as a webserver and used a php file with the following script.

<?php
system ( "tdtool --on 3" );
?>

This does switch the light off when the button is clicked (or when i type 192.168.0.1/lightoff.php into my browser) but the website changes to display the result of the command i.e. tdtool --on 3 completed successfully. I would really like the light to turn off quietly and the website stay on the main page instead of redirecting to the success message.

Thanks in advance
Richard
Post Reply