Unless you’ve been under a rock in the last few weeks – you’ll be at least vaguelly aware of China’s DeepSeek AI -by all accounts – SERIOUS competition for OpenAi’s ChatGPT and other current AIs.
I’ve spent quite some time playing with DeepSeek now and I have some good news and some not-so-good news for you:
DeepSeek is good – as a simple example – several YouTubers out there have given it some requests to produce Python code. One such YouTuber asked it to produce code for an Arduino board to handle a strip of WS2812b LEDS and added 2 buttons – one to turn the LEDS on/off, the other to sequence through a standard set of colours, one colour change per keypress. “Garage Tinkering” produced a long, detailed YouTube video and I’ll link the YouTube video here. You will be impressed, firstly as he’s a good orator and secondly by the detail into which Deepseek described what it was doing and why.
In summary, not at all complex, this code has to initialise the WS2812b strip, initialise button states, produce a table of “standard” colours, debounce buttons as needed and accept button presses to trigger simple actions on the WS2812b strip. DeepSeek produced the code and was VERY verbal in explaining its “thinking” while developing the code. In the end Deepseek produced code that at first sight didn’t work. The Youtuber figured out that there was a bug in the button debounce code and asked DeepSeek to use a standard debounce library. That done, the code worked PERFECTLY with no other interaction – it just worked.
My Favourite Pub from Way Back
Others have asked for code fragments and had 100% success rate. I asked Deepseek to tell me about my favourite pub, the “Gib” (Gibraltar Rock) in Tynemouth, UK, a favourite haunt when I was in my teens.
I didn’t clarify and just asked it about “The Gib in Tynemouth”. The response was PERFECT. Not only that but Deepseek firstly answered saying “The ‘Gib’ in Tynemouth refers to the Gibbet, a historical structure used for displaying the bodies of executed criminals as a warning to others. What made the Gib in Tynemouth special was its prominent location at the entrance to the River Tyne…” – my fault for not clarifying I was talking about the pub. Once I clarified it gave a great description of the pub and the background including “Ah, you’re referring to The Gibraltar Rock pub, commonly known as “The Gib,” in Tynemouth! This historic pub is a beloved local landmark with a unique charm. What makes it special is its rich history, cozy atmosphere…” and much more.
If I didn’t know better I’d think I was speaking to a human and I’m so old and experienced, I used to play with “Eliza” decades ago – I even wrote a version out of boredom – ok it was useless but fun.
So far, So Good
And now for my first DeepSeek real success – Home Assistant under Debian which in turn would run under Windows WSL in Windows 11 Pro – here is a summary I requested after asking DeepSeek various questions, getting answers and getting the whole lot to work. Throughout, I assumed nothing and had DeepSeek do the lot for me.
But firstly – why? I didn’t want to dedicate an entire PC to Home Assistant -on the other hand my Raspberry Pi (house controller) is starting to slow down a bit so as I’m temporarily in the UK away from my normal IOT kit in Spain, I thought this might be a good, save way to learn on my new UK Windows 11 Pro mini-PC.
Home Assistant under Debian – on WSL for Windows
Firstly, let me say that generating this summary of code and assistance I asked for 2 days ago, took a while… it seems the world and it’s mother are using DeepSeek right now.
Certainly! Below is the updated step-by-step summary that includes setting up Node-RED and Mosquitto MQTT alongside Home Assistant under Docker in your Debian WSL instance, ensuring all services are accessible remotely using your PC’s IP address.
DeepSeek’s Solution…
Certainly! Below is the updated step-by-step summary that includes setting up Node-RED and Mosquitto MQTT alongside Home Assistant under Docker in your Debian WSL instance, ensuring all services are accessible remotely using your PC’s IP address.
Step 1: Set Up WSL on Windows 11
- Open PowerShell as Administrator and run:
wsl --install
This installs WSL and the default Linux distribution (usually Ubuntu).
- If WSL is already installed, ensure it’s updated to the latest version:
wsl --update
- Set WSL 2 as the default version:
wsl --set-default-version 2
Step 2: Install Debian from the Microsoft Store
- Open the Microsoft Store and search for Debian.
- Click Install to download and install Debian.
- Launch Debian from the Start menu and complete the initial setup (create a username and password).
Step 3: Install Docker in Debian WSL
- Update your Debian system:
sudo apt update && sudo apt upgrade -y
- Install Docker dependencies:
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
- Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- Add the Docker repository:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Install Docker:
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io -y
- Start and enable the Docker service:
sudo service docker start sudo systemctl enable docker
- Add your user to the
docker
group to run Docker commands withoutsudo
:
sudo usermod -aG docker $USER
Log out and log back in for this change to take effect.
Step 4: Install Home Assistant, Node-RED, and Mosquitto MQTT Under Docker
- Create a directory for your Docker setup:
mkdir ~/docker-services cd ~/docker-services
- Create a
docker-compose.yml
file:
nano docker-compose.yml
- Add the following content to the file:
version: '3' services: homeassistant: image: ghcr.io/home-assistant/home-assistant:stable container_name: homeassistant volumes: - ./homeassistant/config:/config ports: - "8123:8123" # Home Assistant web interface port restart: unless-stopped nodered: image: nodered/node-red container_name: nodered volumes: - ./nodered/data:/data ports: - "1880:1880" # Node-RED web interface port restart: unless-stopped mosquitto: image: eclipse-mosquitto container_name: mosquitto ports: - "1883:1883" # MQTT port volumes: - ./mosquitto/config:/mosquitto/config - ./mosquitto/data:/mosquitto/data - ./mosquitto/log:/mosquitto/log restart: unless-stopped
- Save the file (
Ctrl+O
,Enter
,Ctrl+X
). - Start the Docker containers:
docker-compose up -d
Step 5: Ensure Services Are Accessible Remotely
To access Home Assistant, Node-RED, and Mosquitto MQTT remotely using your PC’s IP address:
1. Find Your PC’s IP Address
- Open Command Prompt or PowerShell and run:
ipconfig
Look for the IPv4 address under your active network adapter (e.g., 192.168.1.x
).
2. Configure Port Forwarding on Windows
- Open PowerShell as Administrator.
- Forward the necessary ports:
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=8123 connectaddress=xxx.xx.xx.xx connectport=8123 netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=1880 connectaddress=xxx.xx.xx.xx connectport=1880 netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=1883 connectaddress=xxx.xx.xx.xx connectport=1883
Replace xxx.xx.xx.xx
with the IP address of your WSL instance (find it using ip addr show eth0
in Debian).
- Verify the port forwarding rules:
netsh interface portproxy show all
- Allow the ports through the Windows Firewall:
- Open Windows Security > Firewall & Network Protection > Advanced Settings.
- Create inbound rules to allow TCP traffic on ports
8123
,1880
, and1883
.
3. Access the Services Remotely
- Home Assistant:
http://<your-pc-ip>:8123
- Node-RED:
http://<your-pc-ip>:1880
- Mosquitto MQTT:
Use an MQTT client to connect to:
<your-pc-ip>:1883
Step 6: Automate Docker Containers on Windows Startup
To ensure the Docker containers start automatically when Windows boots:
- Open Task Scheduler:
- Press
Win + S
, typeTask Scheduler
, and open it.
- Create a new task:
- Click Create Task in the right-hand panel.
- Configure the task:
- General Tab:
- Name:
Start Docker Services
- Description: Optional.
- Select Run whether user is logged on or not and Do not store password.
- Check Run with highest privileges.
- Name:
- Triggers Tab:
- Click New.
- Set Begin the task to At startup.
- Click OK.
- Actions Tab:
- Click New.
- Set Action to Start a program.
- In Program/script, enter:
wsl.exe
- In Add arguments (optional), enter:
-d Debian -u root docker-compose -f /home/your-username/docker-services/docker-compose.yml up -d
Replace/home/your-username/docker-services/docker-compose.yml
with the full path to yourdocker-compose.yml
file. - Conditions Tab:
- Uncheck Start the task only if the computer is on AC power (if applicable).
- Settings Tab:
- Check Allow task to be run on demand.
- Uncheck Stop the task if it runs longer than.
- Click OK to save the task.
Final Notes
- Home Assistant, Node-RED, and Mosquitto MQTT will now run under Docker in your Debian WSL instance and be accessible remotely via your PC’s IP address.
- If you want to access these services from outside your local network, consider using a VPN (e.g., Tailscale) or setting up port forwarding on your router (not recommended for security reasons).
Let me know if you need further assistance!
So far, REALLY impressed – but…
After that success which got me a working Home Assistant up and running, I was convinced that DeepSeek was INVINCIBLE…
THEN – I asked it for some help… I have some Home Assistant blocks that need separating – one of the standard blocks is called a MARKDOWN block – text header – quite easy to format but it’s a bit big (high) taking up significant real estate on my phone. DeepSeek had several attempts to adjust the height of the block, even suggesting alternative methods, confidently predicting they’d work – but all of them failed… reminiscent of Claude and ChatGPT. The information these systems have is not bang up-to-date and Home Assistant changes a lot – maybe that doesn’t help!!