NodeRed Ubports push notification support?



  • I am looking for someone to help implementing a Ubports push notification system for the really cool flow automation system NodeRed (very commonly used in home automatisation on a RasberryPi): https://nodered.org/

    There is already an existing node for Apple and Google push notifications, which could be extended:
    https://flows.nodered.org/node/node-red-contrib-push
    https://github.com/Xzya/node-red-contrib-push

    Ubport's push notification system is documented here:
    http://docs.ubports.com/en/latest/appdev/guides/pushnotifications.html
    and seems quite similar to existing systems.

    I am a bit out of my current level of expertise to do this myself, so help would be much appreciated.



  • Hey, feel free to ask me if you have explicit questions. I dont have much time but will try to answer as soon as possible. First would be that you make your app ready to receive Push Notifications described in the guide in the docs and then you can send them with a http request similar to Google Firebase. The json fields just need to get other names and thats it.

    Btw in the openstore you find the app PushClient where you cann see a minimal working example to use the UBports Push Service



  • Thanks lot for the offer to help answering questions, but after having looked a bit at the code in question, I really don't think I would be able to do it my self (even with some help).

    I could probably help with bug-fixing and testing, but the main bulk would have to be done by someone who actually knows what they are going 😞



  • Are you sending those pushes from outside a UT device? The push server only needs to receive 1 HTTP request with the right data, and your App needs to register for push, take the token from that result and send it to your server. This is not so hard to do, you will find examples with other Apps as krille mentioned, and sending an HTTP push message is something you can also copy from the internet.

    BR



  • @Flohack Yes the overall system seems quite easy, but the devil lies in the details. Starting from scratch would be reinventing the wheel when there are those nice existing NodeRed nodes. But they reference further NodeJS libraries and while all of that is probably not a big deal for an somewhat experienced Javascript developer, I am somewhat lost looking at it 😕