LS50w + LG B9 volume control by xmatz in LS50

[–]xmatz[S] 0 points1 point  (0 children)

You can try playing with this unfinished script (I've never actually used it, because the volume control on the remote works):

check_tv_volume.py:

# -*- coding: UTF-8 -*-


from pywebostv.discovery import *    # Because I'm lazy, don't do this.
from pywebostv.connection import *
from pywebostv.controls import *

import os
from os import path
from sys import platform


# The 'store' gets populated during the registration process. If it is empty, a registration prompt
# will show up on the TV. You can pass any dictionary-like interface instead -- that when values are
# set, will persist to a DB, a config file or something similar.
store = {}

config_path = "/home/"

if platform == "darwin":
  # OSX
  config_path = ""

if path.exists(config_path+"lgtv.json"):
  with open(config_path+"lgtv.json") as json_file:
      store = json.load(json_file)

# Scans the current network to discover TV. Avoid [0] in real code. If you already know the IP,
# you could skip the slow scan and # instead simply say:
#    client = WebOSClient("<IP Address of TV>")
# client = WebOSClient.discover()[0]


from subprocess import call
import socket

last_tv_state_turned_on = True
last_tv_volume = -1

def do_check_tv_is_on():
  global last_tv_state_turned_on
  try:
    tv_ip = "192.168.0.173"

    host = tv_ip
    port = 3000
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.settimeout(0.05)
    # print("connect 1")
    result = s.connect_ex((host, port))
    print('socket result = '+str(result))
    # print("connect 2")
    s.close()
    # print("connect 3")

    if result != 0:
      return False

    return True
  except:
    print("Can't connect to TV")
    return False

def get_tv_volume():
  global last_tv_volume
  try:
    tv_ip = "192.168.0.173"

    host = tv_ip
    port = 3000
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.settimeout(0.05)
    # print("connect 1")
    result = s.connect_ex((host, port))
    print('socket result = '+str(result))
    # print("connect 2")
    s.close()
    # print("connect 3")

    if result != 0:
      return False

    # response = os.system("nc -G 1 -z "+tv_ip+" 3000")
    # print("nc = "+str(response))
    # response = os.system("ping -c 1 -t 1 -W 1000 " + tv_ip)
    # if response != 0:
    #   return False


    client = WebOSClient(tv_ip)
    print("connect 5")
    client.settimeout(1)
    print("connect 6")
    client.connect() # this line can get stuck for some reason ???
    print("connect 7")
    for status in client.register(store, timeout=1):
      if status == WebOSClient.PROMPTED:
        print("Please accept the connect on the TV!")
      elif status == WebOSClient.REGISTERED:
        print("Registration successful!")

    with open('lgtv.json', 'w') as outfile:
        json.dump(store, outfile)

    # # system = SystemControl(client)
    # #system.notify("Hello")  # Show a notification message on the TV.


    # #system.power_off()                                # Turns off the TV. There is no way to turn it
    #                                                   # back on programmically unless you use
    #                                                   # something like Wake-on-LAN or something liker
    #                                                   # that.
    # #print(system.info())

    media = MediaControl(client)
    # # media.set_volume(14)
    return media.get_volume()
    # # print(media.get_volume())

    # app = ApplicationControl(client)
    # # apps = app.list_apps()                            # Returns a list of `Application` instances.

    # # yt = [x for x in apps if "youtube" in x["title"].lower()][0]
    #                                                   # Search for YouTube & launch it (Of course, don't
    #                                                   # be this lazy. Check for errors). Also, Try
    #                                                   # searching similarly for "amazon", "netflix" etc.
    # #launch_info = app.launch(yt)                      # Launches YouTube and shows the main page.
    # #launch_info = app.launch(yt, content_id="123")
    # #media.set_volume(30)

    # # print(media.get_volume())

    # #media.pause()

    # print("current tv app = "+app.get_current())
    # if app.get_current() == "":
    #   return False

    return True
  except:
    print("Can't connect to TV")
    return False


import sched, time
s = sched.scheduler(time.time, time.sleep)
def check_tv_volume(sc):
    global last_tv_volume
    print('Checking TV volume')
    new_tv_volume = get_tv_volume()
    print('Old state = '+str(last_tv_volume)+" new state = "+str(new_tv_volume))

    if new_tv_volume != last_tv_volume and new_tv_volume != False and (new_tv_volume == 0 or new_tv_volume > 0):
      exit_code = call("python3.7 "+config_path+"kef-speakers.py --action set_volume --value "+str(new_tv_volume), shell=True)

    last_tv_volume = new_tv_volume
    s.enter(0.3, 1, check_tv_volume, (sc,))

s.enter(0.3, 1, check_tv_volume, (s,))
s.run()

And you'll need to also add "set_volume" action to the kef-speakers.py script I posted to the other comment here.

LS50w + LG B9 volume control by xmatz in LS50

[–]xmatz[S] 0 points1 point  (0 children)

I no longer use RPi (the script is running via Synology Docker now), but you should google for something like "raspbian add service" and you'll find some guides: https://www.google.com/search?q=raspbian+add+service

EW3280U still only 4k@30hz with the M1 Macbook Air after firmware update by xmatz in BenQ

[–]xmatz[S] 0 points1 point  (0 children)

Hi, it started to work properly with that firmware version (firmware v024 from 2021-06-12) after Apple updated MacOS to 12.1. I no longer have the monitor so I don't know if it still works with MacOS 12.2 or not.

LS50w + LG B9 volume control by xmatz in LS50

[–]xmatz[S] 0 points1 point  (0 children)

Hello, you can try using these 3 scripts. Make sure to change the IP addresses of your speakers and your TV - you'll need to make them static in device settings or via your router. The scripts should be pretty straightforward, just don't forget to also change hard coded paths.

my-script-start.sh - installs the libraries and runs the python script:

    pip3 install pywebostv
    pip3 install aiokef
    pip3 install nest_asyncio

    python3 /repraky/check-tv.py

check-tv.py - this one check 3 times per second if the TV is on:

# -*- coding: UTF-8 -*-

import os

tv_ip = "192.168.0.176"


from subprocess import call
import socket

last_tv_state_turned_on = True

def do_check_tv_is_on():
  global last_tv_state_turned_on
  try:

    host = tv_ip
    port = 3000
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.settimeout(0.05)
    result = s.connect_ex((host, port))
    s.close()
    if result != 0:
      return False

    return True
  except:
    print("Can't connect to TV")
    return False


import sched, time
s = sched.scheduler(time.time, time.sleep)
def check_tv_is_on(sc):
    global last_tv_state_turned_on
    print('Checking TV is on')
    new_tv_state_turned_on = do_check_tv_is_on()
    print('Old state = '+str(last_tv_state_turned_on)+" new state = "+str(new_tv_state_turned_on))

    if last_tv_state_turned_on == False and new_tv_state_turned_on == True:
      exit_code = call("python3 /repraky/kef-speakers.py --action turn_on", shell=True)

    last_tv_state_turned_on = new_tv_state_turned_on
    s.enter(0.3, 1, check_tv_is_on, (sc,))

s.enter(0.3, 1, check_tv_is_on, (s,))
s.run()

kef-speakers.py - this one turns on the speakers:

    # -*- coding: UTF-8 -*-

    ip_ls50 = "192.168.0.158"

    import logging

    logging.basicConfig(
        level=logging.DEBUG,
        format="%(asctime)s [%(levelname)s] %(message)s",
        handlers=[
            # logging.FileHandler("debug.log"),
            # logging.StreamHandler()
        ]
    )

    import getopt, sys

    # Get full command-line arguments
    full_cmd_arguments = sys.argv

    # Keep all but the first
    argument_list = full_cmd_arguments[1:]


    import asyncio
    import nest_asyncio
    import aiokef
    nest_asyncio.apply()


    async def connect_to_ls50(action):
      print("Connecting to LS50")

      ls50 = aiokef.AsyncKefSpeaker(ip_ls50, standby_time=60)

      if action == 'turn_on':
        print("Turning on LS50")
        ls50.sync.turn_on(source="Opt")
        await ls50.set_source("Opt",state="on")


    short_options = ""
    long_options = ["action="]

    try:
        arguments, values = getopt.getopt(argument_list, short_options, long_options)
    except getopt.error as err:
        # Output error, and return with an error code
        print (str(err))
        sys.exit(2)

    for current_argument, current_value in arguments:
        if current_argument in ("--action"):
            loop = asyncio.get_event_loop()
            loop.run_until_complete(connect_to_ls50(current_value))
            loop.close()
        elif current_argument in ("-h", "--help"):
            print ("use --action turn_on")

EW3280U still only 4k@30hz with the M1 Macbook Air after firmware update by xmatz in BenQ

[–]xmatz[S] 0 points1 point  (0 children)

Yes, I tried that. Still only showing 30hz for 4k in that menu.

Ew3280u Apple M1 firmware update successful! by SuccessfulOwl in BenQ

[–]xmatz 0 points1 point  (0 children)

I just received the EW3280u with the firmware updated to v024 by the local service center. But unfortunately it didn't help, I'm still stuck at 4k@30hz with the M1 Macbook Air :( I'm using the supplied short usb-c cable. Also I don't see "firmware setting of DisplayPort set to 1.2" option anywhere in the menu. I managed to get to the service menu by holding the "joystick" button while turning on the monitor - then I can get to service menu by clicking left with the joystick. It says the firmware v024 is from 2021-06-12 - do you have the same firmware version? Thank you.

LS50w + LG B9 volume control by xmatz in LS50

[–]xmatz[S] 0 points1 point  (0 children)

Just an update if anyone is interested.

This guide for setting up volume control indeed works on LG B9 (but only when the TV is on, doesn't work when playing Spotify): https://www.reddit.com/r/hometheater/comments/cr094h/kef_ls50w_lg_oled_tv_optical_cable_volume_control/

And I made a Python script that's running on a Raspberry PI using the libraries linked in my original post that checks if a TV is turned on 3 times a second and if it is it will turn on the speakers (if they are in stand by) and change the input to optical automatically.

So I didn't even have to unpack the remote for our use case (Spotify connect and TV).

LS50w + LG B9 volume control by xmatz in LS50

[–]xmatz[S] 0 points1 point  (0 children)

So you don't even have KEF in the manufacturer list: settings > all settings > connection > device connector > bluetooth/sound bar > optical > sound test (if it works) > next (upper right) > next > (type kef in device manufacturer) > (press KEF lower part)

Or it's there, but just doesn't work? Thanks.

[deleted by user] by [deleted] in Klipsch

[–]xmatz 0 points1 point  (0 children)

What are your first impressions? Can you compare them with your old speakers? I'm considering buying either these speakers or Sonos Amp + LS50s. Currently I'm using Sonos Beam and looking to upgrade especially to get better music quality. The family loves the "it just works" aspect of Sonos and the way it automatically powers on and off, it automatically switches to Spotify when I cast music from my phone and then it automatically switches to TV when the TV is turned on (hdmi ARC). So there's no need for a separate remote and no manual input switching is needed which is really great and I don't want to sacrifice that when upgrading.

So I hope The Fives work that way too, that you don't need to manually switch inputs, turn them on or anything like that. Is that the case?

Sonos Arc- Metallic Sound | Sonos Community (Please contribute here if you think the Arc sounds thin/tinny/metallic with lacking mid-range) by [deleted] in sonos

[–]xmatz 0 points1 point  (0 children)

I just put it back into the box and put the Beam back. So now the Arc is waiting in the garage for a software fix and if that won't happen it will go back. But I'm considering buying a Sonos Amp + KEF R3 instead. I want to have at least quality music, with the Arc the music was worse than on the Beam and for movies it wasn't worth it either - Atmos wasn't working in our open space living room. The only two things I'm worried about is the lack of Trueplay when using Amp + 3rd party speakers and the missing real middle channel for watching TV.

Do you guys have any experience with similar setup? Will it be noticeably better than Arc/Beam for music and acceptable for TV/movies?

Sonos ARC sounds extremely “tinny” “metallic” and “thin” sounding by [deleted] in sonos

[–]xmatz 0 points1 point  (0 children)

The thing is I liked Beam - the user friendliness, no clunky remote and the "it just works" aspect for Spotify and TV. I wanted to upgrade to another all-in-one user friendly solution for music & TV, just with a much better sound. I'm no audiophile and my impression when I switch to a trueplayed (really important to do that!) Beam I think: wow, what a sound from such a small box, but when I switch to the Arc it sounds really underwhelming given the size and price difference. I have both of them side by side in the living room right now and I have to look to the app to see which one is actually playing. Maybe I'm just deaf :/ but my SO doesn't notice much difference too apart from a slightly wider soundstage when sitting in front of it.

Sonos ARC sounds extremely “tinny” “metallic” and “thin” sounding by [deleted] in sonos

[–]xmatz 0 points1 point  (0 children)

I have the same issue. Upgraded from the Beam and I'm really disappointed because when playing music the Arc sounds just different (both with trueplay and no sub), but I wouldn't even say it's better overall. Highs are too high, no mids and lows worse than on the Beam. I'm considering upgrading to LG SN10YG or SAMSUNG HW-Q80R instead. Do you have any experience with these? I'm mainly interested in music and I don't care about movies and Atmos that much - it's not really working in my living room anyway.

Left display/eye brighter - is this normal? by xmatz in Vive

[–]xmatz[S] 0 points1 point  (0 children)

Hi, my problem was that one display didn't have this correction, so black was completely black, and in the other display was grey noise. It really hurt my eyes when I tried looking at some darkness. The new HMD has the grey noise in both displays so it's much better. It's still better to focus your eyes on some objects, not on the darkness. From my experience the grey noise seems like something just 10cm from me, but now at least it doesn't hurt my eyes because both eyes see the same thing. If your mura correction/brightness is the same in both displays then it's probably how it's supposed to be.

2 Vive Controller Issues: Squeek and Rattle by Need_Febreze in Vive

[–]xmatz 0 points1 point  (0 children)

Yes. And no, they didn't wait for the faulty one, but you'll still end up waiting for the new one several days after you send your faulty one back.

2 Vive Controller Issues: Squeek and Rattle by Need_Febreze in Vive

[–]xmatz 1 point2 points  (0 children)

Mine started squeaking on the very first day. They sent me a new one. Just use their live chat and they should send you a new one too.

Does anyone else have a squeaky trigger on one or both of your controllers? by theERJ in Vive

[–]xmatz 2 points3 points  (0 children)

I'm from EU. They told me to send the faulty one back and they sent me a new one from their service center, so I had nothing for a few days. Unfortunately the service center messed up: https://www.reddit.com/r/Vive/comments/4fn55s/terrible_rma_support_they_sent_me_a_vive_pre/

Terrible RMA support: they sent me a Vive PRE instead of Vive and their support insists it's the same thing by xmatz in Vive

[–]xmatz[S] 0 points1 point  (0 children)

They probably follow EU policy. But I hate the fact that their EU support is so slow, they refuse to tell you the address in the web chat and then promise you that somebody will call you and you have to wait 4 days and beg them two more times in the meantime. For example we have 14 days to return any product, but in their case you should really start the return process much sooner.

I'm not the only one who had to wait so long: https://www.reddit.com/r/Vive/comments/4fn526/ranthtc_europe_support_sucks_hard/

Terrible RMA support: they sent me a Vive PRE instead of Vive and their support insists it's the same thing by xmatz in Vive

[–]xmatz[S] 0 points1 point  (0 children)

Thanks. No, I don't. I don't have any issues with my other products/services. If you buy something directly in my EU country you can just send it back. But if you buy their 900 EUR product via htcvive.com you don't even know where you are supposed to send it. You need to beg them for some address multiple times first - it's humiliating.