¿ªÔÆÌåÓý

Locked Re: Populating Reporters via MQTT messages (Was Re: JMRI / RFID / Ethernet) #rfid #mqtt


 

Thank you for the tests and LocoNet monitor info.

I¡¯ve attached my detailed analysis of what¡¯s happening to reduce the length of this post. Note that this is very LocoNet specific, and doesn¡¯t say anything about what¡¯s happening on other kinds of Reporters.

Basically:

1) Each time you move the locomotive, two sets of two messages are sent. The first two e.g.
19:54:25.319: [D0 27 69 11 18 68] Transponder address 2200 present at LR1002 ()
19:54:25.327: [E0 09 27 69 11 18 40 00 11] Transponder address 2200 facing West present at LR1002 ().
Is the arrival messages in the new block. JMRI processes the first of those two messages and ignores the 2nd.
The second pair e.g.
19:54:28.731: [D0 01 57 11 18 70] Transponder address 2200 absent at LR216 (B4S) (BXP88 Board ID 27 section 8 or the BXPA1 Board ID 216 section).
19:54:28.739: [E0 09 01 57 11 18 40 00 09] Transponder address 2200 facing West absent at LR216 (B4S).
Is the departure message from the previous block, which is produced about 3-3.5 seconds later.

2) The ¡°last seen¡± in the IdTag table goes to the arrival block on the 1st pair of messages, and then goes to the departed block upon receipt of the 2nd. In other words, when a train arrives, the IdTag will show where it arrived for three seconds, then show where it departed from. All though this is in some sense consistent with what ¡°last seen¡± means (it was ¡°last seen¡± leaving the block), it doesn¡¯t seem to be the most useful behavior

3) The first pair of messages sets the previous Reporter to blank, and shows ¡°2200 entry¡± on the entered Reporter. Three seconds later, receiving the departure messages in the previous detection zone sets the arrival Reporter to blank, and shows ¡°2200 exits¡± on the departure Reporter. Again, one could argue this is right for the current report, but perhaps not for the last report.


So there seem to be several things that could be improved in this behavior (without considering what the changes might break, and remembering that this is specific to LocoNet transponding behavior)

A) The IdTag¡¯s ¡°Last seen¡± should be the last place _seen_, i.e. the last place that has ¡°enter¡± in the report

B) The Reporter's ¡°Last Report¡± should record the last _non-blank_ report.

C) The Reporter should not clear its Current Report when the same tag (locomotive) is seen somewhere else. This would leave one reporter with ¡°2200 exits¡± and another with ¡°2200 enter¡± after each move is complete. Not sure whether this would actually be the right behavior or not, but it would make it easier to see where the train has appeared.

I have not looked to see how hard it would be to code any of those.

Finally, a note: This was all done with one tag (locomotive) moving around. We should probably explore the behavior when more than one is running. Some interesting cases might be

i) Two trains enter a specific detection zone, perhaps from opposite ends, with more than 3 seconds between.
ii) Two trains enter a specific detection zone, perhaps from opposite ends, with less than 3 seconds between.
iii) A train enters the detection zone that another has just left less than 3 seconds before, e.g. a closely following train.

Bob


On May 7, 2023, at 8:14 PM, Scott Walton <jscottwalton@...> wrote:

I ran a couple of tests:

1) with my test RFID reader (I only have one reader for this test, and only one car to test with), the Reporters window added the reporter and showed the tag briefly I saw two columns populated, but they cleared quickly and ended up with only the System name of the Reporter showing.. Last Report did appear to be briefly populated with the Tag ID, but ended up empty.

2) With LocoNet Ttansponding messages, the situation appeared to be much more complicated. For two other locomotives (both stationary), I saw "entered" messages. For the moving locomotive, the "entered message appeared briefly and then disappeared. After the locomotive entered the NEXT block, (and the Entered message briefly appeared and dissappeared), but then "exits" appeared on the block that it had left previously.. Then after it left the current block, an "exits" messages appeared on the previous block and the one that had been presenet now dissappeared.So, after a session, Last Report never showed anything different from the Report block and the moving locomotive only appeared in at most one block, and often no blocks at all. I am atttaching a Loconet Monitor Log file that includes timestamps and raw data. There are signals present on the layout so there is a lot of other activity.
¡ª
Bob Jacobsen
rgj1927@...

Join [email protected] to automatically receive all group messages.