Comments (2)
Yes! I wrote this in python3 whilst getting to grips with the SDK. It displays the clock icon along with the time. It will also vibrate the mouse on the hour.
import json
import requests
from time import sleep
import datetime
app = 'CLOCK'
display_name = 'Clock'
time_event = 'TIME'
bzzz_event = 'BZZZ'
corePropsPath = '/ProgramData/SteelSeries/SteelSeries Engine 3/coreProps.json'
gamesense_url = json.load(open(corePropsPath))['address']
def register_clock():
clock_metadata = {
'game': app,
'game_display_name': display_name,
}
r = requests.post('http://'+gamesense_url+'/game_metadata', json=clock_metadata)
def bind_clock_event():
clock_handler = {
'game': app,
'event': time_event,
'icon_id': 15,
'handlers': [
{
'device-type': 'screened',
'mode': 'screen',
'zone': 'one',
"datas": [
{
"icon-id": 15,
'has-text': True,
'length-millis': 1100
}
]
}
]
}
r = requests.post('http://'+gamesense_url+'/bind_game_event', json=clock_handler)
def bind_bzzz_event():
clock_handler = {
'game': app,
'event': bzzz_event,
'handlers': [
{
'device-type': 'tactile',
'mode': 'vibrate',
'zone': 'one',
'pattern': [
{
"type": "ti_predefined_doubleclick_100"
}
]
}
]
}
r = requests.post('http://'+gamesense_url+'/bind_game_event', json=clock_handler)
def send_time(time):
event_data = {
'game': app,
'event': time_event,
'data': { 'value': time }
}
r = requests.post('http://'+gamesense_url+'/game_event', json=event_data)
def send_bzzz(id):
event_data = {
'game': app,
'event': bzzz_event,
'data': { 'value': id }
}
r = requests.post('http://'+gamesense_url+'/game_event', json=event_data)
register_clock()
bind_clock_event()
bind_bzzz_event()
while True:
now = datetime.datetime.now()
send_time(now.strftime("%X"))
if not now.minute and not now.second:
send_bzzz(now.hour)
sleep(0.1)
from gamesense-sdk.
For macOS you need to change the corePropsPath :
corePropsPath = '/Library/Application Support/SteelSeries Engine 3/coreProps.json'
from gamesense-sdk.
Related Issues (20)
- Simple Prism Mousepad Light Configuration On/Off HOT 1
- Request - Ability to use configurations in JSON calls
- Keyboard Oled not responding to successfully sent bitmaps HOT 6
- Maximum update rate/refresh rate/best practices for full-keyboard lighting effects?
- Won't react to other event HOT 3
- Sending events breaks profile-switching on the mouse (Rival 710) HOT 3
- macro to write the curent date
- spam limiter triggering for no (apparent) reason HOT 3
- Missing zones for new Arctis Nova Pro Wireless HOT 1
- Multiple read and write permission errors on Standard user account on macOS 12.4 (Monterey) prevent usage of Steelseries GG and Gamesense SDK
- how to avoid this? wireless pro transceiver OLED display goes crazy after an hour or two of processing events HOT 2
- game_event - 404
- Incorrect Content-type value for error responses
- Are you serious? HOT 2
- Bug: Color Sequences not updating to new Event definitions
- Cancel Event
- Image, links, and custom description in SteelSeries GG/Engine HOT 1
- Temp display collision
- Reading key press distance HOT 2
- Text is suddenly clearer (bigger) and only displaying two lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamesense-sdk.