-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Make An Announcement Web Request When Launching A Game #41
Comments
I like this idea a lot! It's definitely doable This is the current payload for the /games/playing API endpoint. Would it be suitable for what you're imagining? {
"core": "PSX",
"system": "PSX",
"systemName": "Playstation",
"game": "PSX/Crash Bandicoot.mgl",
"gameName": "Crash Bandicoot"
} I guess I can put an option in the remote.ini file to specify a url to post to |
Exactly the sort of request I was thinking of. I would maybe add two more fields "platform: mister" and possibly hostname. That way if this type of standard more prevalent, you can differentiate between different platforms and help if users have multi Mister setups. |
I also realized this could potentially be used in the Retrotink 4k via pico (depending on the cli). Per core and per game profiles for the Mister could be huge (and a fun project for me lol). |
Give this a try! Just replace your current remote.sh in the Script folder and it will auto-update later with the real release. Create a file in the Scripts folder called
And then restart mister or do restart remote service from the settings page. From then on it will send the POST payload to that address every time the game/core state changes. Below is the example data consumed by a dummy python server |
Oh and you must have the |
Thanks for getting a this up and running so fast! I was able to get a webhook up and running in home assistant to start looking at different automatons. I did notice some strange behavior when switching cores. For example
|
Unfortunately, that is just how it works. MiSTer's own reporting of launched games and cores are wildly out of sync with each other I could come up with some sort of buffering for it to make them look in sync, but it's not a 10 minute job like this was. I would say give it a shot how it is, and then let me know what features you want to see added that are stopping automations from working One thing missing from this payload is the intention of the event that triggered it. For other apps they normally also know this event is because a core was stopped/started or a game was stopped/started |
Understood. Nothing should block any automation, just adding a debounce to the home assistant side should be enough to filter out the double requests and as long as I keep track of the current game, everything should work fine. The intent would be a neat addition. |
The idea for this feature is that when launching a game, the Mister could send a post request to a specific url(s) containing the core and game name being launched. This would allow users to integrate external services and sync them to Mister activity. For example, you could change smart lighting based on the games,or track games played in an external database.
The text was updated successfully, but these errors were encountered: