Tag Archives: Home Automation

Turning a Vobot Mini Dock into a Home Assistant Office Display

I have a Vobot Mini Dock on my desk, right next to the office lights I wanted to control as they are currently only wifi connected with no physical switch. It already has a little screen and a wheel I can reach without getting up. Surely I could give that wheel a better job than scrolling through menus?

Vobot already has a Home Assistant app in its gallery. That got me thinking about what I actually wanted on my desk. Four lights, a few other office devices, today’s weather and a quick look at how much power the office strip was drawing. A couple of USB cables and three small fixes later, turning the wheel moves down my office list and pressing it switches the selected light. Vobot Mini Dock · Home Assistant in the Vobot App Gallery

Office Display showing outdoor weather, room temperature, power draw and four lights, with String Lights selected.
Office Display on the Mini Dock.

What fits on a two-inch screen?

Four rows, as it turns out. The dock already has a separate LED clock, so I used the top-right corner for current outdoor conditions and temperature from Home Assistant. The room temperature and current watts sit underneath. Turn the wheel and the highlight moves. Keep turning and the list scrolls. A short press turns the selected light on or off, and the app reads the state back from Home Assistant. If an entity is unavailable, the row says N/A. The rest of the screen carries on updating.

The Office Display screen up close, with live data.
The display up close, with live data.

I made the desk outlets and air conditioner optional. Those ask for a second press, with Back cancelling the action. The air conditioner uses its Home Assistant climate entity, which lets me switch HVAC mode without cutting power at the wall. The large number next to Office is watts from my office power strip, so it reflects whatever is plugged into that strip.

The Desk Plugs row selected and awaiting a second press to turn it off.
Office equipment takes a second press. The counter shows where you are in the list.

Build your own

You need a Mini Dock running the LVGL 9 firmware generation, a USB-C data connection to your computer, and a Home Assistant server the dock can reach on your local network. I installed mine from a Mac. Thonny gives you a file browser for the Mini Dock’s MicroPython filesystem. Vobot’s developer setup guide · Thonny

1. Pick the devices

Download and extract the source bundle. In Home Assistant, open Settings → Tools → States to find the entity IDs you want. Copy the ID exactly. A plug’s friendly name can change while its entity ID still refers to whatever used to be plugged into it. Open Office Display/__init__.py and replace the example pairs in LIGHTS with your own display labels and IDs. Start with a single light.* or switch.* that you can see from the desk. Download the Office Display source ZIP · Home Assistant Developer Tools

LIGHTS = (
    ("Desk Lamp", "light.desk_lamp"),
    ("Shelf Lights", "switch.shelf_lights"),
)

EQUIPMENT can hold extra light.* or switch.* entities. Set it to () if you have none. Set CLIMATE to a climate.* entity with a current_temperature attribute and TEMPERATURE_UNIT to F or C to match Home Assistant. Set POWER to a sensor that reports its state in watts. Set WEATHER to a weather.* entity for outdoor conditions and temperature. Leave any of these feeds as None to hide its reading. If you expose the climate control, choose an entity that supports climate.turn_on and climate.turn_off. Home Assistant climate actions · Home Assistant weather entities

2. Get the app onto the dock

  1. On the Mini Dock, go to Settings → Miscellaneous → Experimental Features → Developer Mode and enable it.
  2. Disconnect power until the display goes dark. Connect the computer to the side USB-C port marked COMPUTER with a data cable and restore power.
  3. Open Thonny, select the MicroPython (ESP32) interpreter and the dock’s serial port, then open View → Files.
  4. Open /apps in the device pane and upload the whole Office Display folder. The device should have /apps/Office Display/__init__.py and /apps/Office Display/manifest.yml.
  5. Press Ctrl+D in the Thonny shell to resume or restart the dock. Look for Office Display in the app menu.

The bit that caught me out was USB. My first connection showed a USB Billboard device on the Mac, but the MicroPython console never answered. A different data cable gave me an ESP32 serial port straight away. Check for a MicroPython prompt before spending any time debugging your Python. Vobot’s USB port diagram

3. Point it at Home Assistant

  1. Create a dedicated long-lived access token in your Home Assistant user profile under Security.
  2. On the dock, open Settings → Application Settings and stay on that screen. Enter the address shown on the dock in a browser on the same network, then choose Office Display.
  3. Enter the local Home Assistant base URL, including the port if needed, and paste the token into the app’s settings. Use the Home Assistant address here. The address on the dock’s screen is where you configure the app. Choose Lights and extra equipment if you want those rows too, then save.
  4. Leave settings, open Office Display, wait for the state to appear, and give your test light a short press. Watch the light and the row on the display. Press again to return it to its starting state.

The included build uses HTTP for setup and API traffic. Use it on a trusted private network and keep the token in the dock’s settings. If Home Assistant offline appears, check that the dock’s Wi-Fi can reach the Home Assistant host and port. If the display shows N/A for a single row, check that entity in Home Assistant first. Home Assistant authentication · Vobot app settings

The bits of code that mattered

The Mini Dock runs MicroPython and LVGL. The app polls Home Assistant’s GET /api/states/<entity_id> endpoint and sends an explicit turn_on or turn_off to the selected entity’s domain. It reads the state again after the command. That means the row reflects what Home Assistant reports, even when a device is slow to respond. Home Assistant REST API

The first launch stopped at “Running Office Display”. The USB log gave it away. The firmware calls on_boot with a keyword named apm, so the callback needs to accept that exact name. Once the screen came up, the wheel still did nothing until I put it in LVGL’s input group and gave it focus. Turning the wheel and pressing it took separate fixes. On my dock, wheel turns came through as key events, and the short press needed its own SHORT_CLICKED handler. Vobot app manager · LVGL 9.1 input handling

async def on_boot(apm):
    global app_mgr
    app_mgr = apm


def on_dial(event):
    if screen is None:
        return
    if event.get_code() == lv.EVENT.SHORT_CLICKED:
        screen.on_press()
    else:
        screen.on_key(event)

The full app in the ZIP includes the focus handling, settings form, state refresh, and confirmation flow. Start with the light nearest your monitor. Once that works in both directions, add the rest of the room.