UCTRONICS Pi Rack OLED

Have a look here, garethcheyne/HomeAssistant (github.com) add this to your Addons, and run the script, I have it work. It needs a lot of work, but it is working.

This is totally a work in progress, and in no way is ready for any sort of production env.

Took code from a few places.

UCTRONICS own repo, for baseline C
garethcheyne/HomeAssistant (github.com)

This repo form adamoutler to emable I2C interface in HassOS
adamoutler/HassOSConfigurator: A set of Add-Ons to configure HassOS For various platforms and development purposes. (github.com)

Thanks to Lockdown I have this working :). Still needs work, but it is working.
rack

1 Like

I am having a nightmare trying to get this to work.

I installed the I2C configurator and followed those instructions. Then I installed your script with no luck…

What does it say in the log?

image Do you see this, or something else?

Thanks for the work that you did on creating this plugin. I also struggled to get the initial steps to complete, and kept on getting a message about not being able to find run.sh. I ended up just going through the install process using the https://community.home-assistant.io/t/add-on-hassos-i2c-configurator Add On, and then installing this one to run the OLED software. Looking forward to future development on it!

Yeah, I need to try this on a clean system, and see what’s happening. But you did fine a way to get it to work :slight_smile:

Be good is there was someone around that can code C, then we cant make it alot cooler, HS logos etc, change the F to C etc.

Yeah. I’m diving a bit into the C code now. But day job keeps me pretty busy–we will see. :slight_smile:

I’m curious, what would the #1 thing be that you would like to be able to display also?

So the code that is being used is from UCTRONIC, and the have F set for temperature unit, but for the life of me I cant see where that is, and being able to change it to C.

Would also be very cool if we could have like a Home Assistant flash screen, that shows, with there logo etc.

The F is encoded as part of the bitmap in bmp.h that gets drawn by OLED_DrawBMP. It’s kind of pain to translate, but I think I got it: https://github.com/garethcheyne/HomeAssistant/pull/1

Done, thanks mate, and working fine for me.

Have you got this working for yourself?

Yeah. The C is showing up on mine now.

If you or someone with design skill wants to create a Home Assistant Banner black and white bitmap (128 pixels wide x 32 pixels tall), I can encode it and add it to the rotation.

Nice work @dcwalter. I have added a few images to the img directory. Also to note, that the Memory, and Disk screen seen to be pushed left, compared to CPU Screen.

One thing I forgot about was the CPU Usage, grep -bn1 | grep load | awk ‘{printf “%.2f”, $(NF-2)}’", “r” does not seem to work in HA Pi.

New Pull Request with the HA logo screen added and the CPU load grep command fixed. Thanks for creating the BMP and corresponding header file. I’ll work on the logo alignment and some general code cleanup next. Then I will move onto enabling for more user customization without having to modify the C code.

1 Like

This is super cool, I love when I think to myself “I should figure out how to do this” and then it is already done. I am running into an issue though.

Log output:

[17:11:47] INFO: Disable Auto Start = false
/dev/i2c-1
[17:11:47] INFO: Got i2c access! WoHOo!
[17:11:47] INFO: Display Info to OLED 

Screen output.

Any thoughts or tips?

Have you tested the OLED is not faulty? cable is seated properly? I never got an error like this.

Before enabling the addon, the display was properly displaying the ‘untronics’ logo with the triple dots.

Moved the SD card to the next RPI over, which is/was raspbian and [raspbian] was displaying system info, and the result was the same bunch of dots. Granted my raspbian/ubuntu pi’s are using the C code version.

I utilized this to configure the i2c: :new:[add-on] HassOS I2C Configurator - Home Assistant OS - Home Assistant Community (home-assistant.io)

crw--w----    1 root     tty         4,  27 Oct 12 09:24 tty27
crw--w----    1 root     tty         4,  28 Oct 12 09:24 tty28
crw--w----    1 root     tty         4,  29 Oct 12 09:24 tty29
crw--w----    1 root     tty         4,   3 Oct 12 09:24 tty3
crw--w----    1 root     tty         4,  30 Oct 12 09:24 tty30
crw--w----    1 root     tty         4,  31 Oct 12 09:24 tty31
crw--w----    1 root     tty         4,  32 Oct 12 09:24 tty32
crw--w----    1 root     tty         4,  33 Oct 12 09:24 tty33
crw--w----    1 root     tty         4,  34 Oct 12 09:24 tty34
crw--w----    1 root     tty         4,  35 Oct 12 09:24 tty35
crw--w----    1 root     tty         4,  36 Oct 12 09:24 tty36
crw--w----    1 root     tty         4,  37 Oct 12 09:24 tty37
crw--w----    1 root     tty         4,  38 Oct 12 09:24 tty38
crw--w----    1 root     tty         4,  39 Oct 12 09:24 tty39
crw--w----    1 root     tty         4,   4 Oct 12 09:24 tty4
crw--w----    1 root     tty         4,  40 Oct 12 09:24 tty40
crw--w----    1 root     tty         4,  41 Oct 12 09:24 tty41
crw--w----    1 root     tty         4,  42 Oct 12 09:24 tty42
crw--w----    1 root     tty         4,  43 Oct 12 09:24 tty43
crw--w----    1 root     tty         4,  44 Oct 12 09:24 tty44
crw--w----    1 root     tty         4,  45 Oct 12 09:24 tty45
crw--w----    1 root     tty         4,  46 Oct 12 09:24 tty46
crw--w----    1 root     tty         4,  47 Oct 12 09:24 tty47
crw--w----    1 root     tty         4,  48 Oct 12 09:24 tty48
crw--w----    1 root     tty         4,  49 Oct 12 09:24 tty49
crw--w----    1 root     tty         4,   5 Oct 12 09:24 tty5
crw--w----    1 root     tty         4,  50 Oct 12 09:24 tty50
crw--w----    1 root     tty         4,  51 Oct 12 09:24 tty51
crw--w----    1 root     tty         4,  52 Oct 12 09:24 tty52
crw--w----    1 root     tty         4,  53 Oct 12 09:24 tty53
crw--w----    1 root     tty         4,  54 Oct 12 09:24 tty54
crw--w----    1 root     tty         4,  55 Oct 12 09:24 tty55
crw--w----    1 root     tty         4,  56 Oct 12 09:24 tty56
crw--w----    1 root     tty         4,  57 Oct 12 09:24 tty57
crw--w----    1 root     tty         4,  58 Oct 12 09:24 tty58
crw--w----    1 root     tty         4,  59 Oct 12 09:24 tty59
crw--w----    1 root     tty         4,   6 Oct 12 09:24 tty6
crw--w----    1 root     tty         4,  60 Oct 12 09:24 tty60
crw--w----    1 root     tty         4,  61 Oct 12 09:24 tty61
crw--w----    1 root     tty         4,  62 Oct 12 09:24 tty62
crw--w----    1 root     tty         4,  63 Oct 12 09:24 tty63
crw--w----    1 root     tty         4,   7 Oct 12 09:24 tty7
crw--w----    1 root     tty         4,   8 Oct 12 09:24 tty8
crw--w----    1 root     tty         4,   9 Oct 12 09:24 tty9
crw-rw----    1 root     audio     204,  64 Feb  9 18:25 ttyAMA0
crw-------    1 root     root        5,   3 Oct 12 09:24 ttyprintk
crw-------    1 root     root       10, 239 Oct 12 09:24 uhid
crw-------    1 root     root       10, 223 Oct 12 09:24 uinput
crw-rw-rw-    1 root     root        1,   9 Oct 12 09:24 urandom
drwxr-xr-x    3 root     root            60 Oct 12 09:24 v4l
crw-------    1 root     root      247,   0 Oct 12 09:24 vc-mem
crw-------    1 root     root      242,   0 Oct 12 09:24 vchiq
crw-------    1 root     root       10,  61 Oct 12 09:24 vcio
crw-rw----    1 root     tty         7,   0 Oct 12 09:24 vcs
crw-rw----    1 root     tty         7,   1 Oct 12 09:24 vcs1
crw-rw----    1 root     tty         7,   2 Feb  9 18:25 vcs2
crw-rw----    1 root     tty         7,   3 Feb  9 18:25 vcs3
crw-rw----    1 root     tty         7,   4 Feb  9 18:25 vcs4
crw-rw----    1 root     tty         7,   5 Feb  9 18:25 vcs5
crw-rw----    1 root     tty         7,   6 Feb  9 18:25 vcs6
crw-rw----    1 root     tty         7, 128 Oct 12 09:24 vcsa
crw-rw----    1 root     tty         7, 129 Oct 12 09:24 vcsa1
crw-rw----    1 root     tty         7, 130 Feb  9 18:25 vcsa2
crw-rw----    1 root     tty         7, 131 Feb  9 18:25 vcsa3
crw-rw----    1 root     tty         7, 132 Feb  9 18:25 vcsa4
crw-rw----    1 root     tty         7, 133 Feb  9 18:25 vcsa5
crw-rw----    1 root     tty         7, 134 Feb  9 18:25 vcsa6
crw-rw-rw-    1 root     root       10,  58 Oct 12 09:24 vcsm-cma
crw-rw----    1 root     tty         7,  64 Oct 12 09:24 vcsu
crw-rw----    1 root     tty         7,  65 Oct 12 09:24 vcsu1
crw-rw----    1 root     tty         7,  66 Feb  9 18:25 vcsu2
crw-rw----    1 root     tty         7,  67 Feb  9 18:25 vcsu3
crw-rw----    1 root     tty         7,  68 Feb  9 18:25 vcsu4
crw-rw----    1 root     tty         7,  69 Feb  9 18:25 vcsu5
crw-rw----    1 root     tty         7,  70 Feb  9 18:25 vcsu6
crw-------    1 root     root       10,  63 Oct 12 09:24 vga_arbiter
crw-------    1 root     root       10, 137 Oct 12 09:24 vhci
crw-rw-rw-    1 root     1010       10, 238 Oct 12 09:24 vhost-net
crw-rw-rw-    1 root     1010       10, 241 Oct 12 09:24 vhost-vsock
crw-rw----    1 root     netdev     81,   8 Oct 12 09:24 video10
crw-rw----    1 root     netdev     81,   9 Oct 12 09:24 video11
crw-rw----    1 root     netdev     81,  10 Oct 12 09:24 video12
crw-rw----    1 root     netdev     81,   0 Oct 12 09:24 video13
crw-rw----    1 root     netdev     81,   1 Oct 12 09:24 video14
crw-rw----    1 root     netdev     81,   2 Oct 12 09:24 video15
crw-rw----    1 root     netdev     81,   3 Oct 12 09:24 video16
crw-rw----    1 root     netdev     81,  11 Oct 12 09:24 video18
crw-rw----    1 root     netdev     81,   4 Oct 12 09:24 video20
crw-rw----    1 root     netdev     81,   5 Oct 12 09:24 video21
crw-rw----    1 root     netdev     81,   6 Oct 12 09:24 video22
crw-rw----    1 root     netdev     81,   7 Oct 12 09:24 video23
crw-------    1 root     root       10, 130 Oct 12 09:24 watchdog
crw-------    1 root     root      249,   0 Oct 12 09:24 watchdog0
crw-rw-rw-    1 root     root        1,   5 Oct 12 09:24 zero
brw-rw----    1 root     disk      254,   0 Oct 12 09:24 zram0
brw-rw----    1 root     disk      254,   1 Oct 12 09:24 zram1
brw-rw----    1 root     disk      254,   2 Oct 12 09:24 zram2
/dev/i2c-1
/dev/i2c-0 /dev/i2c-1 /dev/i2c-10 /dev/i2c-22
Found i2c access!  Nothing to do!  You can remove this add-on.

Morse code for “Home Assistant”?