¿ªÔÆÌåÓý

Date

Locked Re: Looking for help finding a Jython function #scripting

 

If you want to see what¡¯s being sent to your command station, you can turn on JMRI¡¯s monitor for that connection. There¡¯s a ¡°show raw data¡± button that will give you the entire message.

For most DCC systems, JMRI doesn¡¯t provide the raw DCC packet information. For LocoNet connections, for example, throttles (including JMRI) send a 0-100 speed on the LocoNet that the command station converts to DCC packets.

So if you really need to know what¡¯s being sent, sniffing the DCC seems like the best approach.

Bob

On Jul 26, 2019, at 7:22 AM, Erich Whitney <erich@...> wrote:

Thanks Bob. I guess I was thinking that there must be a low-level function that actually creates the entry in the data packet that's sent to the command station.

Sounds like the only way for me to really know exactly what is being sent is to generate a throttle command and sniff the DCC bus and decode the packets...

It's not that I don't believe you but I really want to know exactly what is being sent and I want to make sure there isn't a rounding issue...
--
Bob Jacobsen
rgj1927@...


Locked Test version 4.17.2 of JMRI/DecoderPro is available for download

 

Test version 4.17.2 of JMRI/DecoderPro is available for download.

This is the next in a series of test releases that will culminate in a production release, hopefully in December 2019.

There have been a lot of updates in this version, so it should be considered experimental.

If you are currently using JMRI 4.9.6 or earlier, we strongly recommend that you first update to JMRI 4.12 and make sure that's running OK before updating to this test release. There have been a number of changes in serial port support, panel file format and configuration options since those earlier releases, and moving to the stable JMRI 4.12 release is a good way to work through any possible problems.
<>

If you use JMRI on Linux or Mac and are updating from JMRI 4.7.3 or earlier, there¡¯s a necessary migration step. (Not needed on Windows) Please see the JMRI 4.12 release note for details: <>

For more information on the issues, new features and bug fixes in 4.17.2 please see the release note:
<>

Note that JMRI is made available under the GNU General Public License. For more information, please see our copyright and licensing page.
<>

The download links, along with lots of other information which we hope you'll read, can be found on the release note page:
<>

--
Bob Jacobsen
rgj1927@...


Locked Re: Looking for help finding a Jython function #scripting

 

Thanks Bob. I guess I was thinking that there must be a low-level function that actually creates the entry in the data packet that's sent to the command station.?

Sounds like the only way for me to really know exactly what is being sent is to generate a throttle command and sniff the DCC bus and decode the packets...

It's not that I don't believe you but I really want to know exactly what is being sent and I want to make sure there isn't a rounding issue...

-Erich


Locked Re: Raspberry Pi Servo pHAT

 

¿ªÔÆÌåÓý

Hello Jason,

?

Your project sounds very similar to what I am investigating. A few comments:

?

  • The SparkFun Servo pHAT for Raspberry Pi has an optional 5V mini plug so you can power the servos separately from the Raspberry Pi
    • There is also a spot under the board where you can sever the power connection between the RPi and the pHAT
    • With the proper external power supply connected in this way, you should be able to handle all 16 servos
  • With Steve Todd¡¯s Raspbian/JMRI image running on the RPi, you should have the user interface needed to move the servos
    • With JMRI¡¯s Panel Pro, you can create a control panel with buttons that will activate the connections to the servos
    • All JMRI panels may be displayed via the web server and should be visible on any mobile device connected to JMRI

?

I am more of a software guy (40 years¡¯ experience in the industry) who still looks at the hardware like a magic black box. That being said, I do not like to write code ¡­ it is much easier and much more reliable to find code that already works. That I why I love JMRI ¡­ it is a platform with significant functionality right out-of-the-box (and free as well).

?

Richard

?

?

From: sigs@... <sigs@...>
Sent: Thursday, July 25, 2019 10:01 PM
To: [email protected]; Richard Sauerbrun <Richard@...>; [email protected]
Subject: Re: [jmriusers] Raspberry Pi Servo pHAT

?

Richard,

?

I have a project I have been working off and on with for the last few months using a Raspberry Pi Zero W and custom 16 channel PWM board I created, similar to the one you are using.? The difference is I wanted to make the power interface a little more easy to work with.

?

My general goal is to create 16 channel "nodes" for driving 16 servo turnouts around a layout through an IP/web based control interface.

?

I have attached a couple of pictures.? I am working on the code in Python.? So far my limited coding ability has been my major blocking point for really getting this working the way I want it to.? I'm having a hard time getting getting any web access to control the IO pins directly, to talk with the PWM controller.? I'm really a hardware guy, forced to write crummy code :o)

?

Jason Rausch

RPC Electronics, LLC

?

?

?

?

On Thu, Jul 25, 2019 at 8:42, rsauerbrun

<richard@...> wrote:

Hello Group,

Thank you to all who commented on my earlier post where I was trying to connect servos directly to my Arduino Mega running the DCC++ sketch. With everyone's help, I have decided to abandon that approach.

I have ordered a Pi Servo pHAT for my Raspberry Pi that is running JMRI. This $10.95 product has 16 channels that allow for direct connection and management of 16 servos. Here is information on how it works:



Has anyone used a this product, or something similar? I am assuming I will be able to configure and operate this within the JMRI environment.

Richard


Locked Re: EngineDriver 2.24.89 released to production

 

On Mon, Jul 1, 2019 at 07:42 AM, Larry Savage wrote:
Steve, any chance of getting this update from the Kindle app store?

Update for Larry and other Kindle users:

I bought a Fire 7 on Prime Day so I could (hopefully) figure out why EngineDriver was no longer showing up in the Amazon App store. I went through the same steps to post v2.24.93 as I've done before, and it now shows support for 23 of 24 Amazon devices (all but the 2011 Kindle Fire).
On my new Fire 7, I opened Amazon AppStore, searched for "jmri" and it showed EngineDriver. Clicked Install, then Open and it is working fine (desk test).
If I was paranoid, I'd think Amazon refused to publish until I actually owned a compatible device..... :)


Locked Re: Controlling Servos directly connected to Arduino with DCC++ Base Station #arduino #dccpp

les b49
 

Thank you, Bob & Paul. ?There's just so much to learn about JMRI (and then all the other bits of software it can interact with...)

Like much of Europe & the US at the moment, a heatwave here means I'm spending most time outside rather than at the computer, so it'll take me a little while to try the 2 suggestions out. ?But just a couple of comments:

Bob: ?At present, my iMac, Arduino & motor shield are in my office. ?A 5m USB cable currently runs from the motor shield there to the rails outside. ?The USB connection on the ESP32 (driving the servos) is taken up by the power supply from the 5v "Phone charging" battery. ?I could try using a different 5v source for the ESP32 connected directly to a voltage in on the ESP32 and so free up its USB connection to take input from motor shield as you suggest.

Paul: ?Yes, the ESP32 outside is on the house wifi - as are the iMac running JMRI and the iPhone running the WiThrottle app. ?Your suggestion looks feasible and I will try it in due course, but, if possible, I'd prefer not to have to introduce even more s/w elements to the system or interfaces between them, like MQTT and mosquito. ?We'll see...

Best regards,
Les


Locked Re: Alternate Sections in Transits using Dispatcher

 

Steve,

? ? Well, I've learned two things reading this post.? Will have to try out 'Safe' and 'Alternate Section'.? ?Is 'Alternate Section' ok to use as the end of a Transit?

Roger


Locked Re: Controlling Servos directly connected to Arduino with DCC++ Base Station #arduino #dccpp

 

On Fri, Jul 26, 2019 at 11:41 AM, <paul@...> wrote:
PI
Sorry fingers out of control. ?Should be iMac! ?(or almost anything you can run JMRI on!)

Paul


Locked Re: Controlling Servos directly connected to Arduino with DCC++ Base Station #arduino #dccpp

 

On Thu, Jul 25, 2019 at 04:42 PM, les b49 wrote:
Hence, I'm looking for an easy way for WiThrottle/JMRI to instruct the ESP32 to do something

Have a look at MQTT. ?The JMRI implementation of this is described and supports turnouts. ?You will need to run a broker, but your PI should be able to run . ? I'd be surprised if there wasn't some MQTT client implementation available for the ESP32 as it's all about IOT and all the connections can be wireless as long as your garden railway is in range of a wifi router.

Paul


Locked Re: Alternate Sections in Transits using Dispatcher

 

Torben
Running "safe" solves this. A train will not leave it's current section until the next safe section is clear. That's normally a passing point that has alternates.
Steve G.


On July 26, 2019 4:18:42 AM EDT, Torben Cox <torben.cox@...> wrote:
Hi Steve
Thanks for letting me know.
- That's certainly a shame, as it does restrict auto running to single lines

Torben

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Locked Re: Alternate Sections in Transits using Dispatcher

 

Hi Steve
Thanks for letting me know.
- That's certainly a shame, as it does restrict auto running to single lines

Torben


Locked Re: marker / follow number of train on screen

 

Thank you all very much!
?
I will try these solutions.
?
You're going to say I'm stupid but I just discovered the photo section....... We learn every day? :-)


Locked Re: Controlling Servos directly connected to Arduino with DCC++ Base Station #arduino #dccpp

emmanuel ALLAUD
 

The problem might be that DCC needs precise timing to work correctly and it may be difficult to process something else. For example to smoothly move servo you need to move them degree by degree during a certain amount of time. This may introduce too much latency and mess up the DCC decoding.


Le jeu. 25 juil. 2019 16:30, rsauerbrun <richard@...> a ¨¦crit?:
Yes, I am trying run this on the same Arduino Mega that is running the DCC++ code. I just assumed that the DCC++ base station code, when configured for the outputs would handle one servo.

Did I assume incorrectly?


Locked Re: ERROR - PositionableLabel is null! [AWT-EventQueue-0]

 

Gary,

Thanks. Now we know your environment and JMRI settings.

However there is no additional information about the error. The next step is to upload the panel xml file to the group¡¯s ProblemsBeingWorkedOn folder.

Dave Sand

On Jul 25, 2019, at 10:17 PM, fotobahn <gratay@...> wrote:

Dave,

Here is the error log

2019-07-25 18:01:20,787 util.Log4JUtil INFO - * JMRI log ** [main]
2019-07-25 18:01:22,642 util.Log4JUtil INFO - This log is appended to file: /Users/garyr/Library/Preferences/JMRI/log/messages.log [main]
2019-07-25 18:01:22,643 util.Log4JUtil INFO - This log is stored in file: /Users/garyr/Library/Preferences/JMRI/log/session.log [main]
2019-07-25 18:01:22,657 apps.Apps INFO - PanelPro version 4.16+R6f9aced starts under Java 1.8.0_211 on Mac OS X x86_64 v10.12.6 at Thu Jul 25 18:01:22 MDT 2019 [main]
2019-07-25 18:01:24,634 apps.Apps INFO - Starting with profile PanelPro_2019.3db82cc3 [main]
2019-07-25 18:01:24,735 node.NodeIdentity INFO - Using 4e553023-eaf9-49d5-885c-4f2a11c0c60a as the JMRI storage identity for profile id 3db82cc3 [AWT-EventQueue-0]
2019-07-25 18:01:24,955 xml.AbstractSerialConnectionConfigXml INFO - Starting to connect for "XpressNet" [main]
2019-07-25 18:01:25,152 liusb.LIUSBAdapter INFO - cu.usbmodem321 port opened at 57600 baud with DTR: true RTS: true DSR: false CTS: false CD: false [main]
2019-07-25 18:01:25,723 apps.PerformScriptModel INFO - Running script /Users/garyr/Library/Preferences/JMRI/ GR Scripts/PowerSensor.py [main]
2019-07-25 18:01:25,732 script.JmriScriptEngineManager INFO - python 2.7 is provided by jython 2.7.0 [main]
2019-07-25 18:01:25,737 script.JmriScriptEngineManager INFO - ECMAScript ECMA - 262 Edition 5.1 is provided by Oracle Nashorn 1.8.0_211 [main]
2019-07-25 18:01:29,233 util.FileUtilSupport INFO - File path program: is /Applications/JMRI/ [main]
2019-07-25 18:01:29,233 util.FileUtilSupport INFO - File path preference: is /Users/garyr/Library/Preferences/JMRI/PanelPro_2019.jmri/ [main]
2019-07-25 18:01:29,234 util.FileUtilSupport INFO - File path profile: is /Users/garyr/Library/Preferences/JMRI/PanelPro_2019.jmri/ [main]
2019-07-25 18:01:29,234 util.FileUtilSupport INFO - File path settings: is /Users/garyr/Library/Preferences/JMRI/ [main]
2019-07-25 18:01:29,235 util.FileUtilSupport INFO - File path home: is /Users/garyr/ [main]
2019-07-25 18:01:29,235 util.FileUtilSupport INFO - File path scripts: is /Applications/JMRI/jython/ [main]
2019-07-25 18:01:30,339 PanelPro.PanelPro INFO - Main initialization done [main]
2019-07-25 18:01:54,790 configurexml.PositionableLabelXml ERROR - PositionableLabel is null! [AWT-EventQueue-0]

Gary


Locked Re: ERROR - PositionableLabel is null! [AWT-EventQueue-0]

 

Dave,

Here is the error log

2019-07-25 18:01:20,787 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- * JMRI log ** [main]
2019-07-25 18:01:22,642 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- This log is appended to file: /Users/garyr/Library/Preferences/JMRI/log/messages.log [main]
2019-07-25 18:01:22,643 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- This log is stored in file: /Users/garyr/Library/Preferences/JMRI/log/session.log [main]
2019-07-25 18:01:22,657 apps.Apps ? ? ? ? ? ? ? ? ? ? ? ? ? ? INFO ?- PanelPro version 4.16+R6f9aced starts under Java 1.8.0_211 on Mac OS X x86_64 v10.12.6 at Thu Jul 25 18:01:22 MDT 2019 [main]
2019-07-25 18:01:24,634 apps.Apps ? ? ? ? ? ? ? ? ? ? ? ? ? ? INFO ?- Starting with profile PanelPro_2019.3db82cc3 [main]
2019-07-25 18:01:24,735 node.NodeIdentity ? ? ? ? ? ? ? ? ? ? INFO ?- Using 4e553023-eaf9-49d5-885c-4f2a11c0c60a as the JMRI storage identity for profile id 3db82cc3 [AWT-EventQueue-0]
2019-07-25 18:01:24,955 xml.AbstractSerialConnectionConfigXml INFO ?- Starting to connect for "XpressNet" [main]
2019-07-25 18:01:25,152 liusb.LIUSBAdapter ? ? ? ? ? ? ? ? ? ?INFO ?- cu.usbmodem321 port opened at 57600 baud with DTR: true RTS: true DSR: false CTS: false ?CD: false [main]
2019-07-25 18:01:25,723 apps.PerformScriptModel ? ? ? ? ? ? ? INFO ?- Running script /Users/garyr/Library/Preferences/JMRI/ GR Scripts/PowerSensor.py [main]
2019-07-25 18:01:25,732 script.JmriScriptEngineManager ? ? ? ?INFO ?- python 2.7 is provided by jython 2.7.0 [main]
2019-07-25 18:01:25,737 script.JmriScriptEngineManager ? ? ? ?INFO ?- ECMAScript ECMA - 262 Edition 5.1 is provided by Oracle Nashorn 1.8.0_211 [main]
2019-07-25 18:01:29,233 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path program: is /Applications/JMRI/ [main]
2019-07-25 18:01:29,233 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path preference: is /Users/garyr/Library/Preferences/JMRI/PanelPro_2019.jmri/ [main]
2019-07-25 18:01:29,234 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path profile: is /Users/garyr/Library/Preferences/JMRI/PanelPro_2019.jmri/ [main]
2019-07-25 18:01:29,234 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path settings: is /Users/garyr/Library/Preferences/JMRI/ [main]
2019-07-25 18:01:29,235 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path home: is /Users/garyr/ [main]
2019-07-25 18:01:29,235 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path scripts: is /Applications/JMRI/jython/ [main]
2019-07-25 18:01:30,339 PanelPro.PanelPro ? ? ? ? ? ? ? ? ? ? INFO ?- Main initialization done [main]
2019-07-25 18:01:54,790 configurexml.PositionableLabelXml ? ? ERROR - PositionableLabel is null! [AWT-EventQueue-0]

Gary
?


Locked Re: Controlling Servos directly connected to Arduino with DCC++ Base Station #arduino #dccpp

 

(I¡¯ve kept all the below for context, mostly because I don¡¯t understand it enough to quote just part of it)

Could you create a USB connection to the ESP32 chip and then use communications to transfer turnout commands?

Bob

On Jul 25, 2019, at 8:42 AM, les@... wrote:

Just to add another view (which perhaps is an extension of what Richard will soon find with his Pi Servo pHAT approach) ...

I use DCC++ on an Arduino Mega with motor shield to command the locos on my small G-scale garden railway. (It's connected to an iMac running JMRI and I use the iThrottle app to give me a wifi roving throttle The Mega gets its power over USB from the iMac; the motor shield has a separate 20V DC input to pass on to the rails.)

Quite separately, I have an ESP32 chip loaded with a modification from 2 sets of Rui Santos's code to set up a wifi server (search for ESP32 wifi server on youTube to find one video on creating a web server with buttons and one for servo control with a slider). My version provides a webpage of buttons to any connected client (such as an iPhone). The client sends a web request of the form 192.168.55..1/?NN on my local network. The ESP32 wifi server picks out the NN and recognises this as a request to switch a particular point/turnout servo, connected to a pin on the ESP32. (I have 5 servos but it could support more.) Note (1) that the ESP (and from there the servos) is powered from a 5V supply from a phone charger brick, and not from the DCC++ power supply - it's the sort of thing that you can use to recharge your phone when you're out and about and (2) the ESP32 can either send a single command to a servo to say move straight to position x, or a sequence of commands to move the servo incrementally to its end position to produce a smoother point change.

All works fine. The only problem is I have two separate interfaces to play with - one to JMRI and one to the ESP32 - so tend to have to have both an iPhone (to the ESP32) and iPad (to WiThrottle) to hand, which is cumbersome.

Hence, I'm looking for an easy way for WiThrottle/JMRI to instruct the ESP32 to do something.

Maybe I can modify Outputs.cpp in the Arduino code to call the ESP32 webpage... (Is there an HTTP library that might support this?)
Maybe the ESP32 will work with one of the DCCInterface.com products mentioned on the page given by fcot2002 earlier (note the link there had a mistake in it).
If anyone has tried either of these things, please let me know with some details.
I'll write again if I get anywhere.

Regards,

Les

--
Bob Jacobsen
rgj1927@...


Locked Re: ERROR - PositionableLabel is null! [AWT-EventQueue-0]

 

Gary,

When the error occurs and the panel loading has completed, go to Help >> System Console. Click on the Copy to Clipboard button and paste the results in a reply. This will provide some context that may help identify the issue.

Dave Sand

On Jul 25, 2019, at 7:35 PM, fotobahn <gratay@...> wrote:

I am getting this error when loading my panels. I do I go about correcting this?

Garyy Ratay


Locked ERROR - PositionableLabel is null! [AWT-EventQueue-0]

 

I am getting this error when loading my panels. I do I go about correcting this?

Garyy Ratay


Locked Re: JMRI and NCE

 

Ken and Ken,

On 25 Jul 2019, at 9:11 PM, Ken Cameron <kcameron@...> wrote:

Just to remind me, if the cab id is not valid in the USB, we still get the
AA command acknowledged, but we'd not be able to talk to the command
station, correct? I don't think that is any part of this issue, but checking
what I remember.
Cab ID issues don't prevent a response to the AA command, which is handled entirely in the NCE USB (unless you have already issued another command that is trying to get through to the command station - then the Cab Bus LED will be locked on).

That's why I often recommend a basic functionality test for the NCE USB where you unplug the Power Cab from its cable and plug the NCE USB onto the cable end that previously had the Power Cab (because you know the cable has 12V power). In this configuration you should get responses to the AA command (but a lockup with most other commands).

Dave in Australia


Locked Re: marker / follow number of train on screen

 

Francois,

? ?I've added photos on how to add Block Contents Labels to your panels.? You will need to be in a newer version of JMRI I believe as the older version wont work. I'm running 4.15.9 test version. Read the description below each photo.

? ?Would not put too many of the block labels on panel, just in key areas you are interested in.

? ?I noticed the photos are in reverse order.

Roger