¿ªÔÆÌåÓý

Date

Locked Re: JMRI Not Identifying Locomotives Properly

 

¿ªÔÆÌåÓý

I've tried (unsuccessfully) to sleep on this but have realised that we've ended up in an old area of misunderstanding. We need to go back to basics of the problem and what is or is not possible.

The Problem:
On 3 Jan 2019, at 7:57 AM, dcesharkman via Groups.Io <dcesharkman@...> wrote:

I have many locomotives with proper road numbers that overlap with others. For example, I have a Kato NYC PA unit with the number of 4301, but I also have a Kato SD70ACE in MRL with the same number.? I have many instances of this same situation.? There must be a better way to assign the identity of a locomotive so that these miss-identities do not happen. I have 62 of these occurrences. This is where better indexing could keep this from happening.

From this we have interpreted that ?dcesharkman has multiple locos with the same DCC address and he wants the "Identify" button in JMRI (at the top left of the main DecoderPro window or the Roster window in PanelPro) determine (by reading decoder CVs) which is the correct roster entry for those locos that happen to have identical DCC addresses.

What identifying information we can read from decoder CVs:
- The currently-assigned DCC address. This can be done by reading CV29 and then either CV1 or CVs 17 & 18.

- The NMRA-assigned ManufacturerID. This is stored in CV8.

- A version number from CV7. The usage and interpretation of this is up to the manufacturer. In some cases it indicates a decoder model, in other cases it represents a firmware version (which may be user-updatable by manufacturer-supplied hardware/software). In some cases the manufacturer chooses to not use this CV for identification??but instead store identifying information in other CVs, or not at all.

- In some cases (where the manufacturer implements and documents them) we can read what we call a ProductID from special CVs and some calculations.

When we do a "New Loco"->"Read Type from Decoder" we attempt to read ManufacturerID, VersionID and ProductID (if implemented), a task attempted by our IdentifyDecoder Java class,?and try to match these against known values in our decoder definition index file to find a correct decoder definition (characterised by the unique combination of a "family" name and a "model" name).

- In some cases this may lead to a unique identification.

- In many cases this may lead to multiple possibilities, leaving the user to make a manual choice of decoder model. A given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry.

- In many cases a user already knows the exact decoder model and doesn't even bother with the "Read Type from Decoder " procedure, but simply manually picks the known family/model. As above, a?given decoder model may cover a range of VersionIDs and possibly more than one ProductID. So we can't store either of these in the roster entry.

See:
<>

The identity-related information we store in a Roster Entry.
- The user-created ID string: This is entirely up to to the user but JMRI ensures there are no duplicates in a user's roster. There is no way we can store this into decoder CVs.

- The currently-assigned DCC loco address, as per what has been read and/or written in the relevant NMRA address CVs.

- The "family" and "model" unique combination as per above. (Note that using this we can retrieve the ManufacturerID from our decoderIndex.xml file.)

- Note that (as briefly explained in the following link) we do not directly store ManufacturerID, VersionID or ProductID. To do so will cause problems as one or more of. these are often not reliably and uniquely determined at roster entry creation time and furthermore are subject to change (even in existing decoders) by external events outside our control (such circumstances have occurred and will continue to occur).
<>

- However we do have complete control over our assigned?"family" and "model" names and we have procedures already in place to manage needed changes in both our decoder definitions and a user's existing roster entries.
<>

Can we solve?dcesharkman's problem?
Not completely.
1) We can read the DCC address from the decoder and try to match against roster entries. But that will not yield a unique match in his (or many other cases).

2) We can supplement (1) by using the IdentifyDecoder class to retrieve current values of ManufacturerID, VersionID and ProductID (if applicable) and attempt to derive the "family" and "model" to narrow our list of roster entries from (1). Unfortunately?ManufacturerID, VersionID and ProductID do not always return a single unique match. We may end up with another list.

E&OE

Dave








Locked Re: Trying to get on top of jython

 

Wouter,

Do you have "import java" and "import jmri" at the beginning of each python file?

Dave Sand

On Jan 3, 2019, at 5:37 AM, whmvd <vandoornw@...> wrote:

Hello again, Bob,

Thanks for bearing with me on this.

It didn't go quite as planned when I went looking for the global variables 'turnouts', 'masts' and 'sensors'. Weirdly, turnouts and sensors are there, but masts is not. That is now the only little niggle left. Considering where I was only yesterday, that's a nnumber of huge leaps forward. The error reported is "global name 'masts' is not defined". I can bypass the problem easily by including the following line in my code:

masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

but that's really cheating, shouldn't be necessary and keeps the back of my mind worried at what else could go wrong when I continue. Any advice on this?masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

Wouter

On Wed, 2 Jan 2019 at 20:31, Wouter van Doorn <vandoornw@...> wrote:
Hi Bob,

Re 1) Not only did I think that was the way to do it, I was also (and am still) just building my 'library of tricks' to use in the proper, big script later on. This is one of the stages of learning! I have now removed the join, and made the spawned threads daemons, and that now works a *lot* better! Not only do I now get error messages when I need them (hurray!), the user interface no longer locks up, as you predicted (double hurray!).

Re 2) The line you mention is there. I'll see next what happens when I do not create that 'sensors' variable myself. IF it still goes wrong, at least I have an error message now to tell me where and how I goofed.

It's a lot better already, so thank you very much for the help so far. I'll let you know the result of the test once I get to it, which won't be today, but I hope to find time tomorrow.

Thanks again,
Wouter

On Wed, 2 Jan 2019 at 20:03, Bob Jacobsen <rgj1927@...> wrote:
1) Why make the main thread wait with a join? What does that do for you?

2) I¡¯m not a Bash expert, but that looks like it should work. Somehow, Jython isn¡¯t initializing properly for you. Are you getting a line like this in the log?

2019-01-02 11:58:29,512 script.JmriScriptEngineManager INFO - python 2.7 is provided by jython 2.7.0 [AWT-EventQueue-0]

When I force an error, I get output that starts like:

2019-01-02 11:58:41,099 jython.InputWindow ERROR - Error executing script [AWT-EventQueue-0]
javax.script.ScriptException: NameError: name 'xo' is not defined in <script> at line number 1
at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

Bob

On Jan 2, 2019, at 8:24 AM, whmvd <vandoornw@...> wrote:

Hi Bob ,

Thanks for the quick reaction.
Re 1: I actually do that in a separate thread - but then the first thread waits while 'join'ing the subthread, so that remains the same problem, really. Do I need to make the subthread a daemon one and let the main thread just go? That would seem to make sense?

Re 2: I use 'Run script...' from the Tables menu. If it helps, this is the script I use to start jmri (which should be good enough):
=============================
#!/bin/bash

cd $HOME/JMRI
nohup ./PanelPro >>$HOME/Desktop/.PanelPro.log 2>&1 &
=============================
Everything I log neatly shows up in the file on the desktop. The install is squeaky-clean; everything I do is in the user files area, nothing in the installation directory. VERY interesting that 'sensors' and 'turnouts' should have been predefined...

Wouter



On Wed, 2 Jan 2019 at 15:52, Bob Jacobsen <rgj1927@...> wrote:
1) There are ways to do this. They start off looking complicated, but you have to remember that asking the program to sleep _actually_ _works_: If you do that in the main program, the main program sleeps so that you can¡¯t click, etc. Instead, you have to hive your turnout activity into a little separate item (called a ¡°thread¡±) which can run and sleep independently.



2) How are you running your scripts? When I run something (i.e. while debugging) from a Script Entry window, the syntax error and runtime error messages show up nicely on JMRI System console window. Perhaps you¡¯re running them a different way or there¡¯s something else wrong?

Another clue that something is wrong is not seeing ¡°turnouts¡± and ¡°sensors¡± predefined. They _definitely_ should be.

Bob

On Jan 2, 2019, at 7:42 AM, whmvd <vandoornw@...> wrote:

Hello scripting-gurus,

For quite a while now, I've been fighting python/jython rather than using it, and frustration is building up. I want to like it, I want to work with it - but it's not making it easy. For now, I'd like to focus on two things that make life very hard:

1) A small test script that looks up a turnout (successfully) checks its status (thrown or closed), logs it and sleeps for 0.2 seconds before checking again until it is what I want it to be does not allow me to operate any of my four panels (3x Panel Editor, 1x Layout Editor). The only things that can be operated are the resize buttons on the window and the positioning. So I can't throw the turnout to let the test program complete (the log line appears every 0.2 seconds, so it sort of seems to work). I would have thought that the time.sleep(200/1000.0) would allow me to do things instead of the whole interface being locked up? (BTW: specifically not looking for different ways to do this; I know I should add a listener and make that react, and I will end up doing that anyway - I am trying to understand why the simple thing I'd like to do cannot work)

2) When I make one of my frequent coding errors, the result is the same as described above - interface locked up except for the sizing/positioning of windows). I get no error logged. Nothing on standard output or standard error, and nothing in the console. Zilch. This leaves me having to guess where I could have gone wrong, instead of being able to look at a stack dump. For instance: I thought in my optimism that the variables 'turnouts' and 'sensors' where predefined when importing jmri, so I was happily using them. That caused the lock-up with no message at all. Finding the cause of that took me several frustrating days. I hope to turn this back into a hobby!

Any help will be greatly appreciated.

Wouter

PS: using JMRI 4.14 on Linux Mint 18.3.
--
Bob Jacobsen
rgj1927@...






--
Bob Jacobsen
rgj1927@...







Locked Re: SoundPro Map Engine Start - And UK Sounds

 

Scott,

please see my answer in /g/jmriusers/message/155347

Thanks.

Klaus


Am 03.01.2019 um 10:41 schrieb Scott Rixon:

I keep dipping in and out of SoundPro, I feel there is something?interesting here but it doesn't quite play. Are you able to map the engine start and stop to a function button? I've got whistles etc mapped as I can see that in the config file, but I can't figure out how to do the start/stop.
Thanks,
Scott


Locked Re: Decoder Pro problems

 

I have found this forum to be very confusing and some of the participants to be caustic bullies and am going to stop using it!.?

Mr. Heap, I want to thank you for your time.? I have decided because I can use Digitrax's SoundLoader software and it seems to work correctly that I will go with that, instead.

Good luck and thanks to those of you who were helpful; or, trying to help me!? It is much appreciated.? To those of you with caustic intent...

Mark DeSchane


Locked Re: Decoder Pro problems

 

¿ªÔÆÌåÓý

Mark Deschane,

I sent my responses, including embedded images, it to you via private email (as you requested) around 21 hours ago.

I'll resend it now. Please acknowledge receipt (reply by email or on the list).

--?
Dave in Australia



On 3 Jan 2019, at 10:42 PM, mvdeschane@... wrote:

Dave Heap,

I have not received anything from you today, no image as you suggest, above.? However, thanks for the help you have given me!

Mark Deschane


Locked Re: VSDecoder: Problems with xml and sound #vsdecoder #rpi #ubuntu

 

Scott,

Thanks for your interest!

The function mapping is declared by triggers, right.
A trigger can be a button on a VSD panel as well as a throttle key, or both. Just want to mention that flexiblity of VSD.

A Start/Stop trigger is a little bit different. The difference is the underlying functionality, i.e. some Java code. Such triggers have to be declared in the section (or tag) <sound-event name="ENGINE" ...>.
I've put some more details in the VSD documentation here:


A Start/Stop throttle key works with a JMRI web throttle, so I hope that it also works with Engine Driver and an Android based throttle.

Klaus


Am 03.01.2019 um 10:35 schrieb Scott Rixon:

I've been following your progress with interest. The part I've kind of figured out is this.
I'm going to have a play with configuring the VSD files, including looking at which function buttons (is that the same as "notches" ?) each sound is allocated to. Is there any JMRI or other standard specs for what particular function applies to a particular button ?
In the VSD files you can see the function mapping.
<trigger name="HORN_START" type="BOOLEAN">
<event-name>F2</event-name>
<target-name>WHISTLE</target-name>
<match>true</match>
<action>LOOP</action>
? ? ? </trigger>
F2 is a whistle.
What I can't figure out is the sound stop and start! If I'm controlling from Engine Driver on my Android the engine keeps playing until I open VSD and stop it.


Locked Re: For Andrew (Andy) and his Walthers GP7

 

Hi Marc,
Program track wires are attached to the zephyr. Today, I will move them to the PR4 and use a higher output power supply. I¡¯ll make sure to change preferences to PR4 as programmer instead of interface.? I¡¯ll report back after that.?


On Wed, Jan 2, 2019 at 11:35 PM Marc <forfoum@...> wrote:
Andrew..

1 -? What? are the prog track wires attached too,? the PR4 or the DCS51 ?

2 - If attached to the PR4, what power pack is plugged into the PR4.

Your PREFERENCES need to be setup properly based on your response to above questions.

Marc

--
Andrew Roberts Potomac Sound LLC PO Box 223 Monrovia, MD 21770-0223 (301) 332-6111 Andrew@...


Locked Re: VSDecoder: Problems with xml and sound #vsdecoder #rpi #ubuntu

 

Hi Graham

Thank you very much for the feedback! Nice progress!

Love the simulator mode too. And my wife loves that I'm wearing headphones :)

LocoNet Simulator even allows to send LocoNet packets, e.g. transponding messages. That's the way I'm testing "sound follows loco", a cool VSD feature.

Sounds like you can manage all well regarding the RasPi! We can come back to VSD headless later. I've worked on it just now and I think it's not yet ready for adding it to JMRI.

On the function buttons. Notch sounds are different to sounds triggered by function buttons (a GUI button or a throttle key). Notch sounds in VSD are called Engine Sounds. Others are Configurable Sounds. A detailed specificion is not available. If you "read" a config.xml you will find out the concepts quickly. A good introduction can be found here:


Klaus



Am 02.01.2019 um 23:53 schrieb SettleDown:

Hi Klaus
Thanks for your response in the previous post, Here's some feedback:


Q1. JMRI simulator mode

You can use JMRI without a connection to the layout. This is the simulator
mode. I use the LocoNet Simulator (
) and VSD works fine with it.

Please create a new profile in Edit >> Preferences >> Config Profiles >>
New, if you want to give it a try. After a JMRI restart select "Digitrax"
as the system manufacturer and "LocoNet Simulator" as the
system connection.
Awesome !!? I got that going pretty quickly in my study on my Windows laptop, changed a few settings and tidied up my roster, copied the changed files up to my Google Drive and replaced them from the GD onto the memory stick in the RasPi which runs the layout. Love the simulator mode as it allows me to do heaps "offline".? My wife thought I'd moved the layout into the study, with all the Bells and Whistles going off !


Q2. Throttles

When I add a VSDecoder in VSDecoder Manager, I add a JMRI throttle as
well. One JMRI throttle for each VSDecoder. When I have a connection to my
layout, I prefer physical throttes. The DCC address in VSDecoder and
throttle must match, of course. Using WiThrottle and Engine Driver is a
common way to control locos (up to four, I think). An open VSDecoder
Manager with minimum one VSDecoder is required to control a loco.
Copy that !! What a good idea. I did that in the simulator and also on the layout with monitor/keyboard attached to the RasPi. Then I SSH'd and VNC'd into the RasPi from my Linux laptop and iPad in the garage and removed the monitor/keyboard?(which gets in the way of running the trains.? So now I've got a match-box size computer running everything with remote UI access to change anything !


Q3. "VSD faceless" is not yet part of JMRI. The setup could be something
like:
1) Create and configure a roster for each VSDecoder
2) Put them into a roster group named "VSD"
3) Configure a throttle key for each VSDecoder to start/stop the engine
4) Set JMRI startup: Start Virtual Sound Decoder Manager and Web Server
5) Run JMRI with option apps.JmriFaceless

On your last SD> comment:
It should be possible to auto-start RasPi and JMRI and VSD without any
interaction, and to shutdown as well. On my local test environment I can
drive a loco with VSD sound (simulator mode) via JMRI Web server
(). Open point: how to
shutdown.
I'm going to leave the faceless stuff for now, but I'm already able to start the RasPi from cold or reboot with the following Startup "init-jmri" code in the Pi:
#!/usr/bin/env bash
set -o errexit
if [ `mount | grep google-drive-ocamlfuse | wc -l` -eq 0 ]
then
? echo "mounting google drive"
? google-drive-ocamlfuse ~/google-drive
fi
echo "starting DecoderPro"
$HOME/JMRI/DecoderPro
This code mounts and syncs Google Drive each time i start/reboot the RasPi then starts up VNC server with the required settings, then launches JMRI which has a bunch of internal startup commands which start WiThrottle, Webserver, VSDecoder, roster, turnout-table, turnout panel, etc. so that when I VNC into the Pi a can see and interact with all these windows on the laptop.
As for shutting down, i just ssh a Linux "reboot" command to make a fresh start of JMRI, or else ssh "poweroff" to shut down the RasPi completely.
I'm going to have a play with configuring the VSD files, including looking at which function buttons (is that the same as "notches" ?) each sound is allocated to. Is there any JMRI or other standard specs for what particular function applies to a particular button ?
BTW. Is there any provision for including photos in the jmriusers posts ?? I wanted to include a shot of the RasPi JMRI UI as seen by my iPad.
Cheers
Graham - @SettleDown


Locked Re: Decoder Pro problems

 

Dear Dave Heap,

I'm uncertain why there are now three thread named Decoder Pro problems.? This thread is the one I started and so I will attempt to answer; or, do the things recommended to me at the other Decoder Pro problems threads here.? You requested that I download V4.15.1? This I have done and I have opened it up; but, not done anything in it.? ??


Locked Re: Decoder Pro problems

 

Dave Heap,

I have not received anything from you today, no image as you suggest, above.? However, thanks for the help you have given me!

Mark Deschane


Locked Re: Trying to get on top of jython

 

Hello again, Bob,

Thanks for bearing with me on this.

It didn't go quite as planned when I went looking for the global variables 'turnouts', 'masts' and 'sensors'. Weirdly, turnouts and sensors are there, but masts is not. That is now the only little niggle left. Considering where I was only yesterday, that's a nnumber of huge leaps forward. The error reported is "global name 'masts' is not defined". I can bypass the problem easily by including the following line in my code:

masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

but that's really cheating, shouldn't be necessary and keeps the back of my mind worried at what else could go wrong when I continue. Any advice on this?masts = jmri.InstanceManager.getDefault(jmri.SignalMastManager)

Wouter

On Wed, 2 Jan 2019 at 20:31, Wouter van Doorn <vandoornw@...> wrote:
Hi Bob,

Re 1) Not only did I think that was the way to do it, I was also (and am still) just building my 'library of tricks' to use in the proper, big script later on. This is one of the stages of learning! I have now removed the join, and made the spawned threads daemons, and that now works a *lot* better! Not only do I now get error messages when I need them (hurray!), the user interface no longer locks up, as you predicted (double hurray!).

Re 2) The line you mention is there. I'll see next what happens when I do not create that 'sensors' variable myself. IF it still goes wrong, at least I have an error message now to tell me where and how I goofed.

It's a lot better already, so thank you very much for the help so far. I'll let you know the result of the test once I get to it, which won't be today, but I hope to find time tomorrow.

Thanks again,
Wouter

On Wed, 2 Jan 2019 at 20:03, Bob Jacobsen <rgj1927@...> wrote:
1) Why make the main thread wait with a join?? What does that do for you?

2) I¡¯m not a Bash expert, but that looks like it should work.? Somehow, Jython isn¡¯t initializing properly for you.? Are you getting a line like this in the log?

2019-01-02 11:58:29,512 script.JmriScriptEngineManager? ? ? ? INFO? - python 2.7 is provided by jython 2.7.0 [AWT-EventQueue-0]

When I force an error, I get output that starts like:

2019-01-02 11:58:41,099 jython.InputWindow? ? ? ? ? ? ? ? ? ? ERROR - Error executing script [AWT-EventQueue-0]
javax.script.ScriptException: NameError: name 'xo' is not defined in <script> at line number 1
? ? ? ? at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
? ? ? ? at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
? ? ? ? at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
? ? ? ? at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

Bob

> On Jan 2, 2019, at 8:24 AM, whmvd <vandoornw@...> wrote:
>
> Hi Bob ,
>
> Thanks for the quick reaction.
> Re 1: I actually do that in a separate thread - but then the first thread waits while 'join'ing the subthread, so that remains the same problem, really. Do I need to make the subthread a daemon one and let the main thread just go? That would seem to make sense?
>
> Re 2: I use 'Run script...' from the Tables menu. If it helps, this is the script I use to start jmri (which should be good enough):
> =============================
> #!/bin/bash
>
> cd $HOME/JMRI
> nohup ./PanelPro >>$HOME/Desktop/.PanelPro.log 2>&1 &
> =============================
> Everything I log neatly shows up in the file on the desktop. The install is squeaky-clean; everything I do is in the user files area, nothing in the installation directory. VERY interesting that 'sensors' and 'turnouts' should have been predefined...
>
> Wouter
>
>
>
> On Wed, 2 Jan 2019 at 15:52, Bob Jacobsen <rgj1927@...> wrote:
> 1) There are ways to do this. They start off looking complicated, but you have to remember that asking the program to sleep _actually_ _works_: If you do that in the main program, the main program sleeps so that you can¡¯t click, etc.? Instead, you have to hive your turnout activity into a little separate item (called a ¡°thread¡±) which can run and sleep independently.
>
>
>
> 2) How are you running your scripts?? When I run something (i.e. while debugging) from a Script Entry window, the syntax error and runtime error messages show up nicely on JMRI System console window. Perhaps you¡¯re running them a different way or there¡¯s something else wrong?
>
> Another clue that something is wrong is not seeing ¡°turnouts¡± and ¡°sensors¡± predefined.? They _definitely_ should be.
>
> Bob
>
> > On Jan 2, 2019, at 7:42 AM, whmvd <vandoornw@...> wrote:
> >
> > Hello scripting-gurus,
> >
> > For quite a while now, I've been fighting python/jython rather than using it, and frustration is building up. I want to like it, I want to work with it - but it's not making it easy. For now, I'd like to focus on two things that make life very hard:
> >
> > 1) A small test script that looks up a turnout (successfully) checks its status (thrown or closed), logs it and sleeps for 0.2 seconds before checking again until it is what I want it to be does not allow me to operate any of my four panels (3x Panel Editor, 1x Layout Editor). The only things that can be operated are the resize buttons on the window and the positioning. So I can't throw the turnout to let the test program complete (the log line appears every 0.2 seconds, so it sort of seems to work). I would have thought that the time.sleep(200/1000.0) would allow me to do things instead of the whole interface being locked up? (BTW: specifically not looking for different ways to do this; I know I should add a listener and make that react, and I will end up doing that anyway - I am trying to understand why the simple thing I'd like to do cannot work)
> >
> > 2) When I make one of my frequent coding errors, the result is the same as described above - interface locked up except for the sizing/positioning of windows). I get no error logged. Nothing on standard output or standard error,? and nothing in the console. Zilch. This leaves me having to guess where I could have gone wrong, instead of being able to look at a stack dump. For instance: I thought in my optimism that the variables 'turnouts' and 'sensors' where predefined when importing jmri, so I was happily using them. That caused the lock-up with no message at all. Finding the cause of that took me several frustrating days. I hope to turn this back into a hobby!
> >
> > Any help will be greatly appreciated.
> >
> > Wouter
> >
> > PS: using JMRI 4.14 on Linux Mint 18.3.
> >
>
> --
> Bob Jacobsen
> rgj1927@...
>
>
>
>
>
>
>

--
Bob Jacobsen
rgj1927@...







Locked Saving Files.

 

Running JMRI 4.14 Win 10 And a networked drive connected directly to my home hub as my internet is still in the dark ages.and I program on one machine and my layout is connected to another
I do some work on a panel and try to save it as a new file naME. error message. Error during storing
IO error writing file XXXXX.xml
While writing string to file XXXXX.xml
Exception java.io.IOException: The request could not be performed because of an I/O device error

i check in the file directory. The file might be fully written, or it might have a file size of zero.
Repeat the save, and it goes through no problem. I can close down JMRI and re-open it without any errors (apart from the ones I've made). I can open the files on the machine connected to the layout without any problems.
Any clues on how to stop this error message please?

Another problem which there must be an answer but I can't find it.My accessories are currently controlled by a Prodigy. JMRI prefix M. JMRI can find them using the USB.. I want to change the connection to Loconet Prefix L2. JMRI can find signals with the L2 Prefix and operate them. Is there an easy method of changing the prefix from M to L2 so that JMRI can find these accessories under Loconet, or do I have to create them all again, change the panels and the SML and Logix, Sections and Transits which is a few day's work.


Locked Re: JMRI Not Identifying Locomotives Properly

 

My experience is that the "Identify" button currently does a "first match" and doesn't flag multiple matches (unlike "Read Type from Decoder").

In my testing I often create multiple test entries (of the same or another decoder) without changing the address from the default of 3. I occasionally hit "Identify" without thinking and get a first-match.
--
Dave

On 3 Jan 2019, at 9:58 PM, Dave Heap via Groups.Io <dgheap@...> wrote:

Just because a loco on the programming track returns an exact match to either:


Locked Re: JMRI Not Identifying Locomotives Properly

 

We also need to be careful to not lead a user into jumping to conclusions.

Just because a loco on the programming track returns an exact match to either:

A) DCC Address alone.
or
B) DCC Address plus CVs 7 & 8.
or
C) DCC Address plus CVs 7 & 8 plus ProductID.

Does not unequivocally mean that the loco under test is represented by that roster entry.

1) It's possible that the loco under test has had its DCC Address accidentally reset or changed and you have a false match.

2) It's possible that the loco under test doesn't have a roster entry but its DCC Address (and possibly also other items listed above) happen(s) to match an existing roster entry.

It is not uncommon to encounter user confusion between the roles of the "Identify" button versus the "Read Type from Decoder" button, since both of them involve the concept of identifying something. We tend to assume others have the background knowledge we do.

Another unrelated gotcha is that if you have a roster group selected and an "Identify" returns a match to a non-visible entry the "Identify" will succeed but no loco will be seen to be selected.

Dave


Locked Re: JMRI Not Identifying Locomotives Properly

 

¿ªÔÆÌåÓý

Reading the ProductID from a decoder is not a simple operation as it is manufacturer-specific. The code is in:

Haven't got a computer on at present so can't refresh my memory on the details but it would need to be a case of using that class. We wouldn't want that code to be duplicated elsewhere.

But I should be heading towards bed...

--?
Dave


On 3 Jan 2019, at 6:38 PM, Bob Jacobsen <rgj1927@...> wrote:

If somebody wanted to read the ProductID from the decoder, that could be done only when needed by putting another check on the number left selected at the end fo the code in RosterFrame, and perhaps in the other places.


Locked SoundPro Map Engine Start - And UK Sounds

 

I keep dipping in and out of SoundPro, I feel there is something?interesting here but it doesn't quite play. Are you able to map the engine start and stop to a function button? I've got whistles etc mapped as I can see that in the config file, but I can't figure out how to do the start/stop.

Thanks,
Scott


Locked Re: VSDecoder: Problems with xml and sound #vsdecoder #rpi #ubuntu

 

I've been following your progress with interest. The part I've kind of figured out is this.

I'm going to have a play with configuring the VSD files, including looking at which function buttons (is that the same as "notches" ?) each sound is allocated to. Is there any JMRI or other standard specs for what particular function applies to a particular button ?

In the VSD files you can see the function mapping.
<trigger name="HORN_START" type="BOOLEAN">
<event-name>F2</event-name>
<target-name>WHISTLE</target-name>
<match>true</match>
<action>LOOP</action>
? ? ? </trigger>

F2 is a whistle.?

What I can't figure out is the sound stop and start! If I'm controlling from Engine Driver on my Android the engine keeps playing until I open VSD and stop it.


Locked Ops and Roster question

 

I'm having an interesting foray into ops, but have got stuck on the following issue.

I initially imported locos from the roster, but have since been entering hem directly in ops. Some of them are analog, as I will be running some manually but now I am not sure how to sync these back to the decoder pro roster.

Any suggestions welcome.
Thanks and Happy New Year!
John


Thanks


Locked Re: 4.11 to 4.14

 

Worked like a charm! Thanks all for your help.


Locked Re: JMRI Not Identifying Locomotives Properly

 

It¡¯s true that IdentifyLoco reads CV7 and CV8, but in at least some of the places in the code it does not use those values. Other places it does use them.

For example, java/src//jmrijmrit/roster/swing/RosterFrame.java has a selectLoco(int dccAddress, boolean isLong, int mfgId, int modelId) that uses the CV7/CV8 information when multiple values would otherwise match just the address. See the code right below the "//Still more than one possible loco, so check against the decoder family¡± comment.

Other places _don¡¯t_ use the CV7/CV8 information. For example:

java/src//jmri/jmrit/symbolicprog/KnownLocoSelPane.java
java/src//jmri/jmrit/symbolicprog/CombinedLocoSelPane.java
java/src//jmri/jmrit/symbolicprog/CombinedLocoSelTreePane.java

which just use the address.

Depending on what code is selecting the locomotive, the selection might use CV7 and CV8 or it might not.

RosterFrame (which does use CV7 and CV8, at least as far as I can see) handles the ¡°Identify¡± button on the upper left of the main DecoderPro roster pane. So that should be doing what¡¯s requested already. It¡¯s not clear to me what invokes the other code, but if somebody is seeing CV7/CV selection not working, that might be why.

If somebody wanted to read the ProductID from the decoder, that could be done only when needed by putting another check on the number left selected at the end fo the code in RosterFrame, and perhaps in the other places.

Bob

On Jan 2, 2019, at 10:28 PM, Dave Heap <dgheap@...> wrote:

The "Identify" button on the main DecoderPro window already reads the following CVs, in the order listed below:

CV29
CV17 & CV18 OR CV1 (depending on the result from CV29)
CV7
CV8

All the uses cases I checked (long and short addresses, no address match, unique address match, multiple address match) exhibited this behaviour.

So the "Identify" button is already reading CVs 7 and 8. We don't need to add them.

I don't have time to check the code at present to see if it actually uses the read values of CVs 7 and 8 nor in what way.

Tea time over here now and time to slow down for the day... Not to mention the thunderstorms starting...


--
Dave in Australia



On 3 Jan 2019, at 4:35 PM, Bob Jacobsen <rgj1927@...> wrote:

In turn, that selectLoco operation knows whether one or more matched. That would be a good place for the program to reason about whether any additional reads (CV7, CV8, etc) would be able to distinguish the different choices, and if need be, spend the time to do them.
--
Bob Jacobsen
rgj1927@...