开云体育

Automatic clearing of the LocoNet slot monitor #scripting #digikeijs #loconet


 

Good morning,
I am a modeler from Poland. I wanted to write code for JMRI that would automatically clear the LocoNet slot list as implemented by the Digitrax control panel. I have already used artificial intelligence for this, because I can't cope anymore and I lack knowledge.

The concept is that I want the script to detect which throttles are being used. When the speed of such a manipulator is equal to "0", the time (e.g. 10 minutes) is automatically counted down, after which the slot is to be automatically cleared. Moreover, I want the slot monitor to be refreshed from time to time, because there are keypads that use 2 slots after entering the "high address", e.g. Piko Smart Control Light makes this possible.

The command station I have and use at events is the Yamorc YD7001 (Converted from digikeijs DR5000). Everything is fine, the USB connection with JMRI and the communication between the command center and JMRI are flawless.?

The plan of action is that I have a dedicated Yamorc slot monitor running with the sole purpose of sending information about the number of slots for JMRI, as this control panel detects situations where one manipulator may occupy 2 slots. Unfortunately, the Yamorc slot monitor itself does not have automatic cleaning capabilities. I would like everything to be done through the slot monitor in JMRI.?

I tried writing code to "connect" to the "Release" button on the slot monitor, but I don't know the code generated by that button so that the script automatically uses it.

I managed to write a script that reads information from the LocoNet monitor and analyzes it in the program console, and I managed to write a script that automatically refreshes the slot monitor after a specified time. I am unable to write code that automatically triggers socket clearing.

With important information
Computer: Windows 10
Java: 19.0.1
JMRI: 5.6
I write programs in notebook and save them in UTF-8 without BOM.

Regards
Mateusz Krzempek

Join jmriusers@groups.io to automatically receive all group messages.