OpenRGB and a Stream Deck

Stream Deck & OpenRGB

I have these two products, a Stream Deck (it’s only a mini, but hey it still counts!) and the OpenRGB software, for the One App to Rule All LEDs! IF you are at least a little bit savvy in the computer streaming and gaming world then you know what a Stream Deck is (not to be confused with a Valve Steam Deck gaming console). I am going to assume that you know what one is but for those that don’t you can check them out here. In short they are a small macro pad with a grid of buttons, the buttons are little LCD screens that are programmable to do and look damn near whatever you want. It is an absolutely beautiful piece of hardware. It was designed for streamers to help act as a digital switchboard for their apps and scenes but anyone can use it for anything. I’ve seen it used for a Smart Home Hub for Home Assistant and that was an awesome idea I never thought of.

I have a page with buttons mapped with icons for use when I play Diablo 4; shortcuts to Skills, Class, Character, Abilities. I use a Mad Noodle macro pad to game with on D4 instead of the main keyboard and the Stream Deck is right next to it. So I get the macro pad action and the Stream Decks sweet sweet LCD icons to play the game with. The other buttons I use are for things like taking screenshots or moving active windows between multiple monitors. One of my favorite buttons is for my Pi-hole. One press and it disables the Pi-hole, another press and it is enabled again, I don’t have to open the webpage and login anymore to do a quick bypass. It also shows the current traffic blocked percentage (or whatever else you want to display). One of my most useful ones is two buttons for switching the PC audio between the speakers and my headset without having to unplug cables constantly! Welcome to the future!

OpenRGB is a useful piece of software as well. If you are like everyone else these days and are into computers you have a plethora of LEDs at your disposal for your illuminated delight. The PC case and motherboard is loaded with em, the RAM these days are poppin’, all the fans are usually full RGB, headsets are RGB, the keyboards are loaded with RGB for the keys and the case, and lets not forget the mouse, and even your mouse/desk pad! All of these LED’ed products usually have their own proprietary software that you need to use. Unless you happen to have everything within the same brand you need more than one app to use and configure them. Fuck that. I can’t stand that, that is a major flaw these days. This is not the way. All of these products use the same LED protocols to illuminate the actual LED component but their apps/software is locked down to only their products forcing you to have to use and install a few of practically the same thing and they’re usually loaded with bloatware or ads or are heavier than they need to be. Corsair iCue I am looking at you!

Enter OpenRGB. Open source software to control (almost) anything with an LED in it connected to your computer. Doesn’t matter the manufacturer or if it is a mouse a keyboard or fan. This app will most likely be able to tap into it and control it. You can now ditch all that bloatware running all those icons in your system tray. I use OpenRGB on my Windows 11 PC. It controls the LED lighting for my ASUS motherboard, the Corsair RAM, the ASUS RTX video card, and every light bar and colored fan in my off-brand case. Don’t forget it also controls my Razer headset, my Logitech mouse and my custom keyboard (keyboard control requires new firmware, not easy). I have been using OpenRGB for a little over a year now and while it is not perfect the developer is active and my issues have always had a work around or an official fix.

This is where it gets good and why you are here. The other day I was configuring my Stream Deck for Diablo 4 use and I came across a post asking about the Stream Deck and OpenRGB. Wait, what?! Why have I never thought of that before? Or using an Amazon Alexa to change the colors (which I can now do also, see some of my other posts). After that I went off and watched a few YouTube videos on alternate uses for the Stream Deck. I also set out to figure out how to use the Stream Deck with OpenRGB to use the buttons to change the active LED lighting profile (change the colors and/or patterns) of everything. Yes, I got it working. I did have to download a current (specific?) WebHooks plugin though.

View Post

DIY CCTV – Raspberry Pi IP Cameras and NVR

motionEye

I have an old CCTV DVR with two older analog cameras attached. It was all top of the line security gear 10 years ago when I was active in the field, and it has not aged well. The DVR has a very old and obviously no longer maintained android app, and the desktop software is just the same. I am not even sure if the company still sells standard DVRs anymore. The image quality on the cameras is horrible, somewhere around 480. To top it off my once prized analog security camera died while I was writing this.

Everything is IP and all the recorders are now NVRs these days. I was looking at possible new solutions to upgrading and there are some decent options out there. Theres the Blink XT2 and Arlo Pro cameras, they seem to be the most popular. There are also the super cheap (but indoor only at this time) Wyze cameras. They all have pretty decent apps but they all rely on cloud storage or record to local SD cards. If you want IP cameras without the cloud you are looking at going through a security professional or something you can get from Costco, Home Depot or Amazon etc. Now I can’t afford a new IP camera package at the moment but they seem nice, but with no local storage I decided to see if I could roll my own NVR and IP camera.

Before you go any further you should read this blog article, it has a ton of info on the options you have available to you. He goes in depth about the options, I am going to give you my experience with them, what I ended up sticking with and how I got it setup. I recommend trying out all the options if you are so inclined, it took me about a day or two to bounce between them all and settle on one. I have been writing this article for two weeks now.

I have a home server running on an old slim desktop computer (that someone dumped off on my curb one day). I am running Ubuntu Server 18.04 headless. I have a few programs and services running on it as well as a few terabytes of media that I cannot risk losing. Even losing the OS would be a pain in the ass as my Plex server would have to re-crawl the folders. That takes a long while, an event I would like to avoid if at all possible. So I am always hesitant on installing and trying new things that look like they need a lot of tweaking and trial & error. Enter the Raspberry Pi. This little SBC makes testing things perfect for me (I have still yet to dive into Docker and VMs). If it proves not too problematic then I can toss it on ye ole server.

I started writing this over a weekend, I thought I could turn my experience into a quick write up and oh man did this thing grow. I just want to state up front that I was kinda sideswiped during my process of doing this as a motionEyeOS prerelease came out and the official github has updated a few things which also match what I wrote here now (like they now cover the install on Buster which they did not before). So you may find some redundancies between our pages. Go figure.

View Post

OctoPrint-TFT on a Raspberry Pi

octoprint-tft

So I have been seeing the new kid on the block pop up a lot recently, no not that shitty fucking band. This is a new “plugin” for the famous and awesome OctoPrint, OctoPi actually – OctoPrint-TFT. I have seen the screenshots and it is looking slick I must say. A while back I tried to use the OctoPrint TouchUI plugin and didn’t have much luck with it, in the end as the Pi I had at the time was a lower model and I just found the responsiveness just too slow. Plus this gives it a nice TFT feel like it was stock and meant to be. Le’s try it. I am gonna use the same waveshare 3.5″ LCD screen I had before but this time a newer Raspberry Pi 3B+. So I wont need a WiFi dongle this time either cause its built-in.

 

Parts used

  • Raspberry Pi 3 B+
  • Waveshare 3.5″ LCD TFT screen
  • A micro SD card of course
  • Power supply and cord for the Pi
  • USB cable to connect the Pi to the printer
  • A 3D printer lol
  • A computer with some sort of SSH program or a screen and keyboard/mouse to work directly off the Pi (might work I am not sure, I used a terminal on my mac and SSH’d into the Pi).

 

Let’s Party

Let’s follow the directions from the Github page and see what happens?

After installing a fresh copy of OctoPi v0.16 I started the Github directions.

 

The file is actually “/etc/octoprint-tft-environment” not the location.

sudo nano /etc/octoprint-tft-environment
(this tidbit copied form the github page)

The basic configuration is handled via environment variables, if you are using the  .deb package you can configure it at  /etc/octoprint-tft-environment.

  • OCTOPRINT_CONFIG_FILE – Location of the OctoPrint’s config.yaml file. If empty the file will be searched at the  pi home folder or the current user. Only used for locally installed OctoPrint servers.
  • OCTOPRINT_HOST – OctoPrint HTTP address, example  http://localhost:5000, if OctoPrint is locally installed will be read from the config file.
  • OCTOPRINT_APIKEY – OctoPrint-TFT expects an API key to be supplied. This API key can be either the globally configured one or a user specific one if “Access Control”. if OctoPrint is locally installed will be read from the config file.
  • OCTOPRINT_TFT_STYLE_PATH – Several themes are supported, and style configurations can be done through CSS. This variable defines the location of the application theme.
  • OCTOPRINT_TFT_RESOLUTION – Resolution of the application, should be configured to the resolution of your screen, for example  800x480. By default  480x320.

So go to the browser on your working machine that you use and go to the Pies IP address and go thru the OctoPrint setup fun. Once done grab an API key from the config menu on OctoPrint and lets edit that config file for the OctoPrint-TFT.

Do a find -name "config.yaml" on your Pi and you will find the location of yours. Add that to the config. Host should be http://localhost . The API you grabbed from the config menu slap that where it needs to go. I left the last two alone.

It has come a long way since the last time I tried to get this screen to work. This time its is really freaking easy!

This should install with the screen to boot with the bottom being the power plug, if you want it the other way do this instead

Reboot your Raspberry Pi and make sure you get video on your LCD.

If your screen is not rotated correctly with the above command still, do the following.

And change the line for your display to add :rotate=270 as shown below

The Pi rebooted after downloading some files and holy shit! The screen is working, well it showed the boot up sequence and a login prompt. Let’s get touch working and the desktop.

sudo reboot

Let’s see?

Boot up sequence and…login prompt. Ugh. sudo raspi-config to desktop? That loads and wants lightdm, so no. TFT wants xserver, so its gonna get xserver. Lets Google and I mead Reddit. Google didn’t have shit, too new still. Found it.

Let’s try this.

He has an extras step after installing OctoPrint-TFT.

Lastly we need to remove the 99-fbturbo.conf file from our Xorg directory he says.

Now on reboot OctoPrint-TFT should load and start attempting to connect says he?

Fucken eh right it did! If you see the Octoprint image but the error says

Unexpected error: Get /api/connection: unsupported protocol scheme

As mentioned earlier I found out on the Github issues page it was mentioned there to add “http://” to the config file instead of just localhost. So make sure you did that.

If you see the “Connecting to OctoPrint” and it never goes away, don’t wait too long! It simply means it has no connection to a 3D printer at that moment. You MUST plug it in for the TFT to do its job and actually work. Incredibly confusing I know. Hopefully they’ll fix that soon, and change the message soon.

After playing with it for a few minutes (no actual printing done) I find it pretty neat, and may possibly use it in the future if my LCD screen ever loses functionality for some reason. I could disable the control boxes screen lets say and enable more features in Marlin, after I did upgrade my firmware. But I am not too sure. Requiring the tethered connection to the Pi is a drawback for me, thats way more plugs sticking out of a screen than I would like. If I had the 7″ screen to hide the goop maybe, but this wasn’t designed for those. It was perfect size on the 480×320 I ave.

Or if I do some crazy new board installed over the Melzi and I don’t have a screen. I could use this. I wanted to try Klipper out and that loses the screen but I don’t think there is support for it just yet. I am not willing to try it out at this point in time.

But that was my trick to get OctoPrint-TFT to work on my Waveshare 3.5″ TFT screen and Raspberry Pi 3 B+. Hope it helps.