I am in the early stages of thinking of how to build one of these. I am sick of my friends messing up the deals. I did some research on 7inch touch screen monitors. Is it feasible using Node-red to send say a GUI that just has 2 cards, to two seperate monitors? There would also be a bigger monitor in the middle to display the cards that everyone plays.
This is 10,000 dollars. My idea would be to just use regular chips and just have a screen to show the cards. There would still be cloth and the screen to display the cards wouldn't be large. the players would still run the game. That way I only have to make a way to randomize cards, not figure out best hands and chips.
I would love to have a 10 seat table but figured i'd start small....
Of course. While I don't gamble, it would be pretty easy but if you are going to use Dashboard, I think you will likely need 3 different computers, each running node-red and having their own screen since Dashboard is really only a single page.
Something like uibuilder could do it from a single device as it supports multiple independent pages. In that case though, you would need to use something like a Nextion screen that could be driven from GPIO. Quite possibly easier and cheaper to use 3 Pi's each with a standard screen. One of them as the controlling host with the central screen and possibly acting as a WiFi AP. Run MQTT on that as well to make inter-device comms easy.
Then you could actually have as many satellite devices as you wanted, start with 2 but 10 would be easy enough, just more of the same.
You could also use cheap android tablets for players each running node-red. As @TotallyInformation suggest run a central device that runs mosquito broker and Node-red for dealer routines/backend. This device could then update all the android tablets over mqtt
You can do this with the http-in/response and websocket nodes.
Example flow:
[{"id":"56493f2458147742","type":"http response","z":"8e2f7d3f7607066d","name":"","statusCode":"","headers":{},"x":610,"y":180,"wires":[]},{"id":"0244f2a3e53239cd","type":"websocket in","z":"8e2f7d3f7607066d","name":"","server":"ed17a6fe1a3866ea","client":"","x":300,"y":320,"wires":[["2fddc86667e38a18"]]},{"id":"c9116b684dd21dec","type":"websocket out","z":"8e2f7d3f7607066d","name":"","server":"ed17a6fe1a3866ea","client":"","x":670,"y":240,"wires":[]},{"id":"1fa60c9f643c7ab1","type":"http in","z":"8e2f7d3f7607066d","name":"","url":"/poker","method":"get","upload":false,"swaggerDoc":"","x":290,"y":180,"wires":[["7398691a3441e1b4","0c25dc280648cea3"]]},{"id":"7398691a3441e1b4","type":"template","z":"8e2f7d3f7607066d","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <style>\n body{padding:12px;background-color:#333;color:#fff;font-family:sans-serif;}\n .wrapper {\n height: 100%;\n display: flex;\n justify-content: center;\n }\n .content {\n background: #777;\n margin: auto;\n width: 300px;\n border-radius:20px;\n padding:20px;\n text-align:center;\n }\n </style>\n </head>\n<body>\n <div class=\"wrapper\">\n <div class=\"content\">\n <h1>Welcome</h1>\n <h2 id=\"player\"></h2>\n </div>\n </div>\n <script>\n const ws_url = `ws://${location.host}/ws/connect`\n const ws = new WebSocket(ws_url)\n ws.onopen = event => {\n ws.send(\"socket connected.\")\n }\n ws.onmessage = msg =>{\n const data = JSON.parse(msg.data)\n document.querySelector(\"#player\").innerText = `Player ${data.player}`\n \n }\n </script>\n</body>\n\n</html>","output":"str","x":460,"y":180,"wires":[["56493f2458147742"]]},{"id":"2fddc86667e38a18","type":"debug","z":"8e2f7d3f7607066d","name":"debug 133","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":320,"wires":[]},{"id":"70cda79e783e8ce6","type":"change","z":"8e2f7d3f7607066d","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"req.query","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":535,"y":240,"wires":[["c9116b684dd21dec"]],"l":false},{"id":"0c25dc280648cea3","type":"delay","z":"8e2f7d3f7607066d","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":425,"y":240,"wires":[["6bb7b698181f6a4d"]],"l":false},{"id":"6bb7b698181f6a4d","type":"switch","z":"8e2f7d3f7607066d","name":"","property":"req.query","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":475,"y":240,"wires":[["70cda79e783e8ce6"]],"l":false},{"id":"ed17a6fe1a3866ea","type":"websocket-listener","path":"/ws/connect","wholemsg":"false"}]
You can open 2 browser tabs connect to your node-red install url, add /poker
and append the url with ?player=1 and the other with ?player=2, eg. /poker?player=1
etc
Ofcourse it will need more work, but should get you going.
Your friends could even use their own phones (if you allow them on your network) and connect to those pages.
Holy crap. You guys have really helped me. Thank you. I actually do have a couple android devices I'm going to mess around with this. Each user would have their own little dashboard then? I am pretty excited about this I'm pulling out my old androids now. I just need to make a ui for the web browser Thst has deal. Fold...etc.
Does node red have an android app or I'd just a web app and go right there
No App required, as long as the devices can access the controller, you are just looking at the same interactive web site/page.
Is there any more example flows of something to this that i could go off of? I have used node-red for quite a few projects but this is a new one in my wheel house. I'm importing the one Bakman2 suggested now.
Thanks again
This is my progress so far. Pretty happy with it. I want to sql back end this because i wanna analyze the data and our hands. Basically i'll press "Deal next hand" and it will give everyone their cards. Once the players login, that will activate them in the player database. "Active player" will be dealt cards.
am i on the right path?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.