Jump to content

Does Portal support WebSockets (Subscriptions)?


FerventGeek

Recommended Posts

Posted
11 hours ago, FerventGeek said:

I'm looking at the Portal API in case I have to move away from MobiLink with a shift to IoP on Polisy. 

Does the UD Portal support REST subscriptions? https://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#Subscriptions_(Web_Sockets)

Portal does not support websockets.

You can however get a subscription using a web service. You have to make a POST /services (using preferred ISY) or POST /<isyKey>/services

This should get you started:

const customHeader = { SOAPACTION : '"urn:udi-com:service:X_Insteon_Lighting_Service:1#Subscribe"' }
const body = new Buffer.from('<s:Envelope><s:Body><u:Subscribe xmlns:u="urn:udi-com:service:X_Insteon_Lighting_Service:1"><reportURL></reportURL><duration>infinite</duration></u:Subscribe></s:Body></s:Envelope>')

 

Benoit

 

 

 

 

  • Like 2
Posted
1 hour ago, bmercier said:

Portal does not support websockets.

You can however get a subscription using a web service. You have to make a POST /services (using preferred ISY) or POST /<isyKey>/services

This should get you started:

const customHeader = { SOAPACTION : '"urn:udi-com:service:X_Insteon_Lighting_Service:1#Subscribe"' }
const body = new Buffer.from('<s:Envelope><s:Body><u:Subscribe xmlns:u="urn:udi-com:service:X_Insteon_Lighting_Service:1"><reportURL></reportURL><duration>infinite</duration></u:Subscribe></s:Body></s:Envelope>')

Thanks. I already built something like that- golang subscriber pushing to AWS SNS. Still hoping it will eventually be built into a portal. The old SOAP wrappers have all the magic.

Guest
This topic is now closed to further replies.

×
×
  • Create New...