Is this the perfect standalone tablet for HA?

We should probably look into starting a new thread for that, because we’re getting pretty off-topic here :wink:

But I’m looking into it further as we speak and I’m getting the sense that most of the support we require already exists mainline.
There currently isn’t a driver for the Touchscreen (Focaltech FTS8201) but the upstream kernel has a driver for that brand of touchscreen controllers (edt-ft5x06.c « touchscreen « input « drivers - kernel/git/torvalds/linux.git - Linux kernel source tree) that seems to work with other models as well, so it’s worth a shot.
Same goes for the audio codec (TAS5825M) where a device from the family (TAS5805M) is supported mainline.
Other than that most everything else, I assume, should work.

2 Likes

Perhaps I mis-stated. I WANT the screen to time out, but it won’t if Home Assistant is open.

Would anyone be willing to offer step-by-step instructions for windows users?

I’m having a heck of a time getting any of my machines to boot a live version of linux.

I couldn’t get it to install using Windows. The Linux method works. If you don’t have a Linux computer, make a Linux boot thumb drive. My particular favorite is Ubuntu. When Linux boots, select “Try Ubuntu”.

Thanks to @FelixKa, we’ve moved discussion of further rom development to this thread.

I’m excited to contribute. I hope others in the community with applicable skills will join in the fun :nerd_face:

It may take some time for us to make meaningful progress, until then let’s keep supporting our fellow community members and….

PLEASE keep those beautiful dashboard shots coming!

3 Likes

On the topic of the screen not turning off, is there no way to do that using a command/button?

is there no way to do that using a command/button?

One option is to use Fully Kiosk Browser and integrate it with HA, which exposes a light entity for the screen that you can control like any other light in HA. Note that the light entity is not just software dimming (like you get with the Browser Mod integration), it actually changes the screen brightness and can turn it all the way off.

From within FKB you should be able to set a screensaver brightness of 0% after a timeout and use the camera motion to turn the screen on, just like people do with tablets. I want mine always on at my desk, but in my testing this has behaved a little differently than the Fire tablets. I still think it should work though. For my wall tablet I have it turn the screen on with motion in the FKB settings (as well as room motion sensors) but I turn it back off with HA.

Also worth noting is that the camera motion in FKB is a “Plus” paid feature ($9). All plus features are available without paying, but come with a watermark in the app. This means that if all you want is to control the screen you can just use the HA app and control the screen via FKB in the background without paying. IMO, FKB is well worth the price though and I like the other features like being able to load a different view (URL) or automate refreshes (these Lenovo devices seem to become unresponsive at times and it appears you can’t refresh by swiping down in the HA app).

1 Like

those are pre-configured themes, I’m very happy with them too:

in my installation I had to fix the path for the background images before them being available.

also using the layout card extension (GitHub - thomasloven/lovelace-layout-card: 🔹 Get more control over the placement of lovelace cards.) to properly align the cards with grid templates. Was a bit of of fiddling around, but quite happy with it currently.

The thermostat is this one: GitHub - nervetattoo/simple-thermostat: A different take on the thermostat card for Home Assistant ♨️
The weather (with clock, that was important to me) is:GitHub - pkissling/clock-weather-card: A Home Assistant Card indicating today's date/time, along with an iOS inspired weather forecast for the next days with animated icons

2 Likes

I thought there was a long post with detailed instructions on how to install for either Windows, Linux, or Mac but now I can’t find it. The instructions in the original post assume a level of knowledge that I don’t have since I’m a newbie with Linux.

I did some more testing on the display on/off front, maybe someone can read something out of it (I’m not a developer, certainly not an Android developer)

Short version:
Quite a few commands/parameters that I’ve found should turn on/off the screen, or indicate the state don’t to so.
However, the adb shell input keyevent 26 command worked in my tests, to send the screen to sleep.
The mScreenBrightness and mScreenBrightnessModeSetting parameters seem to properly indicate, if the screen is on or off.
I could not find a reliable way yet, to wake the display, nor do I know (yet?) how to make use of these findings to turn off the display without accessing the device over adb.
I’ve actually uninstalled the Home Assistant app in the meantime, so this is not the root cause for the screen not going to sleep. The issue also persists when using WallPanel.

Long version:
There is an adb command to press the “virtual” power button (actually, there are even more than one). It seems that the adb shell input keyevent 26 command on this device does actually only work for turning off the display, it won’t wake the device.

Logcat presents the following output after sending that event:

01-20 15:27:52.336 11186 11186 D AndroidRuntime: Calling main entry com.android.commands.input.Input
01-20 15:27:52.340 11186 11186 I Input   : injectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=64181066, downTime=64181066, deviceId=-1, source=0x101 }
01-20 15:27:52.342  1206  1352 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
01-20 15:27:52.345  1206  1352 D AppOps  : startOperation: allowing code 40 uid 1000 package android
01-20 15:27:52.357 11186 11186 I Input   : injectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=64181066, downTime=64181066, deviceId=-1, source=0x101 }
01-20 15:27:52.357  1206  1352 I PowerManagerService: Going to sleep due to power button (uid 1000)...
01-20 15:27:52.360  1206  1352 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
01-20 15:27:52.363 11186 11186 D AndroidRuntime: Shutting down VM
01-20 15:28:00.001  1206  1269 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
01-20 15:28:00.005  1360  1360 D KeyguardUpdateMonitor: received broadcast android.intent.action.TIME_TICK
01-20 15:28:00.006  1360  1360 D KeyguardUpdateMonitor: handleTimeUpdate
01-20 15:28:00.019  1206  1206 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...
01-20 15:28:43.065  1360  1360 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
01-20 15:28:43.065  1322  1808 D HeadsetStateMachine: Disconnected process message: 10, size: 0
01-20 15:28:43.065  1322  1808 D HeadsetStateMachine: Enter processIntentBatteryChanged()
01-20 15:28:43.065  1322  1808 D HeadsetStateMachine: Exit processIntentBatteryChanged()
01-20 15:28:43.065  1322  1808 D HeadsetStateMachine: Exit Disconnected processMessage() 
01-20 15:28:43.067  1577  1577 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0
01-20 15:28:43.069  1360  1360 D KeyguardUpdateMonitor: handleBatteryUpdate
01-20 15:28:53.727  1206  1216 I zygote  : Background concurrent copying GC freed 116463(18MB) AllocSpace objects, 18(808KB) LOS objects, 58% free, 12MB/30MB, paused 193us total 150.355ms
01-20 15:29:00.001  1206  1269 I PowerManagerService: Going to sleep due to screen timeout (uid 1000)...

If this command is sent, the screen actually dims more or less immediately, and after the screen timeout setting (at least it appears so), it goes dark completely.

When comparing certain parameters, that should indicate if the screen is currently on or off, I’ve found that most of the values don’t really help. I actually tried the following commands to compare the parameters:

  • adb shell dumpsys display | grep "mScreen"
  • adb shell dumpsys power
  • adb shell dumpsys power | grep mPowerState (no value returned)
  • adb shell dumpsys input_method | grep mInteractive=true

the following return values differed between on and off:

  • mScreenBrightness (on: 255, off: 10)
  • mScreenBrightnessModeSetting (on: 1, off: 0)
  • the Looper state returned 3 messages when the screen was on (including the AutomaticBrightnessHandler when the screen was on), vs. only 1 message when the screen was off
2 Likes

Really appreciate all the effort going into this, we’re seeing some great contributions!

Does this work to change brightness?

adb shell settings put system screen_brightness X

Where X is 1-255

Could we use the following command to ease some of the audio focus problems?

adb shell appops set package.name TAKE_AUDIO_FOCUS ignore

Also, check out PermissionManagerX

Check out @Nerwyn’s post, I finally got around to linking it up top.

1 Like

Ok, here come the newbie questions…

When I enter UsbDkController -n in Power Shell or in Python, here is what I get:

Both Git and Python 3.9 are installed.

Also, on the EDL install page, when is the process done? That isn’t clear.

I really don’t want to step into @mattmon’s sandbox because his instructions are complete. But, requiring a bit more than a passing exposure to Linux and I think I may have insulted him by calling it a spaghetti bowl of instructions. (I apologize). My issue was that the instructions for Windows, Linux and Mac were all in the same bowl.

I made notes to myself when I used a Ubuntu computer to install the firmware on my ThinkSmart. You can see them here. (This is the first time I shared anything from my notebook. Please let me know if you can see it.)

1 Like

It’s our sandbox, that’s the point of a community, right?

I recently referenced spaghetti in another thread. Pasta is sometimes a fair technical assessment.

Really, my primary concern with the instructions in OP is to keep them simple and versatile.

I’d rather have someone dive in and ask a lot of questions than scare them away with complexity.

Not to say that granularity can’t be helpful.

@stevemann: if you post the guide you PM’d me, I’ll be happy to link it above.

3 Likes

Just curious, but it doesn’t look like the horizontal boot animation is included. Is there anyplace we could grab that file from?

It is in my wiki.
You can see them here

I PM’d it to you for your critique because there has to be at least one error in my process. (Track record). If it looks good, then feel free to post the link to my Wiki page.

2 Likes

That’s exactly what I needed. Thank you. However, I got this error when trying to run “pip3 install -r requirements.txt”:

Out of curiosity, I kept going and when I tried to start EDL using “./edl qfil ~/edl/bin/rawprogram.xml ~/edl/bin/patch0.xml ~/edl/flash --loader=~/edl/bin/prog_emmc_firehose_8953_ddr.mbn” I got this:

Ok, i added the ‘pip install -r requirements.txt --break-system-packages’ that error message suggests and it installed. Then, I went thru all of the steps again.
However, it is still looking for module named “docopt” when I try to run ’ ./edl qfil ~/edl/bin/rawprogram.xml ~/edl/bin/patch0.xml ~/edl/flash --loader=~/edl/bin/prog_emmc_firehose_8953_ddr.mbn’

Both are already present within the rom. See extras section in OP

I’m a knucklehead. The file is there, but it’s not named .horiz, it’s named .horizontal. Please double check me, but I think post 1 extras and notes last command needs to be updated.

2 Likes