How To Install python3-miio on Debian 12

Learn how to install python3-miio on Debian 12 with this tutorial. python3-miio is Python module for interfacing with Xiaomi appliances

Introduction

In this tutorial we learn how to install python3-miio on Debian 12.

What is python3-miio

python3-miio is:

This Python module allows one to interface with devices using Xiaomi’s miIO protocol. The following devices are supported:

  • Xiaomi Mi Robot Vacuum (miio.vacuum)
  • Xiaomi Mi Home Air Conditioner Companion (miio.airconditioningcompanion)
  • Xiaomi Mi Air Purifier (miio.airpurifier)
  • Xiaomi Aqara Camera (miia.aqaracamera)
  • Xiaomi Mi Smart WiFi Socket (miio.chuangmi_plug)
  • Xiaomi Chuangmi Plug V1 (1 Socket, 1 USB Port) (miio.chuangmi_plug)
  • Xiaomi Chuangmi Plug V3 (1 Socket, 2 USB Ports) (miio.chuangmi_plug)
  • Xiaomi Smart Power Strip V1 and V2 (WiFi, 6 Ports) (miio.powerstrip)
  • Xiaomi Philips Eyecare Smart Lamp 2 (miio.philips_eyecare)
  • Xiaomi Philips LED Ceiling Lamp (miio.ceil)
  • Xiaomi Philips LED Ball Lamp (miio.philips_bulb)
  • Xiaomi Philips Zhirui Smart LED Bulb E14 Candle Lamp (miio.philips_bulb)
  • Xiaomi Philips Zhirui Bedroom Smart Lamp (miio.philips_moonlight)
  • Xiaomi Universal IR Remote Controller (Chuangmi IR) (miio.chuangmi_ir)
  • Xiaomi Mi Smart Pedestal Fan V2, V3, SA1 and ZA1 (miio.fan)
  • Xiaomi Mi Air Humidifier (miio.airhumidifier)
  • Xiaomi Mi Water Purifier (Basic support: Turn on & off) (miio.waterpurifier)
  • Xiaomi PM2.5 Air Quality Monitor (miio.airqualitymonitor)
  • Xiaomi Smart WiFi Speaker (miio.wifispeaker)
  • Xiaomi Mi WiFi Repeater 2 (miio.wifirepeater)
  • Xiaomi Mi Smart Rice Cooker (miio.cooker)
  • Xiaomi Smartmi Fresh Air System (miio.airfresh)
  • Yeelight light bulbs (miio.yeelight)

There are three methods to install python3-miio on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-miio Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-miio using apt-get by running the following command:

sudo apt-get -y install python3-miio

Install python3-miio Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python3-miio using apt by running the following command:

sudo apt -y install python3-miio

Install python3-miio Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python3-miio using aptitude by running the following command:

sudo aptitude -y install python3-miio

How To Uninstall python3-miio on Debian 12

To uninstall only the python3-miio package we can use the following command:

sudo apt-get remove python3-miio

Uninstall python3-miio And Its Dependencies

To uninstall python3-miio and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove python3-miio

Remove python3-miio Configurations and Data

To remove python3-miio configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge python3-miio

Remove python3-miio configuration, data, and all of its dependencies

We can use the following command to remove python3-miio configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python3-miio

Dependencies

python3-miio have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-miio package on Debian 12 using different package management tools: apt, apt-get and aptitude.