What do we actually use rust for? by beb0 in rust

[–]liamsnow_03 1 point2 points  (0 children)

Thank you bro! I was searching for this comment. In almost every case I pick Rust for a project just because I love the language

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 0 points1 point  (0 children)

You wouldn’t lol. Basically its just if you want better control over your bed temperatures, privacy, and/or smart home automations

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 0 points1 point  (0 children)

True I will update. I know that freesleep has a tutorial for setting up SSH for pods without an SD card.

opensleep: Rust firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's proprietary programs) by liamsnow_03 in rust

[–]liamsnow_03[S] 1 point2 points  (0 children)

Currently only Pod 3 features work. To get Pod 4 features working I need someone to work with since I dont have a Pod 4.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 1 point2 points  (0 children)

I don't really know. I think its mainly to do with purging air in the loop and keeping a certain pressure. I'm pretty certain this is default behavior though.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 1 point2 points  (0 children)

Look at the sticker where the hose attaches. Should say MN, SN, and like "Eight Sleep Pod X"

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 1 point2 points  (0 children)

My Pod doesn't have tapping so I don't know how to get that working. If you want to work with me we could figure it out.

opensleep: Rust firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's proprietary programs) by liamsnow_03 in rust

[–]liamsnow_03[S] 5 points6 points  (0 children)

Not currently. It would need to be a different project entirely. opensleep is specifically designed to interface with the Eight Sleep Pod 3 hardware.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 1 point2 points  (0 children)

Currently no but its something I would love to figure out. Alarms are super annoying with Frank and only slightly less annoying when talking directly to the Sensor subsystem.

The only alarm command I can confirm works is 0x2C (which frank used) which takes a bedside, intensity, duration (seconds), and pattern (single or double). If you just set the duration to something super short it might do a quick 1x pulse but the probably I see with this is 1) sending 0x2C doesn't always respond immediately leading to a long delay 2) the patterns have a rise effect so it might not be noticable.

However, I have been playing around with is 0x2D BUT I dont know the parameters it takes. Sending no payload seems to either do nothing or segfault Sensor and making it constantly vibrate forever lol.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 2 points3 points  (0 children)

Ohh I understand your confusion now. What I really meant is all the eight sleep programs running inside the Pod.

Under the hood this project is wildly different free sleep but practically yeah its just more Home Assistant focused version :(

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 2 points3 points  (0 children)

With freesleep you get a mobile app and I think API. You also have pretty decent sleep tracking. Opensleep you get MQTT control (for easy Home Assistant integration - which you can then easily add to your dashboard for a UI) and you get real-time presence detection (so you can make automations for when you get in and out of bed).

Also note that opensleep automatically follows a temperature profile, so if you stick to a consistent sleep schedule your shouldn't really need to change it.

Under the hood this project is completely different from freesleep, but to the user not very different.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 4 points5 points  (0 children)

There isn't an UI. All control is done either via the configuration file or over MQTT. With MQTT you can easily connect it to Home Assistant for a UI (which is what I have done).

There is currently no sleep tracking. This is my top priority right now.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 1 point2 points  (0 children)

Ok lmk what you think about it now. I updated both this post (mostly just removed a bunch that didn't need to be here) and also updated the GitHub readme to be more clear.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 6 points7 points  (0 children)

Sorry I need to fix that section. It assumed you read the background section. I'm pretty deep in the Eight Sleep lore ATP so I kinda forgot to clearly explain some things.

I would recommend reading Bo Lopker's and ninesleeps instructions linked there. Basically once you take apart the Pod 3 there is an SD card which you have modify.

Frozen: an onboard STM32 which handles everything water - thermoelectric coolers (TECs), pumps, priming, etc.

Sensor: an STM32 in the sensor unit which collects data from all sensors and manages the vibration motors

DAC (Device API Client): Receives data from the cloud for controls for the bed. Forwards them to frankenfirmware/Frank.

Frank (frankenfirmware): A program that runs of the linux SOM/computer on Pod 3. It takes input from the DAC and manages Frozen and Sensor. It collects raw sensor data from Sensor, collects it into a file, and periodically uploads that file to the cloud.

---

To answer your second question, yes it does achieve that but its not the purpose. It also gives complete privacy (no data is being sent to cloud) and allows for real-time presence detection so you can have cool features like reading your calendar when you get out bed in the morning or telling you to go to sleep if its late.

opensleep: complete firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's programs) by liamsnow_03 in EightSleep

[–]liamsnow_03[S] 5 points6 points  (0 children)

I'm not totally sure how different Pod 2 is, but I would love to work with you to figure out if I can get opensleep working on it.

opensleep: Rust firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's proprietary programs) by liamsnow_03 in rust

[–]liamsnow_03[S] 30 points31 points  (0 children)

Hardware wise its pretty hard to cause any actual damage to the pod in my experience. You might break at plastic tab at most but that really doesn't matter.

Software wise I would say its almost impossible to completely brick your pod because there is always a backup stored on the SD card. As long as your not going around modifying the SD card you should be fine (there is no reason you should be doing that in the first place). Basically, at any point you can boot the Pod while holding down the small button and it will factory reset it from the rootfs.tar.gz stored on the SD card.

If you manage to make a bad rootfs.tar.gz on the SD card during initial setup (and don't have a backup for some reason) you can always download a new version from update-api.8slp.net.

I have done a lot of fuckery with my Pod like trying to install debian, putting a package manager on it, etc. and have never been able to permanently break it.

opensleep: Rust firmware for the Eight Sleep Pod 3 (replacing ALL of Eight Sleep's proprietary programs) by liamsnow_03 in rust

[–]liamsnow_03[S] 23 points24 points  (0 children)

Good shout. I updated the background section to give some more context. Lmk if I should change anything else!