12 hour JMRI clocks

 

Back when time really meant something on US railroads, they used 12-hour time. Why don't any of the JMRI clocks offer this option - am I missing it? The empolyee timetable for the prototype I model uses 12-hour time...
Thanks


Re: Audio Icon on Web Panel - Java

 

NameError: global name 'audioIcon' is not defined


Re: Any way to view JMRI "console log" via web interface? #webserver

 

On 5/16/2025 8:50 PM, Steve Todd via groups.io wrote:
billybob,
You can't access those file directly, because they located outside of the folders shared by the JMRI web server. The web server has a limited range of folders for security reasons.
Nuts!

But, you can deal with that easily by creating a symlink to the log folder and place it in the user files folder (which is shared).
Below are the instructions from my website for my RPi-JMRI image. You'll need to adjust them to fit your operating system and folder naming convention.
So I'll need to solve this for Win11... A quick web search finds the basic info. I'll try it in the morning.

Thanks, Steve!


Re: jmri & Arduino DCC-EX #dcc-ex

 

Also, what specific motor shield are you using?


Re: jmri & Arduino DCC-EX #dcc-ex

 

FWIW:
I have built lots of DCC-EX systems for various people, using lots of different Arduino boards (Clone Megas, Mega+WiFi, ESP32 Duino, STM32 etc.) and lots of different motor shields. I haven't personally come across an issue with the Arduino board not driving locos yet, although I do know 1 person who was sold a DCC system using an ESP2866 board that wouldn't run DCC-EX.
Specifics about what boards are OK for DCC-EX are best discussed on the DCC-EX discord server though.
As for the Pi not providing a WiFi access point, what specific Pi board are you using Rob?
Trevor


Re: Any way to view JMRI "console log" via web interface? #webserver

 

billybob,
You can't access those file directly, because they located outside of the folders shared by the JMRI web server. The web server has a limited range of folders for security reasons.
But, you can deal with that easily by creating a symlink to the log folder and place it in the user files folder (which is shared).
Below are the instructions from my website for my RPi-JMRI image. You'll need to adjust them to fit your operating system and folder naming convention.

To provide external access to the JMRI log files, ran
ln -s /home/pi/.jmri/log/ /home/pi/JMRI_UserFiles/log
Log can now be accessed as "http://RPi-JMRI.local:12080/prefs/log/session.log" from any connected browser.
--SteveT


Re: Any way to view JMRI "console log" via web interface? #webserver

 

On 5/16/2025 6:49 PM, Dan Boudreau via groups.io wrote:
On Fri, May 16, 2025 at 06:42 PM, billybob experimenter wrote:
Have I missed something? If not, is there a reason why JMRI cannot
show the console log?
Enable frames under Preferences... Web Server

Thanks for this, Dan!

Now I can wish (haha!) that I could set preferences via the web interface.

Guess I'll need to get the preferences fiddled before tomorrow's session...


Re: jmri & Arduino DCC-EX #dcc-ex

 

Hi Rob.
Had the issue of loco could not run forward or back, power was on track , and program track had no problem .turn on or off.fine
So I bought the original UNO Arduino , and that fixed the problem .
So some clone brand Arduino do work .
So with my, Mac
Java -OpenJDK11U-jdk_x64_mac_hotspot_11.0.21_9
Jmri 5.5.2
Andrew.


Re: Any way to view JMRI "console log" via web interface? #webserver

 

On Fri, May 16, 2025 at 06:42 PM, billybob experimenter wrote:
Have I missed something? If not, is there a reason why JMRI cannot show the console log?
Enable frames under Preferences... Web Server


Any way to view JMRI "console log" via web interface? #webserver

 

Trying to debug via the web interface, Want to view the "Console Log" via the web interface. Curiously, I can view several panels - both control panel and layout editor. But I cannot find any way to view the console log via the web interface.

Have I missed something? If not, is there a reason why JMRI cannot show the console log?

(In this JMRI CTC implementation, I have printed some debugging info from Jython, and I want to see the Console Log via the web interface during an operating session. So far, the day's CTC "bugs" have all been blamed on hardware failures or on "dispatcher error"... But, sooner or later, I will need to be able to view the log from the web.)


Re: Losing occupancy when trying to record a warrant #warrants

 

Bob,
Also try recording a warrant that doesn't include this block.
Supposedly an NX Warrant doesn't need a block to have detection as it allows 'Dark' blocks. That would mean if the block had an issue then it mightn't register as a problem.
--
H.O. Australia (Layout in Progress)
Digikeijs DR5000 LocoNet
JMRI v5.10 DecoderPro/Warrants/CPE/SML/LogixNG
Java: OpenLogic jre-17.0.12.7 Windows 10


Re: Script does not Print to System Console on Linux laptop #scripting

 

Thanks again Dave for continuing help. I have never used the Scripting/Scripting Output option, but now that I've found it and opened it, I see all my print results. I guess I can use that rather than, or in addition to, the System Console.
I don't not know what is different now but this will allow me to bumble my way through scripts by giving me the information I print during development.
Phil


Re: Audio Icon on Web Panel - Java

 

> I had to comment-out audioIcon.play() because it caused an error.

What error? If you don't call play(), you don't play the audio.

Daniel


On 2025-05-16 22:14, Vinny DeRobertis via groups.io wrote:

Yes, NY&HV_RR_Yard_Scenes is the name of the panel and Harbor is the ID assigned to the Audio object.
I had to comment-out audioIcon.play() because it caused an error.
Running it now generates no errors but it does not play the audio.


Re: Audio Icon on Web Panel - Java

 

Yes, NY&HV_RR_Yard_Scenes is the name of the panel and Harbor is the ID assigned to the Audio object.
I had to comment-out audioIcon.play() because it caused an error.
Running it now generates no errors but it does not play the audio.


Re: Script does not Print to System Console on Linux laptop #scripting

 

Phil,

If you want script "print output" to go to the system console, do not open the "Script Output" window. Don't use the "Scripting -> Script Output" menu or a "Preferences -> Start Up" action.

The default for Jython print statements is to write them to the system console. If the Script Output window has been opened, then the print statements are redirected to the Script Output window.

You don't need to do anything else.


Dave Sand



----- Original message -----
From: "Phil in gorgeous Young Harris via groups.io" <philabernathy=[email protected]>
Subject: Re: [jmriusers] Script does not Print to System Console on Linux laptop
Date: Friday, May 16, 2025 2:43 PM

On Thu, May 15, 2025 at 10:47 PM, Dave Sand wrote:
If Script Output is NOT open, print output goes to the system console.
Dave Sand
Thanks Dave and Cliff for responding.
However, how do I close Script Output? I looked at the link and at default_lcf.xml, but it appears to be above my pay grade, with no explicit verbiage to turn on or off logging to the console.
Phil
LoggingTest.py output is here, then I loaded my panel and it ran a script to change sensors to Inactive:
15:33:20,563 LoggingTest.py WARN - This WARN is OK, it's emitted from LoggingTest.py on purpose [AWT-EventQueue-0]
15:33:59,634 jmri.configurexml.LoadXmlConfigAction INFO - Loading selected file: /home/phil/Railroad/MQTT/MQTT-ESP32Config-2025-05-16-0849.xml [AWT-EventQueue-0]
28 total sensors found, all 28 changed to INACTIVE


Re: Audio Icon on Web Panel - Java

 

Vinny,

I'm not sure, but I think you should remove ".class".

editor = jmri.InstanceManager.getDefault(jmri.jmrit.display.EditorManager).getByName("NY&HV_RR_Yard_Scenes")

Is "NY&HV_RR_Yard_Scenes" the name of the panel? If so, you need " around it. See above.

Daniel

On 2025-05-16 21:15, Vinny DeRobertis via groups.io wrote:

Ok. Attached .py adapted from Daniel's Java code based on Dave Sand's comments. When I run it, it throws an exception
From System Console:
AttributeError: instance attr: class
?


Re: Script does not Print to System Console on Linux laptop #scripting

 

On Thu, May 15, 2025 at 10:47 PM, Dave Sand wrote:
If Script Output is NOT open, print output goes to the system console.
Dave Sand
Thanks Dave and Cliff for responding.
However, how do I close Script Output? I looked at the link and at default_lcf.xml, but it appears to be above my pay grade, with no explicit verbiage to turn on or off logging to the console.
Phil
LoggingTest.py output is here, then I loaded my panel and it ran a script to change sensors to Inactive:
15:33:20,563 LoggingTest.py WARN - This WARN is OK, it's emitted from LoggingTest.py on purpose [AWT-EventQueue-0]
15:33:59,634 jmri.configurexml.LoadXmlConfigAction INFO - Loading selected file: /home/phil/Railroad/MQTT/MQTT-ESP32Config-2025-05-16-0849.xml [AWT-EventQueue-0]
28 total sensors found, all 28 changed to INACTIVE


Re: Audio Icon on Web Panel - Java

 

Ok. Attached .py adapted from Daniel's Java code based on Dave Sand's comments. When I run it, it throws an exception
From System Console:
AttributeError: instance attr: class
?


Re: Startup Gets Stuck #startup

 

Here I am again. I uninstalled and reinstalled Java 17 : 64 bit using the link - thanks. I then restarted my laptop and ran DecoderPro. The only response was the JMRI Monopoly splash screen and the DecoderPro icon on the taskbar. So, I ran InstallTest and got the three screens shown in the attached photos. Any ideas on why JMRI won't open?
--
Richard Richter


Re: Associating an init script with a panel file?

 

OK, that worked.

At Fri, 16 May 2025 11:36:37 -0500 [email protected] wrote:


Robert,

If you are loading the xml file with a "Preferences -> Startup" action, you can also use a startup action to run the script.

The other approach is to use Logix or LogixNG to run the script. Here is a simple LogixNG.
Because the Startup option is enabled, the ConditonalNG will run after the file loading is done.

Dave Sand


----- Original message -----
From: "Robert Heller via groups.io" <hellere[email protected]>
To: JMRI Users <[email protected]>
Subject: [jmriusers] Associating an init script with a panel file?
Date: Friday, May 16, 2025 11:25 AM

I have a panel file
()
that I have written an init script (it just initializes the internal sensors
to a sane set of states).

Is there some way to run this script when the panel file is loaded?

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services












--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
-- Linux Administration Services
heller@... -- Webhosting Services