I attached the sketch for better reading.
It is basically the bridge example for the Arduino Yun with some modification to respond to commands like:http://IP/command/1/1
The reply for the commands except for status will be the same as the sent command to check if received correctly. Status as well as other information will give a specific code to say what it is doing. This will be returned over http (switch case) but is not yet implemented. Actually I plan to do it the same way as I give out the temperature, except it will be a String.
For the receiving part I need some ideas. Because I want to use the result of a reply right after sending in the same function I thought it makes sense to wait 10 seconds before reading instead of reading in the loop.
I'm open for any suggestions as well as for corrections.