Hello, i have a problem with my fritz.box an pimatic.
I want to reconnect the Internetconnection from fritz.box via pimatic.
Over ssh i can execute the script and all fine.
pi@raspberrypi:~ $ bash reconnect.sh <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:ForceTerminationResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnectio n:1"> </u:ForceTerminationResponse> </s:Body>
But over pimatic GUI with Button i have this output
<?xml version="1.0"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <s:Fault> <faultcode>s:Client </faultcode> <faultstring>UPnPError</faultstring> <detail> <UPnPError xmlns="urn:schemas-upnp-org:control-1-0"> <errorCode>502</errorCode> <errorDescription>XML error </errorDescription> </UPnPError> </detail> </s:Fault> </s:Body> </s:Envelope>
what is the problem the diffrent?
The rule to execute
{
"id": "fb-reconnect",
"name": "FB Reconnect",
"rule": "when fb reconnect is pressed then execute \"/home/pi/reconnect.sh\"",
"active": true,
"logging": true
}
The Script:
#!/bin/bash
curl -s "http://fritz.box:49000/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "@reconnect.xml"