webosbrew / hyperion-webos

hyperion.ng video grabber for webOS
MIT License
153 stars 30 forks source link

Fix: Flickering due to powerstate callback #74

Closed tuxuser closed 2 years ago

tuxuser commented 2 years ago

Ignore the existance of 'processing' field as some TVs use it for checking screensaver state. This causes a short flickering in LED strips because unicapture will stop/start for a brief period.

Just checking for 'state' == 'Active' seems fine tho.

This shows up randomly and leads to hyperion-webos switch off/on:
{ "returnValue": true, "state": "Active", "processing": "Request Screen Saver" }
{ "returnValue": true, "state": "Active", "processing": "Screen On" }
{ "returnValue": true, "state": "Active" }

PowerOff:
{ "returnValue": true, "state": "Active", "processing": "Request Power Off", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active", "processing": "Request Active Standby", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active", "processing": "Prepare Active Standby", "onOff": "off", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active Standby" }
{ "returnValue": true, "state": "Active Standby", "processing": "Request Suspend", "onOff": "off", "reason": "homekit" }
{ "returnValue": true, "state": "Active Standby", "processing": "Prepare Suspend", "onOff": "off", "reason": "homekit" }
{ "returnValue": true, "state": "Suspend" }

PowerOn:
{ "returnValue": true, "state": "Suspend", "processing": "Prepare Resume", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Suspend", "processing": "LastInput Ready", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Suspend", "processing": "Screen On", "onOff": "on", "reason": "remoteKey" }
{ "returnValue": true, "state": "Active" }