Tom Speirs Posted February 9, 2020 Share Posted February 9, 2020 Anyone tried this yet? Didn't get much feedback on it and I thought I did a pretty slick thing! Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 Sorry Tom. Don't use it. (I wasn't aware of it too) What are the voice commands ?(need to find a microphone to hook up to the cab) Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 You know, 'hey google' on phone etc? Maybe your a iPhone guy!? With what I released yesterday? No need for microphone, works with any android phone etc. Its a cloud thing. No special software or hardware required. I guess folks just didn't understand what it was and what I did. The video shows how to set it up. Then just on any android device logged in to your google account - Hey google launch game etc. The API has other uses too but that seems look a good example. Popper had the feature first in terms of Google voice but I believe the API thing is a first. 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 I'm definitely a Android guy. I'm not allowed to use an Iphone (from my wife) Ah ! Didn't see the release notes. I thought we had Google assistant integration on the Cabinet (in PBX) "Hey google, start PBX for system VPX table AC/DC" , Not sure if I should like it, but definitely is fast. I will check it later this week ! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 That it was it does but its all done in the cloud (no microphone needed etc). Its all good. I guess Im just a little needy sometimes and like a little feedback! Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 I know that feeling buddy. Although it is weekend I don't have time to play with it. But will give it a try next week Quote Link to comment Share on other sites More sharing options...
scutters Posted February 9, 2020 Share Posted February 9, 2020 Sounds great, i'm an offline cab guy though so won't be much use to me.. but I think it will be popular with others! Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 I just tested it. pretty fun. Exit game worked after the 3th time. It recognized the comment, but gave me results of "exit game" or "quit game" If I perform "launch" a table, is that only for the specific system, or is that for all systems ? It looks fun. My kids and grandkids will come over today for a birthday party, but I will definitely show this ! EDIT : I see the examples for system and tables. Sorry (A real ICT person never read a manual :P). Will check that too ! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 Thanks for trying it out buddy. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 Just a question @Tom Speirs: If I want to use Quote launch [Game name] on the "System name" What will be the correct command ? launch&p={{TextField}}&p2=Visual Pinball This won't work for me (returns false in the browser) EDIT : Command Exit Game doesn't close a table (emulator). is this only for Gameex and Gamex arcade ? also return false in the broweser The Shutdown computer works ! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 All working fine for me buddy. Not sure. In the browser though you would not use that command like that. {{TextField}} would be for icttt. So: launch&p=kiss&p2=Visual Pinball Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 or &p=kiss on the visual pinball Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 4 minutes ago, Tom Speirs said: All working fine for me buddy. Not sure. In the browser though you would not use that command like that. {{TextField}} would be for icttt. So: launch&p=kiss&p2=Visual Pinball Yes, I get that. But still gave me false. Must be me EDIT : just give it another tty on the browser and returns true back... Sorry buddy. Must have made a typo somewhere I think I like this function ! 1 Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 I guess the system name is different, maybe it is vpx, or physmod or something? Note that it also does a sub string (nearest match). Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 3 minutes ago, Tom Speirs said: or &p=kiss on the visual pinball ah ok. So that can be 1 command too. Will try that one too ! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 Only other thing is you need to give PinballX a chance to log into GameEx Online. It takes a few seconds after it launches. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted February 9, 2020 Share Posted February 9, 2020 Got that part to work fine Tom. thanks. (My system is Visual Pinball) And now the exit game also works. Really nice Tom ! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 Thanks. I guess its kind of a gimmick but the API feature has potential. Could be used for all kinds of things. Blind or disabled people maybe etc or maybe just launching a game for a friend or turning the volume off without getting off the couch! Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 I added random game to the API. Quote Link to comment Share on other sites More sharing options...
tthurman Posted February 9, 2020 Share Posted February 9, 2020 That is pretty damn cool and probably just a good pincab demonstration video from catching on with a much larger audience. For huge table collections it would have to be better than any wheel could ever be, well assuming you can remember all the tables you have Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted February 9, 2020 Share Posted February 9, 2020 will the api keep on expanding ? Like would it be able to read total tables per system / total systems / system names like it returning json and not just execute commands ?. I already run home assistant and i have a dedictated tablet mounted on the wall where i display all kinds of info on it. I could probably let it display some pinball x stats then if it was to return some json info. And perhaps if you let it export complete game list to json people can use "if this then that" with it for other uses as well (like exporting to xls or csv) based on the data available on gameex online Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 9, 2020 Author Share Posted February 9, 2020 I don't see why not. 1 Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 10, 2020 Author Share Posted February 10, 2020 10 hours ago, joyrider3774 said: will the api keep on expanding ? Like would it be able to read total tables per system / total systems / system names like it returning json and not just execute commands ?. I already run home assistant and i have a dedictated tablet mounted on the wall where i display all kinds of info on it. I could probably let it display some pinball x stats then if it was to return some json info. And perhaps if you let it export complete game list to json people can use "if this then that" with it for other uses as well (like exporting to xls or csv) based on the data available on gameex online Done. 2 Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted February 10, 2020 Share Posted February 10, 2020 Okay got it working. I let it update about every 2 hours. In case anyone wants the home assistant sensor code. You have to change m=PINBALLCAB to your computer name. I had data in gameexonline from my main pc also but only want to display info from my cabinet. [apiuser] and [apipassword] you also have to change but it's obvious. and for the system total counts you have to change it to match your system names in the for loop. Also if you start up home assistant it will try to get an initial state for all sensors fast (faster than 1 api call per second) once and fails but after the scan_interval seconds has passed the values get updated. So if you are setting this up change the scan interval to 500 510 520 etc so it updates in about 5-6 mins when your testing afterwards set back the scan intervals as these data don't change much no need to poll it like every 30 seconds. I also put 10 seconds extra with each call so i don't hit the 1 api call per second interval. I did not find a way to do one rest call for same data and reuse that same data but have not tried much. Am happy with how it works now - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getsystems&m=PINBALLCAB&f=json name: pinballx_nr_of_systems value_template: "{{ value_json.data | count }}" unit_of_measurement: "" scan_interval: 6300 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getlastplayed&m=PINBALLCAB&f=json name: Pinballx_lastplayed value_template: "{{ value_json.data[0].Name + ' (' + value_json.data[0].System + ')' }}" unit_of_measurement: "" scan_interval: 6310 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getstatus&m=PINBALLCAB&f=json name: Pinballx_Last_online value_template: "{{ value_json.data[0].LastActive }}" unit_of_measurement: "" scan_interval: 6320 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getsystems&m=PINBALLCAB&f=json name: Pinballx_Total_Tables value_template: "{{ value_json.data|map(attribute='NumberOfGames')|map('int')|sum }}" unit_of_measurement: "" scan_interval: 6330 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getsystems&m=PINBALLCAB&f=json name: Pinballx_Visual_pinball_X_Count value_template: "{% for system in value_json.data %}{% if system.System == 'Visual Pinball X' %}{{system.NumberOfGames}}{% endif %}{% endfor %}" unit_of_measurement: "" scan_interval: 6340 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getsystems&m=PINBALLCAB&f=json name: Pinballx_Visual_pinball_Count value_template: "{% for system in value_json.data %}{% if system.System == 'Visual Pinball' %}{{system.NumberOfGames}}{% endif %}{% endfor %}" unit_of_measurement: "" scan_interval: 6350 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getsystems&m=PINBALLCAB&f=json name: Pinballx_Pinball_FX3_Count value_template: "{% for system in value_json.data %}{% if system.System == 'Pinball FX3' %}{{system.NumberOfGames}}{% endif %}{% endfor %}" unit_of_measurement: "" scan_interval: 6360 - platform: rest resource: https://online.gameex.com/api.aspx?u=[apiuser]&s=[apipassword]&c=getmostplayed&m=PINBALLCAB&f=json name: Pinballx_mostplayed value_template: "{{ value_json.data[0].Name + ' (' + value_json.data[0].System + ') (' + value_json.data[0].TimesPlayed + ')' }}" unit_of_measurement: "" scan_interval: 6370 Quote Link to comment Share on other sites More sharing options...
Tom Speirs Posted February 11, 2020 Author Share Posted February 11, 2020 Nice one buddy The one API call per second is really just for safety. Its not really required at this point. Is it a problem? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.