¿ªÔÆÌåÓý


Re: Edit dialog boxes do not open with full width

 

Ken,
?
Attached are a couple of traces. They are really traces of the same activity but I noticed something interesting. Process was:
?
  1. Start JMRI
  2. Select profile "foo"
  3. Open the Display/Edit Log Categories pane
  4. Set the logging level to TRACE for jmri.util.JmriJFrame
  5. Close the Display/Edit Log pane
  6. Open the Console pane. (It's skinny the very first time opened after the profile is created but JMRI remembers the geometry after that)
  7. Open Tools -> Tables -> Turnouts (this pane is never skinny...looks fine and retains any new size or position I give it)
  8. Click "Add..." in the Turnout Table.
  9. Skinny edit pane appears. Changing the size by hand is never remembered by JMRI
  10. Copy and paste the log into a text file
You'll notice in the log that I put a blank line between steps 5 and 6 and also between steps 7 and 8 just for clarity.
?
I looked over the log and noticed references to screens 3 and 5. That reminded me that I'm running three desktops on the system. So, effectively, 6 monitors, so 3 and 5 would make sense. Seemed promising....maybe the OS is fetching screen sizes for screens that are not displayed and therefore zero? The trace named "JMRI_Trace_3_Desktops.txt" was captured running in this configuration.
?
To test the question of whether 3 desktops were the problem, I deleted desktops 2 and 3 and reran JMRI. Oddly, the log still showed references to screens 3 and 5. So, I rebooted the system and tried again. This time the log showed references to screen 1 and 2. You can see that in the other trace ("JMRI_Trace_1_Desktop.txt").
?
That's it for now. BTW, I also run desktops on the older system and did not have any problems.
?
Vince


Re: Looking for ideas to mirror SE8C signals between two panels

 

On 5/21/2025 8:40 PM, cengel_74 via groups.io wrote:

So the question is, is there a way to resolve this issue or do I just need to manually load the script after the panel until we get to the point of loading the panel in the startup
Yes, you will just need to manually load the script.


Re: VSD dont work #vsdecoder

 

De acuerdo Klaus, thank so much. I will do it.?


Trying to replicate 3-way LogixNG code #logixng

 

¿ªÔÆÌåÓý

Dave Sand,

I saw a copy of your 3way LogixNG.xml code (May 6th) which looked interesting (anyway, I assume it¡¯s yours). It operates much smoother than the Sensor/Route/Turnout conglomeration I developed to do the same thing. Up until now, I have been avoiding any Logix or LogixNG coding, at my age, I really didn¡¯t want to learn another programming language.?

Since the code operated the 3-way turnouts just the way I liked. My plan was to add it to my layout.xml with a modification adding of two extra tracks/turnouts. I tried merging the two xml files (but it created two separate panels), not ideal. I also tried the proper way, creating the code from scratch, but (for me) LogixNG is a steep learning curve. I don¡¯t understand the methodology of how to program by completing the dialog boxes. I got as far as the lines completing the (if-) then-else statements which I couldn¡¯t get it to look like your code, I became so frustrated, the project got put on the back burner.?

Is there an editor to directly type-in the code, leaving the debugger to point out syntax errors? I would like an easier way to replicate your code. Thank you in advance for your expertise.?
?
John ?Bauchiero
-?NCE PH-Pro & PowerCab, Pi4, DCC-EX
- JMRI 5.11.6
- Java 17.0.12


Re: Looking for ideas to mirror SE8C signals between two panels

 

This script worked in my?manual testing so now I need to test it on the real layout.

However I'm pretty sure I know the answer to this stupid question but I'm going to ask it anyway.? We typically load up PanelPro and then manually load the panel that we are going to load since we are actively working on it and have many versions, backups etc.? It appears that if I put this script into the startup it causes issues which I suppose makes sense because the signal heads haven't been defined yet :
19:33:14,574 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [AWT-EventQueue-0]
org.python.core.PyException: AttributeError: 'NoneType' object has no attribute 'setAppearance'
at org.python.core.Py.AttributeError(Py.java:176) ~[jython-standalone-2.7.4.jar:2.7.4]
at org.python.core.PyObject.noAttributeError(PyObject.java:965) ~[jython-standalone-2.7.4.jar:2.7.4]
at org.python.core.PyObject.__getattr__(PyObject.java:959) ~[jython-standalone-2.7.4.jar:2.7.4]
at org.python.pycode._pyx0.propertyChange$3(<script>:42) ~[?:?]
at org.python.pycode._pyx0.call_function(<script>) ~[?:?]

So the question is, is there a way to resolve this issue or do I just need to manually load the script after the panel until we get to the point of loading the panel in the startup?

On Mon, May 19, 2025 at 10:10?AM cengel_74 via <chrisengel=[email protected]> wrote:

> jython/FollowSE8c.py

> It listens to LocoNet (i.e. the other computer¡¯s traffic) and sets a local virtual signal head to correspond to the actual SE8c signal head.

This looks to be exactly what I need.? Thanks.

--
?Chris



--
?Chris


Re: Edit dialog boxes do not open with full width

 

¿ªÔÆÌåÓý

Vince,

?

Here is a clue.

jmri.util.JmriJFrame

?

If you set that to TRACE level, it will show more of how it is figuring out size stuff. Might not get you an answer but worth a shot.

?

Debug->Display/Edit Log Categories

At the bottom scroll box, go down the list to:

jmri.util.JmriJFrame

then pick TRACE in the ¡®New level for above category¡¯ pull down.

?

I¡¯m suspecting that something is saying the screen is way smaller and that confuses everything.

?

-Ken Cameron, Member JMRI Dev Team

?

?


Re: Starting with JMRI sensor reading and signal output: help request

 

Hi Eric,
?
I have just started going down the rabbit hole of JMRI. I created a track plan in Anyrail and created all my Sections, making sure everything was connected.
?
i followed the instructions given by Steve Todd at . I also set up my JMRI system using a Raspberry Pi, using Steve¡¯s instructions and downloads. See https://mstevetodd.com/jmri-raspberrypi-access-point.

I discovered that, if I wanted to move forward with JMRI, the best solution for me was to go with C/MRI nodes. So I selected my JMRI system as C/MRI and when i imported the AnyRail plan, i was able to create correctly named sensors for both my turnouts and blocks. In theory I should be able to move forward now to set up all my C/MRI nodes and sensors (using Arduinos with turnout controls and block sensors all controlled from the Raspberry Pi 4b running JMRI) and have the ability to use my JMRI layout panel displays to show block occupancy status, switch turnouts from the panel, and eventually follow the progress of my trains around the layout.?

This approach also gives me a built in WiFi access point with the ability to use my phone as a loco controller, and use either (or both) tablets (e.g. old iPads) or a touch monitor attached directly to the Raspberry Pi, to display the layout panel and control my turnouts, create routes and generally have fun playing with my trains.
?
There are lots of YouTube videos about how to do all of this, and a lot of helpful information is referenced on the JMRI website.


Re: Edit dialog boxes do not open with full width

 

Thanks, Ken. It sure does appear to act as you suggested. Here's a potentially interesting data point. Since I'm lucky enough to have two Macs both running 5.10 but on different platforms, I tried a simple A/B test. On my Studio (current, new machine - acting weirdly), I started up JMRI and opted to create a new profile called "foo". After clicking OK, it opens up the preferences window as well as the startup PanelPro dialog. Both are "skinny" (see the original post below). Without doing anything else, I went into the profile folder and "vi"ed the user-interface.xml file. Then I went to the iMac (older but working system) and did the same thing. Here are the two xml files:
?
First, the .xml file from the new, misbehaving system:
?

<?xml version="1.0" encoding="UTF-8"?>

<auxiliary-configuration xmlns="http://www.netbeans.org/ns/auxiliary-configuration/1">

? ? <classPreferences xmlns="http://jmri.org/xml/schema/auxiliary-configuration/class-preferences-4-3-5.xsd">

? ? ? ? ? ?(deleted - they're identical between the two files

? ? </classPreferences>

? ? <windowDetails xmlns="http://jmri.org/xml/schema/auxiliary-configuration/window-details-4-3-5.xsd">

? ? ? ? <window xmlns="" class="apps.gui3.tabbedpreferences.TabbedPreferencesFrame:Preferences" height="1440.0" locX="-654.0" locY="0.0" width="80.0"/>

? ? ? ? <window xmlns="" class="PanelPro" height="237.0" locX="48.0" locY="583.0" width="80.0"/>

? ? ? ? <window xmlns="" class="jmri.jmrit.roster.Roster"/>

? ? </windowDetails>

</auxiliary-configuration>

?

Now, the .xml file from the old, working system:

<?xml version="1.0" encoding="UTF-8"?>

<auxiliary-configuration xmlns="http://www.netbeans.org/ns/auxiliary-configuration/1">

? ? <classPreferences xmlns="http://jmri.org/xml/schema/auxiliary-configuration/class-preferences-4-3-5.xsd">

? ? ? ? ? ? ? (again deleted - same as new file)

? ? </classPreferences>

? ? <windowDetails xmlns="http://jmri.org/xml/schema/auxiliary-configuration/window-details-4-3-5.xsd">

? ? ? ? <window xmlns="" class="jmri.jmrit.roster.Roster"/>

? ? ? ? <window xmlns="" class="apps.gui3.tabbedpreferences.TabbedPreferencesFrame:Preferences" height="1440.0" locX="147.0" locY="0.0" width="1018.0"/>

? ? ? ? <window xmlns="" class="PanelPro" height="237.0" locX="1025.0" locY="601.0" width="510.0"/>

? ? </windowDetails>

</auxiliary-configuration>

?

Notice that in the first, incorrect file, the width for both the Preferences window and the opening PanelPro window tags is "80.0". For the working system, the Preferences window width is set to "1018.0" and the width for the PanelPro window is "510.0". On both systems, the width in the .xml file appear to correctly match the windows that appear on the screen. In fact, it looks like all "skinny" windows are 80 [pixels] wide. (When they open, I line them up with each other to check it out.) Not sure where that 80 comes from. One random thought I had was that 80 is frequently the default width (in characters, not pixels) of a terminal window (24x80). Maybe just a meaningless coincidence, but it did come to mind.

Maybe another thing worth noting is the locX property in the "bad" file. The Preferences? window tag has a locX property of -654.0 and the PanelPro has a locX of 48.0. On the screen, the PanelPro pane is on my main monitor. The Preference pane is painted on the secondary monitor. I have the Mac configured so that the main monitor is on the right side of my desk and the secondary is on the left. This then looks as though the coordinate system is based on the main monitor and the negative locX for the Preferences panel reflects the fact that it is to the left of the main monitor (whose left screen edge would represent x = 0).

A couple of other things that come to mind. The new system (with the problem) is a Mac Studio with two monitors. The old, working system is an iMac with a 5K display. Prior to getting the Studio, I used this same Thunderbolt monitor (located on the left as it is now with the new system). I don't remember ever having "skinny window" problems with that system. Perhaps there is a difference between how Apple reports screen geometries between a headless system. with two monitors and an all-in-one computer with one monitor.

The iMac now has no second monitor. So, any tests I run at this point will not be an exact apples-to-apples comparison (no pun intended...although I like it? :-0 ) And, as we appear to be seeing now, even the new system (Studio) works with only one monitor attached.

Please feel free if there are some tests you would like to see run. I am eager to help if I can.

Vince


Re: LogixNG some help requested #logixng

 

Erik,

Which URL? ?They work for me.

For track 3, T2 has to be closed in order to reach T3. ?T2 thrown is used to access track 2. ?Note: ?T1 is a right hand turnout. ?T2 and T3 are left hand turnouts.

Dave Sand


----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG some help requested #logixng
Date: Wednesday, May 21, 2025 4:00 PM

The url's at the bottom are not valid, and I am lost with the table: for example, for route three should T1, T2 and T3 not be thrown/thrown/closed?


Re: LogixNG some help requested #logixng

 

The url's at the bottom are not valid, and I am lost with the table: for example, for route three should T1, T2 and T3 not be thrown/thrown/closed?


LogixNG POM #logixng

 

I am using the POM function in LogixNG.
Currently setting a CV = to an IM value.
Works good.
Now I'd like to ADD an IM value to the CV.
In the snip I started out trying to just add a constant (50) but that didn't work.
I think I need to use the Formula tab but not sure of the syntax.?
--

Many thanks in advance!

Vinny DeRobertis ~ Apex, NC
New York & Hudson Valley RR

Windows 7 Pro / Java 11 / JMRI v5.10
Command Station: Digikeijs DR5000.
Booster: Digikeijs DR5033
(4) Samsung A7 10.4" Tablets
Fully Kiosk/Engine Driver v2.37.187
DCC/DMX Gateway: Pricom LLS.
LocoNet Input Modules: Digikeijs DR4088LN
DCC Output Modules:
Digikeijs DR4018 / Yamorc YD8116.
Sensors: Model Train Technology: DETECTOR-HO.
Turnout Motors: MTB MP1


Re: How do I import openpyxl?

 

If openpyxl.py is *NOT* in the "standard" Python dist library
(under Linux that would be /usr/lib/python3/dist-packages/), you will have to
add its path to sys.path:

import os
import sys
sys.path.append("/path/to/the/directory/containing/openpyxl.py")


At Wed, 21 May 2025 13:08:12 -0700 "Nick Brownsberger via groups.io" <nbrownsbe@...> wrote:


I want to run a Jython script inside of ?jmri so I can manipulate turnouts, etc. However, the script doesn't recognize openpyxl when I try to import it. I need openpyxl to access an Excel spreadsheet. How do I import openpyxl?

Thanks in advance,
Nick






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


Re: How do I import openpyxl?

 

Nick,

I don't have an answer, but it might be lot easier to export the spreadsheet as a CSV file. ?There are several Jython scripts that work with CSV files that could provide useful examples.

Dave Sand



----- Original message -----
From: "Nick Brownsberger via groups.io" <nbrownsbe=[email protected]>
Subject: [jmriusers] How do I import openpyxl?
Date: Wednesday, May 21, 2025 3:08 PM

I want to run a Jython script inside of ?jmri so I can manipulate turnouts, etc. However, the script doesn't recognize openpyxl when I try to import it. I need openpyxl to access an Excel spreadsheet. How do I import openpyxl?
?
Thanks in advance,
Nick


How do I import openpyxl?

 

I want to run a Jython script inside of ?jmri so I can manipulate turnouts, etc. However, the script doesn't recognize openpyxl when I try to import it. I need openpyxl to access an Excel spreadsheet. How do I import openpyxl?
?
Thanks in advance,
Nick


Re: LogixNG some help requested #logixng

 

Erik,

Look at the example at?

This combines LogixNG with a bit of Java code.

Dave Sand


----- Original message -----
From: "Erik84750 via groups.io" <e.arckens=[email protected]>
Subject: Re: [jmriusers] LogixNG some help requested #logixng
Date: Wednesday, May 21, 2025 12:21 PM

Great! The more I delve into these LogixNG programming the more sophisticated it reveals to be.


Re: Audio Icon on Web Panel - Java

 

Ok that makes sense. The browser is Fully Kiosk Plus. I'll look for that setting, thank you Bob.


Re: Audio Icon on Web Panel - Java

 

This sounds like your browser on the tablet has a ¡°only play sounds from top panel¡± option set.

This is commonly desired so that when you have multiple windows open only the top one will be playing the annoying advertising sounds.

What browser are you using?

JMRI has _no_ _idea_ what window is on top in your browser, so this is not something that JMRI can fix.

Bob

On May 21, 2025, at 1:29?PM, Vinny DeRobertis via groups.io <vinny.derobertis@...> wrote:

I'll start fresh.
Tablet1 only has Fully Kiosk browser running.
Panel A is on top on Tablet1.
Panel A has AudioIcon1.
Pressing AudioIcon1 plays Sound1 on Tablet1.
Issue 1: When I make any other panel on top on Tablet1, Sound1 stops. I'd like Sound1 to keep playing on Tablet1 regardless of which panel is on top on Tablet1.
Issue 2: When I run the script from the JMRI computer, it only works when Panel A is on top on Tablet1. I'd like the script to work regardless of which panel is on top on Tablet1.
¡ª
Bob Jacobsen
rgj1927@...


Re: Audio Icon on Web Panel - Java

 

I'll start fresh.
Tablet1 only has Fully Kiosk browser running.
Panel A is on top on Tablet1.
Panel A has AudioIcon1.
?
Pressing AudioIcon1 plays Sound1 on Tablet1.
?
Issue 1: When I make any other panel on top on Tablet1, Sound1 stops. I'd like Sound1 to keep playing on Tablet1 regardless of which panel is on top on Tablet1.
?
Issue 2: When I run the script from the JMRI computer, it only works when Panel A is on top on Tablet1. I'd like the script to work regardless of which panel is on top on Tablet1.
?
?


Re: LogixNG some help requested #logixng

 

Great! The more I delve into these LogixNG programming the more sophisticated it reveals to be.


Re: Edit dialog boxes do not open with full width

 

¿ªÔÆÌåÓý

Vince,

?

The user-interface.xml getting some odd values in there is a typical cause. Since removing the user-interface.xml which holds things like last size didn¡¯t really work, my guess would be the screen size is not being reported right somehow. There might be debug that you could turn on that would show it thinking ¡°this tool is X wide, the user preference is Y wide, but the screen says it¡¯s only Z wide¡± and that would confirm what going on.

?

But in your screen settings things like magnify or scale might impact this. Also, some hi-res screens run on low res settings can also confuse things sometimes.

?

Others may have clues on this.

?

-Ken Cameron, Member JMRI Dev Team

?

?