开云体育

Locked Block and Memory Variables Values show TagID not User Name on Web Server in v4.17.5


 

On a Layout editor panel, when a memory variable or block icon is included, and linked to an RFID Reporter, RFIDs tags show in the block or MV with their user names defined in the ID Tags table.

However, when that same panel is displayed on the web it shows the System Name in the form ID04D1949A74. This is the value shown in the Value column of the Blocks table. However, this is converted on the native panel into the User Name defined in the ID Tags table.

One feature that I'm using is the ability to show html formatted text on the display. I'm doing this by creating a User Name (in the ID Tags table) including html tags e.g:

<html>
<font size="4" color="blue">T1</font> <font size="4" color="red"><b>LMS Wagon (1)</b><br/>
<font size="3" color="black">
HF RFID Test Wagon
</font></p>
</html>

This works really well on the 'native' panel, allowing me to display quite big blocks of formatted text. I'm hoping this will also work on the web panel at some stage (We have a show coming up next weekend where I was hoping to use it, but I think it might have to wait!!)

I'm using Ubuntu 19:10
JMRI 4.17.5
Java 11.0.5-ea (en_GB)

This issue is similar in some ways to an issue I've raised before -? /g/jmriusers/topic/32307293

Thanks
Andy


 

Andy, can you provide an example panel and describe how to recreate this with a simulated connection? I'm not familiar with Reporters and if anything special is required to use them.
--SteveT


 

Hi Steve
I've so far failed to recreate the scenario with a simulated connection; I'm not sure how to simulate a new report! I've tried typing into the Report column of the Reporters table, but that doesn't seem to do the same as having a real (MERG) reporter connected and reading a tag.

When a real tag is read, the Report column in the Reporters table shows the ID Tag User Name, and the Value column in the Block and Memory Variables tables shows the ID Tag System Name. When displayed on the 'native' panel, this is converted back to show the (friendly) User Name. However, on the web display of the same panel it shows as the (unfriendly) System Name (i.e. the tag ID with no conversion to User Name).

I've uploaded a panel that demonstrates the problem - but only with a MERG reporter connected! (see /g/jmriusers/files/ProblemsBeingWorkedOn/Andy%20Brown%20-%20161045/Block%20and%20Memory%20Variables%20Values%20show%20TagID/BlockOnWebProblem01.xml ). Included in the folder is also the ID tags xml which goes in the idtags sub folder.

I have also created a document with a couple of screen shots that 'show' the problem (/g/jmriusers/files/ProblemsBeingWorkedOn/Andy%20Brown%20-%20161045/Block%20and%20Memory%20Variables%20Values%20show%20TagID/BlockOnWebProblem.pdf ) .

I know it's not exactly what you asked for, but it's the nearest I've been able to create at the moment.

Thanks
Andy


 

Hi Andy,

See this post on the MERG forum, CBUS reporters only respond to INCOMING CAN Frames.


This was to facilitate the development of sending data from JMRI to a writeable RFiD tag,
as the same OPC was used, updating Reporters when the outgoing message was heard was prematurely updating the location.

In July the development module code was tweaked to use new OPC DDWS for writing so I'll be updating CBUS reporters to both incoming / outgoing,
in theory that'll be one less gotcha for people!

In meantime to simulate this, in the JMRI Send CAN / event frame tool.
Enter the frame and select to send as incoming CanReply

eg. incoming Reporter 4 with IDTag 2 the body of the Can Frame would be sent like

X FA 0004 0000000002
X - Send Hex CAN Frame
FA -?Device data event (short mode) (DDES)
0004 - Hex Reporter number
0000000002 - Hex ID Tag number

With Send CAN Frame you can keep the spaces ( they'll be trimmed ) for increased readability.

See screenshot :?
/g/jmriusers/album?id=174929

Remember though,
Incoming CanReply MUST be checked at present for reporters to respond!

Steve.


 

Thanks for that Steve (Young) - I can now recreate the problem using CAN simulation.

I've updated the links I provided before with a new panel, id tags file and pdf.

Method to recreate is as follows:

  • Open panel using CAN Simulation
  • Ensure Web Server started
  • Open web browser and show panel (http://localhost:12080/panel/Layout/Block%20on%20Web%20Problem )
  • Open Merg->Merg Send CAN Frame dialog
  • Complete the Frame Packets 1 ,2 and 3 with:
    • X FA 000B 0470949A74
    • X FA 000B 0000000002
    • X FA 000B 0000000003
    • Tick the checkboxes next to frames
    • Un-tick the "Send as outgoing CanMessage
    • Tick the "Send as incoming CanReply
  • Click 'Start'
  • Note how 'native' panel shows the User Names set up in id Tags table
  • Note how browser panel shows the System Names without translation
Hopefully that all makes sense.

Andy


 

All,
I have created a GitHub issue to investigate the display differences between the JMRI panel and the web panel. I will create a separate one for the HTML content issue.

--SteveT


 

Andy, finally got around to trying this, but don't know how to load the ID Tags table. I followed the other steps fine, but the web and JMRI panels are identical, due to the missing tags(?). Please provide steps for loading the tags.


 


 

Making some progress on this. Turns out memories can store various object types, so the panel display logic handles each type individually. Most are easily converted to a string, but one of the types is an ImageIcon.

Andy, (or anyone else), do you know how to store an ImageIcon in a memory? Do you have an example panel with that?


 

Hi Steve
I'm not sure about the term ImageIcon, but I've always created images in memories by modifying the panel xml by hand as mentioned in /g/jmriusers/topic/32307293?

I've created an updated panel using some images from the resources directory - /g/jmriusers/files/ProblemsBeingWorkedOn/Andy%20Brown%20-%20161045/Block%20and%20Memory%20Variables%20Values%20show%20TagID/BlockOnWebProblem02.xml

You can use the same method to animate that was discussed earlier in /g/jmriusers/message/165625

Hope this helps
Andy


 

This enhancement has been merged into 4.17.7, and will be in that release and 4.18 when it comes out.