Hi, I would like tknow how to use Shelly Webhook (url) to activare esphome switch?
From esphome it is working like this
’ - http_request.post: http://192.168.xxx.xxx/relay/0?turn=on’
But how to do it the other way around. From shelly to esphome?
Thx in advance
Helmut
Dear nickrout,
thx so far I followd your sugestion.
I enabled Webserver and now I can read and handle all GPIO in the browser - great!!!
I tried to use “192.168.xxx.xxx/switch/trafo/turn_on” But just reveiced
"{“id”:“switch-trafo”,“value”:false,“state”:“OFF”}
GPIO not switched ON
Any idea?
Try turning logging up per Web Server API — ESPHome
I do note that the esp requires a GET request. I am not sure whether shelly does a GET or a PUT.
It won’t work from the browser as it can only perform a GET command and not a POST. See here:
I also tested mine with http (httpie in linux) and it worked ok:
ding_dong@plex:~$ http POST http://10.0.0.68/switch/relay3_direct/turn_on
HTTP/1.1 200 OK
Accept-Ranges: none
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 0