Run mpf media controller without mpf

182 views
Skip to first unread message

extremgear

unread,
Feb 11, 2017, 2:56:02 PM2/11/17
to MPF Users
Hello,
Thank you for your work on this system , and for sharing the project.

i would like to know if it's easily feasible to run the media controller without mpf , i would like the media controller to run slide and sound from command received directly from serial port with my own hardware , game logic and rules will run on separate and custom hardware .
i'm not a python programmer , but i'm learning this langage.

Thank you for your answers.
guillaume from france.

jabdoa

unread,
Feb 11, 2017, 5:06:22 PM2/11/17
to MPF Users
Hi Guillaume,

Yes that would be possible. You have to implement the bcp (backbox control protocol) to control the media controller. This protocol is actually documented roughly and there is even another implementation for unity. That should be doable. Transports are also pluggable so you could change them from tcp to serial.

Jan

extremgear

unread,
Feb 12, 2017, 2:59:05 PM2/12/17
to MPF Users
Thank you for your answer,

i will have a look to the bcp protocol ( as you said it's really well documented ) , my first concern will be to change the transports from tcp to serial .

extremgear

unread,
Feb 17, 2017, 12:44:37 PM2/17/17
to MPF Users
re,

ok i've tried to understand, but i don't know how to implement serial directly to mpf mc , i guess my python knowledges are far too low for this .

i will try otherwise.

extremgear

unread,
Feb 18, 2017, 6:59:24 AM2/18/17
to MPF Users
and now i'm not even able to start mpf mc ): 
somebody can explain me how to start mpf mc on mac ?
before i was able to run mc demo , but i'm not able to do it again , i didn't touch to any file ( no code modification )

by advance thank you


Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

Brian Madden

unread,
Feb 19, 2017, 5:46:12 PM2/19/17
to MPF Users
Hi Guillaume,

What happens when you try to run MPF MC? Can you copy and paste the output here?

To run mc demo, you need to change into the demo folder (mpf-examples/mc_demo) and then run "mpf mc". If this doesn't work, just copy the error here and we will help you.

extremgear

unread,
Feb 20, 2017, 11:52:44 AM2/20/17
to MPF Users
i'm sorry i'm 100% sure i'm doing something wrong :

iphoneduillaume:~ manettiguillaume$ cd /Users/manettiguillaume/Desktop/pinball/mpf-examples-0.32.x


iphoneduillaume:mpf-examples-0.32.x manettiguillaume$ mpf mc


Error. Could not find machine folder: 'None'.





Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

jabdoa

unread,
Feb 20, 2017, 12:08:08 PM2/20/17
to MPF Users
You need to change into the mc_demo directory and run mpf mc from inside this machine folder.


J

extremgear

unread,
Feb 20, 2017, 12:53:40 PM2/20/17
to MPF Users
ok thank you for your help , i was changing to the wrong directory .
Now it's ok !

extremgear

unread,
Feb 25, 2017, 4:59:46 AM2/25/17
to MPF Users
Hi everybody ,

i've played a bit with the config files and mpf mc , and started to think about implementing bcp protocol in my "home made" pinball controller .
Now my main concern is to replace tcp by serial , i guess i have to implement it in the bcp_server.py file , i'm wrong ?

thank .


Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

extremgear

unread,
Mar 12, 2017, 1:51:20 PM3/12/17
to MPF Users
Hello,
i'm not sure i understand how work the serial port in MPF , i would like to take example from this to change mpf mc from tcp to serial , but it seems there is hundreds of line code and i'm not able to see how work the receive loop .
i'm sorry to disturb you with some beginner questions .

i'm thinking about using the keyboard interface. 


Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

jabdoa

unread,
Mar 12, 2017, 3:12:51 PM3/12/17
to MPF Users
Hi,

you would need to modify bcp_server in mc to open a serial instead of waiting for a network connection. Alternatively, you could implement a small bridge which speaks bcp to mc and relays it to a serial. That would require no modifications in MC itself.


Jan

extremgear

unread,
Mar 18, 2017, 11:41:31 AM3/18/17
to MPF Users
Hi guys,

Thanks to your help i have made significant progress , i'm now able to connect to mpf mc via bluetooth ( serial port profile) and receive some strings on my own hardware from mpf mc .
thanks a lot.

still a lot of work to do ( encoding issue etc ...)


Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

extremgear

unread,
Apr 3, 2017, 7:52:27 AM4/3/17
to MPF Users
hello everybody,

i'm now able to trigger slide or sound from my hardware , but i'm not able yet to display scoring or player variable, i'm trying different bcp command but i don't know how to pass variable to mc controller, any idea ?
Thanks a lot !
Guillaume

Quinn Capen

unread,
Apr 3, 2017, 9:10:50 AM4/3/17
to MPF Users
I recently updated the BCP documentation because it was a little out of date (looks like I missed updating player variable, but the information is correct just not formatted nicely): http://docs.missionpinball.org/en/latest/bcp/index.html

Scoring is handled as a player variable.  Here is an example of a BCP scoring update message:

player_variable?name=score&player_num=int:1&value=int:10500&prev_value=int:5000&change=int:5500

Machine variables work in a similar way, only there is no player_num parameter.

-Quinn

Quinn Capen

unread,
Apr 3, 2017, 9:33:59 AM4/3/17
to MPF Users
I just updated the BCP documentation for machine variable and player variable so they both now reflect the current information and formatting.

Quinn

extremgear

unread,
Apr 3, 2017, 11:02:46 AM4/3/17
to MPF Users
thank you a lot , what a quick answer !

now it work , i had also an error in my config file .
i was using :
text: (score)

instead of :
text: (machine|score)


ok i can now trigger slides and sound , and send some variable to display.
there is still some things i don't fully understand but i make significant progress , i'm happy.

extremgear

unread,
Apr 6, 2017, 11:53:06 AM4/6/17
to MPF Users
Hello,

i'm now trying to use mpf mc on raspberry pi 3 , i've followed the installation steps, but i'm not able to run the Mcdemo config file. when i try to run it i've a black screen, and i have to exit via ctrl alt del ,and so with command mpf mc and mpf both.
But the step15 tutorial work ok.
i guess something is wrong in the config file for raspberry.


Le samedi 11 février 2017 20:56:02 UTC+1, extremgear a écrit :

Gabe Knuth

unread,
Apr 6, 2017, 12:12:59 PM4/6/17
to mpf-...@googlegroups.com
The RPi is an extremely problematic system for MPF, especially for the MC. I learned over the weekend that the dev branch of mpf-mc might not work at all on RPi.

Many have tried to get the RPi to work over the years, myself included. Without an improved GPU, though, the RPi isn't worth wasting time on for projects that include a DMD and/or LCD display.

I know the RPi is cheap, but when you factor in the time it takes trying to get it to work and the eventual disappointment when you try to use it, it makes more sense to go with a cheaper PC, like this:

Mini-ITX motherboard: https://www.amazon.com/gp/product/B00F4J5D9K/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

Processor: https://www.amazon.com/gp/product/B00KPRWAZQ/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

When you add a case, memory, and power supply, the total price comes to under $250 (at least in the US), and then you never have to worry about running out of resources.


--
You received this message because you are subscribed to the Google Groups "MPF Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpf-users+unsubscribe@googlegroups.com.
To post to this group, send email to mpf-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpf-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpf-users/7ff4b224-dc78-4efb-8c6e-a096ba2c8ecb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jabdoa

unread,
Apr 6, 2017, 12:26:26 PM4/6/17
to MPF Users
Are you running dev? I can confirm that mc_demo is currently broken for dev. So don't worry about that. We will fix it.
0.32.x should work. At least that works for me.

The RPi should work with MC for your case. Fast enough for most things. Just don't use too many videos. I don't see this as problematic as Gabe. However, I would not recommend the RPi as development platform. It is especially slow when compiling stuff and starting python code.


Jan

jabdoa

unread,
Apr 6, 2017, 1:15:39 PM4/6/17
to MPF Users
Fixed mc_demo in latest dev. If you update you need to run it with "mpf both" (also changed in the documentation).

Jan

extremgear

unread,
Apr 6, 2017, 1:21:09 PM4/6/17
to MPF Users
gabe : i don' want to put a whole pc in my pinball, but as you say make mpf work on rpi is  not easy

jan :i'm not running dev , i'm running 0.32.7, if i'm able to display some score and trigger sound i would be happy , step15 tutorial work OK

extremgear

unread,
Apr 7, 2017, 7:10:19 AM4/7/17
to MPF Users
i tried with the mc_demo in latest dev it doesn't work too.

do i need to put this on top of the config file :
window:
 
width: 1280
 
height: 800
 
title: Your ultimate pinball
 
resizable: false
 
fullscreen: auto
 
borderless: false
 
exit_on_escape: true

kivy_config:
 
graphics:
       
fbo: force-hardware

thanks

jabdoa

unread,
Apr 7, 2017, 8:21:06 AM4/7/17
to MPF Users
Is that on the RPi? Makes sense. Because you are probably running on the framebuffer and otherwise graphic may not work.


Jan

extremgear

unread,
Apr 7, 2017, 8:42:17 AM4/7/17
to MPF Users
Yes it's on the RPI3 , on mac os everything is ok.

extremgear

unread,
Apr 7, 2017, 9:36:28 AM4/7/17
to MPF Users
step15 is ok on RPI3 , but from step16 to step 18 it doesn't work .

extremgear

unread,
Apr 8, 2017, 12:52:17 PM4/8/17
to MPF Users
hello,

sounds doesn't work too , (but work in command line , so audio output seems to be correctly configured on rpi)

jabdoa

unread,
Apr 8, 2017, 2:01:40 PM4/8/17
to MPF Users
Does the mc log indicate that the sound started to play? How are you trying to play sounds? Does that work on your PC?

Basically we are just playing using gstreamer so it should work fine as long as gstreamer is working which should hold true on the RPi.


Jan

extremgear

unread,
Apr 8, 2017, 2:59:21 PM4/8/17
to MPF Users
yes work correctly on mac os .
the mc log tell nothing about sound on rpi and pc.

jabdoa

unread,
Apr 8, 2017, 6:56:02 PM4/8/17
to MPF Users
Did you run this step: http://docs.missionpinball.org/en/latest/install/raspberry.html#sound-output from the install tutorial?
Are you using HDMI or the build in audio connector?

Jan

extremgear

unread,
Apr 9, 2017, 5:22:30 AM4/9/17
to MPF Users
yes i ran this step , i use the audio connector .
i have to dig a bit more in my problems , i believe i did something wrong during install , i will try to be back with the log files , again thank you for your help.
Reply all
Reply to author
Forward
0 new messages