2017-05-13 12:02:10 +01:00
/*
2019-10-27 11:04:08 +00:00
tasmota_template . h - template settings for Tasmota
2017-05-13 12:02:10 +01:00
2021-01-01 12:44:04 +00:00
Copyright ( C ) 2021 Theo Arends
2017-05-13 12:02:10 +01:00
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2017-01-28 13:41:01 +00:00
2019-10-27 11:04:08 +00:00
# ifndef _TASMOTA_TEMPLATE_H_
# define _TASMOTA_TEMPLATE_H_
2017-10-18 17:22:34 +01:00
2017-02-11 14:06:23 +00:00
// User selectable GPIO functionality
2018-09-08 16:18:31 +01:00
// ATTENTION: Only add at the end of this list just before GPIO_SENSOR_END
// Then add the same name(s) in a nice location in array kGpioNiceList
2017-10-18 17:22:34 +01:00
enum UserSelectablePins {
2020-09-25 17:15:31 +01:00
GPIO_NONE , // Not used
GPIO_KEY1 , GPIO_KEY1_NP , GPIO_KEY1_INV , GPIO_KEY1_INV_NP , // 4 x Button
GPIO_SWT1 , GPIO_SWT1_NP , // 8 x User connected external switches
GPIO_REL1 , GPIO_REL1_INV , // 8 x Relays
GPIO_LED1 , GPIO_LED1_INV , // 4 x Leds
GPIO_CNTR1 , GPIO_CNTR1_NP , // 4 x Counter
GPIO_PWM1 , GPIO_PWM1_INV , // 5 x PWM
GPIO_BUZZER , GPIO_BUZZER_INV , // Buzzer
GPIO_LEDLNK , GPIO_LEDLNK_INV , // Link led
GPIO_I2C_SCL , GPIO_I2C_SDA , // Software I2C
GPIO_SPI_MISO , GPIO_SPI_MOSI , GPIO_SPI_CLK , GPIO_SPI_CS , GPIO_SPI_DC , // Hardware SPI
GPIO_SSPI_MISO , GPIO_SSPI_MOSI , GPIO_SSPI_SCLK , GPIO_SSPI_CS , GPIO_SSPI_DC , // Software SPI
GPIO_BACKLIGHT , // Display backlight control
GPIO_OLED_RESET , // OLED Display Reset
GPIO_IRSEND , GPIO_IRRECV , // IR interface
GPIO_RFSEND , GPIO_RFRECV , // RF interface
GPIO_DHT11 , GPIO_DHT22 , GPIO_SI7021 , GPIO_DHT11_OUT , // DHT11, DHT21, DHT22, AM2301, AM2302, AM2321
GPIO_DSB , GPIO_DSB_OUT , // DS18B20 or DS18S20
GPIO_WS2812 , // WS2812 Led string
GPIO_MHZ_TXD , GPIO_MHZ_RXD , // MH-Z19 Serial interface
GPIO_PZEM0XX_TX , GPIO_PZEM004_RX , GPIO_PZEM016_RX , GPIO_PZEM017_RX , // PZEM Serial Modbus interface
GPIO_SAIR_TX , GPIO_SAIR_RX , // SenseAir Serial interface
GPIO_PMS5003_TX , GPIO_PMS5003_RX , // Plantower PMS5003 Serial interface
GPIO_SDS0X1_TX , GPIO_SDS0X1_RX , // Nova Fitness SDS011 Serial interface
GPIO_SBR_TX , GPIO_SBR_RX , // Serial Bridge Serial interface
GPIO_SR04_TRIG , GPIO_SR04_ECHO , // SR04 interface
GPIO_SDM120_TX , GPIO_SDM120_RX , // SDM120 Serial interface
GPIO_SDM630_TX , GPIO_SDM630_RX , // SDM630 Serial interface
GPIO_TM16CLK , GPIO_TM16DIO , GPIO_TM16STB , // TM1638 interface
GPIO_MP3_DFR562 , // RB-DFR-562, DFPlayer Mini MP3 Player
GPIO_HX711_SCK , GPIO_HX711_DAT , // HX711 Load Cell interface
GPIO_TX2X_TXD_BLACK , // TX20/TX23 Transmission Pin
GPIO_TUYA_TX , GPIO_TUYA_RX , // Tuya Serial interface
GPIO_MGC3130_XFER , GPIO_MGC3130_RESET , // MGC3130 interface
GPIO_RF_SENSOR , // Rf receiver with sensor decoding
GPIO_AZ_TXD , GPIO_AZ_RXD , // AZ-Instrument 7798 Serial interface
GPIO_MAX31855CS , GPIO_MAX31855CLK , GPIO_MAX31855DO , // MAX31855 Serial interface
GPIO_NRG_SEL , GPIO_NRG_SEL_INV , GPIO_NRG_CF1 , GPIO_HLW_CF , GPIO_HJL_CF , // HLW8012/HJL-01/BL0937 energy monitoring
GPIO_MCP39F5_TX , GPIO_MCP39F5_RX , GPIO_MCP39F5_RST , // MCP39F501 Energy monitoring (Shelly2)
GPIO_PN532_TXD , GPIO_PN532_RXD , // PN532 NFC Serial interface
GPIO_SM16716_CLK , GPIO_SM16716_DAT , GPIO_SM16716_SEL , // SM16716 SELECT
GPIO_DI , GPIO_DCKI , // my92x1 PWM controller
GPIO_CSE7766_TX , GPIO_CSE7766_RX , // CSE7766 Serial interface (S31 and Pow R2)
GPIO_ARIRFRCV , GPIO_ARIRFSEL , // Arilux RF Receive input
GPIO_TXD , GPIO_RXD , // Serial interface
GPIO_ROT1A , GPIO_ROT1B , // Rotary switch
GPIO_ADC_JOY , // Analog joystick
GPIO_SSPI_MAX31865_CS1 , // MAX31865 Chip Select
GPIO_HRE_CLOCK , GPIO_HRE_DATA , // HR-E Water Meter
GPIO_ADE7953_IRQ , // ADE7953 IRQ
GPIO_SOLAXX1_TX , GPIO_SOLAXX1_RX , // Solax Inverter Serial interface
GPIO_ZIGBEE_TX , GPIO_ZIGBEE_RX , // Zigbee Serial interface
GPIO_RDM6300_RX , // RDM6300 RX
GPIO_IBEACON_TX , GPIO_IBEACON_RX , // HM17 IBEACON Serial interface
2020-10-02 16:09:09 +01:00
GPIO_A4988_DIR , GPIO_A4988_STP , GPIO_A4988_ENA , GPIO_A4988_MS1 , // A4988 interface
2020-10-23 14:18:58 +01:00
GPIO_OUTPUT_HI , GPIO_OUTPUT_LO , // Fixed output state
2020-09-25 17:15:31 +01:00
GPIO_DDS2382_TX , GPIO_DDS2382_RX , // DDS2382 Serial interface
GPIO_DDSU666_TX , GPIO_DDSU666_RX , // DDSU666 Serial interface
GPIO_SM2135_CLK , GPIO_SM2135_DAT , // SM2135 PWM controller
GPIO_DEEPSLEEP , // Kill switch for deepsleep
GPIO_EXS_ENABLE , // EXS MCU Enable
GPIO_TASMOTACLIENT_TXD , GPIO_TASMOTACLIENT_RXD , // Client Serial interface
GPIO_TASMOTACLIENT_RST , GPIO_TASMOTACLIENT_RST_INV , // Client Reset
GPIO_HPMA_RX , GPIO_HPMA_TX , // Honeywell HPMA115S0 Serial interface
GPIO_GPS_RX , GPIO_GPS_TX , // GPS Serial interface
GPIO_HM10_RX , GPIO_HM10_TX , // HM10-BLE-Mijia-bridge Serial interface
GPIO_LE01MR_RX , GPIO_LE01MR_TX , // F&F LE-01MR energy meter
GPIO_CC1101_GDO0 , GPIO_CC1101_GDO2 , // CC1101 Serial interface
GPIO_HRXL_RX , // Data from MaxBotix HRXL sonar range sensor
GPIO_ELECTRIQ_MOODL_TX , // ElectriQ iQ-wifiMOODL Serial TX
GPIO_AS3935 , // Franklin Lightning Sensor
GPIO_ADC_INPUT , // Analog input
GPIO_ADC_TEMP , // Analog Thermistor
GPIO_ADC_LIGHT , // Analog Light sensor
GPIO_ADC_BUTTON , GPIO_ADC_BUTTON_INV , // Analog Button
GPIO_ADC_RANGE , // Analog Range
GPIO_ADC_CT_POWER , // ANalog Current
# ifdef ESP32
GPIO_WEBCAM_PWDN , GPIO_WEBCAM_RESET , GPIO_WEBCAM_XCLK , // Webcam
GPIO_WEBCAM_SIOD , GPIO_WEBCAM_SIOC , // Webcam I2C
GPIO_WEBCAM_DATA ,
GPIO_WEBCAM_VSYNC , GPIO_WEBCAM_HREF , GPIO_WEBCAM_PCLK ,
GPIO_WEBCAM_PSCLK ,
GPIO_WEBCAM_HSD ,
GPIO_WEBCAM_PSRCS ,
# endif
GPIO_BOILER_OT_RX , GPIO_BOILER_OT_TX , // OpenTherm Boiler TX pin
GPIO_WINDMETER_SPEED , // WindMeter speed counter pin
GPIO_KEY1_TC , // Touch pin as button
GPIO_BL0940_RX , // BL0940 serial interface
GPIO_TCP_TX , GPIO_TCP_RX , // TCP to serial bridge
# ifdef ESP32
GPIO_ETH_PHY_POWER , GPIO_ETH_PHY_MDC , GPIO_ETH_PHY_MDIO , // Ethernet
# endif
GPIO_TELEINFO_RX , // Teleinfo telemetry data receive pin
GPIO_TELEINFO_ENABLE , // Teleinfo Enable Receive Pin
GPIO_LMT01 , // LMT01 input counting pin
GPIO_IEM3000_TX , GPIO_IEM3000_RX , // IEM3000 Serial interface
GPIO_ZIGBEE_RST , // Zigbee reset
2020-08-16 21:49:16 +01:00
GPIO_DYP_RX ,
2020-10-23 14:18:58 +01:00
GPIO_MIEL_HVAC_TX , GPIO_MIEL_HVAC_RX , // Mitsubishi Electric HVAC
GPIO_WE517_TX , GPIO_WE517_RX , // ORNO WE517 Serial interface
2020-11-10 14:04:45 +00:00
GPIO_AS608_TX , GPIO_AS608_RX , // Serial interface AS608 / R503
2020-11-14 15:43:32 +00:00
GPIO_SHELLY_DIMMER_BOOT0 , GPIO_SHELLY_DIMMER_RST_INV ,
2020-11-30 11:52:59 +00:00
GPIO_RC522_RST , // RC522 reset
2020-12-17 15:33:26 +00:00
GPIO_P9813_CLK , GPIO_P9813_DAT , // P9813 Clock and Data
2020-12-20 12:22:01 +00:00
GPIO_OPTION_A , // Specific device options to be served in code
2020-12-22 15:47:24 +00:00
GPIO_FTC532 , // FTC532 touch ctrlr serial input
2020-12-29 11:06:47 +00:00
GPIO_RC522_CS ,
GPIO_NRF24_CS , GPIO_NRF24_DC ,
GPIO_ILI9341_CS , GPIO_ILI9341_DC ,
GPIO_ILI9488_CS ,
GPIO_EPAPER29_CS ,
GPIO_EPAPER42_CS ,
GPIO_SSD1351_CS ,
GPIO_RA8876_CS ,
GPIO_ST7789_CS , GPIO_ST7789_DC ,
2021-01-01 15:05:06 +00:00
GPIO_SSD1331_CS , GPIO_SSD1331_DC ,
2021-01-04 14:03:56 +00:00
GPIO_SDCARD_CS ,
2021-01-06 13:27:41 +00:00
GPIO_ROT1A_NP , GPIO_ROT1B_NP , // Rotary switch
2021-01-05 16:28:38 +00:00
GPIO_ADC_PH , // Analog PH Sensor
2021-01-07 15:39:41 +00:00
GPIO_BS814_CLK , GPIO_BS814_DAT , // Holtek BS814A2 touch ctrlr
2021-01-16 14:39:33 +00:00
GPIO_WIEGAND_D0 , GPIO_WIEGAND_D1 , // Wiegand Data lines
2021-01-20 12:56:57 +00:00
GPIO_NEOPOOL_TX , GPIO_NEOPOOL_RX , // Sugar Valley RS485 interface
2021-02-09 15:13:40 +00:00
GPIO_SDM72_TX , GPIO_SDM72_RX , // SDM72 Serial interface
2021-02-21 11:17:39 +00:00
GPIO_TM1637CLK , GPIO_TM1637DIO , // TM1637 interface
2017-03-09 16:48:04 +00:00
GPIO_SENSOR_END } ;
2017-10-18 17:22:34 +01:00
enum ProgramSelectablePins {
2020-09-25 17:15:31 +01:00
GPIO_FIX_START = 2046 ,
GPIO_USER , // User configurable needs to be 2047
2017-02-11 14:06:23 +00:00
GPIO_MAX } ;
2017-01-28 13:41:01 +00:00
2020-12-20 12:22:01 +00:00
# define MAX_OPTIONS_A 2 // Increase if more bits are used from GpioOptionABits
typedef union { // Restricted by MISRA-C Rule 18.4 but so useful...
uint32_t data ; // Allow bit manipulation using SetOption
struct { // GPIO Option_A1 .. Option_A32
uint32_t pwm1_input : 1 ; // bit 0 (v9.2.0.1) - Option_A1 - (Light) Change PWM1 to input on power off and no fade running (1)
uint32_t spare01 : 1 ; // bit 1
uint32_t spare02 : 1 ; // bit 2
uint32_t spare03 : 1 ; // bit 3
uint32_t spare04 : 1 ; // bit 4
uint32_t spare05 : 1 ; // bit 5
uint32_t spare06 : 1 ; // bit 6
uint32_t spare07 : 1 ; // bit 7
uint32_t spare08 : 1 ; // bit 8
uint32_t spare09 : 1 ; // bit 9
uint32_t spare10 : 1 ; // bit 10
uint32_t spare11 : 1 ; // bit 11
uint32_t spare12 : 1 ; // bit 12
uint32_t spare13 : 1 ; // bit 13
uint32_t spare14 : 1 ; // bit 14
uint32_t spare15 : 1 ; // bit 15
uint32_t spare16 : 1 ; // bit 16
uint32_t spare17 : 1 ; // bit 17
uint32_t spare18 : 1 ; // bit 18
uint32_t spare19 : 1 ; // bit 19
uint32_t spare20 : 1 ; // bit 20
uint32_t spare21 : 1 ; // bit 21
uint32_t spare22 : 1 ; // bit 22
uint32_t spare23 : 1 ; // bit 23
uint32_t spare24 : 1 ; // bit 24
uint32_t spare25 : 1 ; // bit 25
uint32_t spare26 : 1 ; // bit 26
uint32_t spare27 : 1 ; // bit 27
uint32_t spare28 : 1 ; // bit 28
uint32_t spare29 : 1 ; // bit 29
uint32_t spare30 : 1 ; // bit 30
uint32_t spare31 : 1 ; // bit 31
} ;
} GpioOptionABits ;
2018-02-01 15:18:00 +00:00
// Text in webpage Module Parameters and commands GPIOS and GPIO
const char kSensorNames [ ] PROGMEM =
D_SENSOR_NONE " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_BUTTON " | " D_SENSOR_BUTTON " _n| " D_SENSOR_BUTTON " _i| " D_SENSOR_BUTTON " _in| "
D_SENSOR_SWITCH " | " D_SENSOR_SWITCH " _n| "
D_SENSOR_RELAY " | " D_SENSOR_RELAY " _i| "
D_SENSOR_LED " | " D_SENSOR_LED " _i| "
D_SENSOR_COUNTER " | " D_SENSOR_COUNTER " _n| "
D_SENSOR_PWM " | " D_SENSOR_PWM " _i| "
D_SENSOR_BUZZER " | " D_SENSOR_BUZZER " _i| "
D_SENSOR_LED_LINK " | " D_SENSOR_LED_LINK " _i| "
2018-02-01 15:18:00 +00:00
D_SENSOR_I2C_SCL " | " D_SENSOR_I2C_SDA " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_SPI_MISO " | " D_SENSOR_SPI_MOSI " | " D_SENSOR_SPI_CLK " | " D_SENSOR_SPI_CS " | " D_SENSOR_SPI_DC " | "
D_SENSOR_SSPI_MISO " | " D_SENSOR_SSPI_MOSI " | " D_SENSOR_SSPI_SCLK " | " D_SENSOR_SSPI_CS " | " D_SENSOR_SSPI_DC " | "
D_SENSOR_BACKLIGHT " | " D_SENSOR_OLED_RESET " | "
D_SENSOR_IRSEND " | " D_SENSOR_IRRECV " | "
D_SENSOR_RFSEND " | " D_SENSOR_RFRECV " | "
D_SENSOR_DHT11 " | " D_SENSOR_AM2301 " | " D_SENSOR_SI7021 " | " D_SENSOR_DHT11 " _o| "
D_SENSOR_DS18X20 " | " D_SENSOR_DS18X20 " _o| "
2018-02-01 15:18:00 +00:00
D_SENSOR_WS2812 " | "
D_SENSOR_MHZ_TX " | " D_SENSOR_MHZ_RX " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_PZEM0XX_TX " | " D_SENSOR_PZEM004_RX " | " D_SENSOR_PZEM016_RX " | " D_SENSOR_PZEM017_RX " | "
2018-02-01 15:18:00 +00:00
D_SENSOR_SAIR_TX " | " D_SENSOR_SAIR_RX " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_PMS5003_TX " | " D_SENSOR_PMS5003_RX " | "
D_SENSOR_SDS0X1_TX " | " D_SENSOR_SDS0X1_RX " | "
2018-04-20 13:31:09 +01:00
D_SENSOR_SBR_TX " | " D_SENSOR_SBR_RX " | "
2018-05-11 13:44:00 +01:00
D_SENSOR_SR04_TRIG " | " D_SENSOR_SR04_ECHO " | "
2018-05-16 09:07:41 +01:00
D_SENSOR_SDM120_TX " | " D_SENSOR_SDM120_RX " | "
2018-06-28 16:40:37 +01:00
D_SENSOR_SDM630_TX " | " D_SENSOR_SDM630_RX " | "
2018-08-23 15:05:51 +01:00
D_SENSOR_TM1638_CLK " | " D_SENSOR_TM1638_DIO " | " D_SENSOR_TM1638_STB " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_DFR562 " | "
2018-10-21 11:44:45 +01:00
D_SENSOR_HX711_SCK " | " D_SENSOR_HX711_DAT " | "
2020-02-20 17:50:43 +00:00
D_SENSOR_TX2X_TX " | "
2018-11-21 18:13:52 +00:00
D_SENSOR_TUYA_TX " | " D_SENSOR_TUYA_RX " | "
2018-11-27 14:11:10 +00:00
D_SENSOR_MGC3130_XFER " | " D_SENSOR_MGC3130_RESET " | "
2018-12-18 09:22:41 +00:00
D_SENSOR_RF_SENSOR " | "
2018-12-30 10:45:21 +00:00
D_SENSOR_AZ_TX " | " D_SENSOR_AZ_RX " | "
2019-01-19 22:28:58 +00:00
D_SENSOR_MAX31855_CS " | " D_SENSOR_MAX31855_CLK " | " D_SENSOR_MAX31855_DO " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_NRG_SEL " | " D_SENSOR_NRG_SEL " _i| " D_SENSOR_NRG_CF1 " | " D_SENSOR_HLW_CF " | " D_SENSOR_HJL_CF " | "
2019-02-04 18:14:05 +00:00
D_SENSOR_MCP39F5_TX " | " D_SENSOR_MCP39F5_RX " | " D_SENSOR_MCP39F5_RST " | "
2019-02-08 16:00:53 +00:00
D_SENSOR_PN532_TX " | " D_SENSOR_PN532_RX " | "
2019-02-11 18:21:49 +00:00
D_SENSOR_SM16716_CLK " | " D_SENSOR_SM16716_DAT " | " D_SENSOR_SM16716_POWER " | "
D_SENSOR_MY92X1_DI " | " D_SENSOR_MY92X1_DCKI " | "
D_SENSOR_CSE7766_TX " | " D_SENSOR_CSE7766_RX " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_ARIRFRCV " | " D_SENSOR_ARIRFSEL " | "
D_SENSOR_TXD " | " D_SENSOR_RXD " | "
2021-01-06 13:14:15 +00:00
D_SENSOR_ROTARY " A| " D_SENSOR_ROTARY " B| "
2020-09-25 17:15:31 +01:00
D_SENSOR_ADC_JOYSTICK " | "
D_SENSOR_MAX31865_CS " | "
2019-03-23 23:26:03 +00:00
D_SENSOR_HRE_CLOCK " | " D_SENSOR_HRE_DATA " | "
2019-04-12 10:44:50 +01:00
D_SENSOR_ADE7953_IRQ " | "
2019-08-09 11:56:01 +01:00
D_SENSOR_SOLAXX1_TX " | " D_SENSOR_SOLAXX1_RX " | "
2019-08-09 21:52:33 +01:00
D_SENSOR_ZIGBEE_TXD " | " D_SENSOR_ZIGBEE_RXD " | "
2019-08-19 09:54:58 +01:00
D_SENSOR_RDM6300_RX " | "
2019-08-24 12:20:00 +01:00
D_SENSOR_IBEACON_TX " | " D_SENSOR_IBEACON_RX " | "
2020-10-02 16:09:09 +01:00
D_SENSOR_A4988_DIR " | " D_SENSOR_A4988_STP " | " D_SENSOR_A4988_ENA " | " D_SENSOR_A4988_MS1 " | "
2020-10-23 14:18:58 +01:00
D_SENSOR_OUTPUT_HI " | " D_SENSOR_OUTPUT_LO " | "
2019-09-10 14:14:51 +01:00
D_SENSOR_DDS2382_TX " | " D_SENSOR_DDS2382_RX " | "
2019-10-03 09:06:51 +01:00
D_SENSOR_DDSU666_TX " | " D_SENSOR_DDSU666_RX " | "
2019-10-04 15:45:05 +01:00
D_SENSOR_SM2135_CLK " | " D_SENSOR_SM2135_DAT " | "
2019-10-20 10:57:38 +01:00
D_SENSOR_DEEPSLEEP " | " D_SENSOR_EXS_ENABLE " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_CLIENT_TX " | " D_SENSOR_CLIENT_RX " | " D_SENSOR_CLIENT_RESET " | " D_SENSOR_CLIENT_RESET " _i| "
2019-12-23 14:39:07 +00:00
D_SENSOR_HPMA_RX " | " D_SENSOR_HPMA_TX " | "
2020-01-05 00:06:30 +00:00
D_SENSOR_GPS_RX " | " D_SENSOR_GPS_TX " | "
2020-02-10 13:52:22 +00:00
D_SENSOR_HM10_RX " | " D_SENSOR_HM10_TX " | "
2020-02-27 20:31:19 +00:00
D_SENSOR_LE01MR_RX " | " D_SENSOR_LE01MR_TX " | "
2020-02-28 00:28:06 +00:00
D_SENSOR_CC1101_GDO0 " | " D_SENSOR_CC1101_GDO2 " | "
2020-03-17 18:27:17 +00:00
D_SENSOR_HRXL_RX " | "
2020-04-11 00:48:37 +01:00
D_SENSOR_ELECTRIQ_MOODL " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_AS3935 " | "
D_SENSOR_ADC_INPUT " | "
D_SENSOR_ADC_TEMP " | "
D_SENSOR_ADC_LIGHT " | "
D_SENSOR_ADC_BUTTON " | " D_SENSOR_ADC_BUTTON " _i| "
D_SENSOR_ADC_RANGE " | "
D_SENSOR_ADC_CT_POWER " | "
# ifdef ESP32
D_GPIO_WEBCAM_PWDN " | " D_GPIO_WEBCAM_RESET " | " D_GPIO_WEBCAM_XCLK " | "
D_GPIO_WEBCAM_SIOD " | " D_GPIO_WEBCAM_SIOC " | "
D_GPIO_WEBCAM_DATA " | "
D_GPIO_WEBCAM_VSYNC " | " D_GPIO_WEBCAM_HREF " | " D_GPIO_WEBCAM_PCLK " | "
D_GPIO_WEBCAM_PSCLK " | "
D_GPIO_WEBCAM_HSD " | "
D_GPIO_WEBCAM_PSRCS " | "
# endif
2020-05-07 13:58:23 +01:00
D_SENSOR_BOILER_OT_RX " | " D_SENSOR_BOILER_OT_TX " | "
2020-09-25 17:15:31 +01:00
D_SENSOR_WINDMETER_SPEED " | " D_SENSOR_BUTTON " _tc| "
2020-06-17 14:00:48 +01:00
D_SENSOR_BL0940_RX " | "
2020-06-16 18:04:39 +01:00
D_SENSOR_TCP_TXD " | " D_SENSOR_TCP_RXD " | "
2020-09-25 17:15:31 +01:00
# ifdef ESP32
D_SENSOR_ETH_PHY_POWER " | " D_SENSOR_ETH_PHY_MDC " | " D_SENSOR_ETH_PHY_MDIO " | "
# endif
2020-06-17 14:53:38 +01:00
D_SENSOR_TELEINFO_RX " | " D_SENSOR_TELEINFO_ENABLE " | "
2020-07-12 16:52:24 +01:00
D_SENSOR_LMT01_PULSE " | "
2020-07-22 09:07:07 +01:00
D_SENSOR_IEM3000_TX " | " D_SENSOR_IEM3000_RX " | "
2020-08-16 21:49:16 +01:00
D_SENSOR_ZIGBEE_RST " | "
2020-10-02 14:10:21 +01:00
D_SENSOR_DYP_RX " | "
2020-10-02 15:37:43 +01:00
D_SENSOR_MIEL_HVAC_TX " | " D_SENSOR_MIEL_HVAC_RX " | "
2020-11-10 14:04:45 +00:00
D_SENSOR_WE517_TX " | " D_SENSOR_WE517_RX " | "
2020-11-14 15:43:32 +00:00
D_SENSOR_AS608_TX " | " D_SENSOR_AS608_RX " | "
2020-11-30 11:52:59 +00:00
D_SENSOR_SHELLY_DIMMER_BOOT0 " | " D_SENSOR_SHELLY_DIMMER_RST_INV " | "
2020-12-17 15:33:26 +00:00
D_SENSOR_RC522_RST " | "
2020-12-20 12:22:01 +00:00
D_SENSOR_P9813_CLK " | " D_SENSOR_P9813_DAT " | "
2021-01-06 13:14:15 +00:00
D_SENSOR_OPTION " A| "
2020-12-29 11:06:47 +00:00
D_SENSOR_FTC532 " | "
D_SENSOR_RC522_CS " | "
D_SENSOR_NRF24_CS " | " D_SENSOR_NRF24_DC " | "
D_SENSOR_ILI9341_CS " | " D_SENSOR_ILI9341_DC " | "
D_SENSOR_ILI9488_CS " | "
D_SENSOR_EPAPER29_CS " | "
D_SENSOR_EPAPER42_CS " | "
D_SENSOR_SSD1351_CS " | "
D_SENSOR_RA8876_CS " | "
D_SENSOR_ST7789_CS " | " D_SENSOR_ST7789_DC " | "
2021-01-01 15:05:06 +00:00
D_SENSOR_SSD1331_CS " | " D_SENSOR_SSD1331_DC " | "
2021-01-04 14:03:56 +00:00
D_SENSOR_SDCARD_CS " | "
2021-01-06 13:14:15 +00:00
D_SENSOR_ROTARY " A_n| " D_SENSOR_ROTARY " B_n| "
2021-01-05 16:28:38 +00:00
D_SENSOR_ADC_PH " | "
2021-01-07 15:39:41 +00:00
D_SENSOR_BS814_CLK " | " D_SENSOR_BS814_DAT " | "
2021-01-16 14:39:33 +00:00
D_SENSOR_WIEGAND_D0 " | " D_SENSOR_WIEGAND_D1 " | "
2021-01-20 12:56:57 +00:00
D_SENSOR_NEOPOOL_TX " | " D_SENSOR_NEOPOOL_RX " | "
2021-02-09 15:13:40 +00:00
D_SENSOR_SDM72_TX " | " D_SENSOR_SDM72_RX " | "
2021-02-21 11:17:39 +00:00
D_SENSOR_TM1637_CLK " | " D_SENSOR_TM1637_DIO " | "
2019-01-27 13:54:28 +00:00
;
2018-11-11 15:58:21 +00:00
2019-10-10 11:26:00 +01:00
const char kSensorNamesFixed [ ] PROGMEM =
D_SENSOR_USER ;
2020-10-02 15:11:13 +01:00
# define MAX_MAX31865S 6
2020-10-02 16:09:09 +01:00
# define MAX_A4988_MSS 3
2020-09-25 17:15:31 +01:00
# define MAX_WEBCAM_DATA 8
# define MAX_WEBCAM_HSD 3
2021-01-20 10:20:56 +00:00
# define MAX_SM2135_DAT 6
2020-09-25 17:15:31 +01:00
const uint16_t kGpioNiceList [ ] PROGMEM = {
GPIO_NONE , // Not used
2020-12-20 12:22:01 +00:00
AGPIO ( GPIO_OPTION_A ) + MAX_OPTIONS_A , // Device specific options
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_KEY1 ) + MAX_KEYS , // Buttons
AGPIO ( GPIO_KEY1_NP ) + MAX_KEYS ,
AGPIO ( GPIO_KEY1_INV ) + MAX_KEYS ,
AGPIO ( GPIO_KEY1_INV_NP ) + MAX_KEYS ,
AGPIO ( GPIO_KEY1_TC ) + MAX_KEYS , // Touch button
AGPIO ( GPIO_SWT1 ) + MAX_SWITCHES , // User connected external switches
AGPIO ( GPIO_SWT1_NP ) + MAX_SWITCHES ,
2020-07-13 14:10:23 +01:00
# ifdef ROTARY_V1
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ROT1A ) + MAX_ROTARIES , // Rotary A Pin
AGPIO ( GPIO_ROT1B ) + MAX_ROTARIES , // Rotary B Pin
2021-01-06 13:14:15 +00:00
AGPIO ( GPIO_ROT1A_NP ) + MAX_ROTARIES , // Rotary A Pin No Pullup
AGPIO ( GPIO_ROT1B_NP ) + MAX_ROTARIES , // Rotary B Pin No Pullup
2020-09-25 17:15:31 +01:00
# endif
AGPIO ( GPIO_REL1 ) + MAX_RELAYS , // Relays
AGPIO ( GPIO_REL1_INV ) + MAX_RELAYS ,
AGPIO ( GPIO_LED1 ) + MAX_LEDS , // Leds
AGPIO ( GPIO_LED1_INV ) + MAX_LEDS ,
2019-06-16 15:43:23 +01:00
# ifdef USE_COUNTER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_CNTR1 ) + MAX_COUNTERS , // Counters
AGPIO ( GPIO_CNTR1_NP ) + MAX_COUNTERS ,
2019-06-16 15:43:23 +01:00
# endif
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PWM1 ) + MAX_PWMS , // RGB Red or C Cold White
AGPIO ( GPIO_PWM1_INV ) + MAX_PWMS ,
2019-08-12 16:18:08 +01:00
# ifdef USE_BUZZER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_BUZZER ) , // Buzzer
AGPIO ( GPIO_BUZZER_INV ) , // Inverted buzzer
2019-08-12 16:18:08 +01:00
# endif
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_LEDLNK ) , // Link led
AGPIO ( GPIO_LEDLNK_INV ) , // Inverted link led
2020-10-23 14:18:58 +01:00
AGPIO ( GPIO_OUTPUT_HI ) , // Fixed output high
AGPIO ( GPIO_OUTPUT_LO ) , // Fixed output low
2020-12-22 15:47:24 +00:00
# ifdef USE_FTC532
AGPIO ( GPIO_FTC532 ) , // FTC532 touch input
# endif
2021-01-07 15:39:41 +00:00
# ifdef USE_BS814A2
AGPIO ( GPIO_BS814_CLK ) , // Holtek BS814A2 touch ctrlr
AGPIO ( GPIO_BS814_DAT ) ,
# endif
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Protocol specifics
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2018-11-05 16:27:02 +00:00
# ifdef USE_I2C
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_I2C_SCL ) , // I2C SCL
AGPIO ( GPIO_I2C_SDA ) , // I2C SDA
2018-11-05 16:27:02 +00:00
# endif
2020-10-02 16:09:09 +01:00
2018-11-05 16:27:02 +00:00
# ifdef USE_SPI
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_SPI_MISO ) , // SPI MISO
AGPIO ( GPIO_SPI_MOSI ) , // SPI MOSI
AGPIO ( GPIO_SPI_CLK ) , // SPI Clk
AGPIO ( GPIO_SPI_CS ) , // SPI Chip Select
AGPIO ( GPIO_SPI_DC ) , // SPI Data Direction
2020-12-29 11:31:08 +00:00
# ifdef USE_NRF24
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_NRF24_CS ) ,
AGPIO ( GPIO_NRF24_DC ) ,
2020-09-25 17:15:31 +01:00
# endif
2020-12-29 16:42:53 +00:00
# ifdef USE_RC522
AGPIO ( GPIO_RC522_CS ) , // RC522 Rfid Chip Select
AGPIO ( GPIO_RC522_RST ) , // RC522 Rfid Reset
# endif
2021-01-04 14:03:56 +00:00
# ifdef USE_SDCARD
AGPIO ( GPIO_SDCARD_CS ) ,
# endif // USE_SDCARD
2020-12-29 11:31:08 +00:00
# endif // USE_SPI
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SSPI_MISO ) , // Software SPI Master Input Client Output
AGPIO ( GPIO_SSPI_MOSI ) , // Software SPI Master Output Client Input
AGPIO ( GPIO_SSPI_SCLK ) , // Software SPI Serial Clock
AGPIO ( GPIO_SSPI_CS ) , // Software SPI Chip Select
AGPIO ( GPIO_SSPI_DC ) , // Software SPI Data or Command
2018-11-05 16:27:02 +00:00
# ifdef USE_DISPLAY
2021-01-04 14:03:56 +00:00
# ifdef USE_DISPLAY_ILI9341
AGPIO ( GPIO_ILI9341_CS ) ,
AGPIO ( GPIO_ILI9341_DC ) ,
# endif // USE_DISPLAY_ILI9341
2020-12-29 11:31:08 +00:00
# ifdef USE_DISPLAY_ILI9488
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_ILI9488_CS ) ,
2020-12-29 11:31:08 +00:00
# endif // USE_DISPLAY_ILI9488
# ifdef USE_DISPLAY_EPAPER_29
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_EPAPER29_CS ) ,
2020-12-29 11:31:08 +00:00
# endif // USE_DISPLAY_EPAPER_29
# ifdef USE_DISPLAY_EPAPER_42
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_EPAPER42_CS ) ,
2020-12-29 11:31:08 +00:00
# endif // USE_DISPLAY_EPAPER_42
# ifdef USE_DISPLAY_SSD1351
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_SSD1351_CS ) ,
2020-12-29 11:31:08 +00:00
# endif // USE_DISPLAY_SSD1351
# ifdef USE_DISPLAY_RA8876
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_RA8876_CS ) ,
2020-12-29 11:31:08 +00:00
# endif // USE_DISPLAY_RA8876
# ifdef USE_DISPLAY_ST7789
2020-12-31 15:17:30 +00:00
AGPIO ( GPIO_ST7789_CS ) ,
AGPIO ( GPIO_ST7789_DC ) ,
2021-01-01 15:05:06 +00:00
# endif // USE_DISPLAY_ST7789
# ifdef USE_DISPLAY_SSD1331
AGPIO ( GPIO_SSD1331_CS ) ,
AGPIO ( GPIO_SSD1331_DC ) ,
# endif // USE_DISPLAY_SSD1331
2021-02-21 11:17:39 +00:00
# ifdef USE_DISPLAY_TM1637
AGPIO ( GPIO_TM1637CLK ) ,
AGPIO ( GPIO_TM1637DIO ) ,
# endif // USE_DISPLAY_TM1637
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_BACKLIGHT ) , // Display backlight control
AGPIO ( GPIO_OLED_RESET ) , // OLED Display Reset
2021-02-21 11:17:39 +00:00
# endif // USE_DISPLAY
2020-10-02 15:11:13 +01:00
# ifdef USE_MAX31865
AGPIO ( GPIO_SSPI_MAX31865_CS1 ) + MAX_MAX31865S ,
# endif
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TXD ) , // Serial interface
AGPIO ( GPIO_RXD ) , // Serial interface
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Single wire sensors
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-06-16 16:03:41 +01:00
# ifdef USE_DHT
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DHT11 ) , // DHT11
AGPIO ( GPIO_DHT22 ) , // DHT21, DHT22, AM2301, AM2302, AM2321
AGPIO ( GPIO_SI7021 ) , // iTead SI7021
AGPIO ( GPIO_DHT11_OUT ) , // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321
2019-06-16 16:03:41 +01:00
# endif
2019-10-16 10:51:38 +01:00
# ifdef USE_DS18x20
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DSB ) , // Single wire DS18B20 or DS18S20
AGPIO ( GPIO_DSB_OUT ) , // Pseudo Single wire DS18B20 or DS18S20
2019-04-05 16:46:26 +01:00
# endif
2020-09-25 17:15:31 +01:00
# ifdef USE_LMT01
AGPIO ( GPIO_LMT01 ) , // LMT01, count pulses on GPIO
2020-06-17 16:22:41 +01:00
# endif
2019-09-02 15:41:18 +01:00
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Light
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-09-02 15:41:18 +01:00
# ifdef USE_LIGHT
# ifdef USE_WS2812
2020-12-17 15:33:26 +00:00
# if (USE_WS2812_HARDWARE == NEO_HW_P9813)
AGPIO ( GPIO_P9813_CLK ) , // P9813 CLOCK
AGPIO ( GPIO_P9813_DAT ) , // P9813 DATA
# else
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_WS2812 ) , // WS2812 Led string
2020-12-17 15:33:26 +00:00
# endif // NEO_HW_P9813
2018-11-05 16:27:02 +00:00
# endif
2019-09-02 15:41:18 +01:00
# ifdef USE_ARILUX_RF
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ARIRFRCV ) , // AriLux RF Receive input
AGPIO ( GPIO_ARIRFSEL ) , // Arilux RF Receive input selected
2019-09-02 15:41:18 +01:00
# endif
2019-10-06 17:05:17 +01:00
# ifdef USE_MY92X1
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DI ) , // my92x1 PWM input
AGPIO ( GPIO_DCKI ) , // my92x1 CLK input
2019-10-06 17:05:17 +01:00
# endif // USE_MY92X1
2019-09-02 15:41:18 +01:00
# ifdef USE_SM16716
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SM16716_CLK ) , // SM16716 CLOCK
AGPIO ( GPIO_SM16716_DAT ) , // SM16716 DATA
AGPIO ( GPIO_SM16716_SEL ) , // SM16716 SELECT
2019-09-02 15:41:18 +01:00
# endif // USE_SM16716
2019-10-04 15:45:05 +01:00
# ifdef USE_SM2135
2020-12-13 14:34:17 +00:00
AGPIO ( GPIO_SM2135_CLK ) , // SM2135 CLOCK
AGPIO ( GPIO_SM2135_DAT ) + MAX_SM2135_DAT , // SM2135 DATA
2019-10-04 15:45:05 +01:00
# endif // USE_SM2135
2019-09-03 12:23:05 +01:00
# ifdef USE_TUYA_MCU
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TUYA_TX ) , // Tuya Serial interface
AGPIO ( GPIO_TUYA_RX ) , // Tuya Serial interface
2019-09-02 15:41:18 +01:00
# endif
2019-10-18 16:29:19 +01:00
# ifdef USE_EXS_DIMMER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_EXS_ENABLE ) , // EXS MCU Enable
2019-10-18 16:29:19 +01:00
# endif
2020-03-17 18:27:17 +00:00
# ifdef USE_ELECTRIQ_MOODL
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ELECTRIQ_MOODL_TX ) ,
2020-03-17 18:27:17 +00:00
# endif
2020-11-14 15:43:32 +00:00
# ifdef USE_SHELLY_DIMMER
AGPIO ( GPIO_SHELLY_DIMMER_BOOT0 ) ,
AGPIO ( GPIO_SHELLY_DIMMER_RST_INV ) ,
# endif
2019-09-02 15:41:18 +01:00
# endif // USE_LIGHT
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Transmission sensors
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-08-28 21:01:01 +01:00
# if defined(USE_IR_REMOTE) || defined(USE_IR_REMOTE_FULL)
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_IRSEND ) , // IR remote
2019-08-28 21:01:01 +01:00
# if defined(USE_IR_RECEIVE) || defined(USE_IR_REMOTE_FULL)
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_IRRECV ) , // IR receiver
2018-11-05 16:27:02 +00:00
# endif
# endif
# ifdef USE_RC_SWITCH
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_RFSEND ) , // RF transmitter
AGPIO ( GPIO_RFRECV ) , // RF receiver
2018-11-05 16:27:02 +00:00
# endif
2018-12-11 13:24:52 +00:00
# ifdef USE_RF_SENSOR
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_RF_SENSOR ) , // Rf receiver with sensor decoding
2018-12-11 13:24:52 +00:00
# endif
2018-11-05 16:27:02 +00:00
# ifdef USE_SR04
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SR04_TRIG ) , // SR04 Tri/TXgger pin
AGPIO ( GPIO_SR04_ECHO ) , // SR04 Ech/RXo pin
2018-11-05 16:27:02 +00:00
# endif
# ifdef USE_TM1638
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TM16CLK ) , // TM1638 Clock
AGPIO ( GPIO_TM16DIO ) , // TM1638 Data I/O
AGPIO ( GPIO_TM16STB ) , // TM1638 Strobe
2018-11-05 16:27:02 +00:00
# endif
# ifdef USE_HX711
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_HX711_SCK ) , // HX711 Load Cell clock
AGPIO ( GPIO_HX711_DAT ) , // HX711 Load Cell data
2018-11-05 16:27:02 +00:00
# endif
2019-09-02 15:41:18 +01:00
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Energy sensors
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-09-02 15:41:18 +01:00
# ifdef USE_ENERGY_SENSOR
# ifdef USE_HLW8012
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_NRG_SEL ) , // HLW8012/HLJ-01 Sel output (1 = Voltage)
AGPIO ( GPIO_NRG_SEL_INV ) , // HLW8012/HLJ-01 Sel output (0 = Voltage)
AGPIO ( GPIO_NRG_CF1 ) , // HLW8012/HLJ-01 CF1 voltage / current
AGPIO ( GPIO_HLW_CF ) , // HLW8012 CF power
AGPIO ( GPIO_HJL_CF ) , // HJL-01/BL0937 CF power
2019-04-12 10:44:50 +01:00
# endif
2019-09-02 15:41:18 +01:00
# if defined(USE_I2C) && defined(USE_ADE7953)
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ADE7953_IRQ ) , // ADE7953 IRQ
2018-11-05 16:27:02 +00:00
# endif
2019-11-24 01:27:04 +00:00
# ifdef USE_CSE7766
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_CSE7766_TX ) , // CSE7766 Serial interface (S31 and Pow R2)
AGPIO ( GPIO_CSE7766_RX ) , // CSE7766 Serial interface (S31 and Pow R2)
2019-11-24 01:27:04 +00:00
# endif
2019-09-02 15:41:18 +01:00
# ifdef USE_MCP39F501
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_MCP39F5_TX ) , // MCP39F501 Serial interface (Shelly2)
AGPIO ( GPIO_MCP39F5_RX ) , // MCP39F501 Serial interface (Shelly2)
AGPIO ( GPIO_MCP39F5_RST ) , // MCP39F501 Reset (Shelly2)
2018-11-05 16:27:02 +00:00
# endif
# if defined(USE_PZEM004T) || defined(USE_PZEM_AC) || defined(USE_PZEM_DC)
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PZEM0XX_TX ) , // PZEM0XX Serial interface
2018-11-05 16:27:02 +00:00
# endif
# ifdef USE_PZEM004T
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PZEM004_RX ) , // PZEM004T Serial interface
2018-11-05 16:27:02 +00:00
# endif
# ifdef USE_PZEM_AC
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PZEM016_RX ) , // PZEM-014,016 Serial Modbus interface
2018-11-05 16:27:02 +00:00
# endif
# ifdef USE_PZEM_DC
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PZEM017_RX ) , // PZEM-003,017 Serial Modbus interface
2018-11-05 16:27:02 +00:00
# endif
2019-10-18 11:28:29 +01:00
# ifdef USE_SDM120
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SDM120_TX ) , // SDM120 Serial interface
AGPIO ( GPIO_SDM120_RX ) , // SDM120 Serial interface
2019-09-02 15:41:18 +01:00
# endif
2019-10-18 11:28:29 +01:00
# ifdef USE_SDM630
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SDM630_TX ) , // SDM630 Serial interface
AGPIO ( GPIO_SDM630_RX ) , // SDM630 Serial interface
2019-09-16 09:14:09 +01:00
# endif
2019-09-10 14:14:51 +01:00
# ifdef USE_DDS2382
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DDS2382_TX ) , // DDS2382 Serial interface
AGPIO ( GPIO_DDS2382_RX ) , // DDS2382 Serial interface
2019-09-10 14:14:51 +01:00
# endif
2019-10-17 17:22:11 +01:00
# ifdef USE_DDSU666
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DDSU666_TX ) , // DDSU666 Serial interface
AGPIO ( GPIO_DDSU666_RX ) , // DDSU666 Serial interface
# endif // USE_DDSU666
2019-10-17 18:30:55 +01:00
# ifdef USE_SOLAX_X1
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SOLAXX1_TX ) , // Solax Inverter tx pin
AGPIO ( GPIO_SOLAXX1_RX ) , // Solax Inverter rx pin
# endif // USE_SOLAX_X1
2020-01-05 00:06:30 +00:00
# ifdef USE_LE01MR
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_LE01MR_TX ) , // F7F LE-01MR energy meter tx pin
AGPIO ( GPIO_LE01MR_RX ) , // F7F LE-01MR energy meter rx pin
# endif // IFDEF:USE_LE01MR
2020-06-07 16:21:29 +01:00
# ifdef USE_BL0940
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_BL0940_RX ) , // BL0940 Serial interface
2020-06-07 16:21:29 +01:00
# endif
2020-07-12 16:52:24 +01:00
# ifdef USE_IEM3000
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_IEM3000_TX ) , // IEM3000 Serial interface
AGPIO ( GPIO_IEM3000_RX ) , // IEM3000 Serial interface
2020-07-12 16:52:24 +01:00
# endif
2020-10-02 15:37:43 +01:00
# ifdef USE_WE517
AGPIO ( GPIO_WE517_TX ) , // WE517 Serial interface
AGPIO ( GPIO_WE517_RX ) , // WE517 Serial interface
# endif
2021-02-09 15:13:40 +00:00
# ifdef USE_SDM72
AGPIO ( GPIO_SDM72_TX ) , // SDM72 Serial interface
AGPIO ( GPIO_SDM72_RX ) , // SDM72 Serial interface
# endif
2019-09-02 15:41:18 +01:00
# endif // USE_ENERGY_SENSOR
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Serial sensors
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-02-04 17:18:47 +00:00
# ifdef USE_SERIAL_BRIDGE
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SBR_TX ) , // Serial Bridge Serial interface
AGPIO ( GPIO_SBR_RX ) , // Serial Bridge Serial interface
2019-08-09 21:52:33 +01:00
# endif
2020-06-16 17:36:49 +01:00
# ifdef USE_TCP_BRIDGE
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TCP_TX ) , // TCP Serial bridge
AGPIO ( GPIO_TCP_RX ) , // TCP Serial bridge
2020-06-16 17:36:49 +01:00
# endif
2019-08-09 21:52:33 +01:00
# ifdef USE_ZIGBEE
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ZIGBEE_TX ) , // Zigbee Serial interface
AGPIO ( GPIO_ZIGBEE_RX ) , // Zigbee Serial interface
AGPIO ( GPIO_ZIGBEE_RST ) , // Zigbee reset
2019-02-04 17:18:47 +00:00
# endif
# ifdef USE_MHZ19
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_MHZ_TXD ) , // MH-Z19 Serial interface
AGPIO ( GPIO_MHZ_RXD ) , // MH-Z19 Serial interface
2019-02-04 17:18:47 +00:00
# endif
# ifdef USE_SENSEAIR
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SAIR_TX ) , // SenseAir Serial interface
AGPIO ( GPIO_SAIR_RX ) , // SenseAir Serial interface
2019-02-04 17:18:47 +00:00
# endif
# ifdef USE_NOVA_SDS
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_SDS0X1_TX ) , // Nova Fitness SDS011 Serial interface
AGPIO ( GPIO_SDS0X1_RX ) , // Nova Fitness SDS011 Serial interface
2019-02-04 17:18:47 +00:00
# endif
2019-11-05 18:39:45 +00:00
# ifdef USE_HPMA
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_HPMA_TX ) , // Honeywell HPMA115S0 Serial interface
AGPIO ( GPIO_HPMA_RX ) , // Honeywell HPMA115S0 Serial interface
2019-11-05 18:39:45 +00:00
# endif
2018-11-05 16:27:02 +00:00
# ifdef USE_PMS5003
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PMS5003_TX ) , // Plantower PMS5003 Serial interface
AGPIO ( GPIO_PMS5003_RX ) , // Plantower PMS5003 Serial interface
2018-11-05 16:27:02 +00:00
# endif
2020-02-20 17:50:43 +00:00
# if defined(USE_TX20_WIND_SENSOR) || defined(USE_TX23_WIND_SENSOR)
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TX2X_TXD_BLACK ) , // TX20/TX23 Transmission Pin
2018-11-05 16:27:02 +00:00
# endif
2020-05-07 13:58:23 +01:00
# ifdef USE_WINDMETER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_WINDMETER_SPEED ) ,
2020-05-07 13:58:23 +01:00
# endif
2018-11-05 16:27:02 +00:00
# ifdef USE_MP3_PLAYER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_MP3_DFR562 ) , // RB-DFR-562, DFPlayer Mini MP3 Player Serial interface
2018-11-05 16:27:02 +00:00
# endif
2018-12-18 09:22:41 +00:00
# ifdef USE_AZ7798
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_AZ_TXD ) , // AZ-Instrument 7798 CO2 datalogger Serial interface
AGPIO ( GPIO_AZ_RXD ) , // AZ-Instrument 7798 CO2 datalogger Serial interface
2018-12-18 09:22:41 +00:00
# endif
2019-02-08 11:46:07 +00:00
# ifdef USE_PN532_HSU
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_PN532_TXD ) , // PN532 HSU Tx
AGPIO ( GPIO_PN532_RXD ) , // PN532 HSU Rx
2019-02-08 11:46:07 +00:00
# endif
2020-06-18 15:05:55 +01:00
# ifdef USE_TASMOTA_CLIENT
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TASMOTACLIENT_TXD ) , // Tasmota Client TX
AGPIO ( GPIO_TASMOTACLIENT_RXD ) , // Tasmota Client RX
AGPIO ( GPIO_TASMOTACLIENT_RST ) , // Tasmota Client Reset
AGPIO ( GPIO_TASMOTACLIENT_RST_INV ) , // Tasmota Client Reset Inverted
2019-10-20 19:12:55 +01:00
# endif
2019-08-19 10:47:59 +01:00
# ifdef USE_RDM6300
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_RDM6300_RX ) ,
2019-08-19 10:47:59 +01:00
# endif
2019-08-25 11:29:48 +01:00
# ifdef USE_IBEACON
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_IBEACON_TX ) ,
AGPIO ( GPIO_IBEACON_RX ) ,
2019-08-25 11:29:48 +01:00
# endif
2019-12-23 14:39:07 +00:00
# ifdef USE_GPS
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_GPS_TX ) , // GPS serial interface
AGPIO ( GPIO_GPS_RX ) , // GPS serial interface
2019-12-23 14:39:07 +00:00
# endif
2020-02-06 16:05:37 +00:00
# ifdef USE_HM10
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_HM10_TX ) , // GPS serial interface
AGPIO ( GPIO_HM10_RX ) , // GPS serial interface
2020-05-07 15:03:27 +01:00
# endif
# ifdef USE_OPENTHERM
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_BOILER_OT_TX ) ,
AGPIO ( GPIO_BOILER_OT_RX ) ,
2019-12-23 14:39:07 +00:00
# endif
2020-11-10 14:04:45 +00:00
# ifdef USE_AS608
AGPIO ( GPIO_AS608_TX ) ,
AGPIO ( GPIO_AS608_RX ) ,
# endif
2019-12-23 14:39:07 +00:00
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* Other sensors
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2019-02-08 11:46:07 +00:00
# ifdef USE_MGC3130
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_MGC3130_XFER ) ,
AGPIO ( GPIO_MGC3130_RESET ) ,
2019-02-08 11:46:07 +00:00
# endif
2018-12-30 10:45:21 +00:00
# ifdef USE_MAX31855
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_MAX31855CS ) , // MAX31855 Serial interface
AGPIO ( GPIO_MAX31855CLK ) , // MAX31855 Serial interface
AGPIO ( GPIO_MAX31855DO ) , // MAX31855 Serial interface
# endif
2019-03-23 23:26:03 +00:00
# ifdef USE_HRE
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_HRE_CLOCK ) ,
AGPIO ( GPIO_HRE_DATA ) ,
2019-04-05 14:27:06 +01:00
# endif
2019-10-15 19:34:35 +01:00
# ifdef USE_A4988_STEPPER
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_A4988_DIR ) , // A4988 direction pin
AGPIO ( GPIO_A4988_STP ) , // A4988 step pin
2019-09-07 13:03:07 +01:00
// folowing are not mandatory
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_A4988_ENA ) , // A4988 enabled pin
2020-10-02 16:09:09 +01:00
AGPIO ( GPIO_A4988_MS1 ) + MAX_A4988_MSS , // A4988 microstep pin1 to pin3
2019-09-07 13:03:07 +01:00
# endif
2019-10-14 15:12:59 +01:00
# ifdef USE_DEEPSLEEP
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DEEPSLEEP ) ,
2019-12-17 01:13:24 +00:00
# endif
2020-02-27 20:03:05 +00:00
# ifdef USE_KEELOQ
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_CC1101_GDO0 ) , // CC1101 pin for RX
AGPIO ( GPIO_CC1101_GDO2 ) , // CC1101 pin for RX
2020-02-27 20:03:05 +00:00
# endif
2020-02-28 00:28:06 +00:00
# ifdef USE_HRXL
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_HRXL_RX ) ,
2020-02-28 00:28:06 +00:00
# endif
2020-08-16 21:49:16 +01:00
# ifdef USE_DYP
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_DYP_RX ) ,
2020-08-16 21:49:16 +01:00
# endif
2020-04-11 00:48:37 +01:00
# ifdef USE_AS3935
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_AS3935 ) , // AS3935 IRQ Pin
2020-04-11 00:48:37 +01:00
# endif
2020-06-16 18:04:39 +01:00
# ifdef USE_TELEINFO
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_TELEINFO_RX ) ,
AGPIO ( GPIO_TELEINFO_ENABLE ) ,
# endif
2020-10-02 14:10:21 +01:00
# ifdef USE_MIEL_HVAC
AGPIO ( GPIO_MIEL_HVAC_TX ) , // Mitsubishi Electric HVAC TX pin
AGPIO ( GPIO_MIEL_HVAC_RX ) , // Mitsubishi Electric HVAC RX pin
# endif
2021-01-16 14:39:33 +00:00
# ifdef USE_WIEGAND
AGPIO ( GPIO_WIEGAND_D0 ) , // Date line D0 of Wiegand devices
AGPIO ( GPIO_WIEGAND_D1 ) , // Date line D1 of Wiegand devices
# endif
2021-01-20 12:56:57 +00:00
# ifdef USE_NEOPOOL
AGPIO ( GPIO_NEOPOOL_TX ) , // Sugar Valley RS485 Interface
AGPIO ( GPIO_NEOPOOL_RX ) , // Sugar Valley RS485 Interface
# endif
2020-09-25 17:15:31 +01:00
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* ESP32 specifics
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2020-09-25 17:15:31 +01:00
# ifdef ESP32
# ifdef USE_WEBCAM
AGPIO ( GPIO_WEBCAM_PWDN ) ,
AGPIO ( GPIO_WEBCAM_RESET ) ,
AGPIO ( GPIO_WEBCAM_XCLK ) ,
AGPIO ( GPIO_WEBCAM_SIOD ) ,
AGPIO ( GPIO_WEBCAM_SIOC ) ,
AGPIO ( GPIO_WEBCAM_DATA ) + MAX_WEBCAM_DATA ,
AGPIO ( GPIO_WEBCAM_VSYNC ) ,
AGPIO ( GPIO_WEBCAM_HREF ) ,
AGPIO ( GPIO_WEBCAM_PCLK ) ,
AGPIO ( GPIO_WEBCAM_PSCLK ) ,
AGPIO ( GPIO_WEBCAM_HSD ) + MAX_WEBCAM_HSD ,
AGPIO ( GPIO_WEBCAM_PSRCS ) ,
2020-09-29 17:10:21 +01:00
# endif // USE_WEBCAM
2020-09-25 17:15:31 +01:00
# ifdef USE_ETHERNET
AGPIO ( GPIO_ETH_PHY_POWER ) ,
AGPIO ( GPIO_ETH_PHY_MDC ) ,
AGPIO ( GPIO_ETH_PHY_MDIO ) , // Ethernet
2020-09-29 17:10:21 +01:00
# endif // USE_ETHERNET
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* ESP32 multiple Analog / Digital converter inputs
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2020-09-29 13:08:48 +01:00
AGPIO ( GPIO_ADC_INPUT ) + MAX_ADCS , // Analog inputs
AGPIO ( GPIO_ADC_TEMP ) + MAX_ADCS , // Thermistor
AGPIO ( GPIO_ADC_LIGHT ) + MAX_ADCS , // Light sensor
2020-10-08 17:27:12 +01:00
AGPIO ( GPIO_ADC_BUTTON ) + MAX_KEYS , // Button
AGPIO ( GPIO_ADC_BUTTON_INV ) + MAX_KEYS ,
2020-09-29 13:08:48 +01:00
AGPIO ( GPIO_ADC_RANGE ) + MAX_ADCS , // Range
AGPIO ( GPIO_ADC_CT_POWER ) + MAX_ADCS , // Current
AGPIO ( GPIO_ADC_JOY ) + MAX_ADCS , // Joystick
2021-01-05 13:20:04 +00:00
AGPIO ( GPIO_ADC_PH ) + MAX_ADCS , // Analog PH Sensor
2020-09-25 17:15:31 +01:00
# endif // ESP32
2020-09-29 13:08:48 +01:00
} ;
2020-09-25 17:15:31 +01:00
2020-10-02 16:09:09 +01:00
/*-------------------------------------------------------------------------------------------*\
* ESP8266 single Analog / Digital converter input
\ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
2020-09-25 17:15:31 +01:00
# ifdef ESP8266
2020-09-29 13:08:48 +01:00
const uint16_t kAdcNiceList [ ] PROGMEM = {
GPIO_NONE , // Not used
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ADC_INPUT ) , // Analog inputs
AGPIO ( GPIO_ADC_TEMP ) , // Thermistor
AGPIO ( GPIO_ADC_LIGHT ) , // Light sensor
2020-10-08 17:27:12 +01:00
AGPIO ( GPIO_ADC_BUTTON ) + MAX_KEYS , // Button
AGPIO ( GPIO_ADC_BUTTON_INV ) + MAX_KEYS ,
2020-09-25 17:15:31 +01:00
AGPIO ( GPIO_ADC_RANGE ) , // Range
AGPIO ( GPIO_ADC_CT_POWER ) , // Current
AGPIO ( GPIO_ADC_JOY ) , // Joystick
2021-01-05 13:20:04 +00:00
AGPIO ( GPIO_ADC_PH ) , // Analog PH Sensor
2018-09-08 16:18:31 +01:00
} ;
2020-09-29 13:08:48 +01:00
# endif // ESP8266
2018-09-08 16:18:31 +01:00
2020-09-25 17:15:31 +01:00
// User selectable ADC functionality
enum UserSelectableAdc {
ADC_NONE , // Not used
ADC_INPUT , // Analog input
ADC_TEMP , // Thermistor
ADC_LIGHT , // Light sensor
ADC_BUTTON , // Button
ADC_BUTTON_INV ,
ADC_RANGE , // Range
ADC_CT_POWER , // Current
ADC_JOY , // Joystick
2021-01-05 13:20:04 +00:00
ADC_PH , // Analog PH Sensor
2020-09-25 17:15:31 +01:00
// ADC_SWITCH, // Switch
// ADC_SWITCH_INV,
ADC_END } ;
2020-09-29 17:10:21 +01:00
/*********************************************************************************************\
* ATTENTION : No user changeable features beyond this point - do not add templates ! ! !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-10-03 14:06:52 +01:00
# define GPIO_ANY 32 // Any GPIO
2020-09-25 17:15:31 +01:00
# ifdef ESP8266
# define MAX_GPI8_PIN 17 // Number of supported GPIO (0..16)
# define FLASH_PINS 6 // Number of flash chip pins
# define MAX_GPIO_PIN 18 // Number of supported GPIO (0..16 + ADC0)
2020-09-29 17:10:21 +01:00
# define ADC0_PIN 17 // Pin number of ADC0
2020-09-25 17:15:31 +01:00
# define MIN_FLASH_PINS 4 // Number of flash chip pins unusable for configuration (GPIO6, 7, 8 and 11)
# define MAX_USER_PINS 14 // MAX_GPIO_PIN - MIN_FLASH_PINS
# define WEMOS_MODULE 17 // Wemos module
const char PINS_WEMOS [ ] PROGMEM = " D3TXD4RXD2D1flashcFLFLolD6D7D5D8D0A0 " ;
typedef struct MYIO8 {
uint8_t io [ MAX_GPI8_PIN ] ;
} myio8 ; // 17 bytes
typedef struct MYCFGIO8285 {
uint8_t io [ MAX_GPI8_PIN - MIN_FLASH_PINS ] ;
} mycfgio8285 ; // 13 bytes
typedef struct MYTMPLT8285 {
mycfgio8285 gp ;
uint8_t flag ;
} mytmplt8285 ; // 14 bytes
typedef struct MYCFGIO8266 {
uint8_t io [ MAX_GPI8_PIN - FLASH_PINS ] ;
} mycfgio8266 ; // 11 bytes
typedef struct MYTMPLT8266 {
mycfgio8266 gp ;
uint8_t flag ;
} mytmplt8266 ; // 12 bytes
2020-03-28 17:08:43 +00:00
2020-11-28 15:39:15 +00:00
# endif // ESP8266
# ifdef ESP32
2020-03-28 17:08:43 +00:00
2020-09-25 17:15:31 +01:00
# define MAX_GPIO_PIN 40 // Number of supported GPIO
2020-03-28 17:08:43 +00:00
# define MIN_FLASH_PINS 4 // Number of flash chip pins unusable for configuration (GPIO6, 7, 8 and 11)
2020-09-25 17:15:31 +01:00
# define MAX_USER_PINS 36 // MAX_GPIO_PIN - MIN_FLASH_PINS
# define WEMOS_MODULE 0 // Wemos module
2020-03-28 17:08:43 +00:00
2020-09-25 17:15:31 +01:00
// 0 1 2 3 4 5 6 7 8 9101112131415161718192021222324252627282930313233343536373839
const char PINS_WEMOS [ ] PROGMEM = " IOTXIORXIOIOflashcFLFLolIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOAOAOIAIAIAIAIAIA " ;
2020-03-28 17:08:43 +00:00
2020-11-28 15:39:15 +00:00
# endif // ESP32
2020-09-25 17:15:31 +01:00
//********************************************************************************************
2020-04-10 17:24:08 +01:00
2020-03-28 17:08:43 +00:00
typedef struct MYIO {
2020-09-25 17:15:31 +01:00
uint16_t io [ MAX_GPIO_PIN ] ;
} myio ; // 18 * 2 = 36 bytes / 40 * 2 = 80 bytes
2020-03-28 17:08:43 +00:00
typedef struct MYCFGIO {
2020-09-25 17:15:31 +01:00
uint16_t io [ MAX_USER_PINS ] ;
} mycfgio ; // 14 * 2 = 28 bytes / 36 * 2 = 72 bytes
2020-03-28 17:08:43 +00:00
2020-09-25 17:15:31 +01:00
# define GPIO_FLAG_USED 0 // Currently no flags used
2020-03-28 17:08:43 +00:00
typedef union {
2020-09-25 17:15:31 +01:00
uint16_t data ;
2020-03-28 17:08:43 +00:00
struct {
2020-09-25 17:15:31 +01:00
uint16_t spare00 : 1 ;
uint16_t spare01 : 1 ;
uint16_t spare02 : 1 ;
uint16_t spare03 : 1 ;
uint16_t spare04 : 1 ;
uint16_t spare05 : 1 ;
uint16_t spare06 : 1 ;
uint16_t spare07 : 1 ;
uint16_t spare08 : 1 ;
uint16_t spare09 : 1 ;
uint16_t spare10 : 1 ;
uint16_t spare11 : 1 ;
uint16_t spare12 : 1 ;
uint16_t spare13 : 1 ;
uint16_t spare14 : 1 ;
uint16_t spare15 : 1 ;
2020-03-28 17:08:43 +00:00
} ;
2020-09-25 17:15:31 +01:00
} gpio_flag ; // 2 bytes
2020-03-28 17:08:43 +00:00
typedef struct MYTMPLT {
2020-09-25 17:15:31 +01:00
mycfgio gp ; // 28 / 72 bytes
gpio_flag flag ; // 2 bytes
} mytmplt ; // 30 / 74 bytes
2020-03-28 17:08:43 +00:00
2020-09-25 17:15:31 +01:00
//********************************************************************************************
# ifdef ESP8266
2020-12-28 11:36:44 +00:00
# include "tasmota_template_legacy.h"
2020-09-25 17:15:31 +01:00
2020-12-28 11:36:44 +00:00
/********************************************************************************************\
* ESP8266 Module Templates
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-08-22 17:03:20 +01:00
2020-12-28 11:36:44 +00:00
# define USER_MODULE 255
2020-04-28 17:27:07 +01:00
2020-12-28 11:36:44 +00:00
// Supported hardware modules
2020-03-28 17:08:43 +00:00
enum SupportedModules {
SONOFF_BASIC , SONOFF_RF , SONOFF_SV , SONOFF_TH , SONOFF_DUAL , SONOFF_POW , SONOFF_4CH , SONOFF_S2X , SLAMPHER , SONOFF_TOUCH ,
SONOFF_LED , CH1 , CH4 , MOTOR , ELECTRODRAGON , EXS_RELAY , WION , WEMOS , SONOFF_DEV , H801 ,
SONOFF_SC , SONOFF_BN , SONOFF_4CHPRO , HUAFAN_SS , SONOFF_BRIDGE , SONOFF_B1 , AILIGHT , SONOFF_T11 , SONOFF_T12 , SONOFF_T13 ,
SUPLA1 , WITTY , YUNSHAN , MAGICHOME , LUANIHVIO , KMC_70011 , ARILUX_LC01 , ARILUX_LC11 , SONOFF_DUAL_R2 , ARILUX_LC06 ,
SONOFF_S31 , ZENGGE_ZF_WF017 , SONOFF_POW_R2 , SONOFF_IFAN02 , BLITZWOLF_BWSHP , SHELLY1 , SHELLY2 , PHILIPS , NEO_COOLCAM , ESP_SWITCH ,
OBI , TECKIN , APLIC_WDP303075 , TUYA_DIMMER , GOSUND , ARMTRONIX_DIMMERS , SK03_TUYA , PS_16_DZ , TECKIN_US , MANZOKU_EU_4 ,
2020-06-17 14:00:48 +01:00
OBI2 , YTF_IR_BRIDGE , DIGOO , KA10 , ZX2820 , MI_DESK_LAMP , SP10 , WAGA , SYF05 , SONOFF_L1 ,
2020-07-23 10:39:51 +01:00
SONOFF_IFAN03 , EXS_DIMMER , PWM_DIMMER , SONOFF_D1 , SONOFF_ZB_BRIDGE ,
2020-08-19 14:18:33 +01:00
MAXMODULE } ;
2020-03-28 17:08:43 +00:00
const char kModuleNames [ ] PROGMEM =
" Sonoff Basic|Sonoff RF|Sonoff SV|Sonoff TH|Sonoff Dual|Sonoff Pow|Sonoff 4CH|Sonoff S2X|Slampher|Sonoff Touch| "
" Sonoff LED|1 Channel|4 Channel|Motor C/AC|ElectroDragon|EXS Relay(s)|WiOn|Generic|Sonoff Dev|H801| "
" Sonoff SC|Sonoff BN-SZ|Sonoff 4CH Pro|Huafan SS|Sonoff Bridge|Sonoff B1|AiLight|Sonoff T1 1CH|Sonoff T1 2CH|Sonoff T1 3CH| "
" Supla Espablo|Witty Cloud|Yunshan Relay|MagicHome|Luani HVIO|KMC 70011|Arilux LC01|Arilux LC11|Sonoff Dual R2|Arilux LC06| "
" Sonoff S31|Zengge WF017|Sonoff Pow R2|Sonoff iFan02|BlitzWolf SHP|Shelly 1|Shelly 2|Xiaomi Philips|Neo Coolcam|ESP Switch| "
" OBI Socket|Teckin|AplicWDP303075|Tuya MCU|Gosund SP1 v23|ARMTR Dimmer|SK03 Outdoor|PS-16-DZ|Teckin US|Manzoku strip| "
" OBI Socket 2|YTF IR Bridge|Digoo DG-SP202|KA10|Luminea ZX2820|Mi Desk Lamp|SP10|WAGA CHCZ02MB|SYF05|Sonoff L1| "
2020-07-23 10:39:51 +01:00
" Sonoff iFan03|EXS Dimmer|PWM Dimmer|Sonoff D1|Sonoff ZbBridge "
2020-03-28 17:08:43 +00:00
;
2019-04-05 14:27:06 +01:00
const uint8_t kModuleNiceList [ ] PROGMEM = {
2018-10-01 11:19:58 +01:00
SONOFF_BASIC , // Sonoff Relay Devices
2017-08-18 17:04:49 +01:00
SONOFF_RF ,
SONOFF_TH ,
SONOFF_DUAL ,
v5.9.1j - Add Dual R2, Rewrite DS18x20 and fixes
5.9.1j
* Revert changes to xsns_05_ds18x20.ino and rename to
xsns_05_ds18x20_legacy.ino still needing library OneWire and providing
legacy JSON message:
*
"DS18x20":{"DS1":{"Type":"DS18B20","Address":"284CC48E04000079","Temperature":19.5},"DS2":{"Type":"DS18B20","Address":"283AC28304000052","Temperature":19.6}}
* Add new xdrv_05_ds18x20.ino free from library OneWire and add the
following features:
* Add support for DS1822
* Add forced setting of
12-bit resolution for selected device types (#1222)
* Add read
temperature retry counter (#1215)
* Fix lost sensors by performing
sensor probe at restart only thereby removing dynamic sensor probe
(#1215)
* Fix sensor address sorting using ascending sort on sensor
type followed by sensor address
* Rewrite JSON resulting in shorter
message allowing more sensors in default firmware image:
*
"DS18B20-1":{"Id":"00000483C23A","Temperature":19.5},"DS18B20-2":{"Id":"0000048EC44C","Temperature":19.6}
* Add additional define in user_config.h to select either single sensor
(defines disabled), new multi sensor (USE_DS18X20) or legacy multi
sensor (USE_DS18X20_LEGACY)
* Add support for Sonoff Dual R2 (#1249)
*
Fix ADS1115 detection (#1258)
2017-11-27 16:46:51 +00:00
SONOFF_DUAL_R2 ,
2017-08-18 17:04:49 +01:00
SONOFF_POW ,
2018-04-20 15:55:27 +01:00
SONOFF_POW_R2 ,
2017-08-18 17:04:49 +01:00
SONOFF_4CH ,
SONOFF_4CHPRO ,
2018-10-01 11:19:58 +01:00
SONOFF_S31 , // Sonoff Socket Relay Devices with Energy Monitoring
SONOFF_S2X , // Sonoff Socket Relay Devices
SONOFF_TOUCH , // Sonoff Switch Devices
2017-08-18 17:04:49 +01:00
SONOFF_T11 ,
SONOFF_T12 ,
SONOFF_T13 ,
2020-02-27 16:52:27 +00:00
# ifdef USE_SONOFF_D1
SONOFF_D1 , // Sonoff D1
# endif
2018-10-01 11:19:58 +01:00
SONOFF_LED , // Sonoff Light Devices
2017-08-18 17:04:49 +01:00
SONOFF_BN ,
2019-10-17 11:20:26 +01:00
# ifdef USE_SONOFF_L1
2019-07-02 09:54:30 +01:00
SONOFF_L1 ,
# endif
2018-10-01 11:19:58 +01:00
SONOFF_B1 , // Sonoff Light Bulbs
SLAMPHER ,
2019-10-14 17:15:43 +01:00
# ifdef USE_SONOFF_SC
2018-10-01 11:19:58 +01:00
SONOFF_SC , // Sonoff Environmemtal Sensor
2019-10-14 17:15:43 +01:00
# endif
2019-07-14 21:08:19 +01:00
# ifdef USE_SONOFF_IFAN
2018-10-01 11:19:58 +01:00
SONOFF_IFAN02 , // Sonoff Fan
2019-07-14 14:23:02 +01:00
SONOFF_IFAN03 ,
2019-07-14 21:08:19 +01:00
# endif
2019-10-15 14:37:22 +01:00
# ifdef USE_SONOFF_RF
2018-10-01 11:19:58 +01:00
SONOFF_BRIDGE , // Sonoff Bridge
2020-07-23 10:39:51 +01:00
# endif
# ifdef USE_ZIGBEE_EZSP
SONOFF_ZB_BRIDGE ,
2019-10-15 14:37:22 +01:00
# endif
2018-10-01 11:19:58 +01:00
SONOFF_SV , // Sonoff Development Devices
SONOFF_DEV ,
CH1 , // Relay Devices
2017-08-18 17:04:49 +01:00
CH4 ,
MOTOR ,
ELECTRODRAGON ,
EXS_RELAY ,
2017-08-19 17:08:06 +01:00
SUPLA1 ,
2017-10-02 15:45:03 +01:00
LUANIHVIO ,
2017-09-10 14:51:44 +01:00
YUNSHAN ,
2017-08-18 17:04:49 +01:00
WION ,
2018-09-02 15:17:49 +01:00
SHELLY1 ,
SHELLY2 ,
2019-01-12 14:16:37 +00:00
BLITZWOLF_BWSHP , // Socket Relay Devices with Energy Monitoring
2018-10-01 11:19:58 +01:00
TECKIN ,
2018-11-29 14:13:28 +00:00
TECKIN_US ,
2018-10-07 11:37:03 +01:00
APLIC_WDP303075 ,
2018-11-08 09:24:10 +00:00
GOSUND ,
2019-01-14 09:57:01 +00:00
ZX2820 ,
2018-11-18 23:02:09 +00:00
SK03_TUYA ,
2019-01-11 13:29:54 +00:00
DIGOO ,
2019-01-12 14:16:37 +00:00
KA10 ,
2019-01-30 18:44:48 +00:00
SP10 ,
2019-02-01 13:54:35 +00:00
WAGA ,
2019-01-12 14:16:37 +00:00
NEO_COOLCAM , // Socket Relay Devices
2018-09-30 17:38:01 +01:00
OBI ,
2019-01-08 15:27:16 +00:00
OBI2 ,
2018-12-11 13:49:58 +00:00
MANZOKU_EU_4 ,
2019-01-12 14:16:37 +00:00
ESP_SWITCH , // Switch Devices
2019-09-03 12:23:05 +01:00
# ifdef USE_TUYA_MCU
2019-01-12 14:16:37 +00:00
TUYA_DIMMER , // Dimmer Devices
2019-04-05 16:46:26 +01:00
# endif
# ifdef USE_ARMTRONIX_DIMMERS
2018-11-10 15:30:29 +00:00
ARMTRONIX_DIMMERS ,
2019-04-05 16:46:26 +01:00
# endif
# ifdef USE_PS_16_DZ
2018-11-26 00:19:09 +00:00
PS_16_DZ ,
2019-10-18 16:29:19 +01:00
# endif
# ifdef USE_EXS_DIMMER
EXS_DIMMER ,
2020-02-24 13:19:15 +00:00
# endif
# ifdef USE_PWM_DIMMER
PWM_DIMMER ,
2019-04-05 16:46:26 +01:00
# endif
2019-01-12 14:16:37 +00:00
H801 , // Light Devices
2017-09-30 12:32:53 +01:00
MAGICHOME ,
2017-11-15 22:07:45 +00:00
ARILUX_LC01 ,
2017-12-25 16:41:12 +00:00
ARILUX_LC06 ,
2017-11-15 22:07:45 +00:00
ARILUX_LC11 ,
2018-03-21 08:27:05 +00:00
ZENGGE_ZF_WF017 ,
2017-08-18 17:04:49 +01:00
HUAFAN_SS ,
2019-04-05 07:41:26 +01:00
# ifdef ROTARY_V1
2019-01-11 00:50:40 +00:00
MI_DESK_LAMP ,
2019-04-05 14:27:06 +01:00
# endif
2017-10-23 11:18:15 +01:00
KMC_70011 ,
2019-01-12 14:16:37 +00:00
AILIGHT , // Light Bulbs
2018-09-26 10:56:58 +01:00
PHILIPS ,
2019-02-09 12:24:35 +00:00
SYF05 ,
2019-01-08 15:27:16 +00:00
YTF_IR_BRIDGE ,
2019-01-12 14:16:37 +00:00
WITTY , // Development Devices
2019-02-09 12:24:35 +00:00
WEMOS
2017-08-18 17:04:49 +01:00
} ;
2020-08-22 17:03:20 +01:00
enum SupportedTemplates8285 {
TMP_SONOFF_BASIC , TMP_SONOFF_SV , TMP_SONOFF_DUAL , TMP_SONOFF_POW , TMP_SONOFF_LED , TMP_ELECTRODRAGON ,
TMP_EXS_RELAY , TMP_WION , TMP_SONOFF_DEV , TMP_H801 , TMP_SONOFF_SC , TMP_SONOFF_BN , TMP_HUAFAN_SS , TMP_SONOFF_BRIDGE ,
TMP_SONOFF_B1 , TMP_AILIGHT , TMP_SONOFF_T11 , TMP_SUPLA1 , TMP_WITTY , TMP_YUNSHAN , TMP_MAGICHOME ,
TMP_LUANIHVIO , TMP_KMC_70011 , TMP_ARILUX_LC01 , TMP_ARILUX_LC11 , TMP_ARILUX_LC06 , TMP_ZENGGE_ZF_WF017 ,
2020-08-19 14:18:33 +01:00
TMP_SONOFF_POW_R2 , TMP_BLITZWOLF_BWSHP , TMP_SHELLY1 , TMP_SHELLY2 , TMP_PHILIPS , TMP_NEO_COOLCAM , TMP_ESP_SWITCH , TMP_OBI ,
TMP_TECKIN , TMP_APLIC_WDP303075 , TMP_TUYA_DIMMER , TMP_GOSUND , TMP_ARMTRONIX_DIMMERS , TMP_SK03_TUYA , TMP_PS_16_DZ ,
TMP_TECKIN_US , TMP_MANZOKU_EU_4 , TMP_OBI2 , TMP_YTF_IR_BRIDGE , TMP_DIGOO , TMP_KA10 , TMP_ZX2820 , TMP_MI_DESK_LAMP , TMP_SP10 ,
2020-08-22 17:03:20 +01:00
TMP_WAGA , TMP_SYF05 , TMP_EXS_DIMMER , TMP_PWM_DIMMER , TMP_SONOFF_ZB_BRIDGE ,
2020-08-22 17:25:01 +01:00
TMP_MAXMODULE_8285 } ;
2020-08-19 14:18:33 +01:00
2020-08-22 17:03:20 +01:00
enum SupportedTemplates8266 {
2020-08-22 17:25:01 +01:00
TMP_WEMOS = TMP_MAXMODULE_8285 , TMP_SONOFF_4CH , TMP_SONOFF_T12 , TMP_SONOFF_T13 , TMP_SONOFF_DUAL_R2 , TMP_SONOFF_IFAN03 ,
2020-08-22 17:03:20 +01:00
TMP_MAXMODULE_8266 } ;
2020-08-19 14:18:33 +01:00
const uint8_t kModuleTemplateList [ MAXMODULE ] PROGMEM = {
TMP_SONOFF_BASIC ,
TMP_SONOFF_BASIC , // SONOFF_RF
TMP_SONOFF_SV ,
TMP_SONOFF_BASIC , // SONOFF_TH
TMP_SONOFF_DUAL ,
TMP_SONOFF_POW ,
TMP_SONOFF_4CH ,
TMP_SONOFF_BASIC , // SONOFF_S2X
TMP_SONOFF_BASIC , // SLAMPHER
TMP_SONOFF_T11 , // SONOFF_TOUCH
TMP_SONOFF_LED ,
TMP_SONOFF_BASIC , // CH1
TMP_SONOFF_DUAL , // CH4
TMP_SONOFF_BASIC , // MOTOR
TMP_ELECTRODRAGON ,
TMP_EXS_RELAY ,
TMP_WION ,
TMP_WEMOS ,
TMP_SONOFF_DEV ,
TMP_H801 ,
TMP_SONOFF_SC ,
TMP_SONOFF_BN ,
TMP_SONOFF_4CH , // SONOFF_4CHPRO
TMP_HUAFAN_SS ,
TMP_SONOFF_BRIDGE ,
TMP_SONOFF_B1 ,
TMP_AILIGHT ,
TMP_SONOFF_T11 ,
TMP_SONOFF_T12 ,
TMP_SONOFF_T13 ,
TMP_SUPLA1 ,
TMP_WITTY ,
TMP_YUNSHAN ,
TMP_MAGICHOME ,
TMP_LUANIHVIO ,
TMP_KMC_70011 ,
TMP_ARILUX_LC01 ,
TMP_ARILUX_LC11 ,
TMP_SONOFF_DUAL_R2 ,
TMP_ARILUX_LC06 ,
TMP_SONOFF_POW_R2 , // SONOFF_S31
TMP_ZENGGE_ZF_WF017 ,
TMP_SONOFF_POW_R2 ,
TMP_SONOFF_4CH , // SONOFF_IFAN02
TMP_BLITZWOLF_BWSHP ,
TMP_SHELLY1 ,
TMP_SHELLY2 ,
TMP_PHILIPS ,
TMP_NEO_COOLCAM ,
TMP_ESP_SWITCH ,
TMP_OBI ,
TMP_TECKIN ,
TMP_APLIC_WDP303075 ,
TMP_TUYA_DIMMER ,
TMP_GOSUND ,
TMP_ARMTRONIX_DIMMERS ,
TMP_SK03_TUYA ,
TMP_PS_16_DZ ,
TMP_TECKIN_US ,
TMP_MANZOKU_EU_4 ,
TMP_OBI2 ,
TMP_YTF_IR_BRIDGE ,
TMP_DIGOO ,
TMP_KA10 ,
TMP_ZX2820 ,
TMP_MI_DESK_LAMP ,
TMP_SP10 ,
TMP_WAGA ,
TMP_SYF05 ,
TMP_SONOFF_DUAL , // SONOFF_L1
TMP_SONOFF_IFAN03 ,
TMP_EXS_DIMMER ,
TMP_PWM_DIMMER ,
TMP_SONOFF_DUAL , // SONOFF_D1
TMP_SONOFF_ZB_BRIDGE ,
} ;
2020-08-22 17:03:20 +01:00
/*********************************************************************************************\
* Templates with 12 usable pins ( ESP8266 )
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-08-22 17:25:01 +01:00
const mytmplt8266 kModules8266 [ TMP_MAXMODULE_8285 ] PROGMEM = {
2020-09-14 15:14:58 +01:00
{ // SONOFF_BASIC - Sonoff Basic (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Only available on newer Sonoff Basic R2 V1
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_USER , // GPIO04 Optional sensor
2020-09-14 15:14:58 +01:00
0 , // GPIO05
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Green Led (0 = On, 1 = Off) - Link and Power status
GPI8_USER , // GPIO14 Optional sensor
2020-09-14 15:14:58 +01:00
0 , // GPIO15
0 , // GPIO16
0 // ADC0 Analog input
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_SV - Sonoff SV (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_USER , // GPIO04 Optional sensor
GPI8_USER , // GPIO05 Optional sensor
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Green Led (0 = On, 1 = Off) - Link and Power status
GPI8_USER , // GPIO14 Optional sensor
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER // ADC0 Analog input
2020-03-28 17:08:43 +00:00
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_DUAL - Sonoff Dual (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 Pad
GPI8_TXD , // GPIO01 Relay control
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_RXD , // GPIO03 Relay control
GPI8_USER , // GPIO04 Optional sensor
2020-03-28 17:08:43 +00:00
0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
GPI8_USER , // GPIO14 Optional sensor
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_POW - Sonoff Pow (ESP8266 - HLW8012)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL , // GPIO05 HLW8012 Sel output (1 = Voltage)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPI8_NRG_CF1 , // GPIO13 HLW8012 CF1 voltage / current
GPI8_HLW_CF , // GPIO14 HLW8012 CF power
GPI8_LED1 , // GPIO15 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_LED - Sonoff LED (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO04 Optional sensor (PWM3 Green)
GPI8_USER , // GPIO05 Optional sensor (PWM2 Red)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM1 , // GPIO12 Cold light (PWM0 Cold)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
GPI8_PWM2 , // GPIO14 Warm light (PWM1 Warm)
GPI8_USER , // GPIO15 Optional sensor (PWM4 Blue)
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ELECTRODRAGON - ElectroDragon IoT Relay Board (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY2 , // GPIO00 Button 2
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_KEY1 , // GPIO02 Button 1
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_USER , // GPIO04 Optional sensor
GPI8_USER , // GPIO05 Optional sensor
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL2 , // GPIO12 Red Led and Relay 2 (0 = Off, 1 = On)
GPI8_REL1 , // GPIO13 Red Led and Relay 1 (0 = Off, 1 = On)
GPI8_USER , // GPIO14 Optional sensor
GPI8_USER , // GPIO15 Optional sensor
GPI8_LED1 , // GPIO16 Green/Blue Led (1 = On, 0 = Off) - Link and Power status
GPI8_USER // ADC0 A0 Analog input
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // EXS_RELAY - ES-Store Latching relay(s) (ESP8266)
// https://ex-store.de/ESP8266-WiFi-Relay-V31
// V3.1 Module Pin 1 VCC 3V3, Module Pin 6 GND
// https://ex-store.de/2-Kanal-WiFi-WLan-Relay-V5-Blackline-fuer-Unterputzmontage
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 V3.1 Module Pin 8 - V5.0 Module Pin 4
GPI8_USER , // GPIO01 UART0_TXD V3.1 Module Pin 2 - V5.0 Module Pin 3
GPI8_USER , // GPIO02 V3.1 Module Pin 7
GPI8_USER , // GPIO03 UART0_RXD V3.1 Module Pin 3
GPI8_USER , // GPIO04 V3.1 Module Pin 10 - V5.0 Module Pin 2
GPI8_USER , // GPIO05 V3.1 Module Pin 9 - V5.0 Module Pin 1
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Relay1 ( 1 = Off)
GPI8_REL2 , // GPIO13 Relay1 ( 1 = On)
GPI8_USER , // GPIO14 V3.1 Module Pin 5 - V5.0 GPI8_REL3_INV Relay2 ( 1 = Off)
GPI8_LED1 , // GPIO15 V5.0 LED1 - Link and Power status
GPI8_USER , // GPIO16 V3.1 Module Pin 4 - V5.0 GPI8_REL4_INV Relay2 ( 1 = On)
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // WION - Indoor Tap (ESP8266)
// https://www.amazon.com/gp/product/B00ZYLUBJU/ref=s9_acsd_al_bw_c_x_3_w
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 Optional sensor (pm clock)
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1 , // GPIO02 Green Led (1 = On, 0 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12 Optional sensor (pm data)
GPI8_KEY1 , // GPIO13 Button
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO15 Relay (0 = Off, 1 = On)
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_DEV - Sonoff Dev (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 E-FW Button
GPI8_USER , // GPIO01 TX Serial RXD and Optional sensor
2020-08-18 10:42:48 +01:00
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 RX Serial TXD and Optional sensor
GPI8_USER , // GPIO04 Optional sensor
GPI8_USER , // GPIO05 Optional sensor
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12
GPI8_USER , // GPIO13 BLUE LED
GPI8_USER , // GPIO14 Optional sensor
2020-09-14 15:14:58 +01:00
0 , // GPIO15
0 , // GPIO16
2020-09-25 17:15:31 +01:00
GPI8_USER // ADC0 A0 Analog input
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // H801 - Lixada H801 Wifi (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 E-FW Button
GPI8_LED1 , // GPIO01 Green LED - Link and Power status
GPI8_USER , // GPIO02 TX and Optional sensor - Pin next to TX on the PCB
GPI8_USER , // GPIO03 RX and Optional sensor - Pin next to GND on the PCB
GPI8_PWM5 , // GPIO04 W2 - PWM5
GPI8_LED2_INV , // GPIO05 Red LED
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM3 , // GPIO12 Blue
GPI8_PWM2 , // GPIO13 Green
GPI8_PWM4 , // GPIO14 W1 - PWM4
GPI8_PWM1 , // GPIO15 Red
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_SC - onoff SC (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
GPI8_TXD , // GPIO01 RXD to ATMEGA328P
GPI8_USER , // GPIO02 Optional sensor
GPI8_RXD , // GPIO03 TXD to ATMEGA328P
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO13 Green Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_BN - Sonoff BN-SZ01 Ceiling led (ESP8285)
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 , 0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM1 , // GPIO12 Light
GPI8_LED1_INV , // GPIO13 Red Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // HUAFAN_SS - Hua Fan Smart Socket (ESP8266) - like Sonoff Pow
2020-09-25 17:15:31 +01:00
GPI8_LEDLNK_INV , // GPIO00 Blue Led (0 = On, 1 = Off) - Link status
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO03 Red Led (0 = On, 1 = Off) - Power status
GPI8_KEY1 , // GPIO04 Button
GPI8_REL1_INV , // GPIO05 Relay (0 = On, 1 = Off)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_CF1 , // GPIO12 HLW8012 CF1 voltage / current
GPI8_NRG_SEL , // GPIO13 HLW8012 Sel output (1 = Voltage)
GPI8_HLW_CF , // GPIO14 HLW8012 CF power
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_BRIDGE - Sonoff RF Bridge 433 (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
GPI8_TXD , // GPIO01 RF bridge control
GPI8_USER , // GPIO02 Optional sensor
GPI8_RXD , // GPIO03 RF bridge control
GPI8_USER , // GPIO04 Optional sensor
GPI8_USER , // GPIO05 Optional sensor
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12 Optional sensor
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
GPI8_USER , // GPIO14 Optional sensor
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_B1 - Sonoff B1 (ESP8285 - my9231)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Pad
GPI8_USER , // GPIO01 Serial RXD and Optional sensor pad
GPI8_USER , // GPIO02 Optional sensor SDA pad
GPI8_USER , // GPIO03 Serial TXD and Optional sensor pad
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_DI , // GPIO12 my9231 DI
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_DCKI , // GPIO14 my9231 DCKI
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // AILIGHT - Ai-Thinker RGBW led (ESP8266 - my9291)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Pad
GPI8_USER , // GPIO01 Serial RXD and Optional sensor pad
GPI8_USER , // GPIO02 Optional sensor SDA pad
GPI8_USER , // GPIO03 Serial TXD and Optional sensor pad
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_DI , // GPIO13 my9291 DI
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_DCKI , // GPIO15 my9291 DCKI
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_T11 - Sonoff T1 1CH (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button 1
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Optional Sensor (J3 Pin 5)
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Blue Led and Relay 1 (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SUPLA1 - Supla Espablo (ESP8266)
// http://www.wykop.pl/ramka/3325399/diy-supla-do-puszki-instalacyjnej-podtynkowej-supla-org/
0 , // GPIO00 Flash jumper
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
2019-10-16 10:51:38 +01:00
# ifdef USE_DS18x20
2020-09-25 17:15:31 +01:00
GPI8_DSB , // GPIO02 DS18B20 sensor
2019-10-16 10:51:38 +01:00
# else
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO02 Optional sensor
2020-09-14 15:14:58 +01:00
# endif
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_KEY1 , // GPIO04 Button 1
GPI8_REL1 , // GPIO05 Relay 1 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12 Optional sensor
GPI8_REL2 , // GPIO13 Relay 2 (0 = Off, 1 = On)
GPI8_USER , // GPIO14 Optional sensor
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1 , // GPIO16 Led (1 = On, 0 = Off) - Link and Power status
GPI8_USER // ADC0 A0 Analog input
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // WITTY - Witty Cloud Dev Board (ESP8266)
// https://www.aliexpress.com/item/ESP8266-serial-WIFI-Witty-cloud-Development-Board-ESP-12F-module-MINI-nodemcu/32643464555.html
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 D3 flash push button on interface board
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_LED1_INV , // GPIO02 D4 Blue Led (0 = On, 1 = Off) on ESP-12F - Link and Power status
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_KEY1 , // GPIO04 D2 push button on ESP-12F board
GPI8_USER , // GPIO05 D1 optional sensor
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM2 , // GPIO12 D6 RGB LED Green
GPI8_PWM3 , // GPIO13 D7 RGB LED Blue
GPI8_USER , // GPIO14 D5 optional sensor
GPI8_PWM1 , // GPIO15 D8 RGB LED Red
GPI8_USER , // GPIO16 D0 optional sensor
GPI8_USER // ADC0 A0 Light sensor / Requires USE_ADC_VCC in user_config.h to be disabled
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // YUNSHAN - Yunshan Wifi Relay (ESP8266)
// https://www.ebay.com/p/Esp8266-220v-10a-Network-Relay-WiFi-Module/1369583381
// Schematics and Info https://ucexperiment.wordpress.com/2016/12/18/yunshan-esp8266-250v-15a-acdc-network-wifi-relay-module/
0 , // GPIO00 Flash jumper - Module Pin 8
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO01 Serial RXD and Optional sensor - Module Pin 2
GPI8_LED1_INV , // GPIO02 Blue Led (0 = On, 1 = Off) on ESP-12F - Module Pin 7 - Link and Power status
GPI8_USER , // GPIO03 Serial TXD and Optional sensor - Module Pin 3
GPI8_REL1 , // GPIO04 Red Led and Relay (0 = Off, 1 = On) - Module Pin 10
GPI8_KEY1 , // GPIO05 Blue Led and OptoCoupler input - Module Pin 9
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // MAGICHOME - Magic Home (aka Flux-light) (ESP8266) and Arilux LC10 (ESP8285)
// https://www.aliexpress.com/item/Magic-Home-Mini-RGB-RGBW-Wifi-Controller-For-Led-Strip-Panel-light-Timing-Function-16million-colors/32686853650.html
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_LED1_INV , // GPIO02 Blue onboard LED - Link and Power status
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_ARIRFRCV , // GPIO04 IR or RF receiver (optional) (Arilux LC10)
GPI8_PWM2 , // GPIO05 RGB LED Green
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM3 , // GPIO12 RGB LED Blue
GPI8_USER , // GPIO13 RGBW LED White (optional - set to PWM4 for Cold White or Warm White as used on Arilux LC10)
GPI8_PWM1 , // GPIO14 RGB LED Red
GPI8_ARIRFSEL , // GPIO15 RF receiver control (Arilux LC10)
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // LUANIHVIO - ESP8266_HVIO
// https://luani.de/projekte/esp8266-hvio/
0 , // GPIO00 Flash jumper
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Optional sensor / I2C SDA pad
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_REL1 , // GPIO04 Relay 1 (0 = Off, 1 = On)
GPI8_REL2 , // GPIO05 Relay 2 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_SWT1 , // GPIO12 External input 1 (0 = On, 1 = Off)
GPI8_SWT2 , // GPIO13 External input 2 (0 = On, 1 = Off)
GPI8_USER , // GPIO14 Optional sensor / I2C SCL pad
GPI8_LED1 , // GPIO15 Led (1 = On, 0 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER // ADC0 A0 Analog input
2020-03-28 17:08:43 +00:00
} ,
2020-09-14 15:14:58 +01:00
{ // KMC_70011 - KMC 70011
// https://www.amazon.com/KMC-Timing-Monitoring-Network-125V-240V/dp/B06XRX2GTQ
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_HLW_CF , // GPIO04 HLW8012 CF power
GPI8_NRG_CF1 , // GPIO05 HLW8012 CF1 voltage / current
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL , // GPIO12 HLW8012 SEL (1 = Voltage)
GPI8_LED1_INV , // GPIO13 Green Led - Link and Power status
GPI8_REL1 , // GPIO14 Relay
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ARILUX_LC01 - Arilux AL-LC01 (ESP8285)
// https://www.banggood.com/nl/ARILUX-AL-LC01-Super-Mini-LED-WIFI-Smart-RGB-Controller-For-RGB-LED-Strip-Light-DC-9-12V-p-1058603.html
// (PwmFrequency 1111Hz)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Optional Button
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_ARIRFSEL , // GPIO02 RF receiver control
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_ARIRFRCV , // GPIO04 IR or RF receiver (optional)
GPI8_PWM1 , // GPIO05 RGB LED Red
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM2 , // GPIO12 RGB LED Green
GPI8_PWM3 , // GPIO13 RGB LED Blue
GPI8_USER , // GPIO14 RGBW LED White (optional - set to PWM4 for Cold White or Warm White)
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ARILUX_LC11 - Arilux AL-LC11 (ESP8266)
// https://www.banggood.com/nl/ARILUX-AL-LC11-Super-Mini-LED-WIFI-APP-Controller-RF-Remote-Control-For-RGBWW-LED-Strip-DC9-28V-p-1085112.html
// (PwmFrequency 540Hz)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Optional Button
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_ARIRFSEL , // GPIO02 RF receiver control
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_PWM2 , // GPIO04 RGB LED Green
GPI8_PWM1 , // GPIO05 RGB LED Red
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM5 , // GPIO12 RGBCW LED Warm
GPI8_PWM4 , // GPIO13 RGBW LED Cold
GPI8_PWM3 , // GPIO14 RGB LED Blue
GPI8_ARIRFRCV , // GPIO15 RF receiver input
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ARILUX_LC06 - Arilux AL-LC06 (ESP8285)
// https://www.banggood.com/ARILUX-AL-LC06-LED-WIFI-Smartphone-Controller-Romote-5-Channels-DC12-24V-For-RGBWW-Strip-light-p-1061476.html
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Optional Button
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Empty pad
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_USER , // GPIO04 W2 - PWM5
2020-03-28 17:08:43 +00:00
0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM2 , // GPIO12 RGB LED Green
GPI8_PWM3 , // GPIO13 RGB LED Blue
GPI8_PWM1 , // GPIO14 RGB LED Red
GPI8_USER , // GPIO15 RGBW LED White
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ZENGGE_ZF_WF017 - Zenggee ZJ-WF017-A (ESP12S))
// https://www.ebay.com/p/Smartphone-Android-IOS-WiFi-Music-Controller-for-RGB-5050-3528-LED-Strip-Light/534446632?_trksid=p2047675.l2644
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Optional Button
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO02 Empty pad
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO04 W2 - PWM5
2020-03-28 17:08:43 +00:00
0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM2 , // GPIO12 RGB LED Green
GPI8_PWM1 , // GPIO13 RGB LED Red
GPI8_PWM3 , // GPIO14 RGB LED Blue
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_POW_R2 - Sonoff Pow R2 (ESP8285 - CSE7766)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
GPI8_CSE7766_TX , // GPIO01 Serial RXD 4800 baud 8E1 CSE7766 energy sensor
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_CSE7766_RX , // GPIO03 Serial TXD
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // BLITZWOLF_BWSHP - BlitzWolf BW-SHP2 and BW-SHP6 (ESP8285 - BL0937 or HJL-01 Energy Monitoring)
// https://www.banggood.com/BlitzWolf-BW-SHP2-Smart-WIFI-Socket-EU-Plug-220V-16A-Work-with-Amazon-Alexa-Google-Assistant-p-1292899.html
// https://www.amazon.de/Steckdose-Homecube-intelligente-Verbrauchsanzeige-funktioniert/dp/B076Q2LKHG/ref=sr_1_fkmr0_1
// https://www.amazon.de/Intelligente-Stromverbrauch-Fernsteurung-Schaltbare-Energieklasse/dp/B076WZQS4S/ref=sr_1_1
// https://www.aliexpress.com/store/product/BlitzWolf-BW-SHP6-EU-Plug-Metering-Version-WIFI-Smart-Socket-220V-240V-10A-Work-with-Amazon/1965360_32945504669.html
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO00 Red Led (1 = On, 0 = Off) - Power status
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_LEDLNK_INV , // GPIO02 Blue Led (1 = On, 0 = Off) - Link status
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_HJL_CF , // GPIO05 BL0937 or HJL-01 CF power
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage)
GPI8_KEY1 , // GPIO13 Button
GPI8_NRG_CF1 , // GPIO14 BL0937 or HJL-01 CF1 current / voltage
GPI8_REL1 , // GPIO15 Relay (0 = Off, 1 = On)
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SHELLY1 - Shelly1 Open Source (ESP8266 - 2MB) - https://shelly.cloud/shelly1-open-source/
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 - Can be changed to GPI8_USER, only if Shelly is powered with 12V DC
GPI8_USER , // GPIO01 Serial RXD - Can be changed to GPI8_USER, only if Shelly is powered with 12V DC
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 Serial TXD - Can be changed to GPI8_USER, only if Shelly is powered with 12V DC
GPI8_REL1 , // GPIO04 Relay (0 = Off, 1 = On)
GPI8_SWT1_NP , // GPIO05 SW pin
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SHELLY2 - Shelly2 (ESP8266 - 2MB) - https://shelly.cloud/shelly2/
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_MCP39F5_TX , // GPIO01 MCP39F501 Serial input
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_MCP39F5_RX , // GPIO03 MCP39F501 Serial output
GPI8_REL1 , // GPIO04
GPI8_REL2 , // GPIO05
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_SWT1 , // GPIO12
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_SWT2 , // GPIO14
GPI8_MCP39F5_RST , // GPIO15 MCP39F501 Reset
2020-03-28 17:08:43 +00:00
0 ,
0
} ,
2020-09-14 15:14:58 +01:00
{ // PHILIPS - Xiaomi Philips bulb (ESP8266)
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 , 0 , 0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_PWM2 , // GPIO12 cold/warm light
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_PWM1 , // GPIO15 light intensity
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // NEO_COOLCAM - Neo Coolcam (ESP8266)
// https://www.banggood.com/NEO-COOLCAM-WiFi-Mini-Smart-Plug-APP-Remote-Control-Timing-Smart-Socket-EU-Plug-p-1288562.html?cur_warehouse=CN
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO04 Red Led (0 = On, 1 = Off) - Link and Power status
2020-03-28 17:08:43 +00:00
0 ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay (0 = Off, 1 = On)
GPI8_KEY1 , // GPIO13 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ESP_SWITCH - Michael Haustein 4 channel wall switch (ESP07 = ESP8266)
// Use rules for further actions like - rule on power1#state do publish cmnd/other_device/power %value% endon
2020-09-25 17:15:31 +01:00
GPI8_KEY2 , // GPIO00 Button 2
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_REL3_INV , // GPIO02 Yellow Led 3 (0 = On, 1 = Off)
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_KEY1 , // GPIO04 Button 1
GPI8_REL2_INV , // GPIO05 Red Led 2 (0 = On, 1 = Off)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL4_INV , // GPIO12 Blue Led 4 (0 = On, 1 = Off)
GPI8_KEY4 , // GPIO13 Button 4
GPI8_KEY3 , // GPIO14 Button 3
GPI8_LED1 , // GPIO15 Optional sensor
GPI8_REL1_INV , // GPIO16 Green Led 1 (0 = On, 1 = Off)
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // OBI - OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00
GPI8_USER , // GPIO01 Serial RXD
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 Serial TXD
GPI8_LED1 , // GPIO04 Blue LED - Link and Power status
GPI8_REL1 , // GPIO05 (Relay OFF, but used as Relay Switch)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_LED3 , // GPIO12 (Relay ON, but set to LOW, so we can switch with GPIO05)
GPI8_USER , // GPIO13
GPI8_KEY1 , // GPIO14 Button
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO16
GPI8_USER // ADC0 A0 Analog input
2020-03-28 17:08:43 +00:00
} ,
2020-09-14 15:14:58 +01:00
{ // TECKIN - https://www.amazon.de/gp/product/B07D5V139R
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO01 Serial TXD and Button
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO03 Serial RXD and Red Led (0 = On, 1 = Off) - Power status
GPI8_HJL_CF , // GPIO04 BL0937 or HJL-01 CF power
GPI8_NRG_CF1 , // GPIO05 BL0937 or HJL-01 CF1 current / voltage
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage)
GPI8_LEDLNK_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link status
GPI8_REL1 , // GPIO14 Relay (0 = Off, 1 = On)
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // APLIC_WDP303075 - Aplic WDP 303075 (ESP8285 - HLW8012 Energy Monitoring)
// https://www.amazon.de/dp/B07CNWVNJ2
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO03 Button
GPI8_HLW_CF , // GPIO04 HLW8012 CF power
GPI8_NRG_CF1 , // GPIO05 HLW8012 CF1 current / voltage
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 HLW8012 CF Sel output (0 = Voltage)
GPI8_LED1_INV , // GPIO13 LED (0 = On, 1 = Off) - Link and Power status
GPI8_REL1 , // GPIO14 Relay SRU 5VDC SDA (0 = Off, 1 = On )
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // TUYA_DIMMER - Tuya MCU device (ESP8266 w/ separate MCU)
// https://www.amazon.com/gp/product/B07CTNSZZ8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
2020-09-25 17:15:31 +01:00
GPI8_USER , // Virtual Button (controlled by MCU)
GPI8_USER , // GPIO01 MCU serial control
GPI8_USER ,
GPI8_USER , // GPIO03 MCU serial control
GPI8_USER ,
GPI8_USER ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER ,
GPI8_USER ,
GPI8_USER , // GPIO14 Green Led
GPI8_USER ,
GPI8_USER ,
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // GOSUND - https://www.amazon.de/gp/product/B0777BWS1P
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LEDLNK_INV , // GPIO01 Serial RXD and LED1 (blue) inv - Link status
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO03 Serial TXD and Button
GPI8_HJL_CF , // GPIO04 BL0937 or HJL-01 CF power
GPI8_NRG_CF1 , // GPIO05 BL0937 or HJL-01 CF1 current / voltage
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage)
GPI8_LED1_INV , // GPIO13 LED2 (red) inv - Power status
GPI8_REL1 , // GPIO14 Relay (0 = Off, 1 = On)
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ARMTRONIX_DIMMERS - ARMTRONIX Dimmer, one or two channel (ESP8266 w/ separate MCU dimmer)
// https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-two-triac-board/
// https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-esp8266-one-triac-board-alexaecho/
2020-09-25 17:15:31 +01:00
GPI8_USER ,
GPI8_TXD , // GPIO01 MCU serial control
GPI8_USER ,
GPI8_RXD , // GPIO03 MCU serial control
GPI8_USER ,
GPI8_USER ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER ,
GPI8_USER ,
GPI8_USER ,
GPI8_USER ,
GPI8_USER ,
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // SK03_TUYA - Outdoor smart plug with power monitoring HLW8012 chip - https://www.amazon.com/gp/product/B07CG7MBPV
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_HLW_CF , // GPIO04 HLW8012 CF power
GPI8_NRG_CF1 , // GPIO05 HLW8012 CF1 current / voltage
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 HLW8012 CF Sel output (0 = Voltage)
GPI8_LED1_INV , // GPIO13 Red Led (0 = On, 1 = Off) - Power status
GPI8_LEDLNK_INV , // GPIO14 Blue Led (0 = On, 1 = Off) - Link status
GPI8_REL1 , // GPIO15 Relay (0 = Off, 1 = On)
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // PS_16_DZ - PS-16-DZ Dimmer (ESP8266 w/ separate Nuvoton MCU dimmer)
// https://www.aliexpress.com/item/SM-Smart-WIFI-Wall-Dimmer-Light-Switch-US-Ewelink-APP-Remote-Control-Wi-Fi-Wirele-Work/32871151902.html
2020-09-25 17:15:31 +01:00
GPI8_USER ,
GPI8_TXD , // GPIO01 MCU serial control
GPI8_USER ,
GPI8_RXD , // GPIO03 MCU serial control
GPI8_USER ,
GPI8_USER ,
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER ,
GPI8_LED1 , // GPIO13 WiFi LED - Link and Power status
GPI8_USER ,
GPI8_USER ,
GPI8_USER ,
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // TECKIN_US - Teckin SP20 US with Energy Monitoring
// https://www.amazon.com/Outlet-Compatible-Monitoring-Function-Required/dp/B079Q5W22B
// https://www.amazon.com/Outlet-ZOOZEE-Monitoring-Function-Compatible/dp/B07J2LR5KN
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO00 Red Led (1 = On, 0 = Off) - Power status
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_LEDLNK_INV , // GPIO02 Blue Led (1 = On, 0 = Off) - Link status
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO04 Relay (0 = Off, 1 = On)
GPI8_HJL_CF , // GPIO05 BL0937 or HJL-01 CF power
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage)
GPI8_KEY1 , // GPIO13 Button
GPI8_NRG_CF1 , // GPIO14 BL0937 or HJL-01 CF1 current / voltage
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // MANZOKU_EU_4 - "MANZOKU" labeled power strip, EU version
// https://www.amazon.de/Steckdosenleiste-AOFO-Mehrfachsteckdose-Ãœberspannungsschutz-Sprachsteuerung/dp/B07GBSD11P/
// https://www.amazon.de/Steckdosenleiste-Geekbes-USB-Anschluss-Kompatibel-gesteuert/dp/B078W23BW9/
0 , // GPIO00
0 , // GPIO01 Serial RXD
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO03 Serial TXD + Button
GPI8_REL2 , // GPIO04 Relay 2
GPI8_REL1 , // GPIO05 Relay 1
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL3 , // GPIO12 Relay 3
GPI8_REL4 , // GPIO13 Relay 4
GPI8_USER , // GPIO14
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO16
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // OBI2 - OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-2-stueck-weiss/p/4077673
0 , // GPIO00
0 , // GPIO01 Serial RXD
2020-03-28 17:08:43 +00:00
0 ,
2020-09-14 15:14:58 +01:00
0 , // GPIO03 Serial TXD
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO04 Relay 1
GPI8_KEY1 , // GPIO05 Button
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_LEDLNK_INV , // GPIO12 Green LED - Link status
GPI8_LED1 , // GPIO13 Red LED - Power status
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // YTF_IR_BRIDGE - https://www.aliexpress.com/item/Tuya-universal-Smart-IR-Hub-remote-control-Voice-Control-AC-TV-Work-With-Alexa-Google-Home/32951202513.html
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00
GPI8_USER , // GPIO01 Serial RXD
GPI8_USER , // GPIO02
GPI8_USER , // GPIO03 Serial TXD
GPI8_LED1_INV , // GPIO04 Blue Led - Link status
GPI8_IRRECV , // GPIO05 IR Receiver
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
0 , // GPIO12
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO13 Button
GPI8_IRSEND , // GPIO14 IR Transmitter
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // DIGOO - Digoo DG-SP202
// https://www.banggood.com/DIGOO-DG-SP202-Dual-EU-Plug-Smart-WIFI-Socket-Individual-Controllable-Energy-Monitor-Remote-Control-Timing-Smart-Home-Outlet-let-p-1375323.html
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button1
2020-09-14 15:14:58 +01:00
0 , // GPIO01 Serial RXD
0 , // GPIO02
0 , // GPIO03 Serial TXD
2020-09-25 17:15:31 +01:00
GPI8_HJL_CF , // GPIO04 BL0937 or HJL-01 CF power
GPI8_NRG_CF1 , // GPIO05 BL0937 or HJL-01 CF1 current / voltage
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage)
GPI8_LED1 , // GPIO13 Blue Leds - Link Status
GPI8_REL2 , // GPIO14 Relay2 (0 = Off, 1 = On) and Red Led
GPI8_REL1 , // GPIO15 Relay1 (0 = Off, 1 = On) and Red Led
GPI8_KEY2_NP , // GPIO16 Button2, externally pulled up
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // KA10 - SMANERGY KA10 (ESP8285 - BL0937 Energy Monitoring) - https://www.amazon.es/dp/B07MBTCH2Y
0 , // GPIO00
2020-09-25 17:15:31 +01:00
GPI8_LEDLNK_INV , // GPIO01 Blue LED - Link status
2020-09-14 15:14:58 +01:00
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO03 Button
GPI8_HJL_CF , // GPIO04 BL0937 CF power
GPI8_NRG_CF1 , // GPIO05 BL0937 CF1 voltage / current
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 Sel output (1 = Voltage)
GPI8_LED1 , // GPIO13 Red LED - Power status
GPI8_REL1 , // GPIO14 Relay 1
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // ZX2820
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button
2020-03-28 17:08:43 +00:00
0 , 0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_HLW_CF , // GPIO04 HLW8012 CF power
GPI8_NRG_CF1 , // GPIO05 HLW8012 CF1 voltage / current
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 HLW8012 SEL (0 = Voltage)
GPI8_LED1_INV , // GPIO13 Green Led - Link and Power status
GPI8_REL1 , // GPIO14 Relay
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // MI_DESK_LAMP - Mi LED Desk Lamp - https://www.mi.com/global/smartlamp/
2020-03-28 17:08:43 +00:00
0 , 0 ,
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO02 Button
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_PWM1 , // GPIO04 Cold White
GPI8_PWM2 , // GPIO05 Warm White
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_ROT1A , // GPIO12 Rotary switch A pin
GPI8_ROT1B , // GPIO13 Rotary switch B pin
2020-03-28 17:08:43 +00:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SP10 - Tuya SP10 (BL0937 Energy Monitoring)
// https://www.aliexpress.com/item/Smart-Mini-WiFi-Plug-Outlet-Switch-Work-With-ForEcho-Alexa-Google-Home-Remote-EU-Smart-Socket/32963670423.html
0 , // GPIO00
2020-09-25 17:15:31 +01:00
GPI8_PWM1 , // GPIO01 Nightlight
2020-09-14 15:14:58 +01:00
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO03 Button
GPI8_HJL_CF , // GPIO04 BL0937 CF power
GPI8_NRG_CF1 , // GPIO05 BL0937 CF1 voltage / current
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO12 BL0937 Sel output (1 = Voltage)
GPI8_LED1 , // GPIO13 Blue LED - Link status
GPI8_REL1 , // GPIO14 Relay and red LED
2020-03-28 17:08:43 +00:00
0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // WAGA - WAGA life CHCZ02MB (HJL-01 Energy Monitoring)
// https://www.ebay.com/itm/332595697006
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO00 Red LED
2020-09-14 15:14:58 +01:00
0 , // GPIO01 Serial RXD
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_NRG_SEL_INV , // GPIO03 HJL-01 Sel output (1 = Voltage)
2020-09-14 15:14:58 +01:00
0 , // GPIO04
2020-09-25 17:15:31 +01:00
GPI8_HJL_CF , // GPIO05 HJL-01 CF power
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Relay
GPI8_KEY1 , // GPIO13 Button
GPI8_NRG_CF1 , // GPIO14 HJL-01 CF1 voltage / current
GPI8_LEDLNK_INV , // GPIO15 Blue LED - Link status
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SYF05 - Sunyesmart SYF05 (a.k.a. Fcmila) = TYWE3S + SM16726
2020-09-25 17:15:31 +01:00
// Also works with Merkury 904 RGBW Bulbs with 13 set to GPI8_SM16716_SEL
2020-09-14 15:14:58 +01:00
// https://www.flipkart.com/fc-mila-bxav-xs-ad-smart-bulb/p/itmf85zgs45fzr7n
// https://docs.tuya.com/en/hardware/WiFi-module/wifi-e3s-module.html
// http://www.datasheet-pdf.com/PDF/SM16716-Datasheet-Sunmoon-932771
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 N.C.
2020-09-14 15:14:58 +01:00
0 , // GPIO01 Serial RXD
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO02 N.C.
2020-09-14 15:14:58 +01:00
0 , // GPIO03 Serial TXD
2020-09-25 17:15:31 +01:00
GPI8_SM16716_CLK , // GPIO04 SM16716 Clock
GPI8_PWM1 , // GPIO05 White
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12 Alt. White on some devices
GPI8_USER , // GPIO13 SM16716 Enable on some devices
GPI8_SM16716_DAT , // GPIO14 SM16716 Data
2020-09-14 15:14:58 +01:00
0 , // GPIO15 wired to GND
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO16 N.C.
GPI8_USER // ADC0 A0 Analog input
2020-08-18 10:42:48 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // EXS_DIMMER - EX-Store WiFi Dimmer v4, two channel (ESP8266 w/ separate MCU dimmer)
// https://ex-store.de/2-Kanal-RS232-WiFi-WLan-Dimmer-Modul-V4-fuer-Unterputzmontage-230V-3A
// https://ex-store.de/2-Kanal-RS232-WiFi-WLan-Dimmer-Modul-V4-fuer-Unterputzmontage-230V-3A-ESP8266-V12-Stift-und-Buchsenleisten
2020-03-28 17:08:43 +00:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_TXD , // GPIO01 MCU serial control
GPI8_LEDLNK , // GPIO02 LED Link
GPI8_RXD , // GPIO03 MCU serial control
GPI8_USER , // GPIO04
GPI8_USER , // GPIO05
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12
GPI8_EXS_ENABLE , // GPIO13 EXS MCU Enable
GPI8_USER , // GPIO14
2020-09-14 15:14:58 +01:00
0 , // GPIO15
2020-03-28 17:08:43 +00:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // PWM_DIMMER - Support for Martin Jerry/acenx/Tessan/NTONPOWER SD0x PWM
// dimmer switches. The brightness of the load for these dimmers is
// controlled by a PWM GPIO pin. There are typically power, up & down
// buttons and 4 LED's. Examples are:
// https://www.amazon.com/dp/B07FXYSVR1
// https://www.amazon.com/dp/B07V26Q3VD
// https://www.amazon.com/dp/B07K67D43J
// https://www.amazon.com/dp/B07TTGFWFM
2020-09-25 17:15:31 +01:00
GPI8_KEY3 , // GPIO00 Up button
GPI8_KEY2 , // GPIO01 Down button
2020-09-14 15:14:58 +01:00
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_LED4_INV , // GPIO03 Level 5 LED
GPI8_LEDLNK_INV , // GPIO04 LED Link
GPI8_LED3_INV , // GPIO05 Level 4 LED
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_LED2_INV , // GPIO12 Level 3 LED
GPI8_PWM1 , // GPIO13 Dimmer PWM
GPI8_LED1_INV , // GPIO12 Level 2 LED
GPI8_KEY1_INV , // GPIO15 Power button
GPI8_REL1_INV , // GPIO16 Power relay/Level 1 LED
2020-03-28 17:08:43 +00:00
0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_ZB_BRIDGE - Sonoff Zigbee Bridge (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_LED1_INV , // GPIO00 Green Led (0 = On, 1 = Off) - Traffic between ESP and EFR
GPI8_ZIGBEE_TX , // GPIO01 Zigbee Serial control
2020-09-14 15:14:58 +01:00
0 , // GPIO02
2020-09-25 17:15:31 +01:00
GPI8_ZIGBEE_RX , // GPIO03 Zigbee Serial control
GPI8_ZIGBEE_RST , // GPIO04 Zigbee Reset
2020-09-14 15:14:58 +01:00
0 , // GPIO05 EFR32 Bootloader mode (drive Low for Gecko Bootloader, inactive or high for Zigbee EmberZNet)
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
// GPIO09 (SD_DATA2 Flash QIO or ESP8285)
// GPIO10 (SD_DATA3 Flash QIO or ESP8285)
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_I2C_SDA , // GPIO12 I2C SDA - connected to 512KB EEPROM
GPI8_LEDLNK_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link status
GPI8_I2C_SCL , // GPIO14 I2C SCL - connected to 512KB EEPROM
2020-09-14 15:14:58 +01:00
0 , // GPIO15 connected to IO15 pad, also used for logging
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO16 Button
2020-07-23 10:39:51 +01:00
0
2019-01-14 09:57:01 +00:00
}
2019-01-12 14:16:37 +00:00
} ;
2020-08-22 17:03:20 +01:00
/*********************************************************************************************\
* Templates with 14 usable pins ( ESP8285 )
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-09-25 17:15:31 +01:00
const mytmplt8285 kModules8285 [ TMP_MAXMODULE_8266 - TMP_WEMOS ] PROGMEM = {
2020-09-14 15:14:58 +01:00
{ // WEMOS - Any ESP8266/ESP8285 device like WeMos and NodeMCU hardware (ESP8266)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 D3 Wemos Button Shield
GPI8_USER , // GPIO01 TX Serial RXD
GPI8_USER , // GPIO02 D4 Wemos DHT Shield
GPI8_USER , // GPIO03 RX Serial TXD and Optional sensor
GPI8_USER , // GPIO04 D2 Wemos I2C SDA
GPI8_USER , // GPIO05 D1 Wemos I2C SCL / Wemos Relay Shield (0 = Off, 1 = On) / Wemos WS2812B RGB led Shield
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO09 (SD_DATA2 Flash QIO or ESP8285)
GPI8_USER , // GPIO10 (SD_DATA3 Flash QIO or ESP8285)
2020-09-14 15:14:58 +01:00
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO12 D6
GPI8_USER , // GPIO13 D7
GPI8_USER , // GPIO14 D5
GPI8_USER , // GPIO15 D8
GPI8_USER , // GPIO16 D0 Wemos Wake
GPI8_USER // ADC0 A0 Analog input
2020-08-22 17:03:20 +01:00
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_4CH - Sonoff 4CH (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button 1
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Optional sensor
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_REL3 , // GPIO04 Sonoff 4CH Red Led and Relay 3 (0 = Off, 1 = On)
GPI8_REL2 , // GPIO05 Sonoff 4CH Red Led and Relay 2 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_KEY2 , // GPIO09 Button 2
GPI8_KEY3 , // GPIO10 Button 3
2020-09-14 15:14:58 +01:00
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Red Led and Relay 1 (0 = Off, 1 = On) - Link and Power status
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off)
GPI8_KEY4 , // GPIO14 Button 4
GPI8_REL4 , // GPIO15 Red Led and Relay 4 (0 = Off, 1 = On)
2020-08-22 17:03:20 +01:00
0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_T12 - Sonoff T1 2CH (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button 1
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Optional Sensor (J3 Pin 5)
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
2020-08-22 17:03:20 +01:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_REL2 , // GPIO05 Blue Led and Relay 2 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_KEY2 , // GPIO09 Button 2
2020-09-14 15:14:58 +01:00
0 , // GPIO10
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Blue Led and Relay 1 (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-08-22 17:03:20 +01:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_T13 - Sonoff T1 3CH (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 Button 1
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
GPI8_USER , // GPIO02 Optional Sensor (J3 Pin 5)
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
GPI8_REL3 , // GPIO04 Blue Led and Relay 3 (0 = Off, 1 = On)
GPI8_REL2 , // GPIO05 Blue Led and Relay 2 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_KEY2 , // GPIO09 Button 2
GPI8_KEY3 , // GPIO10 Button 3
2020-09-14 15:14:58 +01:00
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Blue Led and Relay 1 (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-08-22 17:03:20 +01:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_DUAL_R2 - Sonoff Dual R2 (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO00 Button 0 on header (0 = On, 1 = Off)
GPI8_USER , // GPIO01 Serial RXD and Optional sensor
2020-08-22 17:03:20 +01:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO03 Serial TXD and Optional sensor
2020-08-22 17:03:20 +01:00
0 ,
2020-09-25 17:15:31 +01:00
GPI8_REL2 , // GPIO05 Relay 2 (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_USER , // GPIO09 Button 1 on header (0 = On, 1 = Off)
GPI8_KEY1 , // GPIO10 Button on casing
2020-09-14 15:14:58 +01:00
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL1 , // GPIO12 Relay 1 (0 = Off, 1 = On)
GPI8_LED1_INV , // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
2020-08-22 17:03:20 +01:00
0 , 0 , 0 , 0
} ,
2020-09-14 15:14:58 +01:00
{ // SONOFF_IFAN03 - Sonoff iFan03 (ESP8285)
2020-09-25 17:15:31 +01:00
GPI8_KEY1 , // GPIO00 WIFI_KEY0 Button 1
GPI8_TXD , // GPIO01 ESP_TXD Serial RXD connection to P0.5 of RF microcontroller
2020-09-14 15:14:58 +01:00
0 , // GPIO02 ESP_LOG
2020-09-25 17:15:31 +01:00
GPI8_RXD , // GPIO03 ESP_RXD Serial TXD connection to P0.4 of RF microcontroller
2020-09-14 15:14:58 +01:00
0 , // GPIO04 DEBUG_RX
0 , // GPIO05 DEBUG_TX
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
2020-09-25 17:15:31 +01:00
GPI8_REL1_INV , // GPIO09 WIFI_O0 Relay 1 (0 = Off, 1 = On) controlling the light
GPI8_BUZZER_INV , // GPIO10 WIFI_O4 Buzzer (0 = Off, 1 = On)
2020-09-14 15:14:58 +01:00
// GPIO11 (SD_CMD Flash)
2020-09-25 17:15:31 +01:00
GPI8_REL3 , // GPIO12 WIFI_O2 Relay 3 (0 = Off, 1 = On) controlling the fan
GPI8_LED1_INV , // GPIO13 WIFI_CHK Blue Led on PCA (0 = On, 1 = Off) - Link and Power status
GPI8_REL2 , // GPIO14 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan
GPI8_REL4 , // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan
2020-08-22 17:03:20 +01:00
0 , 0
}
} ;
2020-11-28 15:39:15 +00:00
# endif // ESP8266
2020-09-25 17:15:31 +01:00
2020-12-28 11:36:44 +00:00
# ifdef ESP32
/********************************************************************************************\
* ESP32 Module templates
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-09-25 17:15:31 +01:00
# define USER_MODULE 255
2020-12-28 11:36:44 +00:00
// Supported hardware modules
enum SupportedModules {
WEMOS ,
ESP32_CAM_AITHINKER ,
2020-12-29 10:07:35 +00:00
ODROID_GO ,
ESP32_SOLO ,
2020-12-28 17:01:02 +00:00
WT32_ETH01 ,
TTGO_WATCH ,
M5STACK_CORE2 ,
2020-12-28 11:36:44 +00:00
MAXMODULE } ;
2021-01-27 13:45:42 +00:00
// Default module settings
const uint8_t kModuleNiceList [ ] PROGMEM = {
WEMOS ,
2020-12-28 17:01:02 +00:00
# ifdef USE_WEBCAM
2021-01-27 13:45:42 +00:00
ESP32_CAM_AITHINKER ,
2020-12-28 17:01:02 +00:00
# endif // USE_WEBCAM
2020-12-29 16:42:53 +00:00
# ifdef USE_ODROID_GO
2021-01-27 13:45:42 +00:00
ODROID_GO ,
2020-12-29 16:42:53 +00:00
# endif // USE_ODROID_GO
2021-01-27 13:45:42 +00:00
# ifdef USE_ESP32_SOLO
// ESP32_SOLO, // To be defined
# endif // USE_ESP32_SOLO
2021-01-27 13:27:05 +00:00
# ifdef USE_WT32_ETH01
2021-01-27 13:45:42 +00:00
WT32_ETH01 ,
2021-01-27 13:27:05 +00:00
# endif // USE_WT32_ETH01
2021-01-27 13:45:42 +00:00
# ifdef USE_TTGO_WATCH
// TTGO_WATCH, // To be defined
# endif // USE_TTGO_WATCH
2020-12-28 17:01:02 +00:00
# ifdef USE_M5STACK_CORE2
2021-01-27 13:45:42 +00:00
M5STACK_CORE2 ,
2020-12-28 17:01:02 +00:00
# endif // USE_M5STACK_CORE2
2021-01-27 13:45:42 +00:00
} ;
2020-09-25 17:15:31 +01:00
2021-02-11 16:13:17 +00:00
// !!! Update this list in the same order as kModuleNiceList !!!
2021-01-27 13:45:42 +00:00
const char kModuleNames [ ] PROGMEM =
" ESP32-DevKit| "
2020-12-28 17:01:02 +00:00
# ifdef USE_WEBCAM
2021-01-27 13:45:42 +00:00
" ESP32-Cam| "
2020-12-28 17:01:02 +00:00
# endif // USE_WEBCAM
2020-12-29 16:42:53 +00:00
# ifdef USE_ODROID_GO
2021-01-27 13:45:42 +00:00
" Odroid Go| "
2020-12-29 16:42:53 +00:00
# endif // USE_ODROID_GO
2021-01-27 13:45:42 +00:00
# ifdef USE_ESP32_SOLO
// "ESP32-Solo|" // To be defined
# endif // USE_ESP32_SOLO
2021-01-27 13:27:05 +00:00
# ifdef USE_WT32_ETH01
2021-01-27 13:45:42 +00:00
" WT32-Eth01| "
2021-01-27 13:27:05 +00:00
# endif // USE_WT32_ETH01
2021-01-27 13:45:42 +00:00
# ifdef USE_TTGO_WATCH
// "TTGO Watch|" // To be defined
# endif // USE_TTGO_WATCH
2020-12-28 17:01:02 +00:00
# ifdef USE_M5STACK_CORE2
2021-01-27 13:45:42 +00:00
" M5Stack Core2| "
2020-12-28 17:01:02 +00:00
# endif // USE_M5STACK_CORE2
2021-01-27 13:45:42 +00:00
;
2020-09-25 17:15:31 +01:00
2021-02-11 16:13:17 +00:00
// !!! Update this list in the same order as SupportedModules !!!
2021-01-27 13:45:42 +00:00
const mytmplt kModules [ ] PROGMEM = {
2020-12-28 17:01:02 +00:00
{ // WEMOS - Espressif ESP32-DevKitC - Any ESP32 device like WeMos and NodeMCU hardware (ESP32)
AGPIO ( GPIO_USER ) , // 0 (I)O GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1, EMAC_TX_CLK
AGPIO ( GPIO_USER ) , // 1 IO TXD0 GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
AGPIO ( GPIO_USER ) , // 2 IO GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0
AGPIO ( GPIO_USER ) , // 3 IO RXD0 GPIO3, U0RXD, CLK_OUT2
AGPIO ( GPIO_USER ) , // 4 IO GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER
AGPIO ( GPIO_USER ) , // 5 IO GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK
// 6 IO GPIO6, Flash CLK
// 7 IO GPIO7, Flash D0
// 8 IO GPIO8, Flash D1
AGPIO ( GPIO_USER ) , // 9 IO GPIO9, Flash D2, U1RXD
AGPIO ( GPIO_USER ) , // 10 IO GPIO10, Flash D3, U1TXD
// 11 IO GPIO11, Flash CMD
AGPIO ( GPIO_USER ) , // 12 (I)O GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3 (If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is connected and pulled high. See ESP32 datasheet for more details.)
AGPIO ( GPIO_USER ) , // 13 IO GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER
AGPIO ( GPIO_USER ) , // 14 IO GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
AGPIO ( GPIO_USER ) , // 15 (I)O GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3 (If driven Low, silences boot messages from normal boot. Has internal pull-up, so unconnected = High = normal output.)
AGPIO ( GPIO_USER ) , // 16 IO GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
AGPIO ( GPIO_USER ) , // 17 IO GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
AGPIO ( GPIO_USER ) , // 18 IO GPIO18, VSPICLK, HS1_DATA7
AGPIO ( GPIO_USER ) , // 19 IO GPIO19, VSPIQ, U0CTS, EMAC_TXD0
0 , // 20
AGPIO ( GPIO_USER ) , // 21 IO GPIO21, VSPIHD, EMAC_TX_EN
AGPIO ( GPIO_USER ) , // 22 IO LED GPIO22, VSPIWP, U0RTS, EMAC_TXD1
AGPIO ( GPIO_USER ) , // 23 IO GPIO23, VSPID, HS1_STROBE
0 , // 24
AGPIO ( GPIO_USER ) , // 25 IO GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0
AGPIO ( GPIO_USER ) , // 26 IO GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1
AGPIO ( GPIO_USER ) , // 27 IO GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV
0 , // 28
0 , // 29
0 , // 30
0 , // 31
AGPIO ( GPIO_USER ) , // 32 IO GPIO32, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4, TOUCH9, RTC_GPIO9
AGPIO ( GPIO_USER ) , // 33 IO GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5, TOUCH8, RTC_GPIO8
AGPIO ( GPIO_USER ) , // 34 I NO PULLUP GPIO34, ADC1_CH6, RTC_GPIO4
AGPIO ( GPIO_USER ) , // 35 I NO PULLUP GPIO35, ADC1_CH7, RTC_GPIO5
AGPIO ( GPIO_USER ) , // 36 I NO PULLUP GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0
0 , // 37 NO PULLUP
0 , // 38 NO PULLUP
AGPIO ( GPIO_USER ) , // 39 I NO PULLUP GPIO39, SENSOR_VN, ADC1_CH3, ADC_H, RTC_GPIO3
0 // Flag
} ,
2021-01-27 13:45:42 +00:00
2020-12-28 17:01:02 +00:00
# ifdef USE_WEBCAM
{ // ESP32_CAM_AITHINKER - Any ESP32 device with webcam (ESP32)
AGPIO ( GPIO_WEBCAM_XCLK ) , // 0 (I)O GPIO0, CAM_XCLK
AGPIO ( GPIO_USER ) , // 1 IO TXD0 GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
AGPIO ( GPIO_USER ) , // 2 IO GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0
AGPIO ( GPIO_USER ) , // 3 IO RXD0 GPIO3, U0RXD, CLK_OUT2
AGPIO ( GPIO_USER ) , // 4 IO GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER
AGPIO ( GPIO_WEBCAM_DATA ) , // 5 IO GPIO5, CAM_DATA1
// 6 IO GPIO6, Flash CLK
// 7 IO GPIO7, Flash D0
// 8 IO GPIO8, Flash D1
AGPIO ( GPIO_USER ) , // 9 IO GPIO9, Flash D2, U1RXD
AGPIO ( GPIO_USER ) , // 10 IO GPIO10, Flash D3, U1TXD
// 11 IO GPIO11, Flash CMD
AGPIO ( GPIO_USER ) , // 12 (I)O GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3 (If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is connected and pulled high. See ESP32 datasheet for more details.)
AGPIO ( GPIO_USER ) , // 13 IO GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER
AGPIO ( GPIO_USER ) , // 14 IO GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
AGPIO ( GPIO_USER ) , // 15 (I)O GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3 (If driven Low, silences boot messages from normal boot. Has internal pull-up, so unconnected = High = normal output.)
AGPIO ( GPIO_USER ) , // 16 IO GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
AGPIO ( GPIO_USER ) , // 17 IO GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
AGPIO ( GPIO_WEBCAM_DATA ) + 1 , // 18 IO GPIO18, CAM_DATA2
AGPIO ( GPIO_WEBCAM_DATA ) + 2 , // 19 IO GPIO19, CAM_DATA3
0 , // 20
AGPIO ( GPIO_WEBCAM_DATA ) + 3 , // 21 IO GPIO21, CAM_DATA4
AGPIO ( GPIO_WEBCAM_PCLK ) , // 22 IO LED GPIO22, CAM_PCLK
AGPIO ( GPIO_WEBCAM_HREF ) , // 23 IO GPIO23, CAM_HREF
0 , // 24
AGPIO ( GPIO_WEBCAM_VSYNC ) , // 25 IO GPIO25, CAM_VSYNC
AGPIO ( GPIO_WEBCAM_SIOD ) , // 26 IO GPIO26, CAM_SIOD
AGPIO ( GPIO_WEBCAM_SIOC ) , // 27 IO GPIO27, CAM_SIOC
0 , // 28
0 , // 29
0 , // 30
0 , // 31
AGPIO ( GPIO_WEBCAM_PWDN ) , // 32 IO GPIO32, CAM_PWDN
AGPIO ( GPIO_USER ) , // 33 IO GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5, TOUCH8, RTC_GPIO8
AGPIO ( GPIO_WEBCAM_DATA ) + 6 , // 34 I NO PULLUP GPIO34, CAM_DATA7
AGPIO ( GPIO_WEBCAM_DATA ) + 7 , // 35 I NO PULLUP GPIO35, CAM_DATA8
AGPIO ( GPIO_WEBCAM_DATA ) + 4 , // 36 I NO PULLUP GPIO36, CAM_DATA5
0 , // 37 NO PULLUP
0 , // 38 NO PULLUP
AGPIO ( GPIO_WEBCAM_DATA ) + 5 , // 39 I NO PULLUP GPIO39, CAM_DATA6
0 // Flag
2020-12-29 11:06:47 +00:00
} ,
2020-12-28 17:01:02 +00:00
# endif // USE_WEBCAM
2021-01-27 13:45:42 +00:00
2020-12-29 11:06:47 +00:00
# ifdef USE_ODROID_GO
{ // ODROID_GO - (ESP32)
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_KEY1 ) , // 0 (I)O GPIO0, BTN-VOLUME
AGPIO ( GPIO_TXD ) , // 1 IO TXD0 GPIO1, TXD0
AGPIO ( GPIO_LEDLNK ) , // 2 IO GPIO2, STATUS LED
AGPIO ( GPIO_RXD ) , // 3 IO RXD0 GPIO3, RXD0
2020-12-29 11:06:47 +00:00
AGPIO ( GPIO_USER ) , // 4 IO GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_ILI9341_CS ) , // 5 IO GPIO5, VSPI_CS0_LCD
2020-12-29 11:06:47 +00:00
// 6 IO GPIO6, Flash CLK
// 7 IO GPIO7, Flash D0
// 8 IO GPIO8, Flash D1
2020-12-29 16:42:53 +00:00
0 , // 9 IO GPIO9, Flash D2, U1RXD
0 , // 10 IO GPIO10, Flash D3, U1TXD
2020-12-29 11:06:47 +00:00
// 11 IO GPIO11, Flash CMD
AGPIO ( GPIO_USER ) , // 12 (I)O GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3 (If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is connected and pulled high. See ESP32 datasheet for more details.)
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_KEY1 ) + 1 , // 13 IO GPIO13, BTN-MENU
AGPIO ( GPIO_PWM1 ) , // 14 IO GPIO14, LCD Backlight
2020-12-29 11:06:47 +00:00
AGPIO ( GPIO_USER ) , // 15 (I)O GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3 (If driven Low, silences boot messages from normal boot. Has internal pull-up, so unconnected = High = normal output.)
AGPIO ( GPIO_USER ) , // 16 IO GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
AGPIO ( GPIO_USER ) , // 17 IO GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_SPI_CLK ) , // 18 IO GPIO18, VSPI_CLK
AGPIO ( GPIO_SPI_MISO ) , // 19 IO GPIO19, VSPI_MISO
2020-12-29 11:06:47 +00:00
0 , // 20
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_ILI9341_DC ) , // 21 IO GPIO21, SPI_DC_LCD
2021-01-06 09:08:01 +00:00
AGPIO ( GPIO_SDCARD_CS ) , // 22 IO LED GPIO22, VSPI_CS1_TFLASH
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_SPI_MOSI ) , // 23 IO GPIO23, VSPI_MOSI
2020-12-29 11:06:47 +00:00
0 , // 24
2020-12-29 16:42:53 +00:00
0 , // 25 IO GPIO25, DAC_1 (PAM8304A)
0 , // 26 IO GPIO26, DAC_2 (PAM8304A)
AGPIO ( GPIO_KEY1 ) + 2 , // 27 IO GPIO27, BTN-SELECT
2020-12-29 11:06:47 +00:00
0 , // 28
0 , // 29
0 , // 30
0 , // 31
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_SWT1 ) + 4 , // 32 IO GPIO32, BTN-A
AGPIO ( GPIO_SWT1 ) + 5 , // 33 IO GPIO33, BTN-B
AGPIO ( GPIO_ADC_JOY ) , // 34 I NO PULLUP GPIO34, JOY-X (LEFT-RIGHT)
AGPIO ( GPIO_ADC_JOY ) + 1 , // 35 I NO PULLUP GPIO35, JOY-Y (UP-DOWN)
AGPIO ( GPIO_ADC_RANGE ) + 2 , // 36 I NO PULLUP GPIO36, SENSOR_VP (BATTERY CARGER)
2020-12-29 11:06:47 +00:00
0 , // 37 NO PULLUP
0 , // 38 NO PULLUP
2020-12-29 16:42:53 +00:00
AGPIO ( GPIO_KEY1 ) + 3 , // 39 I NO PULLUP GPIO39, BTN-START
2020-12-29 11:06:47 +00:00
0 // Flag
} ,
# endif // USE_ODROID_GO
2021-01-27 13:45:42 +00:00
# ifdef USE_ESP32_SOLO
// { // ESP32 Solo (ESP32) - To be defined
// },
# endif // USE_ESP32_SOLO
2021-01-27 13:27:05 +00:00
# ifdef USE_WT32_ETH01
{ // WT32_ETH01 - (ESP32)
0 , // 0 (I)O GPIO0, Ethernet EMAC_REF_CLK
AGPIO ( GPIO_USER ) , // 1 IO TXD0 GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
AGPIO ( GPIO_USER ) , // 2 IO GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0
AGPIO ( GPIO_USER ) , // 3 IO RXD0 GPIO3, U0RXD, CLK_OUT2
AGPIO ( GPIO_USER ) , // 4 IO GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER
AGPIO ( GPIO_USER ) , // 5 IO GPIO5, RXD Led green
// 6 IO GPIO6, Flash CLK
// 7 IO GPIO7, Flash D0
// 8 IO GPIO8, Flash D1
0 , // 9 IO GPIO9, Flash D2, U1RXD
0 , // 10 IO GPIO10, Flash D3, U1TXD
// 11 IO GPIO11, Flash CMD
AGPIO ( GPIO_USER ) , // 12 (I)O GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3 (If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is connected and pulled high. See ESP32 datasheet for more details.)
0 , // 13 IO GPIO13, Ethernet EMAC_RX_ER
AGPIO ( GPIO_USER ) , // 14 IO GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
AGPIO ( GPIO_USER ) , // 15 (I)O GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3 (If driven Low, silences boot messages from normal boot. Has internal pull-up, so unconnected = High = normal output.)
AGPIO ( GPIO_OUTPUT_HI ) , // 16 IO GPIO16, Ethernet OSC_ENA
AGPIO ( GPIO_LEDLNK_INV ) , // 17 IO GPIO17, Network link led (green)
AGPIO ( GPIO_ETH_PHY_MDIO ) , // 18 IO GPIO18, Ethernet MDIO
0 , // 19 IO GPIO19, Ethernet TXD0
0 , // 20
0 , // 21 IO GPIO21, Ethernet EMAC_TX_EN
0 , // 22 IO LED GPIO22, Ethernet EMAC_TXD1
AGPIO ( GPIO_ETH_PHY_MDC ) , // 23 IO GPIO23, Ethernet MDC
0 , // 24
0 , // 25 IO GPIO25, Ethernet EMAC_RXD0
0 , // 26 IO GPIO26, Ethernet EMAC_RXD1
0 , // 27 IO GPIO27, Ethernet EMAC_RX_DV
0 , // 28
0 , // 29
0 , // 30
0 , // 31
AGPIO ( GPIO_USER ) , // 32 IO GPIO32, CFG
AGPIO ( GPIO_USER ) , // 33 IO GPIO33, 485_EN
0 , // 34 I NO PULLUP GPIO34, ADC1_CH6, RTC_GPIO4
AGPIO ( GPIO_USER ) , // 35 I NO PULLUP GPIO35, ADC1_CH7, RTC_GPIO5
AGPIO ( GPIO_USER ) , // 36 I NO PULLUP GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0
0 , // 37 NO PULLUP
0 , // 38 NO PULLUP
AGPIO ( GPIO_USER ) , // 39 I NO PULLUP GPIO39, SENSOR_VN, ADC1_CH3, ADC_H, RTC_GPIO3
0 // Flag
} ,
# endif // USE_WT32_ETH01
2021-01-27 13:45:42 +00:00
# ifdef USE_TTGO_WATCH
// { // TTGO Watch (ESP32) - To be defined
// },
# endif // USE_TTGO_WATCH
2020-12-28 17:01:02 +00:00
# ifdef USE_M5STACK_CORE2
2020-12-29 10:07:35 +00:00
{ // M5STACK CORE2 - (ESP32)
2020-12-28 17:01:02 +00:00
AGPIO ( GPIO_USER ) , // 0 (I)O GPIO0, SPKR_LRCK
AGPIO ( GPIO_USER ) , // 1 IO TXD0 GPIO1, U0TXD
AGPIO ( GPIO_USER ) , // 2 IO GPIO2, SPKR_DATA
AGPIO ( GPIO_USER ) , // 3 IO RXD0 GPIO3, U0RXD
2021-01-09 07:50:56 +00:00
AGPIO ( GPIO_SDCARD_CS ) , // 4 IO GPIO4, SPI_CS_CARD
2020-12-28 17:01:02 +00:00
0 , // 5 IO GPIO5, SPI_CS_LCD
// 6 IO GPIO6, Flash CLK
// 7 IO GPIO7, Flash D0
// 8 IO GPIO8, Flash D1
0 , // 9 IO GPIO9, Flash D2, PSRAM_D3
0 , // 10 IO GPIO10, Flash D3, PSRAM_D2
// 11 IO GPIO11, Flash CMD
0 , // 12 (I)O GPIO12, SPKR_CLK
AGPIO ( GPIO_USER ) , // 13 IO GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER
AGPIO ( GPIO_USER ) , // 14 IO GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
0 , // 15 (I)O GPIO15, SPI_DC_LCD
0 , // 16 IO GPIO16, PSRAM_CS
0 , // 17 IO GPIO17, PSRAM_CLK
AGPIO ( GPIO_SPI_CLK ) , // 18 IO GPIO18, SPI_CLK
AGPIO ( GPIO_USER ) , // 19 IO GPIO19, VSPIQ, U0CTS, EMAC_TXD0
0 , // 20
0 , // 21 IO GPIO21, I2C_SDA_INTERNAL
0 , // 22 IO LED GPIO22, I2C_SCL_INTERNAL
AGPIO ( GPIO_SPI_MOSI ) , // 23 IO GPIO23, SPI_MOSI
0 , // 24
AGPIO ( GPIO_USER ) , // 25 IO GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0
AGPIO ( GPIO_USER ) , // 26 IO GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1
AGPIO ( GPIO_USER ) , // 27 IO GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV
0 , // 28
0 , // 29
0 , // 30
0 , // 31
AGPIO ( GPIO_I2C_SDA ) , // 32 IO GPIO32, I2C_SDA
AGPIO ( GPIO_I2C_SCL ) , // 33 IO GPIO33, I2C_SCL
AGPIO ( GPIO_USER ) , // 34 I NO PULLUP GPIO34, ADC1_CH6, RTC_GPIO4
AGPIO ( GPIO_USER ) , // 35 I NO PULLUP GPIO35, ADC1_CH7, RTC_GPIO5
AGPIO ( GPIO_USER ) , // 36 I NO PULLUP GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0
0 , // 37 NO PULLUP
AGPIO ( GPIO_SPI_MISO ) , // 38 NO PULLUP GPIO38, SPI_MISO
0 , // 39 I NO PULLUP GPIO39, INT_TOUCHPAD
0 // Flag
}
# endif // USE_M5STACK_CORE2
2020-09-25 17:15:31 +01:00
} ;
/*********************************************************************************************\
Known templates
{ " NAME " : " AITHINKER CAM " , " GPIO " : [ 4992 , 1 , 1 , 1 , 1 , 5088 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 5089 , 5090 , 0 , 5091 , 5184 , 5152 , 0 , 5120 , 5024 , 5056 , 0 , 0 , 0 , 0 , 4928 , 1 , 5094 , 5095 , 5092 , 0 , 0 , 5093 ] , " FLAG " : 0 , " BASE " : 1 }
{ " NAME " : " Olimex ESP32-PoE " , " GPIO " : [ 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 5536 , 1 , 1 , 1 , 1 , 0 , 5600 , 0 , 0 , 0 , 0 , 5568 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 ] , " FLAG " : 0 , " BASE " : 1 }
{ " NAME " : " wESP32 " , " GPIO " : [ 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 5568 , 5600 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 ] , " FLAG " : 0 , " BASE " : 1 }
{ " NAME " : " Denky (Teleinfo) " , " GPIO " : [ 1 , 1 , 1 , 1 , 5664 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 1 , 0 , 1376 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 5632 , 1 , 1 , 1 , 0 , 0 , 1 ] , " FLAG " : 0 , " BASE " : 1 }
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2020-04-10 17:24:08 +01:00
# endif // ESP32
2019-10-27 11:04:08 +00:00
# endif // _TASMOTA_TEMPLATE_H_