¿ªÔÆÌåÓý

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


 

¿ªÔÆÌåÓý


What you describe is what I'd expect to see.?

With MQTT, the report will only change if the reporting hardware sends a new message indicating the section is empty.? That's a decision you need to take about your hardware (and how it interacts with software such as JMRI).? ?The hardware I've built will report when it detects nothing, so a new MQTT report of "empty" is sent when the reporting hardware has nothing to report - there is a delay in sending the "empty" to deal with false-reads in the hardware, and to prevent a rapidly repeating intermittent read of "locoA, nothing, locoA, nothing, locoA, nothing" - the delay of the return to "nothing" seemed the best option to avoid such repeated messages.? ?
(My main MQTT detection hardware is for RailCom, so is monitoring a length of rail, rather than a RFID spot reader).??


I'm not sure about your second paragraph, with the referenced reporters persisting.? That may just relate to the reports stored in the ID-Tags table, but I'm guessing a bit about that detail.? ? (And no time this week to setup a test to look at it, day job calls first !).??

You may also have effects around the persistence of messages in the MQTT broker.? There's usually a setting in the broker software about what happens for older messages - particularly relevant if a client connects after the initial report was made.? ? Its another factor to think about; there won't be a "right" answer, but only an appropriate setting for how you are using the information.??



- Nigel




------ Original Message ------
From "JerryG via groups.io" <jerryg2003@...>
Date 07/05/2023 16:19:48
Subject [jmriusers] Populating Reporters via MQTT messages (Was Re: JMRI / RFID / Ethernet) #rfid #MQTT

Nigel? (and any others knowledgeable about use of Reporters) -?

Just starting to use Reporters via MQTT (set by RFID readers connected to an ESP32, but that's not the issue).? When I use the RFID Connection, the Reporter "Report" and "Last Report" gets populated momentarily and then goes blank.? When I send an MQTT Reporter message, the Reporter fields get populated and stay populated.? Q: Is this what I should expect? (I can always send a second MQTT message clearing them out if necessary).

Also, I created 3 Reporters for my MQTT messages since JMRI doesn't create them automatically like it does for the RFID Connection.? I store these in a panel file.? When I reopen JMRI, some of the Reporters are already there even though I haven't loaded the panel file (which has all 3).? It appears to be the ones that were referenced from the prior session (that is, if I didn't activate a Reporter in the prior session, it doesn't show up in the Reporter table on reloading JMRI -- but of course it is still in my panel file).? Q: Is that what I should expect?

The "Last Report" is always the same as the "Report" field.? Q: Is this what I should expect, and if so, what is its purpose?

Thanks, Jerry
___________________________________
jerryg2003@...

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