This is an educational project for hobbyists and is not intended to be a commercial product. It is provided as-is without warranty. Modifying your pod may void your warranty with eight sleep and could potentially brick your device if done incorrectly. Use at your own risk.
Also, this repo has not undergone any testing beyond myself. Open an issue if you run into issues or have code or documentation suggestions.
This repo allows one to control the eight sleep pod 2 completely locally and offline. This is achieved by modifying the firmware and creating a compatibility layer for free-sleep to work with the pod 2.
The firmware is modified to:
- connect to a local control server instead of the eight sleep cloud
- replace the pinned server certificate with a certificate generated by the user
- disable the external dns servers, allowing for local dns resolution only
- optionally change the api and logging ports (default 5683 and 1337 respectively)
The repo also includes a control server that will:
- handshake and relay commands to the pod 2
- accept the logging stream from the pod 2 and write it to RAW logging files
- emulate the pod3 unix socket for use with free-sleep
Lastly, the repo includes a docker-compose file that runs free-sleep in a simulated pod3 environment. Free-sleep has access to the emulated unix socket as well as the RAW log files.
- Viewing/setting temperature
- alarms
- changing brightness
- priming
- biometrics
Follow the instructions in FirmwareTools/Readme.md to modify your pod
Big thank you to the following:
- Free-sleep team for making their excellent UI
- ThrowawayUsernameRE on reddit for their research into the firmware header structure and other initial research notes
- Particle IoT for open sourcing their Spark firmware and protocol and keeping the repo available
I love staring at ghidra as much as anyone else, but those above saved me countless (additional) hours of reverse engineering time and UI development 🙏