Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.88 KB

README.md

File metadata and controls

24 lines (18 loc) · 1.88 KB

PyGameSense

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)

Colors

Some colors are defined in PyGameSense.Colors. Others are triplets like (r,g,b) (0,0,0) -> (255,255,255)

Creating handlers

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}]

It is possible to use the helper function 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}}})

#StaticColorHandler
handler = self.build_handler("rgb-2-zone", "two", "color", {"red" : r, "green" :g, "blue":b})

Look at the code

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.

Credits

Project by Julius Hinze 2015. Feel free to clone and use the code as you want.