¿ªÔÆÌåÓý

Locked JMRI sensors DCC++ and invalid XML files


 

I have used DCC++ for a while but I am a newcomer to JMRI.

When I create sensors in JMRI PanelPro and save the config, then when I restart PanelPro or if I use the debug->validate XML file, I get reports that the XML file is invalid and it complasins about various expected items being missing.

I first tried with DCC++ already having lots of turnouts, sensors etc in it knowledge (from before as we had been using just DCC++ itself on its own) and the then added sensors in PanelPro but saved XML files fail checking.

I then completely cleared DCC++ knowledge and started creating sensors in JMRI and using JMRI DCC++ menu to transfer that to DCC++ but the PanelPro saved XML files still fail on XML checking.

Can anyone suggest what I am doing wrong? Does JMRI PanelPro have some errors if it is creating invalid XML files?

Thanks, Dave Price


 

Dave,

What version of JMRI are you using?

If possible, please upload the XML file to the ProblemsBeingWorkedOn area. This is the best way for us to diagnose the XML validation errors.

Dave Sand


 

1/. I have tried using both 4.6 and 4.7.1 with (essentially) the same invalid XML files being created.

2/. I don't really understand why PanelPro agrees to write out sensot information if it does not meet rules. Also, have other have noted, if the XML file is invalid you can't read it back in with PanelPro to edit the tables you are forced to then try to edit the XML by hand.


I have created a directory called DavePrice in the ProblemsBeingWordOn area containing one example of the invalid XML files being created.






Any advice on either how I should be creating things, or an explanation of why JMRI PanelPro saves invalid XML files would be much appreciated.


Dave Price


 

Dave,

The technical problem is a XML schema / sensor data mismatch that only affects DCC++.


I have created GitHub issue #3695 to address this problem.


In the meantime, you need to disable XML validation during XML file loading. You have two options.


#1) Before loading the panel XML file, go to "Panels >> Run Script...". Select "TurnOffXmlValidation.py" and click on Open. This runs very quickly and you will see no response. Now you can load your panel xml file.


#2) Go to "Preferences >> Start Up". From the "Add" dropdown, select "Run Script..." Select the script as above. Save and restart. Each time you start PanelPro with this profile, the script will run automatically and you can then load your panel xml file.


Dave Sand


 

Dave,

At this time, there is nothing you need to do different, other than running the script I mentioned in a previous post.

The unexpected sensor content has been there for a long time, but older versions of JMRI (before 4.7.2) did not validate the content during loading.

A developer familiar with DCC++ will need to make the determination whether the additional sensor content should be included in the XML file. If yes, then the schema will need to be changed to match.

Dave Sand


 

Thank you for this. I will try to find time later today to try this out.

We have a public awareness event tomorrow and I was hoping to have the small railway shunting yard we have as part of that but the sensors problem was blocking me somewhat.


I will no doubt be asking more questions, but I'll put them in other posts with more appropriate title. Thanks again.


 

Dave,

The schema change for the sensors will be included in the 4.7.7 test release and the 4.8 production release. After upgrading you will no longer need the script to disable schema validation.


Dave Sand


 

The next JMRI version will have a fix for this.

Bob

On Jun 30, 2017, at 1:14 AM, dap@... [jmriusers] <jmriusers@...> wrote:

Thank you for this. I will try to find time later today to try this out.

We have a public awareness event tomorrow and I was hoping to have the small railway shunting yard we have as part of that but the sensors problem was blocking me somewhat.


I will no doubt be asking more questions, but I'll put them in other posts with more appropriate title. Thanks again.
--
Bob Jacobsen
rgj1927@...


 

Thanks for the updates folks.