Saved Command on Notifications does not work

Mormaroa year ago

Hi team,

I'm currently configuring notifications to inform me when GPS enters a Geofence and send commands via TCP session to reconfigure the device.

When setting the "Saved Command" and clicking on "Test Channels" only Telegram Notification works, and the server provides following error:

Saved command not provided - MessageException (NotificatorCommand:49 < NotificationResource:96 < ... < OverrideFilter:50 < ...)

Thing is that if I try to push the Saved Command from the option on the map interface, it works correctly. Logs do not provide me any info regarding the problem:

2023-06-23 17:31:20  INFO: [T8de4d139: h02 > 46.6.147.193] 52434f4e46
2023-06-23 17:32:18  INFO: [T8de4d139: h02 < 46.6.147.193] 2a48512c373032383032303938312c56312c3135333231372c562c343132342e343836392c4e2c30303231302e383330372c452c3030312e37312c3030302c3233303632332c46464646424246462c3231342c30332c323132362c3537342c303423
2023-06-23 17:32:18  INFO: [T8de4d139] id: 7028020981, time: 2023-06-23 17:32:17, lat: 41.40812, lon: 2.18051, speed: 1.7, course: 0.0
2023-06-23 17:32:18  INFO: [T8de4d139: h02 > 46.6.147.193] 2a48512c373032383032303938312c56342c56312c323032333036323331353332313823
2023-06-23 17:33:02  INFO: [T8de4d139: h02 > 46.6.147.193] 52434f4e46
2023-06-23 17:33:03  INFO: [T8de4d139: h02 < 46.6.147.193] 2a48512c585858585858585858582c534d532c415530382c49443a585858585858585858582c55503a303030302c55313a5858585858585858582c55323a5858585858585858582c55333a5858585858585858582c4d4f44453a475052532c4441494c593a4f46462c47454f2046454e43453a4f46462c4f5645522053504545443a4f46462c564f4943453a4f4e2c5348414b4520414c41524d3a4f46462c534c4545503a4f46462c41504e3a696e7465726e65742c696e7465726e65742c696e7465726e65742c49503a582e582e582e583a353031332c475052532055504c4f41442054494d453a3630302c54494d45205a4f4e453a45303223

First message at 17:31:20 is triggered by notification, which does not reach the device, it seems, while same command on 17:33:02 is triggered by me with send command option

Thanks for the help

Regards

Anton Tananaeva year ago

Test channels doesn't work with command option yet, so that's expected.

As for the not triggered command based on event, unfortunately you haven't provide enough evidence to show that's everything is configured correctly and there was an event at the time.

Mormaroa year ago

Hi Anton,

A small video to prove what I was saying: https://drive.google.com/file/d/1De1-tB1ICb-U05bTlgi3jC9dS-bwnqL_/view?usp=sharing

First test done with "Send Command", then I reproduce the effect of exiting the Geofence, and the Web/Telegram notifications work, and even the command seems to be executed, but it does not seem to reach the device as the first test does.

And this happens eveytime

Regards

Anton Tananaeva year ago

Yeah, everything looks correct. Not sure why the command didn't work. Do you see it in the database? Maybe it was queued?

Mormaroa year ago

Hi Anton,

Not sure how to check. Could you point me to the necessary documentation or provide me some initial steps? I'm not used to working with databases

Regards

Anton Tananaeva year ago

Check the tc_commands_queue table in the database.

I have version 6.4 and I have the same problem, the command sent appears in the log but it doesn't reach the device, I've tried everything without success

Anton Tananaev2 months ago

What exactly do you see in the logs?

Well, in the log it looks like the command is sent correctly

2024-09-18 13:20:18  INFO: Event id: 358657102682551, time: 2024-09-18 13:20:17, type: alarm, notifications: 1
2024-09-18 13:20:18  INFO: [Tcee90f47] id: 358657102682551, command type: engineStop sent

I just updated to version 6.5 and it won't work either.

Anton Tananaev2 months ago

Do you see the raw command in the logs? If yes, it means it was sent to the device.