JMRI on Raspberry PI

Want to run your railway a little more like the real thing? Read on...
Post Reply
User avatar
warbonnetuk
Posts: 96
Joined: Fri Jul 03, 2009 7:05 pm
Location: Horley, Surrey

Re: JMRI on Raspberry PI

Post by warbonnetuk »

Neil

I've not done it personally but I do know of a friend that has got JMRI operating on a Raspberry Pi

Cheers

Dan
Dan Spalding

Galatia KS on Facebook: https://www.facebook.com/pages/Galatia- ... 5487154282
PeterLJ
Posts: 151
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by PeterLJ »

Hi Neil

Yes it is possible, many including myself have done so. I could drove a train from my computer OK, but did not try programming. Steve Smith did, and it was so slow that JMRI lost the connection.

I think its strength could lie in its "headless" mode, either as a JMRI WiFi server or as a accessory driver. As a accessory driver it has enough lines to drive a 8255 (or two?) which has 24 ios and is cheap (must sort out the 5 - 3 volt issue though). Commands would be sent down the network. A clever person could perhaps programme it as a NMRANet Node getting its instructions from a computer running JMRI which already supports the proposals.

All the best

Peter L-J
User avatar
Gloriousnse
Posts: 529
Joined: Tue Mar 15, 2011 5:32 pm
Location: Exeter, UK
Contact:

Re: JMRI on Raspberry PI

Post by Gloriousnse »

I think wifi server is the role we had most in mind...

So basically you'd be talking a 'magic box' that connects to the router, the DCC system, and translates, with no external input?
Martyn Read
User avatar
torikoos
Posts: 876
Joined: Mon Nov 09, 2009 10:46 pm
Location: Newton Abbot, Devon, UK .
Contact:

Re: JMRI on Raspberry PI

Post by torikoos »

Intrigued as to what this 'raspberry pie' might be I googled it, and found it to be a credit card sized computer with a TV output promising loads of functionality for about 25 GBP.
That's a barebones price however, no case, no operating system, power supply, SD card or anything else. adding all those etc and you're already looking at 50 GBP, all of a sudden, a second hand Windows PC / laptop looks a lot more interesting, but if electronics etc are your hobby, this is a fun little project.
It's just not my thing I think, and I'm an electrical/electronics engineer by trade originally.
These remind me a bit of the Arduino series of components, also good fun if electronics are your thing. I'm afraid I've gotten used too much to true plug and play, being a long time Mac user.

Interesting stuff though.

Koos
Koos Fockens -Devon UK. North American Model Railroading
Age is just a case of mind over matter. If you don't mind, then it doesn't matter.
PeterLJ
Posts: 151
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by PeterLJ »

Gloriousnse wrote:I think wifi server is the role we had most in mind...
So basically you'd be talking a 'magic box' that connects to the router, the DCC system, and translates, with no external input?
Hi Martyn

I think all one would need would be a Pi, a wireless access point, a computer interface and perhaps a powered USB hub depending on the interface. And wires and stuff. This would all be in ones "Black Box". The box would be plugged into the throttle bus (via the interface) and would have a sticker showing the IP address and port number (the 5 fig thingy?). The most expensive item being the interface. Indeed the interface could be outside the Black Box.

It would be neither difficult nor expensive to test this. I will check the JMRI website.

All the best

Peter L-J
PeterLJ
Posts: 151
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by PeterLJ »

torikoos wrote: a second hand Windows PC / laptop looks a lot more interesting
Koos
Hi Koos

I think one would be pressed to get a £50.00 laptop! But yes, a old doorstop windows PC can be obtained for nothing. One of these set up to run headless with linux could indeed prove a cheaper, though bulkier, solution, for a wifi server.

All the best

Peter L-J
User avatar
torikoos
Posts: 876
Joined: Mon Nov 09, 2009 10:46 pm
Location: Newton Abbot, Devon, UK .
Contact:

Re: JMRI on Raspberry PI

Post by torikoos »

I bought my old company laptop (4 years old Lenovo T61) for 75,- , reconditioned and clean install of Windows Vista. While not £50,- , it is close enough and cheap.
In fact I decided to get a second one, so I could give both my kids one each for christmas, my daughter now goes to secondary school and I figured she'd need one for IT classes. My son is only a year and a half behind. They loved it and I was for a brief moment, the best dad ever! (that doesn't last long though....)

The next round of company laptops being sold off will be in 4 to 5 years now.

Koos
Koos Fockens -Devon UK. North American Model Railroading
Age is just a case of mind over matter. If you don't mind, then it doesn't matter.
Mike_R
Posts: 406
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by Mike_R »

I've now got my old Mac laptop working with Wi Throttle, and have my Mum's old Windows laptop that I plan to do the same with. The advantage of the Mac is it doesn't need a router to work. So another option is an old Power PC Mac. It only runs JMRI 2.14, but that is enough for Wi Throttle.
Mike Ruby
User avatar
Gloriousnse
Posts: 529
Joined: Tue Mar 15, 2011 5:32 pm
Location: Exeter, UK
Contact:

Re: JMRI on Raspberry PI

Post by Gloriousnse »

PeterLJ wrote:I think all one would need would be a Pi, a wireless access point, a computer interface and perhaps a powered USB hub depending on the interface. And wires and stuff. This would all be in ones "Black Box". The box would be plugged into the throttle bus (via the interface) and would have a sticker showing the IP address and port number (the 5 fig thingy?). The most expensive item being the interface. Indeed the interface could be outside the Black Box.
That's the kind of thing, with the intention being that setup on the day is as simple as connect mains plug, connect one cable, switch on, wait a couple of minutes for it to boot properly, wirelessly connect throttles, run trains...
Martyn Read
PeterLJ
Posts: 151
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by PeterLJ »

Mike_R wrote: The advantage of the Mac is it doesn't need a router to work.
Hi Mike

IIRC at Snake Bend we had problems logging a droid onto a Mac network. Could we test it at WU?

Peter L-J
Mike_R
Posts: 406
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by Mike_R »

PeterLJ wrote:IIRC at Snake Bend we had problems logging a droid onto a Mac network. Could we test it at WU?
Yes I'll have the laptop with me.
Testing it with my iPod there was only a delay while I opened a panel, not like we had last time. Nice thing is if the turnouts are named, the names come up on the throttle, don't need to remember the numbers.
I have been playing with networking again (time to do things when off sick!). If I connect my laptop to my desktop, Wi throttle then connects to JMRI on the laptop via the desktop's wifi. So it may be possible to use the Mac as a router for other computers that are running a more up to date version of JMRI.
Another good thing are consists, in JMRI they can be altered on the fly, locos can be reversed without taking it out of consist as has to be done with a Lenz throttle and consist functions can be assigned from a lead loco, still to test if this gives me brakes on the whole consist.
Mike Ruby
User avatar
BrianMoore
Posts: 384
Joined: Fri Jul 03, 2009 7:05 pm
Location: Plymouth, UK

Re: JMRI on Raspberry PI

Post by BrianMoore »

"Locos can be reversed without taking it out of consist as has to be done with a Lenz throttle and consist functions can be assigned from a lead loco, still to test if this gives me brakes on the whole consist."

Now that's cool.
Brian Moore
Mike_R
Posts: 406
Joined: Fri Jul 03, 2009 7:05 pm

Re: JMRI on Raspberry PI

Post by Mike_R »

BrianMoore wrote:"Locos can be reversed without taking it out of consist as has to be done with a Lenz throttle and consist functions can be assigned from a lead loco, still to test if this gives me brakes on the whole consist."
Tried it, doesn't send function commands to all the consist, but the consist address which Lenz does not do, although I still think this would be possible with JMRI. There is still the hope that Lenz V4, if it ever comes out may support it.

It does make reversing consists easy. You can change which loco is in the lead, drag it's number to the top of the list. Press the direction arrows next to each loco number to reverse the locos select the new lead loco, two presses and away you go, a few seconds to do. Plus if you put a loco in the wrong direction by mistake just press that locos arrow to reverse it.
To do this the consist must be setup in JMRI, and not all systems are supported.

I really like the naming of turnouts, but still prefer local switches. Routes are also supported which makes entering or leaving our storage yard a few key presses to change all turnouts and those are named as well.
Mike Ruby
User avatar
torikoos
Posts: 876
Joined: Mon Nov 09, 2009 10:46 pm
Location: Newton Abbot, Devon, UK .
Contact:

Re: JMRI on Raspberry PI

Post by torikoos »

I know of topic, but I've always found consisting on the WiThrottle, a breeze to do. I actually never use pre-programmed consist. I just get a loco, add another (and yet another if you want) and run like that. The fun part is that WiThrottle remembers your recents anyway, so you just scroll through your list and select the consist you want from there.

Koos
Koos Fockens -Devon UK. North American Model Railroading
Age is just a case of mind over matter. If you don't mind, then it doesn't matter.
Post Reply