johnelliott / alpicoold

Apple HomeKit bridge for Alpicool portable cooler style fridges
13 stars 3 forks source link
bluetooth fridge homekit raspberry-pi wireshark

Alpicoold

Apple HomeKit bridge for Alpicool portable cooler style fridges

What is this?

This is a personal hack project for my little fridge.

Alpicoold:

See the k25 package for the Bluetooth characteristic data frames used to interact with the fridge. The protocol is inferred from packet sniffing the manufacturer's app traffic using Wireshark.

Installs

Deployment is via an Ansible playbook called deploy, with another for installing the camera and ffmpeg loopback device.

This playbook uses make and cross-compiles from x86/Darwin to arm/linux via the musl cross-compiler before copying the executable to the Pi.

  1. Install the cross-compiler on the mac
  2. Set up Ansible inventory and variables
  3. Install the camera requirements on the pi manually or via the camera role (camera uses hkcam)
  4. Run the deploy playbook to install and run the daemon

Deploys

ansible-playbook -i ~/inventory.yml ansible/deploy.yml -l pizero2 -e'loglevel=info'

Monitoring Bluetooth on Linux

Some commands to remember for monitoring Bluetooth on Raspberry Pi:

sudo btmon
sudo bluetoothctl
sudo dbus-monitor --system "type=error"