How to send http request?

I had the same problem when I started with openHAB, I ended up doing it like this.

Item

Switch networkLamp "Lamp"

Sitemap

Switch item=networkLamp

Rule

rule "Network Lamp ON"
when
	Item networkLamp received update ON
then
	sendHttpGetRequest("http://192.168.1.3:6001/do.nes?arguments=100")
end

rule "Network Lamp OFF"
when
	Item networkLamp received update OFF
then
	sendHttpGetRequest("http://192.168.1.3:6001/do.nes?arguments=0")
end
1 Like