Zgateway rf2 (#94)
* some minor correction after coadcy checks * Put serial communication speed as a parameter in user_config.h * complete gateway file receiving ok sending ko #32 * add rfm69 to CI * change receiver key and minor improvments #32 now ok on receiving and sending with RFM69 * add schema and tested pinout for RFM69/RF/IR wiring #32 * RFM69 library add * Implement newremoteswitchlibrary for KlikAanKlikUit / ClickOnClickOff protocol #3 * add dependency for CI and link to the library * compilation error for arduino correction * Sketch size decrease * remove nano from CI
This commit is contained in:
1 parent
ba51e340d2
commit
f8ede4aa94
8 files changed
+199
-43
No files matched your search
+5
-5
@@ -53,7 +53,7 @@ boolean IRtoMQTT(){
|
||||
decode_results results;
|
||||
|
||||
if (irrecv.decode(&results)){
|
||||
trc(F("Receiving IR"));
|
||||
trc(F("Rcv. IR"));
|
||||
unsigned long MQTTvalue = 0;
|
||||
String MQTTprotocol;
|
||||
String MQTTbits;
|
||||
@@ -69,7 +69,7 @@ boolean IRtoMQTT(){
|
||||
trc(rawCode);
|
||||
irrecv.resume(); // Receive the next value
|
||||
if (pubIRunknownPrtcl == false && MQTTprotocol == "-1"){ // don't publish unknown IR protocol
|
||||
trc(F("---no publish unknown protocol---"));
|
||||
trc(F("--no pub. unknown protocol--"));
|
||||
} else if (!isAduplicate(MQTTvalue) && MQTTvalue!=0) {// conditions to avoid duplications of RF -->MQTT
|
||||
trc(F("Adv data IRtoMQTT"));
|
||||
client.publish(subjectIRtoMQTTprotocol,(char *)MQTTprotocol.c_str());
|
||||
@@ -80,7 +80,7 @@ boolean IRtoMQTT(){
|
||||
trc(value);
|
||||
boolean result = client.publish(subjectIRtoMQTT,(char *)value.c_str());
|
||||
if (repeatIRwMQTT){
|
||||
trc(F("Publishing IR for repeat"));
|
||||
trc(F("Pub. IR for repeat"));
|
||||
client.publish(subjectMQTTtoIR,(char *)value.c_str());
|
||||
}
|
||||
return result;
|
||||
@@ -163,7 +163,7 @@ void MQTTtoIR(char * topicOri, char * datacallback) {
|
||||
if (pos != -1){
|
||||
pos = pos + +strlen(IRbitsKey);
|
||||
valueBITS = (topic.substring(pos,pos + 2)).toInt();
|
||||
trc(F("Bits number:"));
|
||||
trc(F("Bits nb:"));
|
||||
trc(String(valueBITS));
|
||||
}
|
||||
//We look into the subject to see if a special repeat number is defined
|
||||
@@ -256,7 +256,7 @@ void MQTTtoIR(char * topicOri, char * datacallback) {
|
||||
if (signalSent){ // we acknowledge the sending by publishing the value to an acknowledgement topic, for the moment even if it is a signal repetition we acknowledge also
|
||||
boolean result = client.publish(subjectGTWIRtoMQTT, datacallback);
|
||||
if (result){
|
||||
trc(F("MQTTtoIR OK ack published"));
|
||||
trc(F("MQTTtoIR ack pub."));
|
||||
};
|
||||
}
|
||||
irrecv.enableIRIn(); // ReStart the IR receiver (if not restarted it is not able to receive data)
|
||||
|
||||
Reference in new issue
Block a user