tasmota-commands
is a monorepo for node.js modules that allow you to easily control Tasmota devices. Still in early development, so only a few commands are supported.
- Install core package
npm install tasmota-commands-core
oryarn add tasmota-commands-core
- Install either the
tasmota-commands-http
ortasmota-commands-mqtt
to send commands or create your custom commandHandler. - Create a
TasmotaCommandsHttp
orTasmotaCommandsMqtt
instance and start controlling your Tasmota device
-
Install packages
npm install tasmota-commands-core tasmota-commands-http
-
Create a
TasmotaCommandsHttp
instance and start sending commands:
const commands = new TasmotaCommandsHttp({ address: '127.0.0.1' });
// Power up the device
await commands.sendCommand('Control', 'Power0', 'on');
// Change light color to red
await commands.sendCommand('Light', 'Color', '255,0,0');
// Get current wifi light color
const color = await commands.sendCommand('Light', 'Color');
// Get current device state
const state = await commands.sendCommand('Management', 'State');
// Send any command with "Custom"
await commands.sendCommand('Custom', 'Sleep', 50);
- Send commands to Tasmota device
- Supported protocols are http and mqtt
- Currently only a few command payloads are typed (
Power
,CT
,Dimmer
,Color
,HSBColor
)
- Read Tasmota device state
- Auto refresh state in the background
- Homebridge plugin
- Presets
- Switch
- On/off
- Lightbulb
- On/off
- Brightness
- Brightness and Color Temperature
- RGB
- Custom
- Set device type and set characteristics
- Presets
- Core
- More command payload types
- Improve state management
- Improve types
- Add validation
- Http
- Improve connection handling
- Add more configuration options
- Mqtt
- Improve subscription management and Tasmota state handling
- Add more configuration options
- Update readme and documentation
Before creating an issue, please make sure that it hasn't already been reported. See contribution guide if you'd like to contribute.
MIT