Raspberry Pi/Linux Client?

My Raspberry Pi is up all the time, unlike my MacBook. Is there any chance of a Linux client, so I can hook TT up to my Raspberry Pi?

I’m thinking more an approach for the hobbyist, it wouldn’t need a GUI, just a daemon and a config.json to specify the button calls, for example. No need for any integrations to be built in, just make all calls scripts and let us take care of the rest!

Is something like this possible at all?

1 Like

Agree, Pi or ESP32. Both have BT built in now. I’ve dabbled with BT for Turntouch on both. Really just looking for others who are willing to write code with me.

I’ve never coded for the Bluetooth stack before, are you using Python? Would be fun to try and get something minimal set up, i.e. that can connect and respond to button presses.

Yeah, python. Agree on the minimal setup. I’ll share a stub/repo here in a little bit.

Sweet, make sure to make use of the API documentation.

Here’s the start of a repo:

Communicate here or in issues/PRs, whatever you prefer. There’s a scanner under util/ and monitor.py is the start on dispatching from the turntouch.

There, monitor.py is at the Characteristic level. Next is to write to it and then wait for notifications.

+1 for Pi support

Nice start! I’ll help out with testing it on ArchLinux ARM myself.

I’ve got 3 TurnTouch myself (thanks for offering the complete set Samuel!) so I’ll also help out with ensuring the code handles more than one remote at the time.

Now I just need to go dig my Raspberry Pi out of the closet…

I’ve got a Pi Zero W arriving today, so I should be able to put in some
time over the weekend!

Any thoughts on using software that connects using gattool, which seems intended for connecting to BLE devices?

Examples: https://github.com/peplin/pygatt & https://github.com/getsenic/gatt-python

I’ve got a simple gatt-based script working: It connects and responds to button presses, but I haven’t done anything with it yet:

OK, I did the thing properly. It should be easy enough to configure, and I’ve provided instructions. At the moment, it’ll simply run any bash command as specified in the config.yml file, but if you want to run code in python directly it shouldn’t be hard to modify the client to do that.

Thanks Fredley! I certainly like your attempt more than mine. I’ll start working with it soon.

I’ve spent some more time on this today. It now supports:

  • Hue
  • Nest
  • Low battery alerts
  • Custom controllers!

I’ve written some documentation on the readme to get set up, and to write your own controllers. It would be great for someone else to have a go and give some feedback on the process!

@samuelclay Thanks for providing the developer page with the Bluetooth codes, that’s made this whole thing so much easier! Is there any chance the project could be listed on the page?

1 Like

Rather than implementing hue, nest, etc. you might think about writing a plug-in for home-assistant as it has a gigantic ecosystem and is python. I’d totally use it.

1 Like

like the controllers idea. I’m going to add a controller that I want soon.

you should write it, njr!

Yeah, I wish I had time - enough open source projects that are
desperately seeking attention as it is!

@njr I didn’t know about this, it looks fantastic!

I’ll definitely look into doing this, with the modular controllers setup it should just be a question of writing the controller for it!