Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calvinmclean/stagg-ekg-plus
Python for interacting with the Fellow Stagg EKG+ Electric Kettle
https://github.com/calvinmclean/stagg-ekg-plus
Last synced: 2 months ago
JSON representation
Python for interacting with the Fellow Stagg EKG+ Electric Kettle
- Host: GitHub
- URL: https://github.com/calvinmclean/stagg-ekg-plus
- Owner: calvinmclean
- License: mit
- Created: 2020-02-03T02:14:05.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-02T23:40:18.000Z (about 3 years ago)
- Last Synced: 2023-03-06T19:16:58.222Z (almost 2 years ago)
- Language: Python
- Size: 12.7 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stagg EKG Plus
This project uses Python to communicate with the [Fellow Stagg EKG+]() over BLE. A lot of the information used to create this program came from [this post](https://www.reddit.com/r/homeassistant/comments/ek47k2/ble_reverse_engineering_a_fellow_stagg_ekg_kettle/) and additional testing I performed.This is intended to be used with Homebridge and [my `homebridge-kettle` plugin](https://github.com/calvinmclean/homebridge-kettle).
## Getting Started
Currently, the only change that should be needed is changing the `MAC` variable in `api.py`. I plan to add something with a configuration file or environment variable to make this simpler.Before running you will need to [install `bluepy`](https://github.com/IanHarvey/bluepy).
## Systemd
I run this on a Raspberry Pi alongside Homebridge, so I cloned this repo at `/root/stagg-ekg-plus` and setup this Systemd Service file to easily handle restarts and log to `syslog`:
```
[Unit]
Description=Python 3 API for Stagg EKG+
After=syslog.target network-online.target[Service]
Type=simple
User=root
ExecStart=/usr/bin/python3 -u /root/stagg-ekg-plus/api.py
Restart=on-failure
RestartSec=10
KillMode=process
StandardOutput=syslog
StandardError=syslog[Install]
WantedBy=multi-user.target
```## More Info
These are some `gattool` commands that were really useful when figuring this stuff out:
```bash
gatttool -b $KETTLE_MAC -I
# connect, authenticate, and turn on then off
> connect
> char-write-cmd 0x000d efdd0b3031323334353637383930313
> char-write-cmd 0x000d efdd0a0000010100
> char-write-cmd 0x000d efdd0a0400000400# subscribing
> char-write-req 0x000e 0100
> char-write-cmd 0x000d efdd0b3031323334353637383930313233349a6d
```