POST url

Is there a way to send a POST URL from/in HE ?

Here is one way that I created a while ago...

Ignore the stuff about the Logitech Harmony Hub. Just focus on the http switch driver.

Nice... I just need a simple POST...

Swicth On sends -> http://192.168.0.43/relay/0?turn=on
Switch Off sends -> http://192.168.0.43/relay/0?turn=off

It's a shelly 1 relay if you have heard of them.

You should be able to easily modify the driver to achieve your goals. I believe some other community members may have also done the same.

1 Like

Perhaps a simpler driver to modify is an example from Hubitat itself.

Just change the Get to a Post and you should be in good shape.

1 Like

def params = [
uri: "http://" + ipAddress + "/relay/0?turn=on"
]

  try {
  	httpPost(params){response ->
  	}
  } catch (Exception e) {
  	log.error "${e}"
  }
4 Likes

LOL I just ported a shelly device from ST

https://community.hubitat.com/t/shelly-products/10153/6?u=sgrayban

1 Like

Thanks @ogiewon and @ritchierich !

2 Likes