Using CUE to unify IoT sensor data

https://news.ycombinator.com/rss Hits: 7
Summary

I’ve been building a home automation system that processes motion sensor data from various IKEA Zigbee devices. Each sensor type sends a different data structure, and I needed to extract consistent information from all of them without sacrificing type safety.I spent a long time trying to make Home Assistant work for my setup. The visual automation builder felt limiting once I needed conditional logic beyond simple triggers, and writing automations in YAML became tedious. Adding complex logic like correlating motion across multiple rooms or applying time-weighted logic was difficult. I ended up fighting the system rather than solving the problem.My current home automation setup looks like this:┌─────────────┐ ┌─────────────┐ │ TRÅDFRI │ │ VALLHORN │ │ Sensor │ │ Sensor │ └──────┬──────┘ └──────┬──────┘ │ │ └────────┬───────┘ Zigbee │ ▼ ┌──────────────────┐ │ zigbee2mqtt │ │ (Zigbee bridge) │ └────────┬─────────┘ │ ▼ ┌──────────────────┐ │ MQTT Broker │ │ │ │ Topics: │ │ bedroom/motion │ │ hallway/motion │ │ kitchen/motion │ └────┬─────────┬───┘ │ │ │ │ JSON messages ┌───────┘ └───────┐ ▼ ▼ ┌──────────────┐ ┌──────────────┐ │ Node-RED │ │ Home │ │ │ │ Assistant │ │ - Visual │ │ │ │ flows │◄────►│ - Visual │ │ - Custom │ │ automata │ │ logic │ │ - YAML │ └──────────────┘ └──────┬───────┘ │ │ HTTP API ▼ ┌──────────────────┐ │ Philips Hue Hub │ │ │ │ ┌────┐ ┌────┐ │ │ │Bulb│ │Bulb│ │ │ └────┘ └────┘ │ │ │ │ ┌──────┐ │ │ │Sensor│ │ │ └──────┘ │ └──────────────────┘ With Home Assistant and Node-RED handling some of my automation logic, and controlling devices through various hubs like Philips Hue. This works for many people, but I wanted more control and flexibility that I knew I could get with a custom Go service. I could build exactly what I wanted with the language I already knew.I’m building a Go service to replace this entire automation layer—Home Assistant, Node-RED, and the device-specific hubs. The service subscribes directly to MQTT topics where zigbee2mqtt publis...

First seen: 2025-10-18 19:58

Last seen: 2025-10-24 19:39