Skip to content

Instantly share code, notes, and snippets.

@CoalaJoe
CoalaJoe / ps4_add_game.sh
Created May 1, 2017 11:20
Updated PS4 script
#!/bin/bash
# ----------------- Information -----------------
# Script to discover names and IDs of playstation 4 games and apps when running.
# Then adds them to input selects within home-assistant configuration and creates a automation for each application.
# So it will be possible to start an application from input select
#
# IMPORTANT: When editing a .sh file, to assign variables, there are not spaces allowed around the equal sign.
# This does not work: `myVar = 234`
# This works: `myVar=234`
import re
import json
running_game = r"""
Here some nice debugging message.
{ "type": "device",
"statusLine": "200 Ok",
"statusCode": "200",
"status": "Ok",
"host-id": "BC60A766BA99",