Rf receive only (#701)
* Disable RF transmit * Added definition example (commented out) Co-authored-by: Jonathan Michael Wells <jonathan-wells@oist.jp>
This commit is contained in:
1 parent
6e9b170c00
commit
40152d6a02
3 files changed
+11
No files matched your search
@@ -15,6 +15,12 @@ Generate your RF signals by pressing a remote button or other and you should see
|
|||||||
|
|
||||||
`home/OpenMQTTGateway/433toMQTT {"value":1315156,"protocol":1,"length":24,"delay":317}`
|
`home/OpenMQTTGateway/433toMQTT {"value":1315156,"protocol":1,"length":24,"delay":317}`
|
||||||
|
|
||||||
|
### Disabling Transmit function to safe a PIN
|
||||||
|
|
||||||
|
To disable transmit functions to allow the use of another pin, add the following to the config_rf.h file :
|
||||||
|
|
||||||
|
`#define RF_DISABLE_TRANSMIT`
|
||||||
|
|
||||||
### Send data by MQTT to convert it on RF signal
|
### Send data by MQTT to convert it on RF signal
|
||||||
|
|
||||||
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTto433" -m '{"value":1315156}'`
|
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTto433" -m '{"value":1315156}'`
|
||||||
|
|||||||
@@ -63,7 +63,11 @@ void setupRF() {
|
|||||||
ELECHOUSE_cc1101.setMHZ(CC1101_FREQUENCY);
|
ELECHOUSE_cc1101.setMHZ(CC1101_FREQUENCY);
|
||||||
ELECHOUSE_cc1101.SetRx(CC1101_FREQUENCY);
|
ELECHOUSE_cc1101.SetRx(CC1101_FREQUENCY);
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef RF_DISABLE_TRANSMIT
|
||||||
|
mySwitch.disableTransmit();
|
||||||
|
# else
|
||||||
mySwitch.enableTransmit(RF_EMITTER_GPIO);
|
mySwitch.enableTransmit(RF_EMITTER_GPIO);
|
||||||
|
# endif
|
||||||
mySwitch.setRepeatTransmit(RF_EMITTER_REPEAT);
|
mySwitch.setRepeatTransmit(RF_EMITTER_REPEAT);
|
||||||
mySwitch.enableReceive(RF_RECEIVER_GPIO);
|
mySwitch.enableReceive(RF_RECEIVER_GPIO);
|
||||||
Log.trace(F("ZgatewayRF setup done" CR));
|
Log.trace(F("ZgatewayRF setup done" CR));
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ extern void MQTTtoPilight(char* topicOri, JsonObject& RFdata);
|
|||||||
#define subjectMultiGTWRF "+/+/433toMQTT"
|
#define subjectMultiGTWRF "+/+/433toMQTT"
|
||||||
//RF number of signal repetition - Can be overridden by specifying "repeat" in a JSON message.
|
//RF number of signal repetition - Can be overridden by specifying "repeat" in a JSON message.
|
||||||
#define RF_EMITTER_REPEAT 20
|
#define RF_EMITTER_REPEAT 20
|
||||||
|
//#define RF_DISABLE_TRANSMIT //Uncomment this line to disable RF transmissions. (RF Receive will work as normal.)
|
||||||
|
|
||||||
/*-------------------RF2 topics & parameters----------------------*/
|
/*-------------------RF2 topics & parameters----------------------*/
|
||||||
//433Mhz newremoteswitch MQTT Subjects and keys
|
//433Mhz newremoteswitch MQTT Subjects and keys
|
||||||
|
|||||||
Reference in new issue
Block a user