Posts: 32
Threads: 3
Joined: May 2023
Reputation:
0
(10.11.2023, 10:59)Daniel Wrote: Obviously you didn't add any android device to push app. The common mistake is to configure android app before LM.
Make sure you are on the same local network as LM. Go to LM android app, edit your user, disable push notification, save then edit and enable again and save.
Refresh push notification app in LM to see if your device was added. You can then test it directly from the app.
Yes, that turned out to be the problem!
Thanks!
Posts: 48
Threads: 1
Joined: Mar 2019
Reputation:
1
I can´t get the Push notifications working with IOS 17.6.1
Even in the Push application app i cant send Messages. The error is allways
Code: arg: 1
* nil
* arg: 2
* table:
["ios"]
* table:
[1]
* string: SenderId mismatch
[2]
* string: authorization error
LM FW is 20240426 on a LM2i
any ideas what the error could be ?
Posts: 4776
Threads: 24
Joined: Aug 2017
Reputation:
216
Thanks, we are aware of this issue and working on solution.
------------------------------
Ctrl+F5
Posts: 4776
Threads: 24
Joined: Aug 2017
Reputation:
216
Check it now, it works again.
------------------------------
Ctrl+F5
Posts: 48
Threads: 1
Joined: Mar 2019
Reputation:
1
Many thanks, everything is working again
Posts: 13
Threads: 0
Joined: May 2024
Reputation:
0
Hi,
I am dealing with a restrictive Network and the Customer wants Push Notifications on his Smartphone. I need a Port list for the IT support.
Are you using TCP 443, 5223 and 2197 for Apple and TCP 443, 5228 and 5229/52230 for Android?
Thanks for your Time
Kind regards
Posts: 4776
Threads: 24
Joined: Aug 2017
Reputation:
216
From LM side we use 443 and 8883 but this are outgoing ports. The push notifications are Android and iOS system notifications, we don't use any ports on them.
------------------------------
Ctrl+F5
Posts: 5
Threads: 0
Joined: Dec 2024
Reputation:
0
Hello,
We are facing an issue with the push notification functionality. The application we are using the LM for is taking place in a ship, where we use the Logic Machine 5 (LMp2-GSM) in order to receive with the use of MODBUS RTU alarms from the Monitoring System of the ship (essentially the LM is connected to a PLC device) and then send a few push notifications to the crew of the ship to notify them for alarms etc.
More specifically:
1) a bit from the PLC is turned on, then the user receives a push notification. This is achieved with the use of an Event Script.
2) after a couple of minutes, the alarm will repeat itself unless it has been acknowledged from the crew members. This is achieved with the use of a Resident Script.
3) The acknowledgment is done through the Mosaic UI with the push of a button and an Event Script.
The issue here is that this whole application may not work as intended at all times:
1)the push notification from the first bit may not be sent at all and only receive push notifications from the repeat functionality.
2)the repeat function, which repeats the first message, is generally repeated after the correct time specified time (1minute)
but every few repeats its stops for 10-15 minutes and then starts again.
We are buffled as to why these things occure.
Thank you for your time.
Code: -- this is the Event Script that is activated with each alarm and sends the first message
-- Each alarm is a separate event script with a dedicated object that activated it
pusher = require('applibs.pusher')
Fire_Alarm=grp.getvalue("32/1/24")
if (Fire_Alarm==true) then
status, errors = pusher.send('Captain', '**FIRE ALARM ACTIVATED**\n Please Check The Fire Alarm System!')
status, errors = pusher.send('Chief_engineer', '**FIRE ALARM M/E ALARM ACTIVATED**\n Please Check The Fire Alarm System!')
grp.write('0/1/11',1)
end
Code: --here the repeat function starts
-- essentially each alarm that is activated by an Event Script, activates the object '0/1/11' which then starts a counter. When the counter reaches 3 then is sends the correct message depending on the object that is active
-- when the alarm is ackowlegded, the object of the activation is turned to 0 and the object '0/1/11' is turned to 0 as well
ff=grp.getvalue("0/1/11") -- this bit is set to TRUE with each alarm
count=grp.getvalue('1/1/7') -- this is the counter variable
if (ff == true) then
count = count +1
grp.update('1/1/7',count)
elseif (ff==false) then
grp.update('1/1/7',0)
grp.update('1/1/3',0)
end
if count >= 3 then
grp.update('1/1/3',1) -- this variable when set to TRUE is what initiates the re-send of the push notification
grp.update('1/1/7',0)
elseif count == 1 then
grp.update('1/1/3',0)
end
pusher = require('applibs.pusher')
cnt = grp.getvalue('1/1/3') -- this variable is the trigger for repeatance
--table{"32/1/18","32/1/17"}
local objects={
obj1 = grp.getvalue("32/1/2"),
obj2 = grp.getvalue("32/1/3"),
obj3 = grp.getvalue("32/1/4"),
obj4 = grp.getvalue("32/1/5"),
obj5 = grp.getvalue("32/1/6"),
obj6 = grp.getvalue("32/1/7"),
obj7 = grp.getvalue("32/1/8"),
obj8 = grp.getvalue("32/1/9"),
}
local push={
obj1 = ' **POWER ALARM ACTIVATED**\n Please Check The Monitoring System! ',
obj2 = ' **TANK ALARM ACTIVATED**\n Please Check The Monitoring System! ',
obj3 = ' **PORT M/E ALARM ACTIVATED**\n Please Check The Monitoring System! ',
obj4 = '**STBD M/E ALARM ACTIVATED**\n Please Check The Monitoring System!',
obj5 = '**FIRE ALARM ACTIVATED**\n Please Check The Fire Alarm System!',
obj6 = '**WATERTIGHT DOOR ALARM**\n Please Check The System!',
obj7 = '**HI FOG ACTIVATED**\n Please Check The System!',
obj8 = 'This is the 8th',
}
if cnt == true then
for obj, isActive in pairs(objects) do
if isActive then
status, errors = pusher.send_all(push[obj])
end
end
end
Posts: 7876
Threads: 42
Joined: Jun 2015
Reputation:
450
Log the result of sending push messages:
Code: status, errors = pusher.send(...)
log(status, errors)
Most likely the connection is unstable.
Posts: 5
Threads: 0
Joined: Dec 2024
Reputation:
0
(19.12.2024, 10:55)admin Wrote: Log the result of sending push messages:
Code: status, errors = pusher.send(...)
log(status, errors)
Most likely the connection is unstable.
Thank you for your quick reply,
I have left the system repeating the alarm unacknowledged for about an hour.
The logs show that the script for repeating is executed on time, every time.
The users however have differences on the time and frequency they receive the push notifications.
For example, I may receive a notification every 1 minute but another one may have 20 minutes of interval between the notifications?
Do you think that there may be a fault with the script and it may be executing too quickly?
Posts: 7876
Threads: 42
Joined: Jun 2015
Reputation:
450
Are you sending push notifications to Android or iOS? We've increased message priority for Android, see if it helps. Unfortunately it's not possible to increase priority for iOS messages.
Posts: 5
Threads: 0
Joined: Dec 2024
Reputation:
0
(20.12.2024, 07:55)admin Wrote: Are you sending push notifications to Android or iOS? We've increased message priority for Android, see if it helps. Unfortunately it's not possible to increase priority for iOS messages.
We are sending to both IOS and Android devices and both of them have the same issue. The thing is that some times the it is like the service stops completely after repeating the push notification for a few times and then restarts after some time. The logs show that the script is executed on time but the notifications are not sent.
Posts: 4776
Threads: 24
Joined: Aug 2017
Reputation:
216
Please share these logs
Code: status, errors = pusher.send(...)
log(status, errors)
------------------------------
Ctrl+F5
Posts: 5
Threads: 0
Joined: Dec 2024
Reputation:
0
(20.12.2024, 08:22)Daniel Wrote: Please share these logs
Code: status, errors = pusher.send(...)
log(status, errors)
date,"script","text"
2024.12.19 14:28:36,"repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:29:02","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:29:32","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:29:58","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:30:25","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:30:54","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:31:20","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:31:47","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:32:16","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:32:42","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:33:09","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:33:38","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:34:04","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:34:31","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:35:00","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:35:27","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:35:53","repeat","* arg: 1
* bool: true
* arg: 2
* nil
2024.12.19 14:36:22","repeat","* arg: 1
* bool: true
* arg: 2
* nil
Posts: 4776
Threads: 24
Joined: Aug 2017
Reputation:
216
And what was the outcome based on this log?
------------------------------
Ctrl+F5
Posts: 5
Threads: 0
Joined: Dec 2024
Reputation:
0
(20.12.2024, 11:17)Daniel Wrote: And what was the outcome based on this log?
The script, based on this log, kept executing properly but the push notifiactions would stop being sent and then restart sending after like 20 minutes or so.
This is happening constantly but in irregular paterns. This is what has been buffling us
Posts: 7876
Threads: 42
Joined: Jun 2015
Reputation:
450
Try sending messages now then send your tokens via PM so we can check logs.
Posts: 7876
Threads: 42
Joined: Jun 2015
Reputation:
450
Messages are being sent to the cloud messaging service without any errors. What happens next is out of our control.
Since you are using old LM app, you can try sending push notifications via LM Home app: https://kb.logicmachine.net/notification...fications/
|