(╯°□°)╯︵ ┻┻ DeskPi Pro Active Cooling and Front USB ports

This does not sound like expected behavior from DeskPi Pro. Also the information you’re providing appears to be operating properly. Maybe screenshot a failure condition or something

Its not the Pro, its the Deskpi Lite.
But I think the hardware and its control should be similar.

Deskpi lite uses pwn instead of serial fan control. I don’t have a unit and cannot support it. However if someone wants to use this to adapt the existing code, I could accept a pull request.

Pr would need to either

  1. Be a separate folder displaying the name DeskPi Lite
  2. Detect DeskPi Pro/lite by confirming if serial port or pwm pin values are as expected
  3. Have a selection in the config for pro/lite
    .
    #1 appears to be a better way to do it. I don’t have a unit so I will not be doing this myself.

Hi , Just installed and setup HA /Rpi4B inside a DeskPi Pro case. The instructions here show editing the /boot/config.txt which is normally on a Raspberry OS system. The HA I installed was from custom images from within Raspberry Pi Imager - and is NOT a RpiOS.
Also this is running from an SSD that is plugged into the USB3.0 port.
Tried following the instructions from commandline. However, the path /mnt/config.txt does not exist.
Any HELP you can provide that would reflect a system that is being built today would be appreciated.

this is what is in the log of the AddOn:

s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
could not find /dev/ttyUSB1. This addon cannot continue without a serial device. Here is a list of possible SerialDevice:
ls: /dev/ttyUSB*: No such file or directory

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
punt!
type or paste code here

Enable the front USB and serial first

OK, but I can’t even get past the installation instructions without errors, as I stated in my first post.

Login to the main terminal, then at the ha> prompt, type "login".

echo 'dtoverlay=dwc2,dr_mode=host' >> /mnt/boot/config.txt

| |__| | ___  _ __ ___   ___     /  \   ___ ___ _ ___| |_ __ _ _ __ | |_
|  __  |/ _ \| '_ \ _ \ / _ \   / /\ \ / __/ __| / __| __/ _\ | '_ \| __|
| |  | | (_) | | | | | |  __/  / ____ \\__ \__ \ \__ \ || (_| | | | | |_
|_|  |_|\___/|_| |_| |_|\___| /_/    \_\___/___/_|___/\__\__,_|_| |_|\__|

Welcome to the Home Assistant command line.

System information
  IPv4 addresses for wlan0:
  IPv4 addresses for end0:  192.168.1.166/24
  IPv6 addresses for end0:  fd94:5227:a8e9:a947:1b4b:3bbf:f5a:9e3a/64, fe80::71e         2:bcbf:af73:692f/64

  OS Version:               Home Assistant OS 11.3
  Home Assistant Core:      2024.1.2

  Home Assistant URL:       http://homeassistant.local:8123
  Observer URL:             http://homeassistant.local:4357
➜  ~ whoami
root
➜  ~ echo 'dtoverlay=dwc2,dr_mode=host' >> /mnt/boot/config.txt
zsh: no such file or directory: /mnt/boot/config.txt
➜  ~

The. Boot partition isn’t mounted. I made an addon to do this for you.

OK … could you provide that information ? name of the addon? etc…
if it is HassOS Serial Configurator - I have that installed too, but have no idea how to configure things to make anything work.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
no sda1 config found
no sdb1 config found
no mmcblk0p1 config found
This Configurator did it's job. Perform a hard-power-off now. You can uninstall and reboot now.  This configurator only works once.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
punt!

OK … Success!

It was the protection mode switch - “If it was a snake it would have bit me!”
DeskPi Fan_Fix

DeskPi Fan_Working

Thanks for a Great set of AddOns!

I have been using this addon for many years. Today an update of HA OS 16.1 has caused it to stop working. I have tried starting it again and get: could not find /dev/ttyUSB0. This addon cannot continue without a serial device. Here is a list of possible SerialDevice: ls: /dev/ttyUSB*: No such file or directory s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped punt!

I tried the HassOS Serial Configurator and it did not help. I am stumped as to what to do and I am concerned that I will not have any temp control. Any suggestions as to what to do, pls let me know. Thanks.

It’s been a long time since I last used this unit. Make sure it’s plugged in with the little dongle on the back. Make sure the internals are hooked up properly. Ensure you power off (pull the plug) twice after running the configurator.

I can confirm the same behaviour. the /mnt/config.txt lines are present and have rebooted/Powered off by taking out the power now 4 times. ls /dev does not list any ttyusb devices

➜  ~ ls /dev 
autofs           gpiochip1        mapper           ram11            sda1             tty1             tty24            tty39            tty53            ttyprintk        vcsa             vhci             video31
block            gpiomem          media0           ram12            sda2             tty10            tty25            tty4             tty54            udmabuf          vcsa1            vhost-net        watchdog
bsg              hwrng            media1           ram13            sda3             tty11            tty26            tty40            tty55            uhid             vcsa2            vhost-vsock      watchdog0
btrfs-control    input            media2           ram14            sda4             tty12            tty27            tty41            tty56            uinput           vcsa3            video10          zero
bus              kmsg             media3           ram15            sda5             tty13            tty28            tty42            tty57            urandom          vcsa4            video11          zram0
char             kvm              mem              ram2             sda6             tty14            tty29            tty43            tty58            v4l              vcsa5            video12          zram1
console          log              mqueue           ram3             sda7             tty15            tty3             tty44            tty59            vc-mem           vcsa6            video13          zram2
cpu_dma_latency  loop-control     net              ram4             sda8             tty16            tty30            tty45            tty6             vchiq            vcsm-cma         video14
cuse             loop0            null             ram5             serial           tty17            tty31            tty46            tty60            vcio             vcsu             video15
disk             loop1            port             ram6             shm              tty18            tty32            tty47            tty61            vcs              vcsu1            video16
dma_heap         loop2            ppp              ram7             snd              tty19            tty33            tty48            tty62            vcs1             vcsu2            video18
dri              loop3            ptmx             ram8             stderr           tty2             tty34            tty49            tty63            vcs2             vcsu3            video19
fd               loop4            pts              ram9             stdin            tty20            tty35            tty5             tty7             vcs3             vcsu4            video20
full             loop5            ram0             random           stdout           tty21            tty36            tty50            tty8             vcs4             vcsu5            video21
fuse             loop6            ram1             rfkill           tty              tty22            tty37            tty51            tty9             vcs5             vcsu6            video22
gpiochip0        loop7            ram10            sda              tty0             tty23            tty38            tty52            ttyACM0          vcs6             vga_arbiter      video23
➜  ~ +

I have a UPS /dev/bus/usb/001/003 and a Zigbee USB /dev/bus/usb/001/003 plugged in, Zigbee is /dev/ttyACM0

I believe the serial that it wants is but

BUSNUM: '003'
DEVNAME: /dev/bus/usb/003/003
DEVNUM: '003'
DEVPATH: /devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4
DEVTYPE: usb_device
DRIVER: usb
ID_BUS: usb
ID_MODEL: USB_Serial
ID_MODEL_ENC: USB\x20Serial
ID_MODEL_ID: '7523'
ID_PATH: platform-fe980000.usb-usb-0:1.4
ID_PATH_TAG: platform-fe980000_usb-usb-0_1_4
ID_PATH_WITH_USB_REVISION: platform-fe980000.usb-usbv2-0:1.4
ID_REVISION: '0264'
ID_SERIAL: 1a86_USB_Serial
ID_USB_INTERFACES: ':ff0102:'
ID_USB_MODEL: USB_Serial
ID_USB_MODEL_ENC: USB\x20Serial
ID_USB_MODEL_ID: '7523'
ID_USB_REVISION: '0264'
ID_USB_SERIAL: 1a86_USB_Serial
ID_USB_VENDOR: 1a86
ID_USB_VENDOR_ENC: 1a86
ID_USB_VENDOR_ID: 1a86
ID_VENDOR: 1a86
ID_VENDOR_ENC: 1a86
ID_VENDOR_ID: 1a86
MAJOR: '189'
MINOR: '258'
PRODUCT: 1a86/7523/264
SUBSYSTEM: usb
TYPE: 255/0/0
USEC_INITIALIZED: '3618765'BUSNUM: '003'
DEVNAME: /dev/bus/usb/003/003
DEVNUM: '003'
DEVPATH: /devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4
DEVTYPE: usb_device
DRIVER: usb
ID_BUS: usb
ID_MODEL: USB_Serial
ID_MODEL_ENC: USB\x20Serial
ID_MODEL_ID: '7523'
ID_PATH: platform-fe980000.usb-usb-0:1.4
ID_PATH_TAG: platform-fe980000_usb-usb-0_1_4
ID_PATH_WITH_USB_REVISION: platform-fe980000.usb-usbv2-0:1.4
ID_REVISION: '0264'
ID_SERIAL: 1a86_USB_Serial
ID_USB_INTERFACES: ':ff0102:'
ID_USB_MODEL: USB_Serial
ID_USB_MODEL_ENC: USB\x20Serial
ID_USB_MODEL_ID: '7523'
ID_USB_REVISION: '0264'
ID_USB_SERIAL: 1a86_USB_Serial
ID_USB_VENDOR: 1a86
ID_USB_VENDOR_ENC: 1a86
ID_USB_VENDOR_ID: 1a86
ID_VENDOR: 1a86
ID_VENDOR_ENC: 1a86
ID_VENDOR_ID: 1a86
MAJOR: '189'
MINOR: '258'
PRODUCT: 1a86/7523/264
SUBSYSTEM: usb
TYPE: 255/0/0
USEC_INITIALIZED: '3618765'

but putitng the /dev line in i get

s6-rc: info: service s6rc-oneshot-runner: starting

s6-rc: info: service s6rc-oneshot-runner successfully started

s6-rc: info: service fix-attrs: starting

s6-rc: info: service fix-attrs successfully started

s6-rc: info: service legacy-cont-init: starting

s6-rc: info: service legacy-cont-init successfully started

s6-rc: info: service legacy-services: starting

s6-rc: info: service legacy-services successfully started

nc: bind: Address in use

Current Temperature 123 °F

Level4 - Fan 100% (High)

/run.sh: line 102: /dev/bus/usb/003/003: Operation not permitted

s6-rc: info: service legacy-services: stopping

s6-rc: info: service legacy-services successfully stopped

s6-rc: info: service legacy-cont-init: stopping

s6-rc: info: service legacy-cont-init successfully stopped

s6-rc: info: service fix-attrs: stopping

s6-rc: info: service fix-attrs successfully stopped

s6-rc: info: service s6rc-oneshot-runner: stopping

s6-rc: info: service s6rc-oneshot-runner successfully stopped

punt!

Ediit :

Unplugged all other usb devices and can confirm that usb 003 003 is the correct device based on the Github Comments on. DeskPi Pro V2.0 - Fan control not working · Issue #5 · adamoutler/HassOSDeskPiPro · GitHub
Just adding a user udev rule to try to see if this appears now. Will update again if found
udev rule did nothing

but i believe the driver may be missing in the newest

    4.296300] usbcore: registered new interface driver ch341
[    4.296360] usbserial: USB Serial support registered for ch341-uart
[    4.296663] usb 3-1.4: failed to receive control message: -32
[    4.296684] ch341-uart ttyUSB0: probe with driver ch341-uart failed with error -32

Reverting back to 16.0 and device is showing up

[    7.235506] usbcore: registered new interface driver ch341
[    7.235557] usbserial: USB Serial support registered for ch341-uart
[    7.240433] usb 3-1.4: ch341-uart converter now attached to ttyUSB0

Will try to report this on the 16.1 github issues. as a missing driver in the OS is not your add-on’s fault

I may be wrong but looking at the release notes, it appears they toyed with related files here. The config.txt may not be detected and this could lead to lack of USB io support.

Then again it could be a driver. I don’t know. Someone want to get some dmesg from HASOS terminal, outside the docker? Need to unplug and replug the USB while monitoring dmesg.

Any new status on this? Thanks in advance.

It’s working properly. You’ll need to provide some error message showing otherwise.

I wiped and factory reset. I’m able to reproduce. Looks like HA isn’t responding to the overlay

/➜  / docker run --rm -it --privileged -v /dev:/dev alpine sh
/ # mkdir /media/boot
/ # mount /dev/sda1 /media/boot
/ # cd /media/boot
/media/boot # ls
bcm2711-rpi-4-b.dtb  config.txt           rauc.db
bcm2711-rpi-400.dtb  fixup4.dat           start4.elf
bcm2711-rpi-cm4.dtb  fixup4cd.dat         start4cd.elf
boot.scr             fixup4x.dat          start4x.elf
cmdline.txt          overlays             u-boot.bin
/media/boot # cat config.txt |tail -n4
[all]
#dtoverlay=vc4-fkms-v3d
#max_framebuffers=2
dtoverlay=dwc2,dr_mode=host
/media/boot # 

We can see the last line in config.txt is the proper overlay as injected by the Serial Configurator

I’m not sure what to do. The current kernel doesn’t seem to be compatible with this. If someone can do some research on what needs to happen in order to set the USB to host mode, that would be useful. Until we have a host-mode serial connection, we cannot access the device.

Here is the error log from the add-on below. I have tried all the recommended remedies as I noted in my previous post. I have tried “HassOS Serial Configurator” and cold started more than 3 times? Not sure what else I can do other then the same.

could not find /dev/ttyUSB0. This addon cannot continue without a serial device. Here is a list of possible SerialDevice:
ls: /dev/ttyUSB*: No such file or directory
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
punt!

Also (?) Your post (‘I wiped and factory reset. I’m able to reproduce. Looks like HA isn’t responding to the overlay’) ((╯°□°)╯︵ ┻┻ DeskPi Pro Active Cooling and Front USB ports - #58 by adamoutler), seems to indicate there is an issue ?

Thanks for the addin and your help

Al

Yes. I have no solution as I stated in my last post. They’re deviating from RPI kernel to the point where it’s not working for RPI standard features.

NOTE :exclamation:: todays update of Home Assistant OS to v16.2 resolved this problem. :+1:

Probably same error for my case leds installed on a miniPC?