Push notifications

Push notifications (Android and iOS) #

To use push notifications you must login into LM Cloud via the LM Home app once.

Push tokens for your devices can be found in LM Cloud settings.

Step-by-step guide #

  1. Install LM Home app on your mobile device.
    App Store Google Play

  2. Long press LM Home app icon and select "Go to LM Cloud".

  3. Log into your LM Cloud account.

  4. Click close (×) in Mosaic or go to the LM Cloud apps main page.
    Close Mosaic

  5. Click the cog icon in the LM Cloud apps main page.
    LM Cloud apps

  6. Click the copy icon to copy the relevant push token, then paste it into the notification script.
    LM Cloud settings

Script example #

push = require('applibs.lmcloud.push')

token = 'PUT_YOUR_TOKEN_HERE'
title = 'Push title'
body = 'Push message body'

res, err = push(token, title, body)
log(res, err)

Further assistance can be found in this forum thread