当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-brewer

Coffee brewer home bridge plugin
授权协议 Apache-2.0 License
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 昌山
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

homebridge-brewer

Homebridge plugin for brewing coffee with your Nespresso machines using HomeKit accessories.

Features

With this plugin you can brew coffee using Siri and schedule your coffee within your 'Good Morning' Scene! The plugin exposes the following switches to Homekit: Ristretto, Espresso, Lungo, Americano, Water.Besides, there are also sensors:

Sensor Description
Brewing Opens whenever the brew starts, closes when the brew finishes.
Descealing Needed Opens whenever descealing is needed.
No Capsules Opens whenever you ran out of capsules. (Make sure to setup correctly)
No Water Opens whenever there is no water in the tank.
Slider Opens/Closes together with the capsule-slider on your machine.
Tray Error Opens whenever a capsule jams the tray or whenever the capsule tray is full.

Capsule Count

The status of the capsule count is reflected using the battery level inside the Home App. By default the 'max_capsule_count' count is 0, this is the maximum number your machine can decrement. First make sure to setup the amount of capsules left inside the Nespresso App. Whenever this plugin runs, you can't connect via the app, because the machine can only connect one device at a time!

Let's say 500. This means that the battery percentage will be 50%; 500 capsules left of the max_capsule_count 1000. Below 10% Homekit will provide a low battery warning to remind you to order new cups.

Installation

Make sure your system matches the prerequisites. Also when using a weaker Bluetooth Homekit-Server (especially a Raspberry Pi), make sure its close to the machine before taking it furhter away. The Nespresso machines require a strong connection otherwise you will see random disconnects before the brew even started. Whenever it works you can try to move the Homekit-Server further away.

Noble is BLE central module library for Node.js used to communicate with the coffee machines.

These libraries and their dependencies are required by the Noble library and provide access to the kernel Bluetooth subsystem:

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

For more information see the Noble documentation.

Install homebridge and this plugin

[sudo] npm install -g --unsafe-perm homebridge
[sudo] npm install -g --unsafe-perm homebridge-brewer

Homebridge configuration

Update your Homebridge config.json file. See config-sample.json for a complete example.

"platforms": [
        {
            "machines": [
                {
                    "name": "Expert_AHD34DDBADCC",
                    "token": "DA-03-4B-BB-AA-CC-AA-CC",
                    "temperature": "Medium"
                }
            ],
            "platform": "Brewer"
        }
    ],
Key Default Description
Brewer "Brewer" Mandatory. The name provided to Homebridge. Must be "Brewer".
machines [] Array of configured machines, is needed if you want to display one. (Multiple are supported)
displayName "Coffee" The name of this accessory. This will appear in your Home-app.
name Mandatory. The bluetooth name of the machine, can be found on your phone or pc, or any bluetooth discovery app. (see below)
token Authentication token which is required to send any commands see below ho to gather one. Make sure the format is exactly "XX-XX-XX-XX-XX-XX-XX-XX"
temperature "Medium" Mandatory. The temperature which is used to brew your coffees. Can be set to "Low", "Medium" and "High".
disabled_beverages [] Optional. Disable the exposed switches, can be set to a list of items that shouldn't be exposed to the Home-app: ["ristretto", "espresso", "lungo", "americano", "water"]
max_capsule_count 0 Optional. Set your maximum capsule count. The capsule count is displayed as battery percentage: 500 of 1000 (capsule_count) == 50%. Value can be between 1-1000, 0 is disabled (default)

Name

You can find the name quite easily add the platform and check the homebridge log. If your homebridge server has bluetooth enabled and is close enough to the machine you will see something like this:[3/19/2021, 9:19:27 PM] [Brewer] Found new device, please add configuration for: "Expert_AHD34DDBADCC"The value "Expert_AHD34DDBADCC" should be used for the name in the configuration.

Token


In order to retrieve the token (you need to snoop the bluetooth packets:

  • Use an Android-Phone
  • Go to developer options in settings, enable BLE HCI snoop
  • Start the Nespresso App (you need to have registered this and connected to your machine already)
  • Brew a cup of coffee
  • Stop BLE HCI snoop.
  • Connect the mobile to USB/PC and copy or email the file (location: \#{name}\Phone\Android\data\btsnoop_hci.log)
  • Use the shell to extract find the token:
hexdump -v -e '/1 "%02X "' btsnoop_hci.log | grep -o '0B 00 04 00 12 14 00 \<.. .. .. .. .. .. .. ..\>'

This will search hexdump the log file (btsnoop_hci.log) and then grep for the sequence and 8bytes wildcards <..>, which is the authKey. Write between the bytes dashes to match the pattern which is required by this plugin. For example you will find:

0B 00 04 00 12 14 00 DA 03 4B BB AA CC AA CC

Take the last part (8 bytes) to creat the token:

DA-03-4B-BB-AA-CC-AA-CC

Legal

Nespresso is an registered trademarks of Nestlé Nespresso S.A.

This project is in no way affiliated with, authorized, maintained, sponsored or endorsed by Nespresso or any of its affiliates or subsidiaries.

Credits

These users/repositories helped making the Homekit integration possible:

@farminf - https://gist.github.com/farminf/94f681eaca2760212f457ac59da99f23

@fsalomon - https://github.com/fsalomon/nespresso-expert-ble

@petergullberg - https://github.com/petergullberg/brewbutton

And me and yes, I like coffe ;)

 相关资料
  • Homebridge 是一个轻量级 NodeJS 服务器,它模拟 iOS HomeKit API,提供从 HomeKit 到“智能家居”设备制造商提供的各种第三方 API 的基本桥接。通过 Homebridge 的桥接,可以让 Siri 控制完全不支持 HomeKit 的设备。 此外 Homebridge 支持插件。

  • homebridge-vsx homebridge-vsx is a plugin made for homebridge,which allows switching on and off your Pioneer AV receiver. All AV receivers (VSX and SC),which work with the iControl AV5 App are support

  • homebridge-sesame Control and monitor your Sesame smart lock with HomeKit integration. Prerequisites Installation of Homebridge iOS 11 or later Sesame lock with enabled cloud integration Sesame Wifi A

  • homebridge-panasonictv A homebridge plugin for turning on and off your Panasonic Viera TV. The plugin also has experimental support for changing the volume and channel. These characteristics are not r

  • Quick Start | Contribute A Wake on Lan plugin for Homebridge Turn your PCs, laptops, servers and more on and off through Siri Quick Start To install the plugin, head over to the machine with Homebridg

  • Docker Homebridge This Alpine/Ubuntu Linux based Docker image allows you to run Nfarina's Homebridge on your home network which emulates the iOS HomeKit API. This is a multi-arch image and will also r

  • This Plugin is no longer being maintained. The ST platform removed all of the greatness that made it fun to develop for and I will not rewrite my years of code to adapt. I have moved to Hubitat and al

  • Homebridge myQ myQ garage door and other myQ-enabled device support for Homebridge. homebridge-myq is a Homebridge plugin that makes myQ-enabled devices available to Apple's HomeKit smart home platfor