Jump to content

rambo3

Members
  • Content count

    33
  • Joined

  • Last visited

  1. Hopefully I'll have that sorted out next week as I'm merging his changes into it to get it synced with DOFLinx.
  2. Have you tried the TableOverrideSettings in my DOF-branch? You should be able to, per-table, either reduce or kill completely, specific outputs if you know your shaker controller and output trigger. Though it will affect that/those output(s) for the entire table run.
  3. Release Status & Swisslizard

    mjr; if you are reading this (or anyone else), I'd like to merge your changes (https://github.com/mjrgh/DirectOutput/tree/Release20151130) into my own branch (https://github.com/rambo3/DirectOutput/tree/ultimateio). I don't have a LedWiz myself, so I can't test for stability issues, but is this a stable branch for people with and without Pinscape? It's just 4 commits, but there's a significant set of changes regarding LedWiz.cs and OutputControllerCompleteBase.cs that seem to remove the need for ledwiz.dll?
  4. Ain't happenin' to nobody I had some issues with my flippers getting stuck actually on the Ultimate I/O where support was based on the PacLed64. Turns out it was an issue in the code hammering the poor UIO so much it started missing / skipping commands, in effect causing stuck flippers.
  5. Nice work! One can never, ever, EVER have too many LEDs, PC hardware manufacturers finally figured that one out with actual fully digital RGB output headers and RGB RAM modules C-:
  6. Feature request for the tool

    DOF loves one word ROM-names Cool thing with prefixes is that we'd be able to use wildcards (fp_*) for manual table overrides in Cabinet.xml now too.
  7. DOF just got support for custom table output overrides through the <TableOverrideSettings>. Individual outputs can be globally adjusted (contactors disabled for instance), per-rom, per-table, or using wildcards (afm* for all versions of Attack from Mars). Lights or contactors can be reduced or shut off completely, overriding your configtool export settings. As always; backup your entire DirectOutputFramework - directory before toying with this ! I take no responsibility for issues, fire, damages, psychosis, insomnia etc. https://github.com/rambo3/DirectOutput/tree/ultimateio/DirectOutput/Builds Swisslizard: huge thanks for putting the project on GitHub. My cab would be dead without it. Introduction Kiwi wondered if it would be possible to turn off certain toys based on tables. No, but that's actually a great idea. So here we go! Setup Add the following to your Cabinet.xml, say just before </Cabinet> at the end of your XML, and start adjusting / removing. The example below globally turns off left and right flipper contactors. For Bad Cats turns off my overcab light, and reduces the undercab light to 50%. <TableOverrideSettings> <TableOverrideSetting> <Name>Globally disable left and right contactors</Name> <Enabled>true</Enabled> <Roms>*</Roms> <Tables>*</Tables> <TableOverrideSettingDeviceList> <TableOverrideSettingDevice> <Name>Ultimate I/O contactors</Name> <ConfigPostfixID>27</ConfigPostfixID> <Outputs>49,52</Outputs> <OutputPercent>0</OutputPercent> </TableOverrideSettingDevice> </TableOverrideSettingDeviceList> </TableOverrideSetting> <TableOverrideSetting> <Name>Bad Cats, disable or reduce undercab light</Name> <Description>Disables or reduces output percent on specific outputs for specific tables</Description> <Enabled>true</Enabled> <Roms>bcats*</Roms> <TableOverrideSettingDeviceList> <TableOverrideSettingDevice> <Name>Philips Hue projector overcab</Name> <ConfigPostfixID>70</ConfigPostfixID> <Outputs>7,8,9</Outputs> <OutputPercent>0</OutputPercent> </TableOverrideSettingDevice> <TableOverrideSettingDevice> <Name>Philips Hue undercab</Name> <ConfigPostfixID>70</ConfigPostfixID> <Outputs>10,11,12</Outputs> <OutputPercent>50</OutputPercent> </TableOverrideSettingDevice> </TableOverrideSettingDeviceList> </TableOverrideSetting> </TableOverrideSettings> Settings <TableOverrideSetting> is a mode containing a descriptive name, enabled state, comma seperated ROMs, and / or comma seperated Tables. Wildcards are supported. A single * specifies global. <Roms> specify list of ROMs without spacing, for instance: <Roms>afm*,bcats*</Roms> <Tables> specify table filenames without extension and spacing before commas, for instance: <Tables>AttackFromMars_FS_B2S,Bad Cats.VPX.v1.0</Tables> No commas in filenames, and no spacing before seperator. If there are commas in filename, use first part and add a wildcard / * at the end (AttackFromMars*). Filename are case-insensitive. <TableOverrideSettingDeviceList> contains all the devices you want to affect. <TableOverrideSettingDevice> is a single device, its outputs (according to configtool) to affect, and the output strength in percent 0-100. 0 is off. To let DOF know which device you want to control, match the ConfigPostfixID with your configtool ini file, for instance directoutputconfig27.ini with 27 being the postfixid. Debugging Check your DirectOutput.log file for details if nothing works. You should see something like: ... 2017.06.06 20.45.30.157 Debug: Setting up shape effect for area. L: 91, T: 0, W: 9, H: 30 2017.06.06 20.45.30.157 Table config loading finished: romname=afm, tablename=Attack from Marsvp91x 2017.06.06 20.45.30.157 TableOverrideSettings.activateOverrides... activeSetting[Globally disable left and right contactors]=True 2017.06.06 20.45.30.157 TableOverrideSettings.activateOverrides... activeSetting[Attack from Mars, disable flippers]=True 2017.06.06 20.45.30.157 TableOverrideSettings.activateOverrides... activeSetting[Bad Cats, disable or reduce undercab light]=False 2017.06.06 20.45.30.157 Pinball parts loaded ... Device support Currently Ultimate I/O, Teensy, and Philips Hue are fully supported. PacLed64, PacDrive have the support added in, but since I don't have those devices I can't confirm that they actually work. SainSmart USB have the support added in, but not fully testet yet. LedWiz is planned, but not sure how to add it in yet and will need to be confirmed by someone else since I don't have the thing. Fun thing Outputs can be individually affected, for instance I accidentally applied 0 OutputPercent in Bad Cats to one or two (can't remember) of the three undercab channel outputs causing a yellowish bright green instead of orange.
  8. Just added support for overriding outputs per table, globally, or using wildcards for ROMs and table filenames (either, or both). Outputs can be anything from 0-100 with 0 being turn off, and 100...not making much sense but it's there for consistency. Right now I've got left and right flipper contactors globally shut off, and undercab light at full strength + overcab light completely off for Bad Cats (ROM name "bcats*" with wildcard at the end). Also experimented with undercab at 20-50% strength, and individual R, G, B strength offsets which gave me a nice green color instead of orange in Bad Cats to prove that individual channels were indeed affected That should pretty much cover it. Need to do some more testing before putting up a new thread for <TableOverrideSettings>, hopefully tomorrow. EDIT: EM tables don't have ROMs, right? They're basically analog? In this case, I think we got that covered too as a <Roms> being blank instead of something like "afm" (Attack from Mars) could in effect be triggered to say disable LED strips.
  9. Allright then, I think I have something to work on. I'm kind of in the "DOF"-mode these days. Experimented yesterday with capturing and testing the latency of my UIO -> Sainsmart --> contactor signal delay by basically capturing the devices inside the pincab at 60FPS. You can see when an output gets triggered (LED on Sainsmart), and when a contactor pushes and releases. A full cycle was about 180ms, with the Sainsmart at ~100ms, contactor ON ~34ms, contactor OFF ~46ms rougly. It hit me that if the left flipper was triggered twice within say 100ms and the primary contactor was still busy processing, why not offload retrigger to the slingshot contactor sitting right beside it? Basically have another output assist a running output while the first one was still running as a way of compensating for slow hardware. It worked quite well practically, sounded a bit funny due to different contactor assisting on quick retriggers, but then realised that the real problem of course was the Sainsmart itself; 100ms before reaching the contactor is alot. I'll do some experimenting in a few hours with the disable-toy-feature and report back!
  10. Addressable Rgb's

    One recommendation; take care of your eyes. Use sunglasses, look through the camera of your phone if you have to stare or something. I'm not kidding, don't even dare staring at those. I just put a cover on top and watched the indirect light from the wall in the end, and did recordings using the phone to watch how the LEDs were lighting up.
  11. Wait a minute; can't you disable toys manually in configtool on a table-basis, specific to your configtool account?
  12. No, but that's actually a great idea. Any suggestions on how you'd want something like this implemented, or what you'd need? The <ScheduledSetting> is a background thing running continuesly, but something like <TableSettings> could work? Right now I'm thinking something with Name, Enabled, Table name (not sure; filename? rom?), and the devicelist similar to above. It'd be nice to have day/night-modes run simultaneously. That should make it possible to not only turn off stuff on a per-table basis, but set a strength property to some toys like lights. Eh...suggestions?
  13. Just did a software-approach to this in DOF. Currently using it for shutting off contactors, and adjusting Teensy brightness output to 30%. Been testing it for a few months now, check if out if you're feelin' lucky
  14. DOF now has support for custom day and night modes through three classes: ScheduledSettings, ScheduledSettingDevice, and ScheduledSetting. This is a software approach to having lights or outputs adjusted on-the-fly during different times of the day. As always; backup your entire DirectOutputFramework - directory before toying with this ! I take no responsibility for issues, fire, damages, earthquakes etc. https://github.com/rambo3/DirectOutput/tree/ultimateio/DirectOutput/Builds Swisslizard: huge thanks for putting the project on GitHub. This project, like Philips Hue support, is not official but a side project off the original R3. Introduction As I got home from the job tired I wanted to play pincabs with less noise or brightness. I was changing the Cabinet.xml, renaming files to shut off the contactors, powering off the RGB or using alternative fade curves. At one point I started experimenting with overriding DOF output strength through Cabinet.xml and just brute force code, and eventually the XML settings got to a point that I could have full brightness on everything during the day, gradually shut off contactors, and adjust the Teensy brightness at midnight. Changes would kick in during a game and over midnight, which initially seemed like a bug where contactors would suddenly no longer "work". This is a software approach to specific devices in DOF for dynamically adjusting custom outputs, including Teensy brightness for individually adjustable RGB strips which by default are very powerful. Setup Add the following to your Cabinet.xml, say just before </Cabinet> at the end of your XML, and start adjusting / removing. The example below goes into effect 2200-0500, sets my contactor specific outputs to off, adjusts the Teensy back LED-matrix to 30%, and shuts off the SainSmart USB outputs. And it's enabled. <ScheduledSettings> <ScheduledSetting> <Name>Night Mode</Name> <Enabled>true</Enabled> <ClockStart>2200</ClockStart> <ClockEnd>0500</ClockEnd> <ScheduledSettingDeviceList> <ScheduledSettingDevice> <Name>Ultimate I/O contactors</Name> <ConfigPostfixID>27</ConfigPostfixID> <Outputs>49,50,51,52,53,54,55,56,57,58</Outputs> <OutputPercent>0</OutputPercent> </ScheduledSettingDevice> <ScheduledSettingDevice> <Name>Teensy LEDs back matrix</Name> <ConfigPostfixID>30</ConfigPostfixID> <Outputs>1</Outputs> <OutputPercent>30</OutputPercent> </ScheduledSettingDevice> <ScheduledSettingDevice> <Name>Sainsmart USB</Name> <Description>Note that the Sainsmart is a 0/1 relay array and that 0=off while 1-100 is considered on. There is no inbetween, a relay is either open or closed ("bitbang").</Description> <ConfigPostfixID>40</ConfigPostfixID> <Outputs>1,2,3,4,5,6,7,8</Outputs> <OutputPercent>0</OutputPercent> </ScheduledSettingDevice> </ScheduledSettingDeviceList> </ScheduledSetting> </ScheduledSettings> Settings <ScheduledSetting> is a mode containing start-end time of effect, enabled state, device list. You can have multiple <ScheduledSetting> objects to specify morning, daylight, evening, midnight. Times are forward-looking; typing 2050-0800 would literally mean from 2050 and until 0800 in the coming morning. <ScheduledSettingDeviceList> contains all the devices you want to affect. <ScheduledSettingDevice> is a single device, its outputs (according to configtool) to affect, and the output strength in percent 0-100. To let DOF know which device you want to control, match the ConfigPostfixID with your configtool ini file, for instance directoutputconfig27.ini with 27 being the postfixid. Passing midnight The settings have been confirmed to work passing midnight, which initially was a real problem practically and technically. There's an interesting issue here when a range passes to the next day (2300-0300 for instance), idea being schedules should be able to run all day long in real time without reboots. It's important checks are done in real time, not at DOF boot, as it probably wouldn't become active again if a pincab was online more than a day. Debugging Check your DirectOutput.log file for details if nothing works. Device support Currently Ultimate IO, SainSmart, Teensy and Philips Hue are fully supported. PacLed64, PacDrive and LedWiz have the support added in, but since I don't have those devices I can't confirm that they actually work. Note that the switches / relays like Sainsmart USB device is a 0/1 relay array and that 0=off, while 1-100 is considered on. There is no inbetween, either open or closed ("bitbang"). Gotta run real quick for work; hopefully this post doesn't have too many errors, I'll recheck after work.
  15. DOF now has support for Philips Hue through PhilipsHueController and AutoConfigurator classes. Massive thanks to arngrim for providing example libraries to start with, and support in DOF Configtool for the Hue, and the I-Pac Ultimate I/O while I'm at it. Please note, this is a fork off the original R3 by lizardking / swisslizard as I've been adding ScheduledSettings, UIO support, tweaks to the I-PAC portion of DOF etc for some time now. Check the link below, and use the latest build if you're feelin' lucky. Backup your entire DirectOutputFramework-directory before toying with this! I take no responsibility for issues, fire, damages, earthquakes etc. https://github.com/rambo3/DirectOutput/tree/ultimateio/DirectOutput/Builds Swisslizard: huge thanks for putting the project on GitHub. I love my I-PAC Ultimate I/O, and with the sources I was able to add in support for it. That is huge. Introduction The Philips Hue family consists of Zigbee / wireless controlled lights, sensors, remotes etc. using a bridge (the Philips Hue "hub"). The framework supports auto detection and configuration of these units. Philips Hue is made and sold by Philips. The class was based off PacUIO.cs, and implementation makes use of Q42.HueApi. It retains the 3-channel RGB style inputs, but converts that over to a single-channel #rrggbb hex string. Pretty much like normal RGB-bulbs in a pincab. Technically a single bridge can control about 50 lights x3 = 150 input channels (sensors are additionally ~60). Distance is covered either directly, or through ZigBee device-hopping where signal travels along devices to reach the finale device. Each device acts individually, but a LED-strip cannot have its LEDs individually controlled; the entire LED-strip acts like a single RGB device, and will light up with the same color value. Setup Before DOF can start communicating with the bridge it will need a valid key. To get a key off the bridge the Link-button on the bridge needs to be pressed, and an dof#pincab "user" needs to be registered in the bridge (whitelist) within 30 seconds. This will return a unique key (for instance "2P4R5UT6KAQcpOjFaqwLDrbikEEBsMIHY6z6Gjwg") which can then be used from that point on. The same registration on another bridge, or even the same, will create a new key and is required if you want to crossfire/SLI two hubs for reducing latency per bridge as more bulbs on the same bridge will introduce latency. To avoid duplicates / spamming the whitelist, and to avoid bugs crashing the bridge, currently this is the suggested approach for getting a key: Step 1: set static IP to bridge Get IP of the bridge. Check your phone Hue App -> Settings -> My Bridge -> Network settings. It should default to DHCP. Change this to a static IP, and make note of it, or check your router for IP. Step 2: whitelist DOF using a browser Open up the bridge API in a browser using your IP, example (replace IP with your static IP): http://10.0.1.174/debug/clip.html In the "CLIP API Debugger" it should say something like URL: "/api/1234/" with GET, PUT, POST, and DELETE-buttons. Copy&paste the following line into URL-field (not in your browser, but in the CLIP API Debugger): /api Copy&paste the following into the Message Body textfield: {"devicetype":"dof_app#pincab"} Next, walk calmly over to your bridge and press the physical Link button. You now have 30 seconds to hurry back to your browser, and press "POST"-button. Prepare for a second ride. Eventually you should get a username in the Command Response textbox, for example: "ywCNFGOagGoJYtm16Kq4PS1tkGBAd3bj1ajg7uCk". Make note of this. If you need more help, or images, see the Philips Hue API getting started tutorial with screenshots and replace the text with your own. The Name can also be adjusted. Step 3: add IP and key to Cabinet.xml Open up your Cabinet.xml, and add the following lines in the OutputControllers section, replacing the IP and key with your own: <PhilipsHueController> <Name>PhilipsHueControllerPincab</Name> <BridgeIP>10.0.1.174</BridgeIP> <BridgeKey>ywCNFGOagGoJYtm16Kq4PS1tkGBAd3bj1ajg7uCk</BridgeKey> </PhilipsHueController> Step 4: add lights using http://configtool.vpuniverse.com A bridge can handle about 50 lights. Each light will multiplex RGB (3 channels) on each send, similar to using RGB-buttons on a PacLed64 or UIO. To match your output channels to a specific light, use your Android / iOS Philips Hue app and decide which light you need to control. Each light should have a number in it, for instance "10. Hue lightstrip 1". That 10-number is the light ID. Mapped to the individual RGB-outputs in DOF Config Tool port assignments this means: ((light ID -1) * 3) + 1 = ((10 - 1) *3) + 1 = 27 +1 = 28, resulting in port 28, 29, 30 (R, G, B). If your light ID was 3, you'd map it to port 7, 8, 9. If your light ID was 1, you'd map it to port 1, 2, 3. If you want to delete the key from your bridge, open up CLIP URL again from the URL below, then enter the API-URL (replace both keys with your own, they're the same used twice), then press DELETE: http://10.0.1.174/debug/clip.html /api/ywCNFGOagGoJYtm16Kq4PS1tkGBAd3bj1ajg7uCk/config/whitelist/ywCNFGOagGoJYtm16Kq4PS1tkGBAd3bj1ajg7uCk Shutdown of lights DOF will shut down lights that have been affected, not the entire light array like an UIO or Teensy. If you have a house / apartment controlled by the same Hue bridge, it should only power down that one light or LED-strip that was affected when exiting a table. The feature was implemented as I found myself in complete darkness after quitting Attack from Mars way too often. Latency This is where things get complicated, and I try to cheat, trick and compensate for wireless issues. Signal communication is reduced as much as possible. Results will vary greatly. I'll try and detail what is going on, why, and how I tried through testing to compensate for it. Latency in milliseconds varies depending on wireless distance and signal strength, device-hopping, LED affected (R, G, or and brightness. A worst case scenario would be to adjust all RGB-channels, including brightness. A connection takes a few hundred ms (done once at init using BridgeKey and BridgeIP), and color sends per-light about 40-800ms+. Typically about 100ms. The latency becomes the DOF Philips Hue bridge refresh rate. Note that Phlips Hue does support controlling a group of lights at the same time using the same color change (not individiaully controlled); I'm not doing that right now, everything is per-bulb. The bridge will at worst case queue commands; this introduces more latency and inconsistencies (colors stuck, stuttery fades). To avoid overloading the bridge, DOF will check connection every 3s and use the last known latency as a transition time for the device to smooth out color changes much like TVs introduce frame interpolation from ~film to native panel refresh through synthesized pixel data. Color transition is a Hue API native command, and once set in motion adjust smoothly regardless of latency. The same latency (say 120ms) will become the DOF Hue refresh rate until the next connection check 3 seconds later, at which point the latency might be 300ms. If latency at any time is below 100ms, this gets reset to 100ms to avoid overloading the bridge. In practice 50ms works, 40 even, for a while. Breathing room and bridge stability has absolute priority. If any color changes occur between refreshes it gets stored locally but not actually sent to the bridge / light until the next color change. This is where colors can get stuck until the next change if latency is also high when that happens. Compensating for latency Any off-states in either R, G or B channel uses a fade the amount of current latency. Any on-states from black in either R, G or B is sent instantly without a fade to attempt to have light on as soon as technically possible. Any R, G, B changes not 0 will transition using fade time the amount of current latency. Using Hue color transitions produces smoother pulsating LAUNCH-button for instance, or color changes in general. Without it colors would change inconsistently due to latency changes of 100, 400, 200, 800ms etc while trying to set the color in a varying time span. Using Hue transitions will attempt to smooth out those changes giving the bulbs something to do while DOF is fighting latency. Practical use Start with one light. Do some testing and benchmarks, and see how far you can push it. First thing I did was crossfire / hook up two bridges and 17 devices; RGB, white, ambience, spots, two LED-strips. Then mapped them all to Undercab RGB complex in configtool. It was an interesting experience. 17 devices is 51 ports and about 6000 lumen. One bridge had 16 lights, the other 1 LED-strip. The single LED-strip was close to ~100ms and responded very well to changes, almost hiding latency completely. The other 16 lights were different; Hue will affect one light at a time when controlled individually, and in this case it took about 2 seconds for all lights to light up one by one. For undercab light, it wasn't bad, and the whole apartment flashed vividly, including the bedroom. I then tried mapping all lights to left (red) and right (blue) flipper. Due to the quick changes, the lights could not keep up. Some commands were ignored as they were issued turn off commands before having a chance to light up. Splitting the lights between the two bridges would have reduced latency, but the Hue API does have support for groups. This increases latency, but will attempt to sync and set all lights simultaneously instead of gradually for each command. Start with 1, take it from there. arngrim suggested undercab light. It's a very good match with one of the newer +1000 lumen LED-strips. Debugging Check your DirectOutput.log file for details if nothing works. It should say PhilipsHueController for those specific commands, whether connection was made, whether your IP and key was read of Cabinet.xml, and connection status so you can check your actual latency to the bridge after a game. Wear and tear The bulbs are not cheap. They will break a whole lot quicker being controlled like flashers. Use common sense. I take no responsibility for broken hardware, damages, risks, downtime, pissed off better halfs etc. Example Config.xml attached, with some extra bonuses. Cabinet.xml pincab_dofhue_20170529_1.mp4
×