Using Vero 4k+ w/Kodi as a frontend GUI and Oppo 203 as playback device

Good day,

I am requesting someone’s help in troubleshooting the vero 4k+. Here is my setup

I am currently using the vero 4k+ as a gui frontend, and running a script that takes the base_name path of the currently playing item and sends it with a http get request to my Oppo 203, then I call another script that switches the hdmi port on my LG C1 to the oppo 203. It works brilliantly, however, after returning to the the vero 4K+, it is hanging for roughly 2-3 minutes, it is unresponsive on the GUI, but I can still access it via SSH.

Vero 4k+ up to date January 2023 .
pywebostv installed
hdmi_swithcing.py

`import os
import json
from pywebostv.discovery import *
from pywebostv.connection import *
from pywebostv.controls import *

def set_source():
# Define the file path where the store object will be saved
store_file_path = os.path.expanduser(“~/.kodi/store.txt”)

# Check if the store file already exists
if os.path.exists(store_file_path):
    # If the store file exists, load the store object from the file
    with open(store_file_path, "r") as store_file:
        store = json.load(store_file)
else:
    # If the store file doesn't exist, create an empty store object
    store = {}

client = WebOSClient('192.168.1.135')
client.connect()
for status in client.register(store):
    if status == WebOSClient.PROMPTED:
        print("Please accept the connect on the TV!")
    elif status == WebOSClient.REGISTERED:
        print("Registration successful!")

source_control = SourceControl(client)
sources = source_control.list_sources()    # Returns a list of InputSource instances.
source_control.set_source(sources[2])      # .set_source(..) accepts an InputSource instance.'

playback.py

'import xbmc
import requests
import os
import hdmi_switching
import json
from os.path import expanduser

#class MyPlayer(xbmc.Player):

def init(self):

xbmc.Player.init(self)

def onPlayBackStarted(self):

    # Get the current playback path
    path = self.getPlayingFile()
    # Extract the base name from the path using os.path.basename
    base_name = os.path.basename(path)
    # Replace the placeholder in the URL with the base name
    url = "http://192.168.1.100:436/playnormalfile?{%22path%22:%22/mnt/sda1/UHD/"+base_name+"%22,%22index%22:0,%22type%22:1,%22appDeviceType%22:2,%22extraNetPath%22:%22192.168.1.238/Storage/UHD/%22,%22playMode%22:0}"
    response = requests.get(url)
    response_json = json.loads(response.text)
    with open(expanduser("~/.kodi/oppo_status.txt"), "w") as f:
        json.dump(response_json, f)
    print(response.status_code)
    self.stop()  # stop the playback on Kodi
    xbmc.executebuiltin("Action(Stop)") # Stop the loading circle on screen
    hdmi_switching.set_source()'

I have tried several iterations of the playback.py script. The think the issue is the stop.action is not behaving properly, since when I manually return to the Vero 4k+, the loading circle is stuck on screen.

Any assistance would be gretly appreciated.

Thank you.

Demo video

Sorry – but this is out of our remit.

Sam

Understood @sam_nazarko , I was just hoping some python minded individual would chime in. I’m learning python pretty quickly with Chatgpt, but this minor issue is bogging me down.

On a side note, if and when the next vero (5) launches with BD Menu and Dolby Vision, I will drop and abandon this hackery.

Understood.

Cheers

Sam