scripting + php
Closed this issue · 1 comments
hi there,
your code is great, just what I was looking for.
For my webpage (php) that controls my whole house (almost :) ) : lights, WOL to a pc, garage door, ... I want it to control some basic stuff of the LMS (power on, off and play/pause).
For that I need to do a little scripting, but unfortunately I'm not there. Could you help? My guess it is a stupid small thing (newline, quote, ..).
What I got:
function muz_aan(){
$cmd2=shell_exec("pylms --host 192.168.1.250 --device 00:11:00:11:22:03 -r get_power_state");
if ($cmd2 == "True") {
$muz_power_out="LMS is ON";
} else {
$muz_power_out="LMS is OFF";
}
$muz_aan_out="$muz_power_out";
return $muz_aan_out;
print '
Muzieksysteem ' .$muz_aan_out. '
';thnaks all!
did some scripting in bash, what worked well