(13.02.2025, 16:27)Daniel Wrote: If you using Push notifications app then you are not using LM Home app. The script above is for LM home app not LogicMachine app which is the older version. https://kb.logicmachine.net/notification...fications/
I installed the LM Home app also, but when I open it, the gear icon is not there.
Check the attached picture
For see the gear icon and system you must log as administrator, not user
BR Cristian
(13.02.2025, 16:27)Daniel Wrote: If you using Push notifications app then you are not using LM Home app. The script above is for LM home app not LogicMachine app which is the older version. https://kb.logicmachine.net/notification...fications/
I installed the LM Home app also, but when I open it, the gear icon is not there.
Check the attached picture
For see the gear icon and system you must log as administrator, not user
BR Cristian
(14.02.2025, 07:43)admin Wrote: To login into LM Cloud via LM Home app either click and hold LM Home icon and select "Go to LM Cloud" or temporarily turn of Wi-Fi on your phone.
Hi.
I still have two questions:
1) In local network, credentials seems to be unsaved (however password stored in iphone, but need to put user name + password every time). I can of course store the password in icloud, but i really think it is disturbing having to enter password all time (no, I don't use admin).
2) Any way to use simpler names instead of full token? Also any way to make groups of phones or to push to all phones?
If we are three users, it would be nice to have "xxx's phone", "yyy's phone", and "zzz's phone". + "push to all".
1. Check that "Remember login and password" is enabled in LM > Users > User access settings. Don't use admin user for the app. Keep the app running in the background after the first login otherwise the credentials might not be saved.
2. Create a user library named push, provide user names, tokens and create groups as needed.
local groups = {
['Group A'] = { 'User A', 'User B' },
['Group B'] = { 'User B', 'User C' },
}
return function(name, title, body)
local push = require('applibs.lmcloud.push')
local token = tokens[ name ]
if token then
return push(token, title, body)
end
local group = groups[ name ]
if group then
local ress, errs = {}, {}
for _, tname in ipairs(group) do
token = tokens[ tname ]
if token then
local res, err = push(token, title, body)
if res then
ress[ name ] = true
else
errs[ name ] = err
end
else
errs[ name ] = 'not found'
end
end
return ress, errs
end
return nil, 'not found'
end
Usage:
Code:
push = require('user.push')
name = 'Group A'
title = 'Push title'
body = 'Push message body'
(17.02.2025, 08:00)admin Wrote: 1. Check that "Remember login and password" is enabled in LM > Users > User access settings. Don't use admin user for the app. Keep the app running in the background after the first login otherwise the credentials might not be saved.
2. Create a user library named push, provide user names, tokens and create groups as needed.
local groups = {
['Group A'] = { 'User A', 'User B' },
['Group B'] = { 'User B', 'User C' },
}
return function(name, title, body)
local push = require('applibs.lmcloud.push')
local token = tokens[ name ]
if token then
return push(token, title, body)
end
local group = groups[ name ]
if group then
local ress, errs = {}, {}
for _, tname in ipairs(group) do
token = tokens[ tname ]
if token then
local res, err = push(token, title, body)
if res then
ress[ name ] = true
else
errs[ name ] = err
end
else
errs[ name ] = 'not found'
end
end
return ress, errs
end
return nil, 'not found'
end
Usage:
Code:
push = require('user.push')
name = 'Group A'
title = 'Push title'
body = 'Push message body'