mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
support for hm17 (v110) and hm10 (V609)
This commit is contained in:
parent
df944ed058
commit
858103e082
@ -27,7 +27,11 @@
|
|||||||
|
|
||||||
#define HM17_BAUDRATE 9600
|
#define HM17_BAUDRATE 9600
|
||||||
|
|
||||||
//#define IBEACON_DEBUG
|
#define IBEACON_DEBUG
|
||||||
|
|
||||||
|
// use this for Version 110
|
||||||
|
#define HM17_V110
|
||||||
|
|
||||||
|
|
||||||
// keyfob expires after N seconds
|
// keyfob expires after N seconds
|
||||||
#define IB_TIMEOUT_INTERVAL 30
|
#define IB_TIMEOUT_INTERVAL 30
|
||||||
@ -322,6 +326,14 @@ void hm17_decode(void) {
|
|||||||
hm17_result=1;
|
hm17_result=1;
|
||||||
#ifdef IBEACON_DEBUG
|
#ifdef IBEACON_DEBUG
|
||||||
if (hm17_debug) AddLog_P2(LOG_LEVEL_INFO, PSTR("DISCS OK"));
|
if (hm17_debug) AddLog_P2(LOG_LEVEL_INFO, PSTR("DISCS OK"));
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!strncmp(hm17_sbuffer,"OK+DISIS",8)) {
|
||||||
|
hm17_sbclr();
|
||||||
|
hm17_result=1;
|
||||||
|
#ifdef IBEACON_DEBUG
|
||||||
|
if (hm17_debug) AddLog_P2(LOG_LEVEL_INFO, PSTR("DISIS OK"));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -348,19 +360,26 @@ void hm17_decode(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!strncmp(hm17_sbuffer,"OK+DIS0:",8)) {
|
if (!strncmp(hm17_sbuffer,"OK+DIS0:",8)) {
|
||||||
if (hm17_sindex==20) {
|
if (hm17_cmd==HM17_DISI) {
|
||||||
hm17_result=HM17_SUCESS;
|
#ifdef HM17_V110
|
||||||
#ifdef IBEACON_DEBUG
|
goto hm17_v110;
|
||||||
if (hm17_debug) {
|
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR("DIS0 OK"));
|
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR(">>%s"),&hm17_sbuffer[8]);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
hm17_sbclr();
|
} else {
|
||||||
|
if (hm17_sindex==20) {
|
||||||
|
hm17_result=HM17_SUCESS;
|
||||||
|
#ifdef IBEACON_DEBUG
|
||||||
|
if (hm17_debug) {
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR("DIS0 OK"));
|
||||||
|
AddLog_P2(LOG_LEVEL_INFO, PSTR(">>%s"),&hm17_sbuffer[8]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
hm17_sbclr();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!strncmp(hm17_sbuffer,"OK+DISC:",8)) {
|
if (!strncmp(hm17_sbuffer,"OK+DISC:",8)) {
|
||||||
|
hm17_v110:
|
||||||
if (hm17_cmd==HM17_DISI) {
|
if (hm17_cmd==HM17_DISI) {
|
||||||
if (hm17_sindex==78) {
|
if (hm17_sindex==78) {
|
||||||
#ifdef IBEACON_DEBUG
|
#ifdef IBEACON_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user