Skip to content

Latest πŸ—žοΈ

Tuesday, September 1

Git Commits

dash commits 1 ohnsh/dash
  • 7:24 pm β€” John Sherrell <dev@ohn.sh>

    next: home route now renders all 'quad' clips instead of only those with speech. Add 'use cache' to `fetchInventory`, which necessitates a minor refactor so that it's not in the import path of any client component. Now, dash-video.ts is limited to defining the DashVideo type and providing synchronous helpers for it. New r2.ts for `fetchInventory` (which returns `DashVideo[]`).

YouTube

Friday, August 28

Git Commits

dev commits 1 ohnsh/dev
  • 11:22 pm β€” John Sherrell <dev@ohn.sh>

    cam: new 'readers' command in mmtx-ctrl.sh

dash commits 2 ohnsh/dash
  • 5:57 pm β€” John Sherrell <dev@ohn.sh>

    next: videoPromise bug now fixed; the video is fetched and resolved regardless of when thumbnail strips are visible.

  • 4:57 pm β€” John Sherrell <dev@ohn.sh>

    next: dumb fix for the videoPromise bug by adding a 3-second timeout to the promise. A good solution will involve fetching the exact inventory needed to find the video.

Thursday, August 27

Git Commits

dash commits 4 ohnsh/dash
  • 8:48 pm β€” John Sherrell <dev@ohn.sh>

    next: paginate thumbnail strips on non-date routes. (I may adapt it so on date routes it simply bumps the date forward or backward.) Page state is tracked in the query string, which makes views linkable and keeps fetching on the server. (For now--since this is a live feed, asynchronously refreshing thumbnails on the client is the logical behavior.) Got some practice with tailwind, generating loading skeletons.

  • 12:45 pm β€” John Sherrell <dev@ohn.sh>

    next: cleaned up some debugging code I forgot about in sensor-chart, converted sensor data fetch from `unstable_cache` to `use cache`.

  • 12:00 pm β€” John Sherrell <dev@ohn.sh>

    next: enabled cache components, surfacing several issues due to stricter requirements to not block rendering the static shell. The fixes are somewhat superficial since I haven't reached a point where optimization makes much sense (everything can and will change in the coming weeks anyway). But anyway, it builds.

  • 5:01 am β€” John Sherrell <dev@ohn.sh>

    next: moved chart demo to ChartDemo component.

Wednesday, August 26

Git Commits

dash commits 1 ohnsh/dash
  • 9:52 pm β€” John Sherrell <dev@ohn.sh>

    next: more icon accessibility tweaks. Moved generic svg description from <title> to aria-label so that it doesn't override contextual link tooltip text.

itsa-me commits 1 ohnsh/itsa-me
  • 8:54 pm β€” John Sherrell <dev@ohn.sh>

    Switch in link to dash.ohn.sh, replacing scratch.ohn.sh Also bump dependencies and remove cssnano, which I don't still use.

days commits 1 ohnsh/days
  • 6:24 pm β€” John Sherrell <dev@ohn.sh>

    Add comments to Slideshow.astro component, add button:hover styles.

YouTube

Tuesday, August 25

Using a fake HomeKit switch to automate capturing real sensor data

of

In Apple Home, an action runs whenever the Homebridge dummy switch is "pressed" (every 15 minutes). The action sends a JSON payload to dashd (the backend server/database) consisting of HomePod sensor readings and a timestamp.
In Homebridge, the virtual switch is set to trigger every 15 minutes, and also to create a local webhook where it can be triggered on-demand.
Main settings panel for virtual switch in Apple Home.
Apple Home provides a settings panel for the Homebridge virtual switch, including actions that can be run on single press, double press, and long press.

UPDATE: Ouch, a tvOS/HomePod 27 bug breaks the automation. Sounds like a fix is coming in 27.2.

View full post…

Git Commits

days commits 5 ohnsh/days
  • 4:30 pm β€” John Sherrell <dev@ohn.sh>

    CE

  • 2:37 pm β€” John Sherrell <dev@ohn.sh>

    Minor post edit.

  • 11:17 am β€” John Sherrell <dev@ohn.sh>

    Remove Latest Streams section from /latest (default route). The component was pointing to YouTube live streams, which are getting stale.

  • 11:07 am β€” John Sherrell <dev@ohn.sh>

    Edit title of latest post and change to sentence-case to be consistent with other recent posts.

  • 11:00 am β€” John Sherrell <dev@ohn.sh>

    New post about homebridge/homekit automation to capture sensor data on schedule. Created a bare-bones Slideshow.astro component that uses Alpine.js for reactive state. Installed Astro Alpine integration. Bumped dependencies.

dash commits 5 ohnsh/dash
  • 9:50 pm β€” John Sherrell <dev@ohn.sh>

    next: social icon accessibility tweaks. Descriptive text now in a[aria-label], with the generic icon description in svg > title (ignored inside of aforementioned links).

  • 7:13 pm β€” John Sherrell <dev@ohn.sh>

    next: Tweak new icons.

  • 6:31 pm β€” John Sherrell <dev@ohn.sh>

    next: Add GitHub icon and link to project repository to sidebar.

  • 5:57 pm β€” John Sherrell <dev@ohn.sh>

    next: move my global styles into tailwind's base layer so they can be overridden by tailwind utilities.

  • 5:48 pm β€” John Sherrell <dev@ohn.sh>

    next: Add YouTube link to sidebar using Feather YouTube icon. Tweak global CSS so that global link style (accent color, underline) does not apply to links that contain an <svg>.

Monday, August 24

Git Commits

dash commits 5 ohnsh/dash
  • 7:54 pm β€” John Sherrell <dev@ohn.sh>

    vod: fix bug in video.sh in which a full path was used where a basename was appropriate (it had never been apparent because I basically always pass it files in the current directory).

  • 7:53 pm β€” John Sherrell <dev@ohn.sh>

    next: new ActionButton component that calls a server action in `startTransition` and displays a loading spinner.

  • 1:14 pm β€” John Sherrell <dev@ohn.sh>

    next: tweak scale of charts.

  • 5:19 am β€” John Sherrell <dev@ohn.sh>

    dashd: add CORS handling to new sensor GET route.

  • 12:06 am β€” John Sherrell <dev@ohn.sh>

    next: tweak front page, add revalidate button, limit chart data to last 24 hours (96 records).

Sunday, August 23

Git Commits

dash commits 9 ohnsh/dash
  • 10:51 pm β€” John Sherrell <dev@ohn.sh>

    next: chart demo now on home route. Add `headless` option to VODView to prevent it from rendering an empty player. Now used whenever there's no video specified in the query string on the home route.

  • 9:07 pm β€” John Sherrell <dev@ohn.sh>

    next: alternate implementation of SensorChart in which the server fetches the data and passes a promise down via props. Factor out the UI and provide the different implementations via wrappers SensorChartPromise and SensorChartEffect.

  • 6:01 pm β€” John Sherrell <dev@ohn.sh>

    next: fix types so project will build on vercel.

  • 5:50 pm β€” John Sherrell <dev@ohn.sh>

    next: move sensor demo up to /scratch/sensor

  • 5:48 pm β€” John Sherrell <dev@ohn.sh>

    next: playing with x-axis formatting. Ruled out stateful formatters that detect date changes. This relies on them being called in timestamp order, and it turns out they're not. Also creates stale closure risk.

  • 3:40 pm β€” John Sherrell <dev@ohn.sh>

    next: flexible grid layout for charts, bump font-size down, use "none" | "snap125" for `niceTicks` prop to solve most axis issues (they tend to render nice, round numbers).

  • 12:25 pm β€” John Sherrell <dev@ohn.sh>

    next: wrap charts in div and render optional title; handle explicit abort signal gracefully to prevent unhandled rejections.

  • 5:08 am β€” John Sherrell <dev@ohn.sh>

    next: new demo chart interface at /scratch/recharts/sensor that consumes the new dashd temperature/humidity sensor API and plots the data using Recharts.

  • 1:54 am β€” John Sherrell <dev@ohn.sh>

    dashd: Added /sensor prefix to tunnel route config. POST /sensor saves readings to the database, and GET /sensor queries the database. Query parameter loc=location_name limits queries to a specific location (e.g. 'encore_main'), and last=n limits results to the n most recent.