Add pilight repeater function
#369 set #define repeatPilightwMQTT true into config_RF.h to activate it
This commit is contained in:
1 parent
e1c9e0fcef
commit
1206877fd9
2 files changed
+10
-4
No files matched your search
+7
-2
@@ -5,10 +5,11 @@
|
|||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
- publish MQTT data to a different topic related to received 433Mhz signal using ESPiLight
|
- receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data based on ESPilight library
|
||||||
|
- publish MQTT data to a different topic related to received 433Mhz signal based on ESPilight library
|
||||||
|
|
||||||
Copyright: (c)Florian ROBERT
|
Copyright: (c)Florian ROBERT
|
||||||
Copyright: (c)Randy Simons http://randysimons.nl/
|
Pilight Gateway made by steadramon, improvments with the help of puuu
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
@@ -58,6 +59,10 @@ void pilightCallback(const String &protocol, const String &message, int status,
|
|||||||
RFPiLightdata.set("repeats", (int)repeats);
|
RFPiLightdata.set("repeats", (int)repeats);
|
||||||
RFPiLightdata.set("status", (int)status);
|
RFPiLightdata.set("status", (int)status);
|
||||||
pub(subjectPilighttoMQTT,RFPiLightdata);
|
pub(subjectPilighttoMQTT,RFPiLightdata);
|
||||||
|
if (repeatPilightwMQTT){
|
||||||
|
trc(F("Pub Pilight for rpt"));
|
||||||
|
pub(subjectMQTTtoPilight,RFPiLightdata);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -65,11 +65,12 @@ RF supported protocols
|
|||||||
#define subjectPilighttoMQTT Base_Topic Gateway_Name "/PilighttoMQTT"
|
#define subjectPilighttoMQTT Base_Topic Gateway_Name "/PilighttoMQTT"
|
||||||
#define subjectGTWPilighttoMQTT Base_Topic Gateway_Name "/PilighttoMQTT"
|
#define subjectGTWPilighttoMQTT Base_Topic Gateway_Name "/PilighttoMQTT"
|
||||||
#define PilightRAW "RAW"
|
#define PilightRAW "RAW"
|
||||||
|
#define repeatPilightwMQTT false // do we repeat a received signal by using mqtt with Pilight gateway
|
||||||
|
|
||||||
/*-------------------PIN DEFINITIONS----------------------*/
|
/*-------------------PIN DEFINITIONS----------------------*/
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define RF_RECEIVER_PIN 0 // D3 on nodemcu
|
#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)
|
#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
|
#elif ESP32
|
||||||
#define RF_RECEIVER_PIN 27 // D27 on DOIT ESP32
|
#define RF_RECEIVER_PIN 27 // D27 on DOIT ESP32
|
||||||
#define RF_EMITTER_PIN 12 // D12 on DOIT ESP32
|
#define RF_EMITTER_PIN 12 // D12 on DOIT ESP32
|
||||||
|
|||||||
Reference in new issue
Block a user