Skip to content
jgaleaPublic

About

Swift package for 12V portable compressor fridges over Bluetooth (Alpicool, Vevor, Brass Monkey and friends). Verified against real hardware.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

FridgeKit

Protocol License Built by

Swift package for talking to 12V portable compressor fridges over Bluetooth — Alpicool, Vevor, Brass Monkey and the many other names for the same controller.

Verified against real hardware. Every frame in the test suite is a byte-for-byte capture from an actual fridge, not a fixture written to match the code.

What it does

  • Scans for fridges, connects, and stays connected across drops.
  • Reads temperature, target, run mode, battery protection, voltage and charge.
  • Sets the target temperature and every setting the fridge's own menu exposes.
  • Handles single-zone and genuinely dual-zone units.
  • Decodes defensively: no input, however malformed, can crash the parser.

No UI, no dependencies, nothing platform-specific beyond CoreBluetooth. It runs on iOS and macOS.

Install

.package(url: "https://github.com/jgalea/fridgekit", from: "1.0.0")

Use

import FridgeKit

let connection = FridgeConnection(transport: CoreBluetoothTransport())

Task {
    for await event in connection.events {
        switch event {
        case let .discovered(fridge):
            await connection.connect(to: fridge.id)
        case let .status(status):
            print("\(status.zone1.currentTemperature)° → \(status.zone1.targetTemperature)°")
            print("\(status.batteryVoltage) V, \(status.batteryChargePercent)%")
        default:
            break
        }
    }
}

await connection.startScanning()

Setting a temperature confirms by reading back what the fridge actually accepted, which may not be what you asked for:

let confirmed = try await connection.setZoneTarget(zone: 1, temperature: -18)

Changing anything else is a read-modify-write, because the fridge's Set command carries every setting at once:

try await connection.apply { $0.batterySaver = .high }

Talk to your fridge from the command line

swift run frostprobe scan            # list nearby fridges
swift run frostprobe probe <uuid>    # connect, query, dump raw and decoded frames

Useful for confirming your unit speaks this protocol before you write a line of code, and for capturing frames from variants this package hasn't seen.

Testing without hardware

MockTransport is a scripted fridge that speaks real, correctly-encoded frames. It can be single- or dual-zone, drift its temperature, drop replies, and fragment them — the failure modes real hardware actually produces.

let connection = FridgeConnection(transport: MockTransport())

The protocol

PROTOCOL.md documents the framing, the commands, the status layout, the settings menu, the battery-protection voltages — and the hardware traps that cost a day each if you find them yourself. Chief among them: the fridge advertises a Bluetooth service it does not implement, so a service-filtered scan never finds it.

Credit

The protocol was reverse-engineered by the fridge-owner community. This package stands on BrassMonkeyFridgeMonitor, alpicoold and alpicool-esp32-mqtt, and adds a Swift implementation plus hardware verification.

Independent project. Not affiliated with, endorsed by, or supported by any fridge manufacturer.

License

MIT.

About

Swift package for 12V portable compressor fridges over Bluetooth (Alpicool, Vevor, Brass Monkey and friends). Verified against real hardware.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages