¿ªÔÆÌåÓý

Date

Locked Re: Document source.

 

I believe you must get on GITHUB? JMRI and get the code, add to the code and then upload your changes for inclusion in JMRI.



Maybe there is a simpler way to add to the HELP.

Marc


Locked Document source.

 

Hi All,
I am new to this game.
I would like to add a note to the jmri help page titled
JMRI Code: Building with NetBeans
Where do I find this file in jmri?
Yours Sincerely
Stephen Grant Brown


 

Since 4.18 I've been running the console all the time during my session and tonight with 6 smartphone throttles running there were repeated Engine Driver / WiTHrottle drop outs. Androids seemed to recover automatically and iPhones dit not.?


Scanning through the console log I see this:?

2020-01-30 20:40:57,487 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [DeviceServer-335]

java.util.ConcurrentModificationException

at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)

at java.util.HashMap$KeyIterator.next(HashMap.java:1469)

at java.util.AbstractCollection.toArray(AbstractCollection.java:141)

at java.util.ArrayList.<init>(ArrayList.java:178)

at jmri.jmrit.withrottle.MultiThrottle.passActionsToControllers(MultiThrottle.java:212)

at jmri.jmrit.withrottle.MultiThrottle.handleMessage(MultiThrottle.java:70)

at jmri.jmrit.withrottle.DeviceServer.run(DeviceServer.java:218)

at java.lang.Thread.run(Thread.java:748)

2020-01-30 20:41:03,499 withrottle.FacelessServer ? ? ? ? ? ? INFO? - Creating new WiThrottle DeviceServer(socket) on port 12090, waiting for incoming connection... [WiThrottleServer]


Seems like WiThrottle crashed and re-started am I correct in seeing that. Also is it correct that the DeviceServer -335 is a little high 1h40" into a session with only 6 throttles?

With the session complete I will upgrade from 4.19.1 to 4.19.2 - will I see a difference I wonder?

Also I'm wondering about how the client act when the router is not connected to the internet (it's a stand alone) some phones were trying to use cell data - and might this be resulting in the phone dropping off of the withrottle server?

Thanks,
Dave


Locked Re: Latest test version Ops Pro not building #operationspro

 

John was able to supply me with a set of his operations files.? What we found is that one of his trains was building when the operation files were saved.? Only one train can build at a time, so when the files were loaded the train status was "Building", but the build would never complete as there isn't code in the program to restart a build in progress upon the restart of operations.? The solution was to reset the train that was "Building" before trying to build another train.? The next test release will when loading the operations files, will also check to see if a train is in the building state, and if so, reset it, rather than trying to restart a build that was in progress.

Dan


Locked Re: back up to another commuter

Jay
 

I concur with Ross,
All of my roster & the other necessary files live on Dropbox.
I share it between my PC & Mac.
Also, when a new version of JMRI comes out, I don't have to worry about losing anything.
Just do the install & go!

Jay


Locked Re: back up to another commuter

 

¿ªÔÆÌåÓý

Mike,

?

I suggest you take a look at ¡°JMRI Setup: Sharing Files with Dropbox¡±

?

You can use Dropbox (and other cloud services) to maintain a backup of your data files as well as share them between computers.

?

I use my roster on my laptop as well as a computer ¡®dedicated¡¯ to my programming/test bench.? Dropbox keeps both computers and a backup synchronized.

?

Regards,

Ross Kudlick

?

From: [email protected] <[email protected]> On Behalf Of Mike Swederska
Sent: Thursday, January 30, 2020 4:34 PM
To: [email protected]
Subject: [jmriusers] back up to another comuter

?

I have my Decoder Pro and JMRI Operations on my laptop. As I was working on building a train my computer went off and would not come back up. We I had dislodged one end of the batter. Plugged in back into the laptop and everything is fine.?

In the mean time the scare of loosing my roster of locomotive decoder setting in Decoder Pro along with my car roster and layout locations. Really gave me a scare.?

So my question is: I want to back up everything to another computer. Can someone tel me how?
I would also use that computer to do the Operations program. Keep the lap top for programing decoders but still keep the back up of decoders on both machines.?


Locked Re: back up to another comuter #backup

 

¿ªÔÆÌåÓý

I use all Apple stuff and Macs.?

Really simple with them. Just turn on time machine, select a drive somewhere on the network or attached to another computer on the network or to a network drive and everything is alwasy backed up.?

Does you whole computer, not just JMRI.?

So If the computer totally died you could restore it totally to another.?

Time machine is great and runs hands off in the background .?

Jim




On Jan 30, 2020, at 3:33 PM, Mike Swederska <shur-way@...> wrote:

I have my Decoder Pro and JMRI Operations on my laptop. As I was working on building a train my computer went off and would not come back up. We I had dislodged one end of the batter. Plugged in back into the laptop and everything is fine.?

In the mean time the scare of loosing my roster of locomotive decoder setting in Decoder Pro along with my car roster and layout locations. Really gave me a scare.?

So my question is: I want to back up everything to another computer. Can someone tel me how?
I would also use that computer to do the Operations program. Keep the lap top for programing decoders but still keep the back up of decoders on both machines.?


Locked Re: Digitrax programming and Track Power On (was JMRI 4.18 is available for download)

 

Marc,

Yup, fixed by PR #8004, available in build #3621 or later.

Once 4.19.3 is released I'll close

Steve
"Breezlys"


Locked back up to another comuter #backup

 

I have my Decoder Pro and JMRI Operations on my laptop. As I was working on building a train my computer went off and would not come back up. We I had dislodged one end of the batter. Plugged in back into the laptop and everything is fine.?

In the mean time the scare of loosing my roster of locomotive decoder setting in Decoder Pro along with my car roster and layout locations. Really gave me a scare.?

So my question is: I want to back up everything to another computer. Can someone tel me how?
I would also use that computer to do the Operations program. Keep the lap top for programing decoders but still keep the back up of decoders on both machines.?


Locked Re: Raspberry Pi with DCC++ and PR3 Stand-alone LocoNet

 

Hi
ON a Pi, or most other Linux systems you can add a udev rule.
In?/etc/udev/rules.d? ?add a rule. Call it something like jmri.rules. It should/must finish with ".rules"

IN that file put
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ff7e", ENV{ID_MM_CANDIDATE}="0",? KERNEL=="ttyACM*" SYMLINK+="tty.PR3"?
ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0043", ENV{ID_MM_CANDIDATE}="0",? KERNEL=="ttyACM*" SYMLINK+="tty.Arduino.uno"
ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", ENV{ID_MM_CANDIDATE}="0",? KERNEL=="ttyACM*" SYMLINK+="tty.Arduino.mega"
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fc1e", ENV{ID_MM_CANDIDATE}="0",? KERNEL=="ttyACM*" SYMLINK+="tty.Bachrus"
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c7d0", ENV{ID_MM_CANDIDATE}="0",? KERNEL=="ttyUSB*" SYMLINK+="tty.LocoBuffer"

You can now set the connection to /dev/tty.PR3 and /dev/tty.Arduino.xxxxx etc. Then it doesnt matter where you plug it in.
If you dont want to mess with the udev rules you could also hack the prefernces file and point at /dev/serial/by-id/usb-Digitrax_Inc._VC0M_Port-if00 etc. But thats not quite as simple.
The rules file works for a single pr3 (or other digitrax usb) / arduino.uno etc. There are different rules if you have more than one pr3/4/etc, but then you have to be sure of the order, or be real sneaky.
You can also do some neat rules that will stop and start jmri-headless when you plug in or remove a device.

Steve G.



?


Locked Re: signal heads and masts

 

3) Finally there was a bug in the DCC++ code which was tagging an extra 0 byte on the end of the packet on the rails, so I corrected this.
Terry could you please elaborate on this? I am playing with SignalMasts over DCC decoder using NMRADCC library and can see the same very extra 0 at the end of extended accessory packet.


Locked Re: Digitrax programming and Track Power On (was JMRI 4.18 is available for download)

 

This issue has been address and resolved in Jenkins build 4.19.3,

Tested it on? LB-USB > DCS50 Zephyr?? and Track power remains off.
Tested it? on the Digitrax PR3 >DCS50 Zephyr ? and track power remains off.

Tested it on Digitrax PR3 in Standalone Programmer mode and track power remains off.

Marc


Locked Re: CATS: Where is new CATS Group? Was Moving objects on the designer panel #cats

 

Dave in Trempealeau this question is for you.? I searched but only found thousands of sites related to 4 legged cats.

Dave...in Colorado


Locked Re: Raspberry Pi with DCC++ and PR3 Stand-alone LocoNet

 

Solved.? Problem was with how the RPi assigns ports.? When only the DCC++ was connected it was assigned ttyACM0.? When two devices are connected the first one RPi recognizes is given port ttyACM0 and the second is ttyACM1.? When you plug in a 3rd device OR unplug a device and re-plug it that device will be given port ttyACM2, and so on.

So the RPi saw the port with the LocoNet first and assigned it port number ttyACM0.? I switched the ports in Preferences and the problem was solved.? This would make a great comment to add to JMRI help.

Ken, thanks for suggesting the ports issue.? BTW the defaults were correctly assigned to DCC++.


Locked Re: propertyChangeListener

 

Thanks everyone - I created a class called runTask? and called it with the standard invocation? runTask.start() as Bob suggested and it worked for me.

Billybob - sorry did not know about the developers group so will go take a look at that for future reference.?

class runTask(jmri.jmrit.automat.AbstractAutomaton) :
? ? ? def inti(self):
? ? ? ? ? return
? ? ? def handle(self):
? ? ? ? ?print(str(time.ctime())+" Run task runnning")
? ? ? ? ?time.sleep (15)
? ? ? ? ?print(str(time.ctime())+" Run Task finished")
? ? ? ? ?return
?


Locked Re: propertyChangeListener

 

James,

Your issue contains some deep programming issues and may not be of interest to the average jmriusers list member.

The jmri-developers.groups.io list is more programming-oriented, and is a better fit for your issue.

Regards,
Billybob


Locked Re: propertyChangeListener

 

Take a look at the jython/BackAndForth.py sample script. (In the JMRI distribution or here: )

It creates an indepedent thread via the AbstractAutomaton class, which handles those details. That then waits for sensors and commands a throttle.

For more:





Bob

On Jan 30, 2020, at 1:16 AM, James Anderson <james_anderson_999@...> wrote:

Hi, I have included a small cut down version of something I am trying to do.

I set up a propertyChangeLlistener for a sensor. When the sensor is activated it runs. I have simulated it running a long time just by putting a time.sleep in.
My problem is that when the se.setSate(ACTIVE) in the main function runs. It does not complete until the propertChangeListener completes.

Is there a way to have the propertyChageListener run without the main function waiting for it to complete.

I have looked at some of the documentation on threads but do not understand how to get this to work with jython.
I have used threading.Thread from the standard library start a thread running to do the long running task but this has some really strange behaviour and does not appear to run as thread but runs sequentially.

Some examples of why I want to do this is that when a sensor is activated I want to set a function key on the throttle a number of seconds later and not at the time the senor is activated or to start running some animation program on the layout that
could take some time.

Thanks jim.

Code
---------

import jmri
import java.beans
import time

class _SET_SENSOR(jmri.jmrit.automat.AbstractAutomaton) :

def init(self):
return


def handle(slef):
se=sensors.provideSensor("IStest")
se.addPropertyChangeListener(_LISTENER(), "IStest", "TCPDeviceMgr")
print(str(time.ctime())+" setting ACTIVE")
se.setState(ACTIVE)
print(str(time.ctime())+" setting INACTIVE")
se.setState(INACTIVE)
return


class _LISTENER(java.beans.PropertyChangeListener):
def propertyChange(self, event):
if event.newValue==2:
print(str(time.ctime())+" PropertyChange Activated...")
se=sensors.getSensor("IStest")
for oldListener in se.getPropertyChangeListenersByReference("IStest"):
if se.getListenerRef(oldListener) == "TCPDeviceMgr":
print(str(time.ctime())+" Removing old listner for sensor : IStest")
se.removePropertyChangeListener(oldListener)
time.sleep(15)
print(str(time.ctime())+" PropertyChange Complete")
return

test=_SET_SENSOR()
test.start()


OUTPUT from script
---------------------------
Thu Jan 30 08:48:24 2020 setting ACTIVE
Thu Jan 30 08:48:24 2020 PropertyChange Activated...
Thu Jan 30 08:48:24 2020 Removing old listner for sensor : IStest

--->>> 15 second gap for the time.sleep(15) inside the propertyChangeListener function.

Thu Jan 30 08:48:39 2020 PropertyChange Complete
Thu Jan 30 08:48:39 2020 setting INACTIVE

--
Bob Jacobsen
rgj1927@...


Locked Re: Errors moving from 4.14 to 4.18 #tables #merg

 

Thanks Steve, the main problem has been resolved, actually quite simple, I had a turnout MT+N0E9 as well as MT+N0E09, same for E6 and E7.
Checking the turnout table in 4.14 only showed N0E9 and not N0E09 and I guess the new address validation in 4.18 quite correctly picked up on this.
No idea why but could not delete the turnouts using the button in the table, clicking delete had no effect even though I had removed the signal heads associated with them, no error message, edited the XML and the panel now works with 4.18.

PT5/6T-11T-PT7C-PT8T-PT9T etc. are just user names, the system name follows the standard JMRI / MERG naming convention.
I use Logix to determine the state of the five turnouts, "PT5/6T-11T-PT7C-PT8T-PT9T"?will be Thrown if any of the turnouts are not set as required, setting PT5/6T-11T-PT7C-PT8T-PT9T to Closed changes the turnouts to the required position by sending a specific event e.g.+N0E103 which has been taught to each of the turnouts. Makes the Jython script a lot simpler, just one route to check and set.
I used Node 0 as I thought this was necessary as the event is produced by the PC / JMRI but since learnt that I could used any node number providing it was not a duplicate.

Thanks
Pete


Locked Re: 4.17.3ish and csvreader #scripting

Randall Wood
 

The release notes already cover how to use the old CSV API by linking into the documentation for setting JMRI parameters.

The draft release notes for 4.19.3 are at


Locked Re: Raspberry Pi with DCC++ and PR3 Stand-alone LocoNet

 

Dave,

You should do the test of watching /dev while plugging and unplugging the
devices. From the confused traffic, I would suspect that the picks might be
reversed for the ports. ttyACM1 and ttyACM0 may not be the device you think
it may be.

Make sure of which name shows up when you plug in the device.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.org
www.syracusemodelrr.org