If you know Home Assistant and ESPHome
ThingStudio puts a microcontroller board in Home Assistant as a device, the way an ESPHome node appears there. The difference is how the board is programmed: you build a flow in a node-based editor and deploy it to MicroPython on the board, instead of writing YAML and building firmware.
How a board reaches Home Assistant
A flow places one ha device node and an entity node for each thing Home Assistant should see. On deploy, the board joins your WiFi, connects to your MQTT broker and announces itself through MQTT discovery. Home Assistant lists it under Settings → Devices & services → MQTT, as one device with its entities.
The connection is MQTT, so you need a broker (the Mosquitto broker add-on is the usual one) and Home Assistant's MQTT integration. Home Assistant walks through both.
Entities are nodes
The entity types are sensor, binary sensor, switch, number, select and button, each a node in the palette's home assistant group. Their properties are the ones you know from Home Assistant: name, device class, unit, state class, icon.
- Into Home Assistant: wire a value into an entity node's input, and it becomes the entity's state.
- Out of Home Assistant: a switch flipped, a number set or a button pressed in Home Assistant comes out of the
entity node as a message. Wire it to what it controls, such as a
gpio outdriving a relay.
Each entity's on start setting gives it a known state when the flow starts, including restore for the last
value it showed. See Showing a value from the start.
Logic runs on the board
What ESPHome does with automations and lambdas, a flow does with wires: a sensor reading through a function node
to a threshold, a button press to a delay to a relay. Function nodes run Python, and a message is a dict with its
value in msg['payload']. When the board goes offline, its
entities show as unavailable in Home Assistant.
No firmware build for each change
MicroPython goes on the board once. Deploy compiles the flow on your computer and sends it to the board over USB or WiFi, and the board swaps it in. Changing the flow and trying it again takes seconds, with no toolchain on your computer. Some boards take a custom MicroPython image, flashed once like any other.
Python is slower than C and uses more memory. That's fine for sensing, switching and networking, and the wrong tool for tight timing such as high sample rates.
Limits
- One ha device per flow, so one Home Assistant device per board.
- The discovery message, which describes every entity, can be at most 4 KB. Compile says so when a flow goes over.
- The nodes cover the board's own entities. A flow doesn't read the state of other Home Assistant entities.
Which boards have been tested is on Supported hardware.
Next: getting started, then Home Assistant.