Add of SONOFF RFR3 environment

Relay ok
Button press ok
RF reception 433toMQTT ok
To have the RF reception you need to connect D0 of SYN470 to GPIO4 of ESP8285. Instruction to follow. Do not do that if you are not confortable with soldering and don't have an electrical background.
This commit is contained in:
1technophile committed 2019-08-08 21:27:34 +02:00
1 parent 8f91441c19
commit ca7d5d4195
4 files changed
+58 -25

No files matched your search

+7 -5
View File
@@ -34,10 +34,12 @@ extern void GPIOInputtoMQTT();
#define GPIOInputDebounceDelay 60 //debounce time, increase if there are issues
/*-------------------PIN DEFINITIONS----------------------*/
#if defined(ESP8266) || defined(ESP32)
#define GPIOInput_PIN 14
#else
#define GPIOInput_PIN 7
#ifndef GPIOInput_PIN
#if defined(ESP8266) || defined(ESP32)
#define GPIOInput_PIN 14
#else
#define GPIOInput_PIN 7
#endif
#endif
#endif
#endif
+8 -6
View File
@@ -35,12 +35,14 @@ extern void MQTTtoONOFF(char * topicOri, JsonObject& RFdata);
#define subjectGTWONOFFtoMQTT Base_Topic Gateway_Name "/ONOFFtoMQTT"
/*-------------------PIN DEFINITIONS----------------------*/
#ifdef ESP8266
#define ACTUATOR_ONOFF_PIN 15 //12 for sonoff basic relay
#elif ESP32
#define ACTUATOR_ONOFF_PIN 15
#else
#define ACTUATOR_ONOFF_PIN 13
#ifndef ACTUATOR_ONOFF_PIN
#ifdef ESP8266
#define ACTUATOR_ONOFF_PIN 15 //12 for sonoff basic relay
#elif ESP32
#define ACTUATOR_ONOFF_PIN 15
#else
#define ACTUATOR_ONOFF_PIN 13
#endif
#endif
#endif
+24 -14
View File
@@ -91,20 +91,30 @@ RF supported protocols
#define repeatPilightwMQTT false // do we repeat a received signal by using mqtt with Pilight gateway
/*-------------------PIN DEFINITIONS----------------------*/
#ifdef ESP8266
#define RF_RECEIVER_PIN 0 // D3 on nodemcu // put 4 with rf bridge direct mod
#define RF_EMITTER_PIN 3 // RX on nodemcu if it doesn't work with 3, try with 4 (D2) // put 5 with rf bridge direct mod
#elif ESP32
#define RF_RECEIVER_PIN 27 // D27 on DOIT ESP32
#define RF_EMITTER_PIN 12 // D12 on DOIT ESP32
#elif __AVR_ATmega2560__
#define RF_RECEIVER_PIN 1 //1 = D3 on mega
#define RF_EMITTER_PIN 4
#else
//IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library <library>IRremote/boarddefs.h so as to free pin D3 for RF RECEIVER PIN
//RF PIN definition
#define RF_RECEIVER_PIN 1 //1 = D3 on arduino
#define RF_EMITTER_PIN 4 //4 = D4 on arduino
#ifndef RF_RECEIVER_PIN
#ifdef ESP8266
#define RF_RECEIVER_PIN 0 // D3 on nodemcu // put 4 with rf bridge direct mod
#elif ESP32
#define RF_RECEIVER_PIN 27 // D27 on DOIT ESP32
#elif __AVR_ATmega2560__
#define RF_RECEIVER_PIN 1 //1 = D3 on mega
#else
#define RF_RECEIVER_PIN 1 //1 = D3 on arduino
#endif
#endif
#ifndef RF_EMITTER_PIN
#ifdef ESP8266
#define RF_EMITTER_PIN 3 // RX on nodemcu if it doesn't work with 3, try with 4 (D2) // put 5 with rf bridge direct mod
#elif ESP32
#define RF_EMITTER_PIN 12 // D12 on DOIT ESP32
#elif __AVR_ATmega2560__
#define RF_EMITTER_PIN 4
#else
//IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library <library>IRremote/boarddefs.h so as to free pin D3 for RF RECEIVER PIN
//RF PIN definition
#define RF_EMITTER_PIN 4 //4 = D4 on arduino
#endif
#endif
#endif
+19
View File
@@ -22,6 +22,7 @@ extra_configs =
;you can also adapt the modules by removing the corresponding lines in the env detail ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;default_envs = sonoff-basic-rfr3
;default_envs = rfbridge
;default_envs = esp32dev-all
;default_envs = esp32dev-rf
@@ -299,6 +300,24 @@ build_flags =
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF"'
board_build.flash_mode = dout
[env:sonoff-basic-rfr3]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZactuatorONOFF="ONOFF"'
'-DZsensorGPIOInput="GPIOInput"'
'-DACTUATOR_ONOFF_PIN=12'
'-DGPIOInput_PIN=0'
'-DRF_RECEIVER_PIN=4'
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_SONOFF_BASIC_RFR3"'
board_build.flash_mode = dout
[env:atmega-all]
platform = ${com.atmelavr_platform}
board = megaatmega2560