General question is whether anyone has setup FCM / GCM push notifications for a device driver? Meaning receiving push notifications, not sending push notifications.
I'm playing around with writing a device driver for a eufy security camera and looks like some folks on nodejs are able to setup push notifications through FCM/GCM by creating a TCP socket to mtalk.google.com:5228
. Not sure how to do this in hubitat of if it's even possible.
I tried doing this through different ways such as:
-
Raw Socket
interfaces.rawSocket.connect("mtalk.google.com", 5228, pingInterval: 300, byteInterface : true)
But I'm not getting any calls to the
socketStatus(msg)
method. -
Websocket
interfaces.webSocket.connect("ws://mtalk.google.com:5228", pingInterval: 300, ignoreSSLIssues: true, byteInterface : true)
gets an error
Failed to connect to mtalk.google.com/2607:f8b0:400e:c06:0:0:0:bc:5228