whatisgithub

What is sorta-modular-examples?

hezi/sorta-modular-examples — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · developerComplexity · 2/5Setup · moderate

In one sentence

Sample code showing how to build Custom URL widgets for the Sorta Modular Pebble Time 2 watchface, including a Home Assistant integration.

Mindmap

mindmap
  root((Sorta Modular examples))
    What it does
      Custom URL widgets
      Fetch JSON, render on watch
    Tech stack
      Node.js
      Python
      Home Assistant
    Use cases
      Reference server
      Home Assistant widgets
    Audience
      Pebble Time 2 owners
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a custom JSON endpoint to show data on a Sorta Modular watchface

USE CASE 2

Show Home Assistant sensor data on a Pebble Time 2 watch

USE CASE 3

Learn the Custom URL widget templates by example

What is it built with?

Node.jsPythonHome AssistantJSON

How does it compare?

hezi/sorta-modular-examples0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity2/52/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a Pebble Time 2 running Sorta Modular, plus Node.js or a Home Assistant instance.

So what is it?

This repository holds example code for building custom widgets on Sorta Modular, a modular smartwatch face made for the Pebble Time 2. Sorta Modular supports something called a Custom URL complication: a small slot on the watchface that can fetch a tiny piece of JSON data from any web address you control, then display it using the same built in renderers the watchface already uses for other widgets, such as text, gauges, columns, lines, and timelines. The full specification for these widgets, including templates and the JSON schema they follow, lives in separate documentation linked from the README rather than in this repository itself. This repo focuses purely on working sample integrations that show the idea in practice. Two examples are included. The first, custom-url-service, is a very small Node.js server with no external dependencies that demonstrates every supported widget template, including text, gauges, columns, lines, a text area, and timelines, plus a couple of examples of how error responses should look. It is described as the best starting point for anyone who wants to write their own custom endpoint from scratch. The second example, home-assistant, is a custom integration for Home Assistant, the open source home automation platform. It exposes entities from a Home Assistant setup, such as sensors or switches, as widget endpoints reachable over a local network. Any number of widgets can be defined this way, each with its own URL, so different watch faces or slots can each show a different piece of home data, like a thermostat reading or a light's status. Together the two examples cover both a bare-bones reference server for developers building something custom, and a ready-made integration for people who already run Home Assistant and want their smartwatch to reflect their home data. The project is written in Python according to its repository metadata, alongside the JavaScript used in the Node example.

Copy-paste prompts

Prompt 1
Help me run the custom-url-service Node example from hezi/sorta-modular-examples locally.
Prompt 2
Show me how to add a new Home Assistant entity as a Sorta Modular widget.
Prompt 3
Explain the JSON format used by Sorta Modular's Custom URL complications from these examples.

Frequently asked questions

What is sorta-modular-examples?

Sample code showing how to build Custom URL widgets for the Sorta Modular Pebble Time 2 watchface, including a Home Assistant integration.

What language is sorta-modular-examples written in?

Mainly Python. The stack also includes Node.js, Python, Home Assistant.

How hard is sorta-modular-examples to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is sorta-modular-examples for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.