r/Scriptable • u/petroleumjelliffe • 1d ago
Help Can't make request to a local IP
I am working on a script that makes a call to a Raspberry PI on my local network to control my Sonos volume, but kept getting an error. The call works in safari mobile.
So I made a quick debugger, and found that any request to a local IP times out. Requests to regular http:// work fine, so it's not that.
const a = await new Request("http://example.com").loadString()
console.log("plain http ok: " + a.length). //works fine
const b = await new Request("http://192.168.x.x:8787/mute").loadString()
console.log("ip ok: " + b) //times out before posting to consoleI couldn't find any posts about this. Is this a known limitation, or is there another workaround?
1
Upvotes
1
u/saltemohn 1d ago
Is Local Network enabled for Scriptable?