I’m having some trouble with what I thought would be simple! I just need a script for my router to connect to my home automation to power cycle some devices as required. It just needs to open a link in the form off the following;
http://192.168.20.11:3480/data_request?id=action&DeviceNum=113&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0
I’ve tried a few things like;
/tool fetch url=“http://192.168.20.11:3480/data_request?id=action&DeviceNum=113&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&output_format=json”
/tool fetch address=192.168.20.11 src-path=data_request?id=action&DeviceNum=113&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0 port=3480 mode=http
But keep getting various errors, mainly failed (6).
I don’t need to keep the returned XML file, just as long as the GET request has gone through. I’m hoping to use the script in Netwatch Down.
You need to escape the “?”, as it triggers the help, and in turn doesn’t get added to the URL, causing a wrong URL to be called, in turn causing a 404, in turn causing the error message.
i.e. use
/tool fetch url="http://192.168.20.11:3480/data_request\?id=action&DeviceNum=113&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&output_format=json"
Thank you, thank you, thank you! I wansn’t even thinking of this as a possibility and I would have been hours stressing over this. Worked first time. 
I don’t suppose you also know how I can modify this so it doesn’t save the file or automatically deletes it?
/tool fetch url="http://192.168.20.11:3480/data_request\?id=action&DeviceNum=113&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&output_format=json" keep-result=no
(notice that last part)
Just in case you ever need it, a list of escapes is in the scripting language manual.
Thank you. Sorry the second part was simple and should have got that myself. Very much appreciate the help.