SteelSeries / gamesense-sdk

472 stars 146 forks source link

how to avoid this? wireless pro transceiver OLED display goes crazy after an hour or two of processing events #127

Open xanderalexx opened 2 years ago

xanderalexx commented 2 years ago

brief context: an apple watch app allows me to send health data(my heart rate) every second to a few seconds (this varies) to a web server which is what this is. new_msg() is called when the server receives a new message. it checks if it includes my heart rate and if it does, it creates a game event as a dict object and sends it over to gamesense to handle as JSON. it also sets up and sends a screen handler (prePL) before the web server loop starts.

After handling game events just fine for an hour or two the screen goes crazy and wont fix itself unless I power cycle the transceiver.

Here's a couple of videos:

https://user-images.githubusercontent.com/90756854/173176969-7bf06d53-8758-4948-b545-5608c5d4fc17.mp4

This looks like a camera shutter/fps issue but exactly what you see in the video is what my eyes were seeing.

https://user-images.githubusercontent.com/90756854/173176974-864204fa-0d3a-4ac4-aa69-f2703eaba26f.mp4

https://user-images.githubusercontent.com/90756854/173176978-9dcd1073-0dec-430e-b395-b29bea1c13fb.mp4

did satan himself possess my transceiver?

https://user-images.githubusercontent.com/90756854/173176983-16121870-f4d2-416e-86b7-aed1db4da873.mp4

keep in mind I'm not well versed in this, feel free to point out any obvious errors and oversights

Thanks! python code:

import logging
from websocket_server import WebsocketServer
import requests
import json
import os

address = "http://" + json.load(open('C:\ProgramData\SteelSeries\SteelSeries Engine 3\coreProps.json'))['address']
i = 0
prePL = {
    "game":"HEARTRATE",
    "event":"HEARTBEAT",
    "handlers":[{
        "device-type":"screened",
        "zone":"one",
        "mode":"screen",
        "datas":[{
            "icon-id":38,
            "has-text": True,
            "length-millis":0,
            "context-frame-key": "custom-text"
        }]
    }]
}
prepost = requests.post(url=address + "/bind_game_event", json=prePL)
print(prepost.status_code)
print(prepost.content)

def new_msg(client, server, message):
    global i
    data = message.split(":")
    if data[0] == "heartRate":
        print(data[1])
        payload = {
            "game": "HEARTRATE",
            "event": "HEARTBEAT",
            "data":{
                "value":i,
                "frame":{
                    "custom-text":data[1]
                }
            }
        }
        r = requests.post(url=address + "/game_event", json=payload)
        i = i + 1
        print(r)
        print(r.content)

server = WebsocketServer(host='0.0.0.0', port=8080, loglevel=logging.INFO)
server.set_fn_message_received(new_msg)
server.run_forever()
gemSquared commented 2 years ago

I have this SAME exact issue. I need to unplug and replug the device when it does this. Except mine does it sooner because I stream images at 15FPS heheheh. I've found a past issue though! Supposedly a hardware/firmware issue. #66

xanderalexx commented 1 year ago

I have this SAME exact issue. I need to unplug and replug the device when it does this. Except mine does it sooner because I stream images at 15FPS heheheh. I've found a past issue though! Supposedly a hardware/firmware issue. #66

Yeah I did a bit more research after opening this issue and saw what the dev had to say about it. So unfortunate that there's nothing they can do.