while true do
command = http.get("http://24.152.212.26:8080/tropo/command.txt")
if (command.readAll() == "lights_on") then
rs.setOutput("back", true)
http.get("http://24.152.212.26:8080/tropo/nullcommand.php")
end
if (command.readAll() == "lights_off") then
rs.setOutput("back", false)
http.get("http://24.152.212.26:8080/tropo/nullcommand.php")
end
end
So pretty much all that's going on here, is the computer is looking at a file called command.txt. The php that I have will change the contents of that file depending on what I tell it to do via my cell phone. Currently that file would be set to either null, lights_on, or lights_off. If I choose to turn the lights on, the command.txt file will be changed to lights_on. Then the redstone output in the back will be set to true. nullcommand.php just sets command.txt to null.
Everything works great, except lights_off. Lights_on works like a charm, but I'm not sure why lights_off wont work. If I switch lights_on and lights_off, lights_off works, but lights_on does not.
Anyone have any suggestions?












