Screeneo U5 turn on direct to HDMI2

Afternoon all, I have just unboxed my U5. Nicely packaged, easy to get out of the box - so that’s the unpacking sorted. :slightly_smiling_face:

It is running AndroidTV 11. I am trying (failing) to set the input to automatically go straight to HDMI2 and not go to the androidTV side. I have a Fury HD VRROOM setup so that I can change between the 3 different HDMIs I have. But I simply cannot get the U5 to go straight to HDMI2.

I also have a Logitech Harmony Elite Hub, although the U5 is not on Logitech’s database yet, I can manually learn the remote control, however, there is no “source” key on the remote which I can simply press and then press “ok” too to automate that. I had considered setting up RS232 to the VRROOM, but I cannot find any info on the U5 automation side of things using RS232.

So - all in all, kinda stuck - any guidance greatly appreciated. :slight_smile:

If this helps:
Unit was shipped to Canada.
Software version : V1.00002
Android TV OS sec patch: Sept 1, 2022
Android TV OS build: RTM5.220609.091

Hello Stuart, unfortunately, as a Google policy we cannot add a feature to change the INput source at boot.

Thank you for the reply, so is there, in that case, any “guaranteed” button presses on the remote control to bring up the source menu and press “ok”? Or is there a signal that has been created in the U5 for source, that, does not appear on the remote (long shot I know).

Or, how can I do this via the RS232 port?
The remote control, is it the same as the U4? I can program it manually via the Logitech Harmony, but, need to either:

a) know the keystrokes or
b) RS232 API manual/wiki

Thanks in advance :slight_smile:

Hello, unfortunately not, but here is the RS232 page

1 Like

as a Google policy we cannot add a feature to change the INput source at boot

How so?

I’m waiting for my U5 to be delivered still, but would expect the same functionality (to be on HDMI1 or HDMI2, or at least the last used input, on startup).

I have had and currently have several Android TV devices, STBs and TVs, and the TVs, all of which would be the same type of device as the U5, all boot up directly to the last used HDMI port, whether from sleep or from a cold boot. None of them revert back to the Android TV interface when turning the device on.

Hello, this is different on a projector in fact. This is a new rule from Google unfortunately.

I’m using mine with an apple tv. The trick I use is, turn off the U5 first then the apple tv. Next time you turn it all on. Turn on the apple tv first then the U5 second and it defaults to the active input. Give that a try. Works for me every time.

1 Like

That’s also my way. I use the turn off/on from AppleTV remote and it always comes on via HDMI2.

Same with the Nvidia Shield.

I created this to switch hdmi port or power up/down the projector with keyboard shortcuts via an usb to RS232 serial port cable on Ubuntu 22.04. Maybe it saves someone else time who also wants to automate this. Currently hardcoded to work with F4 (Ctrl, Meta, Backspace) and F11 (Homepage) function keys on my Logitech K810 keyboard, but should be adaptable if you read the keycodes with the evtest tool.

/usr/bin/projector_control.py

#!/usr/bin/env python3

from evdev import InputDevice, list_devices, categorize, ecodes, KeyEvent
from serial import Serial
import asyncio

# Initialize the serial connection to the projector
projector = Serial('/dev/ttyUSB0', 38400)

# This dictionary will track the state of the keys we are interested in
key_states = {'KEY_LEFTCTRL': False, 'KEY_LEFTMETA': False, 'KEY_BACKSPACE': False}

# Variables to store the projector state
power_state = False  # Starts in powered-off state
hdmi_state = 1  # Starts in HDMI1 state

# Asynchronous function to handle input from one device
async def handle_device(dev):
    global power_state
    global hdmi_state
    async for event in dev.async_read_loop():
        if event.type == ecodes.EV_KEY:
            key_event = categorize(event)
            # Check if one of the keys we're interested in has been released
            if key_event.keystate == KeyEvent.key_up and key_event.keycode in key_states:
                key_states[key_event.keycode] = not key_states[key_event.keycode]

                # If all keys have been released, switch HDMI state
                if all(key_states.values()):
                    if hdmi_state == 1:
                        projector.write(b'\x0D\x35\x33\x39\x34\x0D')
                        hdmi_state = 2
                    else:
                        projector.write(b'\x0D\x35\x33\x38\x33\x0D')
                        hdmi_state = 1

            # Check if the 'XF86HomePage' key (corresponding to keycode 180) has been released
            elif key_event.keystate == KeyEvent.key_up and key_event.keycode == 'KEY_HOMEPAGE':
                if power_state:
                    projector.write(b'\x0D\x35\x33\x36\x31\x0D')
                    power_state = False
                else:
                    projector.write(b'\x0D\x41\x37\x33\x35\x30\x41\x42\x43\x0D')
                    power_state = True

# Get the list of all input devices
devices = [InputDevice(path) for path in list_devices()]

# Create a new event loop
loop = asyncio.new_event_loop()

# Set the event loop as the current one
asyncio.set_event_loop(loop)

# Create and run tasks for all keyboards
for dev in devices:
    if "keyboard" in dev.name.lower():
        loop.create_task(handle_device(dev))

# Run the event loop
loop.run_forever()

/etc/systemd/system/projector-control.service

[Unit]
Description=Projector Control

[Service]
ExecStart=/usr/bin/projector_control.py
Restart=always
User=root
Group=root
Environment=PATH=/usr/bin:/usr/local/bin
Environment=PYTHONUNBUFFERED=1

[Install]
WantedBy=multi-user.target

Setup

# Remove braille reader package as it conflicts with the usb to serial cable mapping at /dev/ttyUSB0
sudo apt remove brltty

sudo apt install python3-evdev

sudo chmod +x /usr/bin/projector_control.py

sudo systemctl daemon-reload

sudo systemctl enable projector-control

sudo systemctl start projector-control
1 Like