🐢

The Pidog Router

a robot dog with a brain that knows when to think small, think big, or phone home

This guide explains β€” in plain language β€” how a SunFounder Pidog is wired to a little "router" program that decides, for every single thing you say, the smartest and cheapest way to answer it. No jargon required.

πŸ—£οΈ Voice in & out 🧠 3 AI brains 🦴 Real movement πŸ“· Vision 🏠 Smart home πŸ”Ž Web search
The big picture

Two computers, one dog

The Pidog itself is a small Raspberry Pi computer. It's great at listening, talking, moving, and seeing β€” but it isn't powerful enough to run a serious AI. So it hands the thinking to a second computer (a Mac) running the Router. They talk over your home Wi-Fi.

🐢 Pidog (Raspberry Pi) on your Wi-Fi 🎀 microphone πŸ”Š speaker πŸ“· camera 🦿 servos & sensors 🐍 pidog_voice.py 🧭 Router (Mac) port :8000 Β· router.py decide where to send it FAST Β· 3B model on the Mac Β· chit-chat SMART Β· 7B model on the Mac Β· reasoning CLOUD Β· Claude API internet Β· hard questions HOME Β· Home Assistant another Pi Β· your devices your words the answer
The Pidog captures speech and sends the text to the Router. The Router picks one of four destinations, gets an answer, and sends it back for the dog to speak β€” and act on.
The brains

Three AI "brains" plus your smart home

Not every question deserves the same effort. Asking "who's a good boy?" shouldn't cost money or wait on the internet. The Router keeps a ladder of options and climbs it only as far as a question needs.

FAST β€” a small local model

A compact 3-billion-parameter model (Qwen2.5-3B) running right on the Mac. Instant, free, private. Handles greetings, jokes, quick chit-chat.

SMART β€” a bigger local model

A 7-billion-parameter model (Qwen2.5-7B), also on the Mac. Slower but better at reasoning: "why", "how does", "compare", "explain". Still free and private.

CLOUD β€” Claude, over the internet

Anthropic's Claude models via the API. Reserved for the hard stuff: current events, long or expert answers, and anything needing a web search. Costs a little per use, so it's used sparingly.

HOME β€” Home Assistant

Not an AI at all β€” your existing smart-home hub. "Turn off the kitchen" is sent straight here so it controls the lights and speaks the confirmation back.

BrainLivesGood forSpeedCost
FAST (3B)Macchit-chat, quick repliesvery fastfree
SMART (7B)Macreasoning, explanations~20 words/secfree
CLOUD (Claude)internetcurrent events, expertise, searchfast, has network hoppennies
HOME (HA)your hublights, locks, thermostatsinstantfree
Automatic fallback. If a chosen brain is unavailable (a model isn't running, the internet is down, the smart home doesn't recognise a command), the Router quietly tries the next option and tells you what it did. The dog never just goes silent.
The decision

How it chooses, in a blink

The Router reads your words and checks them against simple rules β€” key phrases and length β€” before any AI is even involved. This costs microseconds and keeps easy things cheap.

you speak β€œturn off / lock / dim …” β†’ HOME β€œlatest / today / weather”, long β†’ CLOUD (may web-search) β€œwhy / how / explain / compare” β†’ SMART (7B) everything else, short β†’ FAST (3B) A camera photo attached? always β†’ CLOUD (only it can see) A direct command like β€œsit”? handled on the dog itself β€” no AI
Simple keyword & length rules pick a destination first. You can also force one, or set the whole dog to "always use CLOUD" for a setup with no local models.
Voice

Ears and a mouth

All the listening and speaking happens on the Pi. Each half has options so you can trade convenience against privacy and quality.

πŸ‘‚ Speech β†’ text (hearing)

Google (default) β€” accurate, needs internet.
Vosk β€” fully offline, private.
Home Assistant β€” use your HA voice engine (e.g. Whisper).

πŸ—£οΈ Text β†’ speech (talking)

Local (default) β€” the Pidog's built-in voice, free & offline.
ElevenLabs β€” a far more natural cloud voice.
Home Assistant β€” HA's Piper/cloud voices.

Streaming speech. The dog doesn't wait for the whole answer. As the AI writes, the Router sends text over as it appears; the dog speaks each sentence the moment it's finished while the rest is still being written. A long, web-searched answer starts coming out of the speaker in a second or two instead of after a long silence.
Movement

Making the dog actually move

Talking is only half a robot dog. There are two ways it physically acts.

⚑ Direct commands

Say a plain command β€” sit, come, shake hands, turn left β€” and the dog does it instantly, without asking any AI at all. Works even if the internet and the Mac are off. Rock-solid and fast.

🧠 AI-chosen actions

For anything conversational, the AI can attach a hidden action to its reply. Ask it to "pretend you're sleepy" and it might yawn a sentence and lie down. It can even chain a short routine β€” turn, walk, sit β€” in one go.

Do a little routine for me β€” turn around and then sit.
Woohoo, routine time! Turning, then plopping into a sit like a good pup! 🐾
cloud Β· claude Β· performs: turn_left β†’ forward β†’ sit
Behind the scenes the AI adds a tiny tag like [[action:turn_left,forward,sit]] to its reply. The Router removes that tag before the dog speaks (so it's never said aloud) and passes the moves to the Pi to perform in order. Unknown moves are ignored safely β€” a bad guess never crashes the dog.
Vision

β€œWhat do you see?”

Ask the dog what it sees and it snaps a photo with its camera, sends the picture along with your question, and describes what's in front of it. Because only Claude can look at images, vision questions always go to the CLOUD brain automatically.

πŸ“· What do you see?
I see a red ball on the wooden floor, and a person's sneakers just past it! Fetch? 🎾
cloud Β· claude Β· πŸ“· photo sent with the question

Trigger phrases include "what do you see", "who is this", "what am I holding", and "take a look". Any other time, the camera stays off.

Reaching outside

The smart home & the whole web

🏠 Home Assistant

If you run Home Assistant, commands like "turn off the kitchen" are forwarded to it. HA does the understanding β€” it already knows your rooms and devices β€” then acts and hands back a spoken reply. If HA doesn't recognise the phrase, it quietly falls through to the AI instead.

πŸ”Ž Web search

The CLOUD brain can search the web on its own. Ask for the weather or today's news and Claude decides by itself to look it up, then answers with live information. You don't program the "when" β€” it just knows. (Local models can't search, which is another reason those questions route to the cloud.)

What's the weather right now?
Woof! It's mostly cloudy and 56Β° right now β€” sweater weather, not shorts weather! 🐾
cloud Β· claude Β· πŸ”Ž searched the web
Personality

Instincts & idle life

Some behaviours don't involve thinking at all β€” they're reflexes, just like a real dog, and run quietly in the background on the Pi.

πŸ–οΈ Head pat

Touch its head and it wags its tail β€” instantly, no AI.

πŸ‘‚ Loud sound

Tilts its head curiously toward an unexpected noise.

🧱 Obstacle

Refuses to walk into something close ahead β€” barks instead of bumping.

Idle behaviours. Left alone for a while, the dog stretches, dozes off, or wags on its own, so it feels alive rather than switched-off. All movement β€” commands, reflexes, idle β€” is coordinated so the dog never tries to do two things at once.
Start to finish

The journey of one question

  1. You speak. The Pi's microphone captures it and turns it into text.
  2. Quick check. Is it a direct command like "sit"? Do it now, done. A camera question? Take a photo.
  3. Ask the Router. The Pi sends the text (and photo, if any) over Wi-Fi to the Mac.
  4. Choose a brain. The Router matches keywords & length β†’ FAST, SMART, CLOUD, or HOME.
  5. Get the answer β€” searching the web or attaching an action if the moment calls for it.
  6. Speak & move. The dog talks sentence-by-sentence as the answer streams back, then performs any actions.
  7. Log it. Every exchange appears on a live dashboard so you can watch what happened and what it cost.
Watching it work

The live dashboard

Open http://<your-mac>:8000/dashboard in any browser on your network to see a running feed of every question: which brain answered, how fast, how many words, the estimated cost, any moves performed, and the full conversation. It updates every couple of seconds β€” handy for tuning and genuinely fun to watch.

fast smart cloud home
Under your control

Turn things on and off

Every major feature is a simple switch in a settings file (.env). A few examples:

SettingWhat it does
CLOUD_MODELWhich Claude model to use (cheaper Haiku vs. smarter Sonnet).
CLOUD_WEB_SEARCHLet the cloud brain search the web. 0 to turn off.
ROUTER_DEFAULT_ROUTESend everything to one brain β€” e.g. cloud if you run no local models.
PIDOG_ACTIONSAllow the AI to move the dog. 0 for a text-only setup.
STREAM_TTSSpeak sentence-by-sentence as the answer generates.
PIDOG_CAMERA Β· PIDOG_REFLEXES Β· IDLE_MINUTESVision, reflexes, and idle behaviours.
Two people can share the exact same code but behave completely differently β€” one with local models and a real dog, another bypassing all of that to use only Claude in the cloud β€” just by changing their own private settings file.