User Tools

Site Tools


web_remote_control

Differences

This shows you the differences between two versions of the page.


web_remote_control [2023/02/19 15:32] (current) – created pinupadmin
Line 1: Line 1:
 +====== Web Remote Control ======
 +
 +===== How to Setup =====
 +
 +See latest video: [[https://youtu.be/DHtS7-Owcdw|https://youtu.be/DHtS7-Owcdw]]
 +
 +this is a WIP project. To get the files needed to test this use the following:
 +
 +[[https://www.nailbuster.com/pupupdatesv14/popperwebremote_v1_4_6.zip|https://www.nailbuster.com/pupupdatesv14/popperwebremote_v1_4_6.zip]]
 +
 +unblock and unzip contents of zip into root of pinupsystem.
 +
 +{{:3068dff00902edb311c2d5c170f7cb16.png}} <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>By default</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>go into "Modify script options" (above photo).  Tthe web-remote control is disabled. You must change the existing line and enabled it in system options</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>:</font>
 +<code>
 +
 +useWEB=true;   **make sure true is in lowercase.**
 +
 +</code>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>To register the remote/web server on your cab.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>There's a batch file called</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>PUPServerRegisterCOM.bat you must run this by right-click run-as-administor. press yes.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>Windows will probably come up with warnings and such for the webserver. You will most likely need to setup as public so other computers can access.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>now you should reboot your computer.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>on next Popper Menu startup it will auto-start the webserver to listen for requests.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>to test, you can leave Popper running and alt-tab to chrome. in browser type in</font>
 +
 +<code>
 +localhost
 +
 +</code>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>a page should come up. if a 404 error comes up you have problems….you've setup something wrong.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>if works, then next battle is to make sure it works from other computers on your network.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>some things to note: some wifi routers don't allow traffic between wifi and 'wired' pcs. So always good to test both.</font>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>Ideally its good to try first the ip of the vpinball address. so in browser on other pc type the address into chrome:</font>
 +
 +<code>
 +http://192.168.1.25
 +
 +</code>
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>replace 25 with ip of vpinball, (or entire address if not using standard 192.168.1.x) you may also try just typing into chrome:</font>
 +
 +<code>
 +http://vpinball/
 +
 +</code>
 +
 +and see if that works, if it does, then your remote control is all up and ready. Have Fun!
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>note: the webserver webserver is only running while Popper is running, closing Popper will close the webserver as well.</font>
 +
 +//** <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>Troubleshoot: still not working with localhost?</font>  **  //
 + <font 12.0pt/Calibri,sans-serif;;inherit;;inherit>make a shortcut to PUPServer.exe with parameters</font>  -wwwport 80 -sockport 8888
 +
 +then try browser with localhost.
 +
 +also check firewall to see if you fine PUPServer blocked or anthing like that.
 +
 +===== Another different type of project using web-remote!!! =====
 +
 +See project here: [[https://github.com/doogie2301/pinup-popper-browser|https://github.com/doogie2301/pinup-popper-browser]]
 +
 +===== Have a Tablet or TV/Device with a browser built in? =====
 +
 +There's another really neat idea. Where you can have a tablet or some TV hanging on wall showing some of the Popper Media (even during gameplay). For Example, you could have the instruction/help cards on an old Tablet in your hand. You don't need much except to point the device/browser to your vpin cab and specify which pupdisplay. It will refresh every few seconds to correct media.
 +
 +Once you have confirmed web-remote is working from above. Then you can try this from any browser.
 +<file>
 +
 +http://vpinball/pupLoop.html?pupid=2
 +
 +</file>
 +
 +note: you set the pupid to which pup screen you want to display/loop.
 +
 +check if your wwwRoot folder has the puploop.html if not then grab the updated zip at top of this page.
 +
 +===== How to Use =====
 +
 +===== Programmers Reference =====
 +
 +\PinUPSystem\wwwRoot the root home directory.
 +
 +index.html is the default landing page.
 +
 +note: this is a bare-bone-slim-down-totally basic www server… don't try anything fancy with it as it just won't work. NEVER use on a public internet facing computer.
 +
 +Here are list of current URL (mimic rest).
 +
 +PinUP Popper menu must be running in order for the Remote control to work…
 +
 +<code>
 +http://vpinball/function/getcuritem
 +
 +</code>
 +
 +use this to get a json of all the info you can get of the currently selected item. fields should be self-explanatory.
 +
 +sending emulated pupEvents to Popper
 +
 +<code>
 +http://vpinball/pupkey/XXX
 +
 +</code>
 +
 +where xxx is a number of the putEvent ID. See list for all pupEvents IDs on bottom of this page.
 +
 +<code>
 +http://vpinball/function/record/xx
 +
 +</code>
 +
 +where xx is the PUPDisplay# to record. 0-top, 1-dmd, 2-BG, 3=playfiled.
 +
 +it is toggle to start… same event to stop.
 +
 +<code>
 +http://vpinball/function/launchgame/xxx
 +
 +</code>
 +
 +xxx is the Popper GameID # to launch. it is launched in NON-record mode.
 +
 +<code>
 +http://vpinball/function/launchgamerec/xxx
 +
 +</code>
 +
 +xxx is the Popper GameID # to launch. it is launched in recording mode.
 +
 +<code>
 +http://vpinball/function/getdisplay/xxx
 +
 +</code>
 +
 +XXX is the # of the PuPDisplay will return a png or mp4 of the PUPDIsplay # 0=top,1=dmd…etc
 +
 +v1.4 pupkey events
 +
 +<code>
 +//functions for menu
 +fGamePrior   = 1;
 +fGameNext    = 2;
 +fListNext    = 3;
 +fListPrior   = 4;
 +fPageNext    = 5;
 +fPagePrior   = 6;
 +fGameStart   = 7;
 +fGameMenu    = 8;
 +fHomeMenu    = 9;
 +fGameInfo    = 10;
 +fSystemExit  = 11;
 +fShutdown    = 12;
 +fMenuReturn  = 13;
 +fSelect      = 14;
 +fEmuExit     = 15;
 +fSystemMenu   = 16;
 +fStartRecord    =17;
 +fShowOther2     = 18;
 +fInstruct     = 21;
 +fPlayOnlyMode = 22;
 +fPauseGame    = 23;
 +fInGameBatch = 24;
 +
 +fFavAdd      = 50;
 +fFavDel      = 51;
 +fFavAddSystem = 52;
 +fFavDelSystem = 53;
 +fPassCode     = 55;
 +fSystemRestart =56;
 +fSetRecord     =57;
 +fShutDownInstant =58;
 +fRestartInstant =59;
 +
 +</code>
 +