Motion Event - State, Time ...

B.Ihaba year ago

Hi there,
I noticed that not all devices has motionTime/motionDistance value ( lot of them have it on null ), but all of them has a motionState probably due to default value, I noticed also that motionState aren't always correct some of the devices has motionState on 1 and status - device - is offline and even motion in position attribute is false, probably due to not having a motionTime?
I'm not sure if this is an issue or if this is intended.

Tested on 2 different servers, with different devices - staging and prod -

Anton Tananaeva year ago

Probably intended. It's hard to tell without more specific details.

B.Ihaba year ago

On Staging:

+----+-----------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+
| id | name            | uniqueid        | lastupdate          | positionid | groupid | attributes | phone      | model  | contact | category | disabled           | status  | expirationtime      | motionstate              | motiontime | motiondistance | overspeedstate                 | overspeedtime | overspeedgeofenceid | motionstreak               | calendarid |
+----+-----------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+
|  2 | Opel - 000000WW | 350544500000000 | 2023-09-03 21:51:50 |    3910794 |    NULL | {}         | 0000000000 | fmb920 | NULL    | car      | 0x00               | offline | 2024-08-26 23:00:00 | 0x01                     | NULL       |              0 | 0x00                           | NULL          |                NULL | 0x01                       |       NULL |
|  3 | 208 - 000000WW  | 350540000000000 | 2023-09-03 22:28:48 |    3910885 |    NULL | {}         | 0000000000 | fmb920 | NULL    | car      | 0x00               | offline | 2024-09-02 23:00:00 | 0x01                     | NULL       |              0 | 0x00                           | NULL          |                NULL | 0x01                       |       NULL |
+----+-----------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+

On prod:

+----+---------------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+---------------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+
| id | name                | uniqueid        | lastupdate          | positionid | groupid | attributes | phone      | model  | contact | category | disabled           | status  | expirationtime      | motionstate              | motiontime          | motiondistance | overspeedstate                 | overspeedtime | overspeedgeofenceid | motionstreak               | calendarid |
+----+---------------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+---------------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+
|  1 | CITRO�N  JUMPY      | 000002102570451 | 2023-09-03 19:54:15 |  295734700 |    NULL | {}         | 0000045175 | fmb920 | NULL    | car      | 0x00               | offline | 2023-12-18 23:00:00 | 0x00                     | 2023-09-03 19:52:53 |   569065619.23 | 0x00                           | NULL          |                NULL | 0x01                       |       NULL |
|  2 | Logan - 00000A11    | 000003293793101 | 2023-09-03 22:32:45 |  295927712 |    NULL | {}         | 0000020936 | fmb920 | NULL    | car      | 0x00               | offline | 2024-07-01 23:00:00 | 0x00                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x00                       |       NULL |
|  3 | Logan - 00000-D-8   | 000002071565194 | 2023-06-18 12:33:53 |  191490541 |    NULL | {}         | 0000073545 | fmb920 | NULL    | car      | 0x00               | offline | 2024-06-19 23:00:00 | 0x00                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x00                       |       NULL |
|  4 | Clio4 - 00000-0-00  | 000005033812080 | 2023-09-03 22:37:24 |  295932199 |    NULL | {}         | 0000059390 | Tk103  | NULL    | car      | 0x00               | online  | 2024-03-05 00:00:00 | 0x00                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x00                       |       NULL |
|  5 | Clio 4 - 00000-0-00 | 000000033811991 | 2023-09-03 22:37:44 |  295932538 |    NULL | {}         | 0000025524 | tk103  | NULL    | car      | 0x00               | online  | 2024-03-18 00:00:00 | 0x01                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x01                       |       NULL |
|  6 | Express 2_aaaaaaaa  | 000000032294538 | 2023-09-03 22:37:39 |  295932475 |    NULL | {}         | 0000390000 | TK     | NULL    | car      | 0x00               | online  | 2024-07-10 00:00:00 | 0x00                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x00                       |       NULL |
|  7 | Express 1_bbbbbbbb  | 000000030937310 | 2023-09-03 22:37:37 |  295932443 |    NULL | {}         | 0000400000 | TK     | NULL    | car      | 0x00               | online  | 2024-07-10 00:00:00 | 0x01                     | NULL                |              0 | 0x00                           | NULL          |                NULL | 0x01                       |       NULL |
+----+---------------------+-----------------+---------------------+------------+---------+------------+------------+--------+---------+----------+--------------------+---------+---------------------+--------------------------+---------------------+----------------+--------------------------------+---------------+---------------------+----------------------------+------------+

If it's a bug I'll try to solve it, I just want to be sure that it's not an issue in my own config.

B.Ihaba year ago

Sorry, but I have a simple question: when should the motion event be handled?

Anton Tananaeva year ago