PyGameSense requieres Requests
Control your Steelseries gear using Python. This is very Beta. Only device added at the Moment is the Steelseries Rival but it is very easy to add custom devices. Handlers are written in a json
format wich is described here
To connect to the Gamesense Service, we must get the port (It seems like Steelseries api can only be accesed from localhost). Thats why we have to parse "C:/ProgramData/SteelSeries/SteelSeries Engine 3/coreProps.json" to get the port (Example)
Some colors are defined inPyGameSense.Colors
. Others are triplets like (r,g,b) (0,0,0) -> (255,255,255)
Read the official docs first. A handler in Python is always and array containing a dict like so:
handler = [{"device-type" : device_type, "zone" : zone, "mode": mode}]
build_handler
like so:
#GradientHandler handler = self.build_handler("rgb-2-zone", "two", "color", {"gradient" : {"zero" : {"red" : 0, "green" : 0, "blue":0}, "hundred" :{"red" : r, "green" : g, "blue":b}}})Take a look at the code. It is easy to understand and is friendly for newbies creating simple effects like the rgb rainbow that is already predefined. Project by Julius Hinze 2015. Feel free to clone and use the code as you want.#StaticColorHandler
handler = self.build_handler("rgb-2-zone", "two", "color", {"red" : r, "green" :g, "blue":b})