Thanks for the info. Then I’ll consider this if I need more.
Currently I am just starting with one for testing as I have just started with Home Assistant - after having it set up completely as needed, I might need a second one for my parents (I had set up two Dell Wyse 5070 with openmediavault for adguard home, nextcloud and jellyfin as homeservers and changed the OS on mine to HAOS). I will only do this transformation for my parents if it works on my side - so I’m the guinea pig.
I’m really looking forward to receive mine. I’m currently not interested in squeezebox but for the rest - after pmos is running - I would also try to set this up and share my experiences if you wish.
It might arrive today but work and private life will either keep me busy until Friday afternoon or Saturday afternoon. And then first step is to set up my Ubuntu again and afterwards flashing.
Just curious about your setup for wakescreen on motion stuff. Would love to see a tutorial on how to get it to successfuly keep the screen on without dev settings to just have it always on. I didnt have great luck with wallpanel and getting streamassist to work properly so i went back to hotwordplugin and the companion app with better results, but not perfect. When i had these things running the stock firmware with ok google, it seemed like the wake word detection was so much better. I presume some proprietary stuff or some google magic, but was really hoping these devices mics would be better at wake word.
I’ve got MPD working!
/etc/mpd.conf
contents:
audio_output {
type "pulse"
name "My PULSE Device"
mixer_type "software" # optional
}
Aside from that, I disabled the firewall using
sudo rc-service nftables stop
sudo rc-service nftables disable
My devices are locked out from the internet, so a firewall is unnecessary for me.
And in my configuration.yaml
media_player:
platform: mpd
host: 192.168.xxx.xxx
scan_interval: 1
Works like a charm with MP3 files and TTS! Onto a Wyoming satellite next.
And now wyoming-satellite
is working.
Let’s get our prerequisites out of the way:
sudo apk add py3-virtualenv py3-pip git
Then download and setup wyoming-satellite
git clone https://github.com/rhasspy/wyoming-satellite.git
cd wyoming-satellite
script/setup
Feel free to test it out by just running the following command, but I added it to the end of ~/.profile
to kick it off at login:
cd /home/pmos/wyoming-satellite/
script/run \
--name 'thinkSmart Satellite 2' \
--uri 'tcp://0.0.0.0:10700' \
--mic-command 'arecord -r 16000 -c 1 -f S16_LE -t raw' \
--snd-command 'aplay -r 22050 -c 1 -f S16_LE -t raw' > /dev/null 2>&1 &
cd ~
After reboot, the Wyoming plugin in HA automatically found this and it works flawlessly.
EDIT: Okay, so it seems that with wyoming-satellite
running, MPD will stop working. I’m guessing this is because by default, wyoming-satellite
captures the mic input at all times, tying up the audio driver. There might be another mpd.conf
configuration that would work, but for now, I’m sticking with MPD for TTS alerts. If I get back onto getting wyoming working again, I’ll post it here.
Yesterday I started following this guide but I have one question and there were two problems that I could not solve…
- Does it matter which kernel I choose at the beginning of the setup of pmbootstrap before I choose to use the git-branch from (you,) Felix?
- The build of the kernel was successful. However I was not able to find lenovo-cd-18781y-rootfs.img. Where is this located after the last command?
- I was able to find lk2nd.img but even with the support from google I did not understand how to sign the image using Magisk. How to install Magisk on ubuntu?
Afterwards I can start flashing as the edl installation worked smoothly.
Edit: Please ignore the last question, I’ll try avbtool instead of Magisk.
magiskboot -sign boot.img
It includes a signature that is used by default.
You can either do it on a device that has already had magisk installed, or build magisk tools on your host.
Thanks a lot for the answer - main problem was that I was not able to find where to find the code for compiling but I stumbled upon an XDA thread (which was afterwards was leading me to the correct location either way). So if you don’t want to compile it yourself- you can also follow that guide (" How to process Android boot image files on a PC running the Linux OS" by bnsmb).
My command was a little different…
./magiskboot sign path/to/lk2nd.img
Just a short update. I’m up and running PMOS now. Thanks a lot for putting this up!
I seem to have the Himax screen variant as my touchscreen is not responding and the screen is a little off, just as the one from @TurtleHat, however wifi is working fine and bluetooth for my mosue (my keyboards are behaving a little funky, not reconnecting after they have been disconnected e. g. after a reboot).
dmesg however is not providing a similar line as described in post 110 - so I cannot confirm that I have the Himax screen.
I’ve tried installing the epiphany (in the software section so called “web”) browser to test the homeassistant website but there is not enough space left for that.
Concerning the errors I had in my last post - this was my fault. The guide (post #70) to build from source only builds the part for the boot partition (not lenovo-cd-18781y-rootfs.img) and that or the signing of lk2nd.img seems to have failed for me.
Having used lk2nd.img from post #88 (if I remember correctly) and both lenovo-cd-18781y-rootfs.img (from post # 175 or pmos-lenovo-cd-18781y-testing-latest-rootfs.img.xz, which I’m currently using) are booting just fine.
Anyone have any tips for running doing this on windows? edl on windows gives me an error about an unsupported platform (NotImplementedError: Operation not supported or unimplemented on this platform) and the edl repo makes it sound like this is expected. in VirtualBox I have an issue with USB pass-through/attaching where I get a “device busy” message.
I guess my next step is to just boot a live CD.
EDIT: the missing step for me on windows was to use zadig to change the driver:
I got it to boot and added some install instructions for windows in the wiki in the first post.
I have the same “resolution” issue as someone posted before but that’s a problem for tomorrow!
Hey I missed the ping with all the activity. On the android side I spent way too much time trying alternative kernels to address the boot & wifi panics. Finally finding it’s way more stable and responsive with Android 10 instead.
Started my pmOS one back up and upgraded to your 6.8.0 kernel. Haven’t tried USB yet but so far easy and smooth. I’ll update & validate my partition changes and look how to package that in. Currently running with 6.3G for root.
Next up, trying the wyoming-satellite…
Edit: works! Had to reflash the full userdata to bring in the alsa changes for the mic
The Himax Touchscreen variant that @mattmon sent me has finally made it to Canada on the third attempt!
Thanks to Matt for being so persistent
First thing I can already say: This variant has a much better screen than the variant I have. I also now have the model number for both panels:
- Innolux P080DDD-AB2 is the variant with the Himax HX83100 touch controller (name in Lenovo kernel sources:
hx83100a_800p_video
). This variant is currently missing a touch screen driver (which I now hope to write thanks to the hardware donation). - BOE TV080WXM-LL3 is the variant with the Focaltech FT8201 touch controller (name in Lenovo kernel sources:
boyift8201_800p_video
). This variant works today.
I also figured out the issue some of you have been seeing with the scaling on the screen looking off. This is due to the fact that the Lenovo sources specify physical dimensions for the Innolux panel but not for the BOE panel. As such, the Innolux driver is more correct, but the result is that the boot splash screen and Phosh are trying to be smart about scaling factors but end up with something that looks off.
Technically, the BOE panel driver should have that physical dimension information added as well (it’s the exact same, obviously). I will look into how this can be best achieved with things not turning out all funky.
In other news
WiFi stability improvements
I was able to squash a few bugs I was seeing, namely some write timeouts and the bad WPA3 performance (WPA2 has been fine).
Unfortunately, I wasn’t able to solve that the driver can’t re-key properly with ath10k, causing a full reconnect every hour (the Group Key Interval set on my WiFi APs). I’ll be submitting my ath10k patch for review shortly and hope to get some eyes on it from there. I did send it in for comments over a month ago, but it’s actually pretty unlikely people are using this particular WiFi chip in the same environment (i.e. without the vendor qcacld driver) as we are.
USB OTG hack
I think I found a workable hack for the USB OTG issue that allows both OTG mode and device mode to function without having to recompile the kernel to allow changing it. It also wouldn’t require messing around in sysfs to switch modes. You’d still need a powered USB hub.
It’s pretty much what I mentioned earlier: Using the GPIOs currently used for the serial console to detect USB presence. GPIO4 already gets pulled high when a USB cable is plugged in because power is applied to VCONN by either the USB-A to C cable or the USB-C host device. Given that nothing blew up with the 3V-5V I’m measuring on VCONN on my cables I can only assume that voltage clamping is taking place on the PCB somewhere, leading me to believe it should be safe to do this (I obviously don’t give any warranties).
I think the best way to go about it involves shorting pin 5 to pin 8 (e.g. A5 to B8 or B5 to A8) on the USB-C connector.
With that we’re basically connecting GPIO4 and GPIO5 together and pulling them both high with the voltage from VCONN. GPIO4 is high anyway when a USB cable is plugged in (so it’s not really useful to differentiate what’s plugged in), but only when a modified cable with the short between 5 and 8 is plugged in do we get GPIO5 pulled high.
What is activated when is determined by how the USB ID node for GPIO5 is configured in the DTS: ACTIVE_LOW
= OTG active when using special cable or ACTIVE_HIGH
= USB Gadget mode active when using special cable.
I’ll post some test kernels for this shortly.
Memory optimization
I removed all unnecessary memory reservations (mostly those that relate to the cellular modem) which makes 115MB of previously unavailable RAM available to the OS again. On a device with 2GB RAM that’s 5% after all
So, stuff is moving along nicely. I’ve started the process of getting everything upstreamed into postmarketOS. The first step was creating the Wiki page for the device: Lenovo ThinkSmart View (lenovo-cd-18781y) - postmarketOS
Stay tuned for future updates
Wow, that’s a pretty huge status update!
@FelixKa’s tenacity continues to impress
I guess Canadian customs is really serious about lithium batteries
Thanks for the update and all your efforts with this.
It’s really going to open up the possibilities on these Thinksmart devices (and hopefully the smart displays too)
Thanks! I’ll give that a shot!
I really appreciate the work you’re putting in to this. I picked up a few of these after seeing them mentioned in a Reddit post. The one’s I picked up for $39 on Amazon are the Innolux P080DDD-AB2 variants. I was able to load your Postmarket image that didn’t have a touchscreen driver. I’ve also played around with a few of the Android builds. Exciting project! Would love to be able to run Linux natively on it.
Great update thanks
Just a question about using HA on PMOS - as there isn’t a Linux version of fully kiosk (which I love), is there a similar kiosk option that has as many features (such as controlling screen on/off, brightness, audio etc)? Basically, how useable is PMOS with HA?
Firefox has a kiosk mode, though not anywhere near as feature rich as Fully.
You can invoke it from the command line:
./firefox -kiosk http://your-dashboard-url
Maybe have a look at @zhbjsh’s ssh integration to help fill in the gaps.
Edit: chromium also has the --kiosk
flag
You mean the batteries this device lacks?