So I’ll star by saying I’m pretty literate when it comes to most digital things… I dabble in html, css, SQL, jquery, php, all aspects of networking and domains etc and it’s all self taught/google.
I’ve got a decent smart home setup now, 6 x echos, 10 fibaro dimmers, 2 nest protects, harmony hub, hue lights and a few other bits. I’m running openhab as my main controller on a QNAP NAS. So I’ve just bought a load of Shelly 1’s to do all my sockets (didn’t want bulky plugs and they are the only product out there rated above 13amp for the uk.
Now there’s no binding for them, I don’t want to go down the MQTT route as it disables cloud and also another thing to keep running. It has an api and I can successfully turn on/off through the browser url.
I’m struggling to get it working through openhab tho and having read for hours and experimented I can honestly say I’m lost. I’ve tried a dummy switch with a rule to send the http command but it throws an error.
I’ve read an openhab post where someone got working with exec binding and curl but I just can’t find enough information to even know where to start.
If someone could point me in the right direction/help me with the item it would be most appreciated.
That’s what I thought and did, it just doesn’t work. I’ll grab the error and post in a minute.
Do I need to put anything in the http.cfg file. The binding information just wasn’t very clear.
rule "Kitchen Light" when Item KitchenLight received command then
if (receivedCommand==ON)
{
sendHttpGetRequest(”http://192.168.6.17/relay/0?turn=on”)
}
else if (receivedCommand==OFF)
{
sendHttpGetRequest(“http://192.168.6.17/relay/0?turn=off”)
}
end