Air Hockey Table Project using Alexa, Smart Things, And WebCoRE


#1

Hey guys. I just installed WebCoRE tonight and I plan to start messing aroung with it in the next few days. I have a few fairly complex things I’d like to happen. Hopefully someone can tell me if this is the avenue to make them happen, or if I’m barking up the wrong tree.

Step 1: Ask Alexa to “Turn on Air Hockey.” She then turns on the Smartthings switch, in turn turning on the table itself. She also turns the light over it to red, and the light under it to blue. She also plays Kiss’ version of the Star Spangled Banner on Spotify via a routine I set up. I need an additional switch to be triggered when I say this that will turn on spotlights illuminating an American Flag on my wall. And finally, after the song is over, I’d like the lights to return back to white, maybe typing in the exact time the song takes and then something turns off the flag spotlights, and changes the red and blue lights to white?

I also have another routine programmed similarly where I say: " Turn on black light Air Hockey." As you can imagine she turns the lights purple, turns on the table, and plays “Bangarang” on Spotify. I also need the spotlights to turn on and I’d also like the purple lights to strobe/flash white periodically similar to the Hue Disco app. Then when the song is over have something trigger the spotlights off and the lights to stop strobing/flashing white, but remain purple.

Step 2: Depending on which routine I trigger (normal or blacklight) I’d like 2 multi purpose sensors mounted inside the goals to do similar things, but different colors. For example, if I trigger the normal air hockey routine, when a contact sensor opens, an air horn sound is triggered, the overhead light changes to red (from white) and then when the contact sensor closes, have a “player 2 scored” sound play and have the overhead light change back to white. Obviously have the other contact sensor do similar things but say “player 1 scored” instead. But if the black light air hockey routine is on and the lights are all purple, do the same actions but return the overhead light back to purple instead of white.

I have Alexa, Sonos, Smart things, Hue, and just downloaded WebCoRE and RemindR in the hopes I could at least get the audio notifications of the airhorn and the Player 1 and player 2 scored notifications to work, but was unsuccessful. However, hopefully with some assistance, I could integrate WebCoRE and RemindR and try to get the delay time down and add that to the lighting pistons? Thanks for the help guys!!


#2

It all definitely sounds doable… The only challenge that I see is to get the contact sensors to consistently trigger when a goal is scored. Them air hockey pucks can really fly! Aren’t you concerned your contact sensors will break once impacted?

I use Tasker to speak text out loud, so am not familiar with the exact commands needed for Sonos, but I would start simple on this one. Start with only one trigger and one command. Something like this:

If contact sensor opens
Then read text in Sonos

Once this part is working, you can build on it.

Searching this forum for the word “Sonos” might yield some good tips from Sonos users.


#3

Thanks for the quick reply! I’m retrofitting an older air hockey table that was given to me with a new optically driven scoring system currently, so I figured while I was doing that, I’d start the coding. So, if say for instance the light was red…after a certain period I could change it to white? I’m running into trouble now with the Hue colors triggering things. For example, when one light changes to purple, it turns on another light and turns it purple as well. Then when I turn the second light off, it changes the first one back to white. That was just an experiment. As for the multi sensors, I was going to 3d print little hinged doors to cover the big open spot of the goal area the puck falls into, and then mount the sensor on the outside. Door opens…changes light to red and plays airhorn sound. Door closes…corresponding player scored message plays and lights go back to either white or purple. I tried motion sensors inside the goals but they were hit or miss when the pucks went by them because they are pretty fast. I just wish I knew more so I could integrate alexa and have her keep track of the score. But one thing at a time I guess! Right now, like I said I’m having trouble getting something to happen once my hue bulb changes to a certain color via alexa. For example…alexa change stairs to purple. Then once that bulb changes to purple…it triggers something to happen. I tried using the preset colors in webcore without much luck.


#4

You could keep track of the score with WebCoRE, as you want it to play the sound you could increment a variable at the same time, this could then reset after a period of inactivity.


#5

That’s pretty interesting! The more digging I do, the more I can see myself doing with this! I just hope the learning curve isn’t too steep.


#6

I’ll be honest. I have never tried using a lights color as a trigger for anything. I would be tempted to let webCoRE handle both aspects. (turning both lights to purple, and later, turning both lights to white) This also makes troubleshooting much smoother, since all the triggers and commands are centrally located in one place.

This may sound strange, but once I became familiar with webCoRE, I have totally stopped using the Philips Hue hub and app. WebCoRE can do it all, and do it much better. (I did not disconnect my Hue hub, but my Hue app hasn’t been touched in a year, and all my coding is done in webCoRE)

As far as scoring goes, I wonder if a vibration sensor attached to the outside of the goal pocket would be accurate enough to keep track of goals. I have seen people use the SmartThings Door/Window contact sensor on their washing machine to monitor vibrations, so it sounds possible. Would you be willing to share closeup pictures of the goal pocket?


#7

I can see a small iris sensor inside the goal pocket, pointing down. Curious to see if it’s sensitive enough to detect the puck motion.


#8

Sure thing! I’ll take some pictures this weekend of the goal for you. I’m in the process of building an arcade cabinet as well, so things are a little cramped at the moment! I actually tried to use the vibration function of the Samsung sensors when I first bought my house. But I have them mounted on a large pedestal, so they wouldn’t read accurately. I moved the sensors to the doors, and have them trigger voice notifications over Sonos connected to my whole home audio system reminding me the washer and/or dryer is done based on time of the cycle I usually run on the respective machines.


#9

I tried using a Samsung motion sensor and the pucks moved too fast. I could try the Iris sensor. Is it known to be more sensitive/adjustable?


#10

Just a heads up…

Many motion sensors are based on heat changes to detect motion.
Any of these types of motion detectors would never even see the puck.

I haven’t seen the design of your puck pocket yet, but in my mind, a
vibration sensor on the outside of the pocket sounds the most reliable.


#11

There is a possible issue with a vibration sensor and that is you could accidentally set it off if you knocked against the table.

Could use a laser trip sensor, but I don’t know if there are any Zwave compatible ones about.


#12

Yes, the sensitivity of the vibration sensor on the pocket would definitely need to be tweaked to prevent false triggers, but it still sounds like the most reliable method with the devices currently on the market.


#13

With the devices on the market today, probably the best chance you have at something working reliably without manual workaround would be putting a very small (but strong) magnet on the puck and placing a contact sensor somewhere in the goal. Even if the switch closes momentarily, the device will wake up and send that notification to ST/webCoRe.


#14

You could recess something like this in the middle of the puck to avoid making it heavy to one side:

Here’s an even thinner one, but it has less than 1/50th the strength of the one above. I guess size really does matter…


#15

Can you guys recommend me folding air hockey table? Which one should i buy and from where? I want something like this https://airhockeytablereviews.com/best-folding-air-hockey-tables