-
Notifications
You must be signed in to change notification settings - Fork 1
Adding new Module types
Before you add a new module type, you can try using the module type "Generic" over the web interface and set up the GPIO Config.
Generic Module was added in v5.12.0, before that version its called "Wemos D1 Mini".
Check the Other Devices Page for more infos and other Devices with ESP.
Module types are defined in sonoff_template.h
This includes a "User Test" module type that you can experiment with
You can add an additional type by editing both the mytmplt and module_t arrays to add your own module type (make sure you keep the order of entries in the two arrays the same)
The module definition is a list that contains the module name, followed by a definition of what each of the 17 GPIO pins on the ESP-8266 are defined to be. Each item in the list can be either 0 (unused), or a pin definition from the list below.
As of 3/9/17 (4.0.3) these functions are:
* GPIO_DHT11, // DHT11
* GPIO_DHT21, // DHT21, AM2301
* GPIO_DHT22, // DHT22, AM2302, AM2321
* GPIO_DSB, // Single wire DS18B20 or DS18S20
* GPIO_I2C_SCL, // I2C SCL
* GPIO_I2C_SDA, // I2C SDA
* GPIO_WS2812, // WS2812 Led string
* GPIO_IRSEND, // IR remote
* GPIO_SWT1, // User connected external switches
* GPIO_SWT2,
* GPIO_SWT3,
* GPIO_SWT4,
* GPIO_KEY1, // Button usually connected to GPIO0
* GPIO_KEY2,
* GPIO_KEY3,
* GPIO_KEY4,
* GPIO_REL1, // Relays (0 = off, 1 = on)
* GPIO_REL2,
* GPIO_REL3,
* GPIO_REL4,
* GPIO_REL1_INV, // Relays with inverted signal control (0 = on, 1 = off)
* GPIO_REL2_INV,
* GPIO_REL3_INV,
* GPIO_REL4_INV,
* GPIO_LED1, // Leds (0 = off, 1 = on)
* GPIO_LED2,
* GPIO_LED3,
* GPIO_LED4,
* GPIO_LED1_INV, // Leds with inverted signal control (0 = on, 1 = off)
* GPIO_LED2_INV,
* GPIO_LED3_INV,
* GPIO_LED4_INV
* GPIO_PWM1, // Warm
* GPIO_PWM2, // Red (swapped with Blue from original)
* GPIO_PWM3, // Green
* GPIO_PWM4, // Blue (swapped with Red from original)
* GPIO_RXD, // Serial interface
* GPIO_TXD, // Serial interface
* GPIO_HLW_SEL, // HLW8012 Sel output (Sonoff Pow)
* GPIO_HLW_CF1, // HLW8012 CF1 voltage / current (Sonoff Pow)
* GPIO_HLW_CF, // HLW8012 CF power (Sonoff Pow)
* GPIO_USER // User configurable
The online user can only change GPIO functionality for pins that are defined as GPIO_USER in the module.
Home | Wiki | What's new | Tutorials | FAQ | Troubleshooting | Button usage | Commands | Rules
Home
Theo's Tasmota Tips
What's New
Getting Started
Upload tools
- SonOTA
- OTA over SCP
- Esptool
- Arduino IDE
- PlatformIO
- PlatformIO CLI
- Visual Studio Code
- Python HTTP OTA server
- Node Red OTA server and firmware manager
Usage
- Button Functionality
- MQTT Features
- Supported Commands
- Using Rules
- Sensor Configuration
- PowerOnState Configuration
- SwitchMode/SwitchTopic
- Button Multipress
- Energy Saving
- KNX Features
- Misc. Tips
Devices - Additional Info
- Sonoff Basic
- Sonoff SV
- Sonoff S20 Smart Socket
- Sonoff S26 Smart Socket
- Sonoff Dual / Dual R2
- Sonoff 4CH / 4CH Pro
- Sonoff RF and Slampher
- Sonoff RF Bridge 433
- Sonoff Pow / Pow R2
- Sonoff Touch
- Sonoff T1
- Sonoff B1 / B1 R2
- Sonoff iFan02
- Sonoff SC
- Sonoff PSA
- Sonoff S31
- Shelly 1 and 2
- Wemos D1 R1 & R2
- Wemos D1 Mini
- HuaFan Smart Socket
- Hyleton-313 Smart Plug
- MagicHome LED controller
- H801
- Arilux LC02
- SP108E LED controller
- Blitzwolf SHP2
- Tuya Dimmer
- PS-16-DZ Dimmer
- Armtronix Dimmers
- Other Devices
- retired
Home Automation Integration
- OpenHAB
- Home Assistant
- Domoticz - Manual configuaration
- Domoticz - Automatic discovery
- HomeBridge
- HomeSeer
- SmartThings
- IP-Symcon
- IOBroker
- TasmoAdmin
- Alexa
- Yeti
- NodeRed Examples
- Securing your Setup
Other Integrations
Further Topics
- MQTT Overview
- Remote Button
- Modified Kaku
- PZEM004T Energy Monitor
- IR Extension
- S20 sensor
- Wiring additional things to a module
- Sonoff Basic DHT11 Wiring
- Expand Sonoff 4CH with jack plug
- Defining new module types
- GPIO Locations
- JSON Status Responses
- Expand Sonoff Basic to 4MB Flash
- Time Proportioned Output support
- PID Control with Sonoff Devices
- Sensor-API
- Sensors Supported by Tasmota
- Syslog Setup
ESP32
Misc