diff --git a/src/httpserver/new_http.c b/src/httpserver/new_http.c index e776d1c39..3f23d8c51 100644 --- a/src/httpserver/new_http.c +++ b/src/httpserver/new_http.c @@ -306,8 +306,9 @@ template_t g_templates [] = { { Setup_Device_CalexLEDDimmerFiveChannel, "Calex RGBWW LED Dimmer Five Channel PWM BK7231S"}, { Setup_Device_CalexPowerStrip_900018_1v1_0UK, "Calex UK power strip 900018.1 v1.0 UK"}, { Setup_Device_ArlecCCTDownlight, "Arlec CCT LED Downlight ALD029CHA"}, - { Setup_Device_NedisWIFIPO120FWT_16A, "Nedis WIFIPO120FWT 16A"}, - { Setup_Device_NedisWIFIP130FWT_10A, "Nedis WIFIP130FWT 10A"} + { Setup_Device_NedisWIFIPO120FWT_16A, "Nedis WIFIPO120FWT SmartPlug 16A"}, + { Setup_Device_NedisWIFIP130FWT_10A, "Nedis WIFIP130FWT SmartPlug 10A"}, + { Setup_Device_Device_EmaxHome_EDU8774, "Emax Home EDU8774 SmartPlug 16A"} }; diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index 1b6242b78..05cf702ad 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -175,16 +175,16 @@ void Setup_Device_NedisWIFIPO120FWT_16A() { // WB2S // Pins are: - // Led - PWM0 - // BL0937 CF - PWM1 - // BL0937 CF1 - PWM2 - // Button = TX1 - // BL0937 SEL - PWM4 - // Relay = PWM5 + // Led PWM0 - P6 + // BL0937-CF PWM1 - P7 + // BL0937-CF1 PWM2 - P8 + // Button RX1 - P10 + // BL0937-SEL PWM4 - P24 + // Relay PWM5 - P26 PIN_ClearPins(); - // Button stat + // LEd PIN_SetPinRoleForPinIndex(6, IOR_LED); PIN_SetPinChannelForPinIndex(6, 1); // Button @@ -203,13 +203,13 @@ void Setup_Device_NedisWIFIP130FWT_10A() { // WB2S // Pins are: - // Led - PWM0 - // Button = TX1 - // Relay = PWM5 + // Led PWM0 - P6 + // Button RX1 - P10 + // Relay PWM5 - P26 PIN_ClearPins(); - // Button stat + // Led PIN_SetPinRoleForPinIndex(6, IOR_LED); PIN_SetPinChannelForPinIndex(6, 1); // Button @@ -219,5 +219,33 @@ void Setup_Device_NedisWIFIP130FWT_10A() { PIN_SetPinRoleForPinIndex(26, IOR_Relay); PIN_SetPinChannelForPinIndex(26, 1); + PIN_SaveToFlash(); +} + +// https://www.elektroda.pl/rtvforum/topic3804553.html +// SmartSwitch Emax Home EDU8774 16A +void Setup_Device_EmaxHome_EDU8774() { + + // WB2S + // Pins are: + // BL0937-CF PWM0 - P6 + // BL0937-CF1 PWM1 - P7 + // BL0937-SEL PWM2 - P8 + // Button RX1 - P10 + // Relay PWM4 - P24 + // Led PWM5 - P26 + + + PIN_ClearPins(); + // Button + PIN_SetPinRoleForPinIndex(6, IOR_Button); + PIN_SetPinChannelForPinIndex(10, 1); + // Relay + PIN_SetPinRoleForPinIndex(10, IOR_Relay); + PIN_SetPinChannelForPinIndex(24, 1); + // Led + PIN_SetPinRoleForPinIndex(26, IOR_LED); + PIN_SetPinChannelForPinIndex(26, 1); + PIN_SaveToFlash(); } \ No newline at end of file diff --git a/src/new_pins.h b/src/new_pins.h index edcc1548d..a0f8f7d74 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -63,6 +63,7 @@ void Setup_Device_CalexPowerStrip_900018_1v1_0UK(); void Setup_Device_ArlecCCTDownlight(); void Setup_Device_NedisWIFIPO120FWT_16A(); void Setup_Device_NedisWIFIP130FWT_10A(); +void Setup_Device_Device_EmaxHome_EDU8774(); #endif