Code: Alles auswählen
Group gButtons
Group gButtonStates
Switch button1 "Markiese [%s]" (gButtons) { http=">[ON:POST:http://local/leds.cgi?led=1] >[OFF:POST:http://local/leds.cgi?led=1]" }
Switch button2 "Terrasse [%s]" (gButtons) { http=">[ON:POST:http://local/leds.cgi?led=2] >[OFF:POST:http://local/leds.cgi?led=2]" }
Switch button3 "Steckdose [%s]" (gButtons) { http=">[ON:POST:http://local/leds.cgi?led=3] >[OFF:POST:http://local/leds.cgi?led=3]" }
Switch button4 "Eingang [%s]" (gButtons) { http=">[ON:POST:http://local/leds.cgi?led=4] >[OFF:POST:http://local/leds.cgi?led=4]" }
Number button1_state "Markiese [%s]" (gButtonStates) { http="<[http://local/status.xml:3000:XPATH(/response/led1/text())]" }
Number button2_state "Terrasse [%s]" (gButtonStates) { http="<[http://local/status.xml:3000:XPATH(/response/led2/text())]" }
Number button3_state "Steckdose [%s]" (gButtonStates) { http="<[http://local/status.xml:3000:XPATH(/response/led3/text())]" }
Number button4_state "Eingang [%s]" (gButtonStates) { http="<[http://local/status.xml:3000:XPATH(/response/led4/text())]" }

Ach, wenn das Extern geändert wird. Die rule ändert leider nicht den Status der Button ...