Pi Home Automation Example

This page lets you toggle an example switch on and off.

'; shell_exec($run_cmd); } } if ($_GET['switch']) { switch($_GET['switch']) { case 'on': on_off('on'); break; case 'off': on_off('off'); break; } } ?>

Send command to turn ON or OFF