<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd" -->

---
title: I wrote an API client for my water-cooled bed | daily.dev
description: A software engineer built a CLI API client called `bedctl` in Zig for controlling a Sleep.me Chilipad 2.0 water-cooled bed. The post covers the motivation...
canonical: https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I wrote an API client for my water-cooled bed | daily.dev
og:description: A software engineer built a CLI API client called `bedctl` in Zig for controlling a Sleep.me Chilipad 2.0 water-cooled bed. The post covers the motivation...
og:url: https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd
og:image: https://api.daily.dev/og/posts/GjieDQJjD.png
og:image:alt: I wrote an API client for my water-cooled bed
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I wrote an API client for my water-cooled bed

**[Lobsters](https://daily.dev/sources/lobsters)** · 23 min read · 0 upvotes · 0 comments

## Summary

A software engineer built a CLI API client called `bedctl` in Zig for controlling a Sleep.me Chilipad 2.0 water-cooled bed. The post covers the motivation (ADHD, autism, temperature regulation issues, hot Portland apartment), a walkthrough of the Sleep.me REST API (two endpoints, GET/PATCH device control), and the implementation details of the Zig library including data structures with anonymous enums, HTTP client usage via `std.http.Client`, and plans for a C-interface dynamic library for use from higher-level languages like Python. The author also shares early impressions of the device itself.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tinkering.xyz/bedctl>

## Similar posts on daily.dev

- [An iroh powered smart fan](https://daily.dev/posts/an-iroh-powered-smart-fan-ro0cnn291) · Hacker News · 1 upvotes · 0 comments
- [A More Convenient IButton Reader](https://daily.dev/posts/a-more-convenient-ibutton-reader-fvtar4pid) · Hackaday · 0 upvotes · 0 comments
- [I tried Anthropic's open-source desk pet on an ESP32, and it fixes the most annoying thing about Claude](https://daily.dev/posts/i-tried-anthropic-s-open-source-desk-pet-on-an-esp32-and-it-fixes-the-most-annoying-thing-about-cla-sdv3thxtw) · XDA Developers · 0 upvotes · 0 comments
- [High Temperature](https://daily.dev/posts/high-temperature-gnfbioeau) · The Daily WTF · 0 upvotes · 0 comments

---

Tags: [#iot](https://daily.dev/tags/iot), [#cli](https://daily.dev/tags/cli), [#rest-api](https://daily.dev/tags/rest-api), [#zig](https://daily.dev/tags/zig)

[View this post on daily.dev](https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I wrote an API client for my water-cooled bed","url":"https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd"},"datePublished":"2026-07-20T14:20:23.341Z","dateModified":"2026-07-20T14:20:45.313Z","description":"A software engineer built a CLI API client called `bedctl` in Zig for controlling a Sleep.me Chilipad 2.0 water-cooled bed. The post covers the motivation...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-wrote-an-api-client-for-my-water-cooled-bed-gjiedqjjd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"iot,cli,rest-api,zig","timeRequired":"PT23M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"I wrote an API client for my water-cooled bed"}]}
```

