Jump to content

Curl to Network Resource translation


atmarosi
Go to solution Solved by whywork,

Recommended Posts

Posted

Did some searching but couldn't find anything of the sort - so here we are...

Got a Digital Logger's DIN Relay 4, trying to leverage Network Resources to trigger REST API call on said DIN Relay 4.  Using Curl on test box on the same network I'm able to have a relay fire, but can't figure out how to chop up the curl command into something for Network Resources to consume...Any ideas?

Working curl:

curl --digest -u admin:admin -X PUT -H "X-CSRF: x" --data "value=true" "http://10.10.10.10/restapi/relay/outlets/2/state/"

Thanks in advanced!

 

Posted

Found a work around in the mean time; Home Assitant + Wemo Relay Devices (Digital Loggers allows their relays to show up as a Wemo device).   I can setup the necessary automations in HA until i figure it out further with Network Resources.  

  • Solution
Posted

Hi

I dont have Din Relay but do have Digital loggers web powerswitch

Here is the network resource i use to turn on outlet 3

GET /outlet?3=ON HTTP/1.1
Host: 192.168.1.174:8074
User-Agent: Mozilla/4.0
Connection: Close
Content-Type: application/x-www-form-urlencoded
Authorization: Basic (password is requested, then saved when setting up network resource)
 

Guest
This topic is now closed to further replies.

×
×
  • Create New...