Raspberry Pi As Stream Deck Substitute

I recently acquired a 7" touch screen I strapped my (otherwise redundant) Pi 3B to…

… The purpose was to experiment with creating my own Stream Deck-like thing…

… After a little experimentation I have a TKInter-based app with a pair of buttons that turn on and off one specific light in my house. It’s fairly simple Python that uses IFTTT webhooks and the Hue support in IFTTT to do its work.

What I don’t think I can do easily is automate Mac this way - except for Keyboard Maestro web serving. (iOS of course could be automated with Pushcut (possibly Automation Server).)

I’ve found the LXDE desktop unreliable in reacting to taps but the TKInter app itself swift and reliable. So I keep the app open all the time.

The question is: Is there general enough interest for me to bother writing this up in a blog post?

(A very secondary question is whether anyone has experience with a Pi and a touch screen so I can figure out gestures etc?)

I will also say I have a 2x3 Stream Deck and a 3x5 one. I also use MetaGrid. So this is an experiment is extreme customisation - given both Stream Deck and MetaGrid have their own limitations (only some of which I’ve got round with Keyboard Maestro).

I’ve never used any of them, but I know there are ways to get a Pi to emulate a USB keyboard. You could then trigger keystrokes from the Pi. Not sure if this is more useful than using KM web server, but it might be if the Pi is doing other background work locally as part of the process.

I may be an outlier, but I’m always interested in Pi based stuff.


1 Like

Thanks for the encouragement, @davenicholls!

I don’t want to go down the USB route - largely as it’s the sort of thing I’ll get nowhere with.

I have it on my blogging queue, BTW. But it’s competing with a very pretty work-related graph as the next post I’ll write… :slight_smile:

Yes! I was actually thinking about doing this (before I ever heard about Stream Decks). I think I have the same touch screen. Would love to know how you did it.

I did well, I think. I’m writing it up right now.

1 Like

OK. Here’s the blog post: Raspberry Pi As An Automation Platform

I’ll happily take improvements to it.

1 Like

Most, if not all, kiosk touch screen apps I’ve seen for the Pi have been based on a web UI presented via Chromium. Did you consider that option at all?

I note you mentioned the TkInter was snappier than the desktop in general. I wondered if this might also be true of a web-based UI in comparison to Python using TkInter? I just figured that a web GUI would probably be easier to maintain and grow in a modular fashion, allowing for easy feedback.

Last time I used Tk was in TkSchema for my Masters project at university, so I’m more than a little out of touch with how it might compare to a web UI particularly Tk with Python on a Pi which no doubt vastly out performs the Intel Pentium I was using at the time :joy:

1 Like

Which 7" screen did you get?

What’s the price?

1 Like

I got this from Amazon UK.

I think it was £80 (or about $100 US).

I’ve just ordered a couple of right hand connectors - USB B and also HDMI - to make the ensemble sit better on my desk. So I’d think another $20 for those.

Not cheaper than a small StreamDeck but - even with the Pi - similar to the medium. XL much more expensive.

But a good fun exercise - which is what I wanted. Plus a good use for this second-slowest :slight_smile: Pi. (I have a PI Zero W and a WH coming.)

Hi! That’s another approach - but I think it would rely entirely on URLs and so things like “reboot” probably wouldn’t work so well. (Other projects - on my Mac - are heavily web localhost based.)

I’ve never used Tkinter before - so this was interesting (beginning) part of the learning curve. It seems nice enough and fast enough. On speed:

  • I noticed the touch screen once in the app GUI was much faster and more reliable than the LXDE desktop. So. UDF so that I want to keep the app open rather than implement as a series of desktop icons.
  • My main speed concern - given the GUI is responsive enough - is with IFTTT webhooks vs local actions vs KM remote macros. But once I’ve trusted the office light will come on as a result of pushing a button I can be a little more patient. It’s only a second or two.

So, yeah, I could implement using web technologies - which I’m pretty familiar with - but Python was expedient and y experience with it stretched a little more.

As for extensibility it’s pretty modular - given it’s list-driven - and it’s more a demo sample for people to play with and adapt than a polished piece of work.

I have a 3B+ and Zero in use, but I’m not sure I want to spend €100 to use the spare 3B for this.

Was hoping it would be cheaper.

Thanks for answering, coming up with the idea, and writing the blog post though!

1 Like

You’re welcome. I’m not sure it’s worth 100 Euros, either.

The next experiment, now I’ve got a shutdown button working, is to see if I can automate software update. Oh, and restarting the app itself.

You’ll also note no use of Pushcut in this - yet. (Sorry @sliemeobn.) :slight_smile: