mijia.el is an Emacs package for managing and controlling Xiaomi MiJia smart home devices within Emacs. It interacts with the mijiaAPI command-line tool to provide device listing, scene management, and more.
The ctable package is required for table display.
The mijiaAPI command-line tool must be installed.
- Clone the project to your Emacs configuration directory:
git clone https://github.com/ginqi7/mijia.el ~/.emacs.d/lisp/mijia.el - Add the path to
load-path:(add-to-list 'load-path "~/.emacs.d/lisp/mijia.el")
(require 'mijia)| variable | default value | description |
|---|---|---|
| mijia-command | mijiaAPI | Command-line tool for MiJia API |
mijia-list-devices- Display all MiJia devices in a ctable buffermijia-list-scenes- Display all MiJia scenes in a ctable buffer; click to executemijia-run-scene- Run the selected scene (used within the scenes buffer)
;; List all devices
M-x mijia-list-devices
;; List all scenes
M-x mijia-list-scenes
;; In the scenes buffer, select a row and click (or call mijia-run-scene) to execute