¿ªÔÆÌåÓý

Date

Locked Re: Getting throttle settings with LogixNG #logixng

 

¿ªÔÆÌåÓý

Jos,

No, not currently. But you can use a Jython script to do that. Hopefully someone else will join in and give you an example on a Jython script for it.

Daniel

On 2024-09-06 15:11, Jos Smeele wrote:

Is there a way that I can query an active throttle with LogixNG and, for instance, store the current speed in a local variable with LogixNG?
I want to get the current train speed with LogixNG when Dispatcher is executing Transits.
I've learned that Memory variables can be queried with: memories.getMemory(<memory name>) so is there something similar for throttle data?
Thanks,
Jos


Locked Getting throttle settings with LogixNG #logixng

 

Is there a way that I can query an active throttle with LogixNG and, for instance, store the current speed in a local variable with LogixNG?
I want to get the current train speed with LogixNG when Dispatcher is executing Transits.
I've learned that Memory variables can be queried with: memories.getMemory(<memory name>) so is there something similar for throttle data?
Thanks,
Jos


Locked Re: Cannot manually move cars in Operations #operationspro

 

To get a build report for a train that has failed to build, just press the "Report" button for that train.
?


Locked Re: Lighting control with JMRI

 

I would never pay the $700 asking price. Like I said, Bob gave it to me for free. Talk to?

bob@...

I think the board is worth about $100.


Locked Re: MQTT high volume issues - some progress #mqtt

 

Hi both - thanks for this.
?
I upgraded yesterday and shortly afterwards encountered a new error! Well, at least that's progress!
?
Here's an excerpt from the JMRI logs - I'll upload them in their relative completeness.
?
It seems that JMRI now has a 2 minute timeout (as exactly 2 minutes prior to it disconnecting due to timeout, there is a log entry that's generated from receipt of an inbound MQTT message).
?
When it tried to reconnect, it went back into that cycle of exceptions and the UI froze.
?
2024-09-05T19:09:28,301 actions.LogLocalVariables ? ? ? ? ? ? WARN ?- Log local variables: [JMRI LogixNGThread]
2024-09-05T19:09:28,302 actions.LogLocalVariables ? ? ? ? ? ? WARN ?- ? ? Name: topic, Value: layout/block/allocate/Incline PC end [JMRI LogixNGThread]
2024-09-05T19:09:28,302 actions.LogLocalVariables ? ? ? ? ? ? WARN ?- ? ? Name: message, Value: Incline PC end [JMRI LogixNGThread]
2024-09-05T19:09:28,302 actions.LogLocalVariables ? ? ? ? ? ? WARN ?- Global variables: [JMRI LogixNGThread]
2024-09-05T19:09:28,302 actions.LogLocalVariables ? ? ? ? ? ? WARN ?- Log local variables done [JMRI LogixNGThread]
2024-09-05T19:11:28,601 internal.ClientState ? ? ? ? ? ? ? ? ?ERROR - TheLoftJMRI8EB8A1FEM: Timed out as no activity, keepAlive=60,000,000,000 lastOutboundActivity=21,321,669,921,400 lastInboundActivity=21,261,662,355,400 time=21,381,673,416,700 lastPing=21,321,669,922,800 [MQTT Ping: TheLoftJMRI8EB8A1FEM]
2024-09-05T19:11:28,603 mqtt.MqttAdapter ? ? ? ? ? ? ? ? ? ? ?ERROR - Can't publish : ?[AWT-EventQueue-0]
org.eclipse.paho.client.mqttv3.MqttException: Timed out waiting for a response from the server
? ? at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
? ? at org.eclipse.paho.client.mqttv3.internal.ClientState.checkForActivity(ClientState.java:747) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
? ? at org.eclipse.paho.client.mqttv3.internal.ClientComms.checkForActivity(ClientComms.java:818) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
? ? at org.eclipse.paho.client.mqttv3.internal.ClientComms.checkForActivity(ClientComms.java:804) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
? ? at org.eclipse.paho.client.mqttv3.TimerPingSender$PingTask.run(TimerPingSender.java:79) ~[org.eclipse.paho.client.mqttv3-1.2.5.jar:?]
? ? at java.util.TimerThread.mainLoop(Timer.java:556) ~[?:?]
? ? at java.util.TimerThread.run(Timer.java:506) ~[?:?]
?
But over in the MQTT logs we see activity with JMRI between 19:09 and 19:11
2024-09-05T19:10:28: Received PINGREQ from TheLoftJMRI8EB8A1FEM
2024-09-05T19:10:28: Sending PINGRESP to TheLoftJMRI8EB8A1FEM
...
2024-09-05T19:11:09: Sending PUBLISH to TheLoftJMRI8EB8A1FEM (d0, q0, r0, m0, 'layout/block/release/Incline Pi end', ... (14 bytes))
2024-09-05T19:11:10: Sending PUBLISH to TheLoftJMRI8EB8A1FEM (d0, q0, r0, m0, 'layout/block/release/Incline Top Pi side DS', ... (22 bytes))
?
but then
2024-09-05T19:11:28: Client TheLoftJMRI8EB8A1FEM closed its connection.
and then a little later
2024-09-05T19:11:29: New connection from 192.168.1.29:59227 on port 1883.
2024-09-05T19:11:29: New client connected from 192.168.1.29:59227 as TheLoftJMRI8EB8A1FEM (p2, c1, k60).
2024-09-05T19:11:29: Will message specified (4 bytes) (r1, q2).
2024-09-05T19:11:29: ? ? track/$state
?
?
Partial log file - all I have I'm afraid as the rest was cut, but definitely after upgrade
?
And partial MQTT log for roughly the same period
?
Thanks,
Chris
?


Locked Re: Section in Auto-run transit retains state as Reverse on termination. #dispatcher #sections #transits

 

Hi,
Perhaps I should have elaborated on how I have things set up:
?
Jmri 5.6
Java 11.0.18
Windows 11
DCC Command station Merg via CBus
Sensors Merg via CBus
Turnouts via DCC?

I have set up multiple train info files to run auto trains around the layout from a storage yard and back to the storage yard. I run the trains from scrips as many of the routes are chained. I run Dispatcher with 'no signals'. I don't use speed profiles, preferring to use 'constant distance stopping' set up on my Zimo and ESU sound decoders.
?
The problem transits run a DMU shuttle from the Branch station around the layout to the Marlfield bay platform P3.
?
Layout XML file loaded in Problems area.
?
Any suggestions?
?
Malcolm


Locked Re: LT1017 - LT1020 #digitrax

 

Thanks for the responses, confirmed my thoughts, just wanted to double check.
?
Darren


Locked Re: Lighting control with JMRI

 

Trevor, do you know if the jayton script can be translated into LogixNG? I much prefer that than using scripts.

Thx
Leo P

On Thu, Sep 5, 2024 at 5:24?PM Keith Williams via <directorsixfive=[email protected]> wrote:
Trevor
Thanks for the reply!? I will investigate!

On Thu, Sep 5, 2024 at 6:14?PM Trevor Rowland via <trevor=[email protected]> wrote:
Keith:
?
I have layout lighting changing from Moonlight - Dawn - Morning - Noon - Afternoon - Dusk - Moonlight using 2 LIFX WiFi enabled mains powered RGB globes (1 in the East and 1 in the West).
?
The LIFX globes have software available on the internet that allows Windows (I don't recall if Linux and Mac are also covered) to change the globe 'scene' (i.e. colour and brightness) via a command line utility.
?
To get it working, I established the light levels and colours I wanted on each globe for each time of the day, and saved that scene via the mobile phone app.? I then utilised the Windows command line utility to determine the unique ID number of the particular scene, and coded that scene ID into a Jython script that then utilises an Operating System call to run the Windows command to select a particular light level.? It is a bit convoluted, but it works.
?
I don't know if other brands of WiFi enabled mains powered globes also have this facility, but it might be another idea to investigate, and it is certainly less expensive than $700.
?
Cheers,
Trevor


Locked Re: SSL or SML #dispatcher

 

On Wed, Sep 4, 2024 at 07:58 AM, Jos Smeele wrote:
If two trains are too close on the layout one train will switch the crossing for it's Transit and shortly after the second train will switch the crossing back to satisfy it's Transit
This is a normal situation. Once one train allocates the crossing it will set the switch's. The other train will not be able to allocate the crossing until the first train has cleared and released it. So it will stop and wait at an appropriate point.
?
?
Steve G.
?
?


Locked Re: Cannot manually move cars in Operations #operationspro

 

Gord,
?
You've attached the same build report from your previous post.? No build failure.? However, the date the train was built is back in June.? You're not retrieving the latest build report for the train 18.
?
Build Report for train (18) built on 2024-06-01, 2:08 p.m.
?
Dan


Locked Re: Lighting control with JMRI

 

Trevor
Thanks for the reply!? I will investigate!

On Thu, Sep 5, 2024 at 6:14?PM Trevor Rowland via <trevor=[email protected]> wrote:
Keith:
?
I have layout lighting changing from Moonlight - Dawn - Morning - Noon - Afternoon - Dusk - Moonlight using 2 LIFX WiFi enabled mains powered RGB globes (1 in the East and 1 in the West).
?
The LIFX globes have software available on the internet that allows Windows (I don't recall if Linux and Mac are also covered) to change the globe 'scene' (i.e. colour and brightness) via a command line utility.
?
To get it working, I established the light levels and colours I wanted on each globe for each time of the day, and saved that scene via the mobile phone app.? I then utilised the Windows command line utility to determine the unique ID number of the particular scene, and coded that scene ID into a Jython script that then utilises an Operating System call to run the Windows command to select a particular light level.? It is a bit convoluted, but it works.
?
I don't know if other brands of WiFi enabled mains powered globes also have this facility, but it might be another idea to investigate, and it is certainly less expensive than $700.
?
Cheers,
Trevor


Locked Re: Lighting control with JMRI

 

Keith:
?
I have layout lighting changing from Moonlight - Dawn - Morning - Noon - Afternoon - Dusk - Moonlight using 2 LIFX WiFi enabled mains powered RGB globes (1 in the East and 1 in the West).
?
The LIFX globes have software available on the internet that allows Windows (I don't recall if Linux and Mac are also covered) to change the globe 'scene' (i.e. colour and brightness) via a command line utility.
?
To get it working, I established the light levels and colours I wanted on each globe for each time of the day, and saved that scene via the mobile phone app.? I then utilised the Windows command line utility to determine the unique ID number of the particular scene, and coded that scene ID into a Jython script that then utilises an Operating System call to run the Windows command to select a particular light level.? It is a bit convoluted, but it works.
?
I don't know if other brands of WiFi enabled mains powered globes also have this facility, but it might be another idea to investigate, and it is certainly less expensive than $700.
?
Cheers,
Trevor


Locked Re: Cannot manually move cars in Operations #operationspro

 

Hi Dan,
?
Attached 'build' report.
This problem is not specific to this train only.? When I 'reset' another train, the same situation occurs, train won't build, and "current location" of train does not appear on the "Trains" window..
?
Gord


Locked Re: Lighting control with JMRI

 

Vinny,
Thanks for the reply.? I will look int this, but 700 is pretty steep!

On Thu, Sep 5, 2024 at 8:46?AM Vinny DeRobertis via <vinny.derobertis=[email protected]> wrote:

I use a Pricom Design "Layout Lighting Solution" (LLS) board as a DCC/DMX gateway. It connects directly to the DCC bus and translates turnout commands from JMRI to control DMX devices. It has an Ethernet web server where you configure the lighting scenes (dimming rate). I have panels in panel pro that control the whole mess. I divide the 24 hour day into 12 scenes and a Jython script automates the sequence. See attached. I'd be happy to share all the software/coding. You can probably get Bob at Pricom to come down on the price of the LLS. He is asking like $700 (yes, $700) but he gave me one for free (yes, free). This approach works very well for my needs.
--
Vinny DeRobertis ~ Apex, NC
New York & Hudson Valley RR
Windows 7 Pro / Java 11 / JMRI v5.7.7
Command Station: Digikeijs DR5000.
Booster: Digikeijs DR5033
Interface: Samsung A7 10.4" Tablets/Fully Kiosk.
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


Locked Re: Train entering multi track terminus

 

Dave,


The details about the JMRI objects are in the Javadocs:
Thank you. I took a quick look at the file this evening. That's what I was missing.

This list of "shortcuts" in the initial help page are the "managers" for common JMRI objects. For example, "sensors" referees to SensorManager which provides methods such as getSensor, provideSensor, etc. Other managers, such as for Dispatcher, don't have shortcuts.
That I had figured out. I'll be taking a much closer look tomorrow or the day after; especially to the format of the parameters used. By parameter I mean that the parameter in the line below is 'filename'.

infoFile = symbolTable.getValue('fileName')

I had only realized a coupe of weeks ago that the contents of the value column in the block table was the local ID of the locomotive in the Roster, if and only if, a certain column in the info.file was checked. This will make my life a bit less boring for a while. Problem is that I have other interests such as physics and that there is only 24 hours in a day.

I'll give "hello world" a start to see how inputs, outputs and error messages behave with out using libraries. I also have a little idea the the Python concept of dictionaries might be of some use in changing keyword values in the info.xml file.

We shall see.

Thanks for your example and your help

Richard

Edited on Friday, 6 September 2024 at 00:15 (GMT + 2) ¨¤ Paris, France;
sent later.


Locked Re: 5.9.2 / 5.9.3

 

¿ªÔÆÌåÓý

John,

Thank you for finding that! I confirm that bug and it's fixed in PR #13423.

Daniel


On 2024-09-05 19:52, John Bauchiero wrote:

Daniel,

As a follow-up from?
Subject:?Mac Java 17 upgrade caused permission issue
Subject: Password on files?

With the "Guest user" not having permissions I would get ¡°Permission Denied¡± when saving, but the changes _still_ saved. I had forgotten I was halfway through setting up permissions when I came upon that issue.?

John ?Bauchiero
- D&H Model Railroad
-?NCE PH-Pro & PowerCab, Pi4b, DCC-EX
- JMRI current test version


Locked Re: Cannot manually move cars in Operations #operationspro

 

On Thu, Sep 5, 2024 at 01:47 PM, Gord King wrote:
When I go to "edit train" and 'reset' a train, then check "edit route" for correctness, then 'save' the train, then set cars, and locos for the train, then 'build' on the "Trains" window, the train does not 'build'. ? It tells me 'build failed'.
Again, provide the train build report in very detailed mode for the train that failed to build and we'll look at it if you can't figure out why.??
?
Dan


Locked 5.9.2 / 5.9.3

 

¿ªÔÆÌåÓý

Daniel,

As a follow-up from?
Subject:?Mac Java 17 upgrade caused permission issue
Subject: Password on files?

With the "Guest user" not having permissions I would get ¡°Permission Denied¡± when saving, but the changes _still_ saved. I had forgotten I was halfway through setting up permissions when I came upon that issue.?

John ?Bauchiero
- D&H Model Railroad
-?NCE PH-Pro & PowerCab, Pi4b, DCC-EX
- JMRI current test version


Locked Re: Cannot manually move cars in Operations #operationspro

 

Hi Dan,
?
In my OperationPro 'settings', both 'auto save', and 'auto backup' have been selected.
?
I 'restored' an 'auto backup' file previous to 24-07-30.? Now I can make changes in Car, Routes, Locos, and Locations, and they are saved - progress.? I have repeatedly made changes, and they continue to save.? I check in my date files and the 'date modified' are also updating in all files as I make the changes.
?
I currently remain with one apparent problem.? When I go to "edit train" and 'reset' a train, then check "edit route" for correctness, then 'save' the train, then set cars, and locos for the train, then 'build' on the "Trains" window, the train does not 'build'. ? It tells me 'build failed'.? When I check in Cars and Loco the assigned cars, and loco have been added to the train.? Another oddity is the when I reset and save the train it doesn't displace 'current location' on the 'Trains' window.? Any suggestions??
?
Gord


Locked Re: Train entering multi track terminus

 

Richard,

The details about the JMRI objects are in the Javadocs:??

This list of "shortcuts" in the initial help page are the "managers" for common JMRI objects.? For example, "sensors" referees to SensorManager which provides methods such as getSensor, provideSensor, etc.? Other managers, such as for Dispatcher, don't have shortcuts.

Here is an example script.? It combines starting a Dispatcher auto train from a train info file along with providing an example of getting and setting LogixNG local variables.

# Called by LogixNG to start a Dispatcher auto train from a train info file.

# The train info file name is in the fileName local variable.
# The dcc address is the dccAddr local variable.
# The result is returned in the result local variable, 0 indicates successful.

import java
import jmri

type = 'USER'?? # Use ROSTER when the address value is a roster entry name

infoFile = symbolTable.getValue('fileName')
dccAddr = symbolTable.getValue('dccAddr')

dispFrame = jmri.InstanceManager.getDefault(jmri.jmrit.dispatcher.DispatcherFrame)
result = dispFrame.loadTrainFromTrainInfo(infoFile, type, dccAddr)

symbolTable.setValue('result', result)


Dave Sand



----- Original message -----
From: "Richard Trilling via groups.io" <richard.trilling=[email protected]>
Subject: Re: [jmriusers] Train entering multi track terminus
Date: Thursday, September 05, 2024 9:27 AM

On Wed, Sep? 4, 2024 at 12:39 AM, Dave Sand wrote:

> I would use a script to start the train using the train info file. There are
> options to override some of the defined fields, such as the DCC address or
> roster entry.
>
David,

"I would use a script to start the train using the train info file.? There are options to override some of the defined fields, such as the DCC address or roster entry. "

That's what I hoped you wouldn't say. I've done a fair lot of programming in my life (I'm 84). A bit in Python. So I'll bite the bullet and start off with "Hello world.".

What bother me is the lack of documentation, or at least I haven't been able to find it, on the parameters for the object programming. For example both sensors and turnouts are used as objects, one has the parameters sensors.provideSensor and roughly the same for turnouts.
??
Is there a list of libraries some place with their list objects and their object parameters, besides the
How to which is only some what helpful?

I saw an example of how to read a file. Considering the development work, it would seem to me that there would be in some place routines on how to read and write keyword definitions in a file. How to find them ??

Richard

Edited on Thursday, 5 September 2024 at 16:21 (GMT + 2) ¨¤ Paris, France;
?? sent later.