Hey @bmercier and @Javi thank you both for the help! It looks like a simple post to the wsdl returns a 500 error when trying to use the portal with the full url to the isy:
const postBody = `
<s:Envelope>
<s:Body>
<u:Subscribe xmlns="urn:udicom:service:X_Insteon_Lighting_Service:1">
<reportURL>REUSE_SOCKET</reportURL>
<duration>Infinite</duration>
</u:Subscribe>
</s:Body>
</s:Envelope>`;
let headers = new HttpHeaders();
headers = headers.append('Authorization', 'Basic ' + btoa(`myportalemail@email.com:myportalpassword`));
headers = headers.append('Content-type', 'text/xml');
headers = headers.append('SOAPACTION', '"urn:udi-com:service:X_Insteon_Lighting_Service:1#Subscribe"');
this.http.post('https://my.isy.io/isy/ISYKEYHERE/services.wsdl', postBody, {
headers: headers, responseType: 'text'}).subscribe(res => {
console.log('Component - res:', res);
});
Returns:
ERROR
HttpErrorResponse {headers: HttpHeaders, status: 500, statusText: "Internal Server Error", url: "https://my.isy.io/isy/ISYKEY/services.wsdl", ok: false, …}
headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
status: 500
statusText: "Internal Server Error"
url: "https://my.isy.io/isy/ISYKEY/services.wsdl"
ok: false
name: "HttpErrorResponse"
message: "Http failure response for https://my.isy.io/isy/ISYKEY/services.wsdl: 500 Internal Server Error"
error: "Internal Server Error"
This works locally so I'm sure I'm missing something very basic.
Also, It looks like as mentioned above that you shouldn't need to include the url to the ISY when using the portal because the default behavior is to use the preferred isy, is this true?
Thanks so much!