diff --git a/User_config.h b/User_config.h index c082ca3..f367967 100644 --- a/User_config.h +++ b/User_config.h @@ -107,7 +107,7 @@ RF supported protocols #define pubIRunknownPrtcl false // key to avoid mqtt publication of unknown IR protocol (set to true if you want to publish unknown protocol) #ifdef ESP8266 //IR supported protocols on ESP8266, all supported per default - #define IR_Raw + #define IR_GC #define IR_COOLIX #define IR_Whynter #define IR_LG @@ -117,7 +117,6 @@ RF supported protocols #define IR_Sharp #define IR_SAMSUNG #else //IR supported protocols on arduino uncomment if you want to send with this protocol, NEC protocol is available per default - //#define IR_Raw //#define IR_COOLIX //#define IR_Whynter //#define IR_LG @@ -125,7 +124,7 @@ RF supported protocols //#define IR_DISH //#define IR_RC5 //#define IR_Sharp - #define IR_SAMSUNG + //#define IR_SAMSUNG #endif /*----------------------BT topics-------------------------*/ @@ -145,8 +144,8 @@ RF supported protocols //IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote/IRremoteInt.h so as to free pin D3 for RF RECEIVER PIN //RF PIN definition #define RF_RECEIVER_PIN 1 // 1 = D3 on arduino - #define BT_RX 10 - #define BT_TX 11 + #define BT_RX 5 + #define BT_TX 6 #endif //RF number of signal repetition #define RF_EMITTER_REPEAT 20 diff --git a/ZgatewayBT.ino b/ZgatewayBT.ino index b49797f..c2f9c02 100644 --- a/ZgatewayBT.ino +++ b/ZgatewayBT.ino @@ -19,6 +19,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Thanks to wolass https://github.com/wolass for suggesting me HM 10 and dinosd https://github.com/dinosd/BLE_PROXIMITY for inspiring me how to implement the gateway */ #ifdef ZgatewayBT #include @@ -26,6 +28,7 @@ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT #define STRING_MSG "OK+DISC:" #define QUESTION_MSG "AT+DISI?" #define RESPONSE_MSG "OK+DISIS" +#define SETUP_MSG "OK+RESET" #define TimeBtw_Read 10000 SoftwareSerial softserial(BT_RX, BT_TX); @@ -56,9 +59,9 @@ boolean BTtoMQTT() { for (int i=0;i=0) + { + trc(F("Connection OK to HM-10")); + } } if (millis() > (time1 + TimeBtw_Read)) {//retriving value of adresses and rssi time1 = millis(); diff --git a/img/OpenMQTTGateway_Arduino_IR_RF_BT.png b/img/OpenMQTTGateway_Arduino_IR_RF_BT.png new file mode 100644 index 0000000..a6ae43e Binary files /dev/null and b/img/OpenMQTTGateway_Arduino_IR_RF_BT.png differ